From 4739b9e4a6dbfd64f407737a80d6d132f926ccad Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 00:28:36 -0500 Subject: [PATCH 01/50] Starting TS rewrite + API types --- .gitignore | 4 + package/.npmignore | 4 +- package/examples/discord_bot.js | 6 +- package/examples/download_crosshair.js | 6 +- package/package.json | 5 +- package/pnpm-lock.yaml | 65 ++++++ package/src/index.js | 267 +++++++--------------- package/src/index.ts | 171 ++++++++++++++ package/src/{index.d.ts => oldIndex.d.ts} | 0 package/src/types/general.ts | 16 ++ package/src/types/v2-mmr.ts | 38 +++ package/src/types/v3-matches.ts | 233 +++++++++++++++++++ package/src/util.ts | 161 +++++++++++++ package/test/test.js | 11 +- package/test/test.ts | 5 + package/tsconfig.json | 20 ++ 16 files changed, 818 insertions(+), 194 deletions(-) create mode 100644 .gitignore create mode 100644 package/pnpm-lock.yaml create mode 100644 package/src/index.ts rename package/src/{index.d.ts => oldIndex.d.ts} (100%) create mode 100644 package/src/types/general.ts create mode 100644 package/src/types/v2-mmr.ts create mode 100644 package/src/types/v3-matches.ts create mode 100644 package/src/util.ts create mode 100644 package/test/test.ts create mode 100644 package/tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91e0e20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.history/ +node_modules/ +*.js +*.js.map diff --git a/package/.npmignore b/package/.npmignore index 3a32276..403f155 100644 --- a/package/.npmignore +++ b/package/.npmignore @@ -1,2 +1,2 @@ -examples -test \ No newline at end of file +examples/**/* +test/**/* diff --git a/package/examples/discord_bot.js b/package/examples/discord_bot.js index e73d597..21ab442 100644 --- a/package/examples/discord_bot.js +++ b/package/examples/discord_bot.js @@ -1,5 +1,9 @@ +/** + * OUTDATED NEW EXAMPLES COMING SOON + */ + //Discord.js v13.8.0 -import {Client, Intents} from 'discord.js'; +import { Client, Intents } from 'discord.js'; import HenrikDevValorantAPI from 'unofficial-valorant-api'; const VAPI = new HenrikDevValorantAPI(); diff --git a/package/examples/download_crosshair.js b/package/examples/download_crosshair.js index 2b2b43c..384f3c7 100644 --- a/package/examples/download_crosshair.js +++ b/package/examples/download_crosshair.js @@ -1,5 +1,9 @@ +/** + * OUTDATED NEW EXAMPLES COMING SOON + */ + +import { writeFileSync } from 'fs'; import HenrikDevValorantAPI from 'unofficial-valorant-api'; -import {writeFileSync} from 'fs'; const VAPI = new HenrikDevValorantAPI(); async function download(crosshair_code) { const crosshair_data = await VAPI.getCrosshair({code: crosshair_code}); diff --git a/package/package.json b/package/package.json index e1ff81a..74f6c67 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "unofficial-valorant-api", - "version": "2.3.0-stable.0", + "version": "3.0.0-stable.0", "description": "Library for the Unofficial VALORANT API by api.henrikdev.xyz", "main": "./src/index.js", "dependencies": { @@ -20,5 +20,6 @@ }, "homepage": "https://github.com/Henrik-3/unofficial-valorant-api", "author": "HenrikDev", - "license": "ISC" + "license": "ISC", + "type": "module" } diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml new file mode 100644 index 0000000..4aafe11 --- /dev/null +++ b/package/pnpm-lock.yaml @@ -0,0 +1,65 @@ +lockfileVersion: 5.4 + +specifiers: + axios: ^0.27.2 + +dependencies: + axios: 0.27.2 + +packages: + + /asynckit/0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: false + + /axios/0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + dependencies: + follow-redirects: 1.15.1 + form-data: 4.0.0 + transitivePeerDependencies: + - debug + dev: false + + /combined-stream/1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: false + + /delayed-stream/1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: false + + /follow-redirects/1.15.1: + resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: false + + /form-data/4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: false + + /mime-db/1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + dev: false + + /mime-types/2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + dev: false diff --git a/package/src/index.js b/package/src/index.js index b08caeb..0eed9c0 100644 --- a/package/src/index.js +++ b/package/src/index.js @@ -1,192 +1,95 @@ -const axios = require('axios'); - -module.exports = class { +import axios from "axios"; +const baseUrl = "https://api.henrikdev.xyz/valorant"; +export default class { + token; + /** + * The main class to call API functions from + * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + */ constructor(token) { this.token = token; } - _parsebody(body) { - if (body.errors) return body.errors; + _parseBody(body) { + if (body.errors) + return body.errors; return body.status ? body.data : body; } - _parseresponse(req) { + async _fetch(url, searchParams, config = {}) { + // Format search params into `?something=like&this` + const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { + const value = searchParams[cur]; + if (value === null || value === undefined) + return acc; + return acc === "" + ? `?${cur}=${value}` + : acc + `&${cur}=${value}`; + }, "") : ""; + // Main request + const req = await axios({ + url: encodeURI(`${baseUrl}/${url}${queryParams}`), + responseType: "json", + headers: this.token + ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } + : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, + ...config + }).catch(error => error); + // Formatting response return { status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers['Content-Type'] ? this._parsebody(req.data) : req.data, - ratelimits: { - used: Number(req.response ? req.response.headers['x-ratelimit-limit'] : req.headers['x-ratelimit-limit']), - remaining: Number(req.response ? req.response.headers['x-ratelimit-remaining'] : req.headers['x-ratelimit-remaining']), - reset: Number(req.response ? req.response.headers['x-ratelimit-reset'] : req.headers['x-ratelimit-reset']), + data: req.response ? null : !req.config.headers["Content-Type"] ? this._parseBody(req.data) : req.data, + rateLimits: { + used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), + remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), + reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), }, - error: req.response ? this._parsebody(req.response.data) : null, - url: req.config.url, + error: req.response ? this._parseBody(req.response.data) : null, + url: req.config.url }; } - _validate(input) { - for (let i = 0; Object.keys(input).length > i; i++) { - if (Object.values(input)[i] == null) throw new Error(`Missing parameter: ${Object.keys(input)[i]}`); - } - } - _query(input) { - let query = new URLSearchParams(); - for (let i = 0; Object.values(input).length > i; i++) { - if (Object.values(input)[i] && Object.values(input)[i] != 'undefined') query.append(Object.keys(input)[i], Object.values(input)[i]); - } - return query.toString().length ? query : null; - } - async _fetch({url, type = 'GET', body = null, rtype = null} = {}) { - const req = await axios({ - url: url, - method: type, - data: body, - responseType: rtype ? rtype : 'json', - headers: this.token - ? { - Authorization: this.token, - 'User-Agent': 'unofficial-valorant-api/node.js/2.3.0', - } - : { - 'User-Agent': 'unofficial-valorant-api/node.js/2.3.0', - }, - }).catch(err => err); - return this._parseresponse(req); - } - - async getAccount({name, tag, force} = {}) { - this._validate({name, tag}); - const query = this._query({force}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/account/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ''}`, - }); - } - - async getAccountByPUUID({puuid, force} = {}) { - this._validate({puuid}); - const query = this._query({force}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/account/${puuid}${query ? `?${query}` : ''}`, - }); - } - - async getMMRByPUUID({version, region, puuid, filter} = {}) { - this._validate({version, region, puuid}); - const query = this._query({filter}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/by-puuid/mmr/${region}/${puuid}${query ? `?${query}` : ''}`, - }); - } - - async getMMRHistoryByPUUID({region, puuid} = {}) { - this._validate({region, puuid}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/mmr-history/${region}/${puuid}`, - }); - } - - async getMatchesByPUUID({region, puuid, filter, map, size} = {}) { - this._validate({region, puuid}); - const query = this._query({filter, map, size}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v3/by-puuid/matches/${region}/${puuid}${query ? `?${query}` : ''}`, - }); - } - - async getContent({locale} = {}) { - const query = this._query({locale}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/content${query ? `?${query}` : ''}`, - }); - } - - async getLeaderboard({version, region, start, end, name, tag, puuid, season} = {}) { - if (name && tag && puuid) - throw new Error("Too many parameters: You can't search for name/tag and puuid at the same time, please decide between name/tag and puuid"); - this._validate({version, region}); - const query = this._query({start, end, name: encodeURI(name), tag: encodeURI(tag), puuid, season}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/leaderboard/${region}${query ? `?${query}` : ''}`, - }); - } - - async getMatches({region, name, tag, filter, map, size} = {}) { - this._validate({region, name, tag}); - const query = this._query({filter, map, size}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v3/matches/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ''}`, - }); - } - - async getMatch({match_id} = {}) { - this._validate({match_id}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v2/match/${match_id}`, - }); - } - - async getMMRHistory({region, name, tag} = {}) { - this._validate({region, name, tag}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/mmr-history/${region}/${encodeURI(name)}/${encodeURI(tag)}`, - }); - } - - async getMMR({version, region, name, tag, filter} = {}) { - this._validate({version, region, name, tag}); - const query = this._query({filter}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/mmr/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ''}`, - }); - } - - async getRawData({type, value, region, queries} = {}) { - this._validate({type, value, region, queries}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/raw`, - body: {type, value, region, queries}, - type: 'POST', - }); - } - - async getStatus({region} = {}) { - this._validate({region}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/status/${region}`, - }); - } - - async getFeaturedItems({version} = {}) { - this._validate({version}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/store-featured`, - }); - } - - async getOffers() { - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/store-offers`, - }); - } - - async getVersion({region} = {}) { - this._validate({region}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/version/${region}`, - }); - } - - async getWebsite({country_code, filter} = {}) { - this._validate({country_code}); - const query = this._query({filter}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/website/${country_code}${query ? `?${query}` : ''}`, - }); - } - - async getCrosshair({code, size} = {}) { - this._validate({code}); - const query = this._query({id: code, size}); - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/crosshair/generate${query ? `?${query}` : ''}`, - rtype: 'arraybuffer', - }); - } -}; + /** + * Make sure each key in {@param input} has a non `null` or `undefined` value + * @param {{ [key: string]: any }} input - Arguments to check + */ + async _validateArgs(input) { + Object.keys(input).forEach(key => { + if (input[key] === null || input[key] === undefined) + throw new TypeError(`Missing parameter: "${key}"`); + }); + } + /** + * Gets general info about a player by their Riot ID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Season} filter - Filter results based on episode and act + */ + async getMMR(name, tag, region, filter) { + this._validateArgs({ name, tag, region }); + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter }); + } + /** + * Gets the most recent 5 matches by a players Riot ID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Season} filter - Filter results based on episode and act + * @param {ValorantMap} map - Filter results based on map **(needs testing)** + * @param {any} size - Filter results based on size **{needs testing)** + */ + async getMatches(name, tag, region, filter, map, size) { + this._validateArgs({ name, tag, region }); + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter, map, size }); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package/src/index.ts b/package/src/index.ts new file mode 100644 index 0000000..c40bff6 --- /dev/null +++ b/package/src/index.ts @@ -0,0 +1,171 @@ +import axios, { type AxiosRequestConfig } from "axios" +import type { Season, ValorantMap } from "./types/general.js" +import type { MMRResponse } from "./types/v2-mmr.js" +import type { MatchesResponse } from "./types/v3-matches.js" + +interface APIResponse { + status: number + /** + * Real response from API + */ + data?: dataType + /** + * Information about current rate limits + */ + rateLimits: RateLimit + /** + * Error object (if there is) + */ + error?: ErrorObject + /** + * Original request URL + */ + url: string +} + +interface ErrorObject { + /** + * Error message + */ + message: string + /** The response status of the API. Can be any of the following: + * - `1` Invalid API Key + * - `2` Forbidden endpoint + * - `3` Restricted endpoint + * - `101` No region found for this Player + * - `102` No matches found, can't get puuid + * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again + * - `104` Invalid region + * - `105` Invalid filter + * - `106` Invalid gamemode + * - `107` Invalid map + * - `108` Invalid locale + * - `109` Missing name + * - `110` Missing tag + * - `111` Player not found in leaderboard + * - `112` Invalid raw type + * - `113` Invalid match or player id + * - `114` Invalid country code + * - `115` Invalid season + */ + code: number + /** + * Error details to help fix the problem + */ + details: string +} + +interface RateLimit { + /** + * Number of used API requests per 60s. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + used: number + /** + * Remaining number of API requests per 60s. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + remaining: number + /** + * In how many seconds (every 60s) your rate limit is going to reset. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + reset: number +} + +export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br" + +const baseUrl = "https://api.henrikdev.xyz/valorant" +export default class { + /** + * The main class to call API functions from + * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + */ + constructor(private token?: string) {} + + private _parseBody(body: any) { + if (body.errors) return body.errors + return body.status ? body.data : body + } + + private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { + // Format search params into `?something=like&this` + const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { + const value = searchParams[cur] + if (value === null || value === undefined) return acc + return acc === "" + ? `?${cur}=${value}` + : acc + `&${cur}=${value}` + }, "") : "" + + // Main request + const req = await axios({ + url: encodeURI(`${baseUrl}/${url}${queryParams}`), + responseType: "json", + headers: this.token + ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } + : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, + ...config + }).catch(error => error) + + // Formatting response + return { + status: req.response ? req.response.status : req.status, + data: req.response ? null : !req.config.headers["Content-Type"] ? this._parseBody(req.data) : req.data, + rateLimits: { + used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), + remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), + reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), + }, + error: req.response ? this._parseBody(req.response.data) : null, + url: req.config.url + } + } + + /** + * Make sure each key in {@param input} has a non `null` or `undefined` value + * @param {{ [key: string]: any }} input - Arguments to check + */ + private async _validateArgs(input: { [key: string]: any }) { + Object.keys(input).forEach(key => { + if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) + }) + } + + /** + * Gets general info about a player by their Riot ID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Season} filter - Filter results based on episode and act + */ + async getMMR(name: string, tag: string, region: Region, filter?: Season) { + this._validateArgs({ name, tag, region }) + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter }) + } + + /** + * Gets the most recent 5 matches by a players Riot ID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Season} filter - Filter results based on episode and act + * @param {ValorantMap} map - Filter results based on map **(needs testing)** + * @param {any} size - Filter results based on size **{needs testing)** + */ + async getMatches(name: string, tag: string, region: Region, filter?: Season, map?: ValorantMap, size?: any) { + this._validateArgs({ name, tag, region }) + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter, map, size }) + } +} diff --git a/package/src/index.d.ts b/package/src/oldIndex.d.ts similarity index 100% rename from package/src/index.d.ts rename to package/src/oldIndex.d.ts diff --git a/package/src/types/general.ts b/package/src/types/general.ts new file mode 100644 index 0000000..76511e9 --- /dev/null +++ b/package/src/types/general.ts @@ -0,0 +1,16 @@ +type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal" +type SubRank = "1" | "2" | "3" +export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated" + +type Episodes = "e1" | "e2" | "e3" | "e4" | "e5" +type Acts = "a1" | "a2" | "a3" +export type Season = `${Episodes}${Acts}` + +export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball" +export type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl" +export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br" +export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru" +/** + * TODO Check "Golden Gun" and "Tactical Knife" + */ +export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee" diff --git a/package/src/types/v2-mmr.ts b/package/src/types/v2-mmr.ts new file mode 100644 index 0000000..6459a0a --- /dev/null +++ b/package/src/types/v2-mmr.ts @@ -0,0 +1,38 @@ +import { Rank, Season } from "./general.js" + +export interface SeasonMMR { + error?: "No data available" + wins: number + number_of_games: number + final_rank: number + final_rank_patched: Rank + act_rank_wins: { + patched_tier: Rank + tier: number + }[] +} + +export interface MMRResponse { + name: string + tag: string + puuid: string + current_data: { + currenttier: number + currenttierpatched: Rank + images: { + small: string + large: string + triangle_up: string + triangle_down: string + } + ranking_in_tier: number + mmr_change_to_last_game: number + elo: number + games_needed_for_rating: number + old: boolean + } + + by_season: { + [key in Season]: SeasonMMR + } +} diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts new file mode 100644 index 0000000..1eda72c --- /dev/null +++ b/package/src/types/v3-matches.ts @@ -0,0 +1,233 @@ +import type { Region } from "../index.js" +import type { Characters, Mode, Rank, ValorantMap, Weapon } from "./general.js" + +export interface Player { + puuid: string + name: string + tag: string + team: "Red" | "Blue" + level: number + character: Characters + currenttier: number + currenttier_patched: Rank + player_card: string + player_title: string + party_id: string + session_playtime: { + minutes: number + seconds: number + milliseconds: number + } + behavior: { + afk_rounds: number + friendly_fire: { + incoming: number + outgoing: number + } + rounds_in_spawn: number + } + platform: { + type: string + os: { + name: string + version: string + } + } + ability_casts: { + c_cast: number + q_cast: number + e_cast: number + x_cast: number + } + assets: { + card: { + small: string + large: string + wide: string + } + + agent: { + small: string + bust: string + full: string + killfeed: string + } + } + stats: { + score: number + kills: number + deaths: number + assists: number + bodyshots: number + headshots: number + legshots: number + } + economy: { + spent: { + overall: number + average: number + } + loadout_value: { + overall: number + average: number + } + } + damage_made: number + damage_received: number +} + +type PlayerLocation = { x: number, y: number } + +interface PlayerLocationOnEvent { + player_puuid: string + player_display_name: string + player_team: "Red" | "Blue" + location: PlayerLocation + view_radians: number +} + +interface KillEvent { + kill_time_in_round: number + kill_time_in_match: number + killer_puuid: string + killer_display_name: string + killer_team: "Red" | "Blue" + victim_puuid: string + victim_display_name: string + victim_team: "Red" | "Blue" + victim_death_location: PlayerLocation + damage_weapon_id: string + damage_weapon_name: Weapon + damage_weapon_assets: { + display_icon: string + killfeed_icon: string + } + secondary_fire_mode: boolean + player_locations_on_kill: PlayerLocationOnEvent[] + assistants: { + assistant_puuid: string + assistant_display_name: string + assistant_team: "Red" | "Blue" + }[] +} + +interface Round { + winning_team: "Red" | "Blue" + end_type: "Eliminated" | "Bomb defused" | "Bomb detonated" + bomb_planted: boolean + bomb_defused: boolean + plant_events: { + plant_location?: PlayerLocation + planted_by?: { + puuid: string + display_name: string + team: "Red" | "Blue" + } + plant_site?: "A" | "B" | "C" + plant_time_in_round?: number + player_locations_on_plant?: PlayerLocationOnEvent[] + } + defuse_events: { + defuse_location?: PlayerLocation + defused_by?: { + puuid: string + display_name: string + team: "Red" | "Blue" + } + defuse_time_in_round?: number + player_locations_on_defuse?: PlayerLocationOnEvent[] + } + player_stats: { + ability_casts: { + c_cast?: number + q_cast?: number + e_cast?: number + x_cast?: number + } + player_puuid: string + player_display_name: string + player_team: "Red" | "Blue" + damage_events: { + receiver_puuid: string + receiver_display_name: string + receiver_team: "Red" | "Blue" + bodyshots: number + damage: number + headshots: number + legshots: number + }[] + damage: number + headshots: number + bodyshots: number + legshots: number + kill_events: KillEvent[] + kills: number + score: number + economy: { + loadout_value: number + weapon: { + id: string + name: Weapon + assets: { + display_icon: string + killfeed_icon: string + } + } + armor: { + id: string + name: "Heavy Shields" | "Light Shields" + assets: { + display_icon: string + } + } + remaining: number + spent: number + } + was_afk: boolean + was_penalized: boolean + stayed_in_spawn: boolean + } +} + +interface KillEventMatch extends KillEvent { + round: number +} + +export interface Match { + metadata: { + map: ValorantMap + game_version: string + game_length: number + game_start: number + game_start_patched: string + rounds_played: number + mode: Mode + queue: string + season_id: "string" + platform: "PC" + matchid: string + region: Region + cluster: string + } + players: { + all_players: Player[] + red: Player[] + blue: Player[] + } + teams: { + red: { + has_won: false + rounds_won: number + rounds_lost: number + } + blue: { + has_won: false + rounds_won: number + rounds_lost: number + } + } + rounds: Round[] + kills: KillEventMatch[] +} + +export type MatchesResponse = Match[] diff --git a/package/src/util.ts b/package/src/util.ts new file mode 100644 index 0000000..0f09374 --- /dev/null +++ b/package/src/util.ts @@ -0,0 +1,161 @@ +import type { Rank, ValorantMap } from "./types/general.js" + +/** + * Extra util. Useful for displaying info about a certain map + */ +export const mapImages: { [key in ValorantMap]: { + splash: string + minimap: string + landscape: string +} } = { + Ascent: { + splash: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/splash.png", + minimap: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/displayicon.png", + landscape: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/listviewicon.png" + }, + Split: { + splash: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/splash.png", + minimap: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/displayicon.png", + landscape: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/listviewicon.png" + }, + Fracture: { + splash: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/splash.png", + minimap: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/displayicon.png", + landscape: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/listviewicon.png" + }, + Bind: { + splash: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/splash.png", + minimap: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/listviewicon.png" + }, + Breeze: { + splash: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/splash.png", + minimap: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/listviewicon.png" + }, + Pearl: { + splash: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/splash.png", + minimap: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/displayicon.png", + landscape: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/listviewicon.png" + }, + Icebox: { + splash: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/splash.png", + minimap: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/displayicon.png", + landscape: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/listviewicon.png" + }, + Haven: { + splash: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/splash.png", + minimap: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/listviewicon.png" + } +} + +/** + * Extra util. Useful for calls such as `matches` that don't include rank images on players + */ +export const rankImages: { [key in Rank]: { large: string, small: string } } = { + "Unrated": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/smallicon.png" + }, + "Iron 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/smallicon.png" + }, + "Iron 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/smallicon.png" + }, + "Iron 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/smallicon.png" + }, + "Bronze 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/smallicon.png" + }, + "Bronze 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/smallicon.png" + }, + "Bronze 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/smallicon.png" + }, + "Silver 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/smallicon.png" + }, + "Silver 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/smallicon.png" + }, + "Silver 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/smallicon.png" + }, + "Gold 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/smallicon.png" + }, + "Gold 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/smallicon.png" + }, + "Gold 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/smallicon.png" + }, + "Platinum 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/smallicon.png" + }, + "Platinum 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/smallicon.png" + }, + "Platinum 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/smallicon.png" + }, + "Diamond 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/smallicon.png" + }, + "Diamond 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/smallicon.png" + }, + "Diamond 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/smallicon.png" + }, + "Ascendant 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/smallicon.png" + }, + "Ascendant 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/smallicon.png" + }, + "Ascendant 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/smallicon.png" + }, + "Immortal 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/smallicon.png" + }, + "Immortal 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/smallicon.png" + }, + "Immortal 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/smallicon.png" + }, + "Radiant": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/smallicon.png" + } +} diff --git a/package/test/test.js b/package/test/test.js index b122bbd..424a152 100644 --- a/package/test/test.js +++ b/package/test/test.js @@ -1,6 +1,5 @@ -const VAPI = require('../src/index.js'); -const VALORANTAPI = new VAPI(); - -(async () => { - console.log(await VALORANTAPI.getCrosshair({code: '0;P;c;5;t;3;o;1;f;0;m;1;0t;4;0l;5;0o;0;0a;1;0f;0;1t;8;1l;3;1o;0;1a;1;1m;0;1f;0', size: 128})); -})(); +import _VAPI from "../src/index.js"; +const VAPI = new _VAPI(); +const res = await VAPI.getMMR("jameslinimk", "8868", "na"); +console.log(res); +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts new file mode 100644 index 0000000..fdeba53 --- /dev/null +++ b/package/test/test.ts @@ -0,0 +1,5 @@ +import _VAPI from "../src/index.js" +const VAPI = new _VAPI() + +const res = await VAPI.getMMR("jameslinimk", "8868", "na") +console.log(res) diff --git a/package/tsconfig.json b/package/tsconfig.json new file mode 100644 index 0000000..f27dd88 --- /dev/null +++ b/package/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ESNext", + "watch": true, + "lib": [ + "ESNext", + "DOM" + ], + "module": "ESNext", + "moduleResolution": "node", + "sourceMap": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true + }, + "exclude": [ + "node_modules", + "./node_modules", + "./node_modules/*" + ] +} From 9afc387cc1302dfe701fd6bd1d380d5aa51ef892 Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 01:27:50 -0500 Subject: [PATCH 02/50] Added more methods --- package/package.json | 5 +- package/pnpm-lock.yaml | 8 ++ package/src/index.js | 122 +++++++++++++++++++-- package/src/index.ts | 141 ++++++++++++++++++++++--- package/src/types/v1-crosshair.ts | 1 + package/src/types/v1-featured-items.ts | 33 ++++++ package/src/types/v1-profile.ts | 19 ++++ package/src/types/v1-store-offers.ts | 27 +++++ package/src/types/v1-version.ts | 6 ++ package/src/types/v1-website.ts | 17 +++ package/src/types/v3-matches.ts | 11 +- package/test/test.js | 2 +- package/test/test.ts | 2 +- 13 files changed, 364 insertions(+), 30 deletions(-) create mode 100644 package/src/types/v1-crosshair.ts create mode 100644 package/src/types/v1-featured-items.ts create mode 100644 package/src/types/v1-profile.ts create mode 100644 package/src/types/v1-store-offers.ts create mode 100644 package/src/types/v1-version.ts create mode 100644 package/src/types/v1-website.ts diff --git a/package/package.json b/package/package.json index 74f6c67..80bf5c1 100644 --- a/package/package.json +++ b/package/package.json @@ -21,5 +21,8 @@ "homepage": "https://github.com/Henrik-3/unofficial-valorant-api", "author": "HenrikDev", "license": "ISC", - "type": "module" + "type": "module", + "devDependencies": { + "@types/node": "^18.7.5" + } } diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml index 4aafe11..7d5b451 100644 --- a/package/pnpm-lock.yaml +++ b/package/pnpm-lock.yaml @@ -1,13 +1,21 @@ lockfileVersion: 5.4 specifiers: + '@types/node': ^18.7.5 axios: ^0.27.2 dependencies: axios: 0.27.2 +devDependencies: + '@types/node': 18.7.5 + packages: + /@types/node/18.7.5: + resolution: {integrity: sha512-NcKK6Ts+9LqdHJaW6HQmgr7dT/i3GOHG+pt6BiWv++5SnjtRd4NXeiuN2kA153SjhXPR/AhHIPHPbrsbpUVOww==} + dev: true + /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false diff --git a/package/src/index.js b/package/src/index.js index 0eed9c0..dc37437 100644 --- a/package/src/index.js +++ b/package/src/index.js @@ -57,7 +57,49 @@ export default class { }); } /** - * Gets general info about a player by their Riot ID + * Get a visualization of a valorant crosshair by its code + * @param {string} code Valorant crosshair code + * @param {number} size Image size (default: `1024`) + * @returns Image buffer for the preview + */ + async getCrosshair(code, size) { + this._validateArgs({ code }); + return this._fetch("v1/crosshair/generate", { id: code, size }, { + responseType: "arraybuffer" + }); + } + /** + * Get all announcements from the valorant website of a country + * @param countryCode Country code of website + */ + async getAnnouncements(countryCode) { + this._validateArgs({ countryCode }); + return this._fetch(`v1/website/${countryCode}`); + } + /** + * Get information about valorant in a region + * @param region Region to get info about + */ + async getVersion(region) { + this._validateArgs({ region }); + return this._fetch(`v1/version/${region}`); + } + /** + * Get a list of featured items in Valorant + */ + async getFeaturedItems() { + // ! v2 is bugged for some reason + return this._fetch("v1/store-featured"); + } + /** + * Get a list of all in-app-purchases for valorant + * TODO find out wtf this actually does + */ + async getIAPs() { + return this._fetch("v1/store-offers"); + } + /** + * Gets general info about a player's rank by their Riot ID * - **Returns:** * - Current rank and info about their rank * - RR change on their last game @@ -66,11 +108,26 @@ export default class { * @param {string} name - The Riot ID username of the player * @param {string} tag - The Riot ID tag of the player * @param {Region} region - The region of the player - * @param {Season} filter - Filter results based on episode and act + * @param {Season} seasonFilter - Filter results based on episode and act */ - async getMMR(name, tag, region, filter) { + async getMMR(name, tag, region, seasonFilter) { this._validateArgs({ name, tag, region }); - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter }); + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }); + } + /** + * Gets general info about a player's rank by their PUUID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} puuid - The PUUID of the player + * @param {Region} region - The region of the player + * @param {Season} seasonFilter - Filter results based on episode and act + */ + async getMMRByPUUID(puuid, region, seasonFilter) { + this._validateArgs({ puuid, region }); + return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }); } /** * Gets the most recent 5 matches by a players Riot ID @@ -83,13 +140,60 @@ export default class { * @param {string} name - The Riot ID username of the player * @param {string} tag - The Riot ID tag of the player * @param {Region} region - The region of the player - * @param {Season} filter - Filter results based on episode and act - * @param {ValorantMap} map - Filter results based on map **(needs testing)** - * @param {any} size - Filter results based on size **{needs testing)** + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** */ - async getMatches(name, tag, region, filter, map, size) { + async getMatches(name, tag, region, gamemodeFilter, mapFilter, size) { this._validateArgs({ name, tag, region }); - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter, map, size }); + return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); + } + /** + * Gets the most recent 5 matches by a players PUUID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} puuid - The PUUID username of the player + * @param {Region} region - The region of the player + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** + */ + async getMatchesByPUUID(puuid, region, gamemodeFilter, mapFilter, size) { + this._validateArgs({ name: puuid, region }); + return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); + } + /** + * Get general information about a player from their Riot ID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} name The Riot ID username of the player + * @param {string} tag The Riot ID tag of the player + * @param {boolean} force Force data update? + */ + async getProfile(name, tag, force) { + this._validateArgs({ name, tag }); + return this._fetch(`v1/account/${name}/${tag}`, { force }); + } + /** + * Get general information about a player from their PUUID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} puuid The PUUID of the player + * @param {boolean} force Force data update? + */ + async getProfileByPUUID(puuid, force) { + this._validateArgs({ name: puuid }); + return this._fetch(`v1/by-puuid/account/${puuid}`, { force }); } } //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package/src/index.ts b/package/src/index.ts index c40bff6..9882d28 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,5 +1,11 @@ import axios, { type AxiosRequestConfig } from "axios" -import type { Season, ValorantMap } from "./types/general.js" +import type { Mode, Region, Season, ValorantMap } from "./types/general.js" +import type { CrosshairResponse } from "./types/v1-crosshair.js" +import type { FeaturedItemsResponse } from "./types/v1-featured-items.js" +import type { ProfileResponse } from "./types/v1-profile.js" +import type { StoreOffersResponse } from "./types/v1-store-offers.js" +import type { VersionResponse } from "./types/v1-version.js" +import type { WebsiteResponse } from "./types/v1-website.js" import type { MMRResponse } from "./types/v2-mmr.js" import type { MatchesResponse } from "./types/v3-matches.js" @@ -73,8 +79,6 @@ interface RateLimit { reset: number } -export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br" - const baseUrl = "https://api.henrikdev.xyz/valorant" export default class { /** @@ -133,7 +137,54 @@ export default class { } /** - * Gets general info about a player by their Riot ID + * Get a visualization of a valorant crosshair by its code + * @param {string} code Valorant crosshair code + * @param {number} size Image size (default: `1024`) + * @returns Image buffer for the preview + */ + async getCrosshair(code: string, size?: number) { + this._validateArgs({ code }) + return this._fetch("v1/crosshair/generate", { id: code, size }, { + responseType: "arraybuffer" + }) + } + + /** + * Get all announcements from the valorant website of a country + * @param countryCode Country code of website + */ + async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn") { + this._validateArgs({ countryCode }) + return this._fetch(`v1/website/${countryCode}`) + } + + /** + * Get information about valorant in a region + * @param region Region to get info about + */ + async getVersion(region: Region) { + this._validateArgs({ region }) + return this._fetch(`v1/version/${region}`) + } + + /** + * Get a list of featured items in Valorant + */ + async getFeaturedItems() { + // ! v2 is bugged for some reason + return this._fetch("v1/store-featured") + } + + /** + * Get a list of all in-app-purchases for valorant + * TODO find out wtf this actually does + */ + async getIAPs() { + return this._fetch("v1/store-offers") + } + + /** + * Gets general info about a player's rank by their Riot ID * - **Returns:** * - Current rank and info about their rank * - RR change on their last game @@ -142,11 +193,27 @@ export default class { * @param {string} name - The Riot ID username of the player * @param {string} tag - The Riot ID tag of the player * @param {Region} region - The region of the player - * @param {Season} filter - Filter results based on episode and act + * @param {Season} seasonFilter - Filter results based on episode and act */ - async getMMR(name: string, tag: string, region: Region, filter?: Season) { + async getMMR(name: string, tag: string, region: Region, seasonFilter?: Season) { this._validateArgs({ name, tag, region }) - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter }) + return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }) + } + + /** + * Gets general info about a player's rank by their PUUID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} puuid - The PUUID of the player + * @param {Region} region - The region of the player + * @param {Season} seasonFilter - Filter results based on episode and act + */ + async getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season) { + this._validateArgs({ puuid, region }) + return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }) } /** @@ -160,12 +227,62 @@ export default class { * @param {string} name - The Riot ID username of the player * @param {string} tag - The Riot ID tag of the player * @param {Region} region - The region of the player - * @param {Season} filter - Filter results based on episode and act - * @param {ValorantMap} map - Filter results based on map **(needs testing)** - * @param {any} size - Filter results based on size **{needs testing)** + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** */ - async getMatches(name: string, tag: string, region: Region, filter?: Season, map?: ValorantMap, size?: any) { + async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { this._validateArgs({ name, tag, region }) - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter, map, size }) + return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }) + } + + /** + * Gets the most recent 5 matches by a players PUUID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} puuid - The PUUID username of the player + * @param {Region} region - The region of the player + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** + */ + async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { + this._validateArgs({ name: puuid, region }) + return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }) + } + + /** + * Get general information about a player from their Riot ID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} name The Riot ID username of the player + * @param {string} tag The Riot ID tag of the player + * @param {boolean} force Force data update? + */ + async getProfile(name: string, tag: string, force?: boolean) { + this._validateArgs({ name, tag }) + return this._fetch(`v1/account/${name}/${tag}`, { force }) + } + + /** + * Get general information about a player from their PUUID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} puuid The PUUID of the player + * @param {boolean} force Force data update? + */ + async getProfileByPUUID(puuid: string, force?: boolean) { + this._validateArgs({ name: puuid }) + return this._fetch(`v1/by-puuid/account/${puuid}`, { force }) } } diff --git a/package/src/types/v1-crosshair.ts b/package/src/types/v1-crosshair.ts new file mode 100644 index 0000000..a826ba0 --- /dev/null +++ b/package/src/types/v1-crosshair.ts @@ -0,0 +1 @@ +export type CrosshairResponse = Buffer diff --git a/package/src/types/v1-featured-items.ts b/package/src/types/v1-featured-items.ts new file mode 100644 index 0000000..7e90ee8 --- /dev/null +++ b/package/src/types/v1-featured-items.ts @@ -0,0 +1,33 @@ +export interface BaseItem { + ItemTypeID: string + ItemID: string + Amount: number +} + +export interface Item { + Item: BaseItem + BasePrice: number + CurrencyID: string + DiscountPercent: number + DiscountedPrice: number + IsPromoItem: boolean +} + +export interface Bundle { + ID: string + DataAssetID: string + CurrencyID: string + Items: Item[] + DurationRemainingInSeconds: number + WholesaleOnly: boolean +} + +export interface FeaturedBundle { + Bundle: Bundle + Bundles: Bundle[] + BundleRemainingDurationInSeconds: number +} + +export interface FeaturedItemsResponse { + FeaturedBundle: FeaturedBundle +} diff --git a/package/src/types/v1-profile.ts b/package/src/types/v1-profile.ts new file mode 100644 index 0000000..3e46194 --- /dev/null +++ b/package/src/types/v1-profile.ts @@ -0,0 +1,19 @@ +import { Region } from "./general.js" + +export interface Card { + small: string + large: string + wide: string + id: string +} + +export interface ProfileResponse { + puuid: string + region: Region + account_level: number + name: string + tag: string + card: Card + last_update: string + last_update_raw: number +} diff --git a/package/src/types/v1-store-offers.ts b/package/src/types/v1-store-offers.ts new file mode 100644 index 0000000..6dd792d --- /dev/null +++ b/package/src/types/v1-store-offers.ts @@ -0,0 +1,27 @@ +export interface Cost { + "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": number +} + +export interface Reward { + ItemTypeID: string + ItemID: string + Quantity: number +} + +export interface Offer { + OfferID: string + IsDirectPurchase: boolean + StartDate: any + Cost: Cost + Rewards: Reward[] +} + +export interface UpgradeCurrencyOffer { + OfferID: string + StorefrontItemID: string +} + +export interface StoreOffersResponse { + Offers: Offer[] + UpgradeCurrencyOffers: UpgradeCurrencyOffer[] +} diff --git a/package/src/types/v1-version.ts b/package/src/types/v1-version.ts new file mode 100644 index 0000000..b7bce41 --- /dev/null +++ b/package/src/types/v1-version.ts @@ -0,0 +1,6 @@ +export interface VersionResponse { + version: string + clientVersion: string + branch: string + region: string +} diff --git a/package/src/types/v1-website.ts b/package/src/types/v1-website.ts new file mode 100644 index 0000000..19761c1 --- /dev/null +++ b/package/src/types/v1-website.ts @@ -0,0 +1,17 @@ +export interface Post { + banner_url: string + category: string + date: Date + external_link: string + title: string + url: string +} + +export interface WebsiteResponse { + banner_url: string + category: string + date: Date + external_link: string + title: string + url: string +} diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index 1eda72c..6e58701 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -1,5 +1,4 @@ -import type { Region } from "../index.js" -import type { Characters, Mode, Rank, ValorantMap, Weapon } from "./general.js" +import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general.js" export interface Player { puuid: string @@ -78,7 +77,7 @@ export interface Player { type PlayerLocation = { x: number, y: number } -interface PlayerLocationOnEvent { +export interface PlayerLocationOnEvent { player_puuid: string player_display_name: string player_team: "Red" | "Blue" @@ -86,7 +85,7 @@ interface PlayerLocationOnEvent { view_radians: number } -interface KillEvent { +export interface KillEvent { kill_time_in_round: number kill_time_in_match: number killer_puuid: string @@ -111,7 +110,7 @@ interface KillEvent { }[] } -interface Round { +export interface Round { winning_team: "Red" | "Blue" end_type: "Eliminated" | "Bomb defused" | "Bomb detonated" bomb_planted: boolean @@ -189,7 +188,7 @@ interface Round { } } -interface KillEventMatch extends KillEvent { +export interface KillEventMatch extends KillEvent { round: number } diff --git a/package/test/test.js b/package/test/test.js index 424a152..7876199 100644 --- a/package/test/test.js +++ b/package/test/test.js @@ -1,5 +1,5 @@ import _VAPI from "../src/index.js"; const VAPI = new _VAPI(); -const res = await VAPI.getMMR("jameslinimk", "8868", "na"); +const res = await VAPI.getVersion("na"); console.log(res); //# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts index fdeba53..e56a449 100644 --- a/package/test/test.ts +++ b/package/test/test.ts @@ -1,5 +1,5 @@ import _VAPI from "../src/index.js" const VAPI = new _VAPI() -const res = await VAPI.getMMR("jameslinimk", "8868", "na") +const res = await VAPI.getVersion("na") console.log(res) From a2ab195a72d80d76c8b6a10615c8fe522e2a9e25 Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 01:28:26 -0500 Subject: [PATCH 03/50] Add pnpm-lock to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 91e0e20..258504b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ *.js *.js.map +pnpm-lock.yaml From 33c55d3e3f42e7d8f9b841cca5c74b89ab45aa54 Mon Sep 17 00:00:00 2001 From: Linimik <63650909+jameslinimk@users.noreply.github.com> Date: Tue, 16 Aug 2022 01:29:08 -0500 Subject: [PATCH 04/50] Delete pnpm-lock.yaml --- package/pnpm-lock.yaml | 73 ------------------------------------------ 1 file changed, 73 deletions(-) delete mode 100644 package/pnpm-lock.yaml diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml deleted file mode 100644 index 7d5b451..0000000 --- a/package/pnpm-lock.yaml +++ /dev/null @@ -1,73 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@types/node': ^18.7.5 - axios: ^0.27.2 - -dependencies: - axios: 0.27.2 - -devDependencies: - '@types/node': 18.7.5 - -packages: - - /@types/node/18.7.5: - resolution: {integrity: sha512-NcKK6Ts+9LqdHJaW6HQmgr7dT/i3GOHG+pt6BiWv++5SnjtRd4NXeiuN2kA153SjhXPR/AhHIPHPbrsbpUVOww==} - dev: true - - /asynckit/0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: false - - /axios/0.27.2: - resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} - dependencies: - follow-redirects: 1.15.1 - form-data: 4.0.0 - transitivePeerDependencies: - - debug - dev: false - - /combined-stream/1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - dependencies: - delayed-stream: 1.0.0 - dev: false - - /delayed-stream/1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dev: false - - /follow-redirects/1.15.1: - resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: false - - /form-data/4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: false - - /mime-db/1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - dev: false - - /mime-types/2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.52.0 - dev: false From f7f7db4dfa39b8fcb2ebb48b05812fb1402ee167 Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 14:12:46 -0500 Subject: [PATCH 05/50] Finished all methods + improvements --- .gitignore | 2 - package/.eslintrc.cjs | 61 ++ package/.npmignore | 3 + package/dist/index.d.ts | 300 ++++++ package/{src => dist}/index.js | 155 ++- package/dist/index.js.map | 1 + package/dist/types/general.d.ts | 13 + package/dist/types/general.js | 2 + package/dist/types/general.js.map | 1 + .../dist/types/raw/competitive-updates.d.ts | 22 + package/dist/types/raw/competitive-updates.js | 2 + .../dist/types/raw/competitive-updates.js.map | 1 + package/dist/types/raw/match-details.d.ts | 228 +++++ package/dist/types/raw/match-details.js | 2 + package/dist/types/raw/match-details.js.map | 1 + package/dist/types/raw/match-history.d.ts | 15 + package/dist/types/raw/match-history.js | 2 + package/dist/types/raw/match-history.js.map | 1 + package/dist/types/raw/mmr.d.ts | 60 ++ package/dist/types/raw/mmr.js | 2 + package/dist/types/raw/mmr.js.map | 1 + package/dist/types/v1-content.d.ts | 39 + package/dist/types/v1-content.js | 2 + package/dist/types/v1-content.js.map | 1 + package/dist/types/v1-crosshair.d.ts | 2 + package/dist/types/v1-crosshair.js | 2 + package/dist/types/v1-crosshair.js.map | 1 + package/dist/types/v1-featured-items.d.ts | 29 + package/dist/types/v1-featured-items.js | 2 + package/dist/types/v1-featured-items.js.map | 1 + package/dist/types/v1-profile.d.ts | 17 + package/dist/types/v1-profile.js | 2 + package/dist/types/v1-profile.js.map | 1 + package/dist/types/v1-status.d.ts | 29 + package/dist/types/v1-status.js | 2 + package/dist/types/v1-status.js.map | 1 + package/dist/types/v1-store-offers.d.ts | 23 + package/dist/types/v1-store-offers.js | 2 + package/dist/types/v1-store-offers.js.map | 1 + package/dist/types/v1-version.d.ts | 6 + package/dist/types/v1-version.js | 2 + package/dist/types/v1-version.js.map | 1 + package/dist/types/v1-website.d.ts | 16 + package/dist/types/v1-website.js | 2 + package/dist/types/v1-website.js.map | 1 + package/dist/types/v2-leaderboard.d.ts | 23 + package/dist/types/v2-leaderboard.js | 2 + package/dist/types/v2-leaderboard.js.map | 1 + package/dist/types/v2-match.d.ts | 2 + package/dist/types/v2-match.js | 2 + package/dist/types/v2-match.js.map | 1 + package/dist/types/v2-mmr-history.d.ts | 18 + package/dist/types/v2-mmr-history.js | 2 + package/dist/types/v2-mmr-history.js.map | 1 + package/dist/types/v2-mmr.d.ts | 35 + package/dist/types/v2-mmr.js | 2 + package/dist/types/v2-mmr.js.map | 1 + package/dist/types/v3-matches.d.ts | 227 +++++ package/dist/types/v3-matches.js | 2 + package/dist/types/v3-matches.js.map | 1 + package/dist/util.d.ts | 20 + package/dist/util.js | 155 +++ package/dist/util.js.map | 1 + package/examples/discord_bot.js | 46 +- package/examples/download_crosshair.js | 21 +- package/package.json | 9 +- package/pnpm-lock.yaml | 921 ++++++++++++++++++ package/src/index.ts | 297 ++++-- package/src/oldIndex.js | 192 ++++ package/src/types/general.ts | 12 +- package/src/types/raw/competitive-updates.ts | 23 + package/src/types/raw/match-details.ts | 257 +++++ package/src/types/raw/match-history.ts | 16 + package/src/types/raw/mmr.ts | 65 ++ package/src/types/v1-content.ts | 44 + package/src/types/v1-profile.ts | 2 +- package/src/types/v1-status.ts | 33 + package/src/types/v1-store-offers.ts | 2 +- package/src/types/v2-leaderboard.ts | 24 + package/src/types/v2-match.ts | 3 + package/src/types/v2-mmr-history.ts | 21 + package/src/types/v2-mmr.ts | 2 +- package/src/types/v3-matches.ts | 2 +- package/src/util.ts | 161 --- package/test/test.js | 26 +- package/test/test.ts | 5 - package/tsconfig.json | 8 +- 87 files changed, 3451 insertions(+), 297 deletions(-) create mode 100644 package/.eslintrc.cjs create mode 100644 package/dist/index.d.ts rename package/{src => dist}/index.js (54%) create mode 100644 package/dist/index.js.map create mode 100644 package/dist/types/general.d.ts create mode 100644 package/dist/types/general.js create mode 100644 package/dist/types/general.js.map create mode 100644 package/dist/types/raw/competitive-updates.d.ts create mode 100644 package/dist/types/raw/competitive-updates.js create mode 100644 package/dist/types/raw/competitive-updates.js.map create mode 100644 package/dist/types/raw/match-details.d.ts create mode 100644 package/dist/types/raw/match-details.js create mode 100644 package/dist/types/raw/match-details.js.map create mode 100644 package/dist/types/raw/match-history.d.ts create mode 100644 package/dist/types/raw/match-history.js create mode 100644 package/dist/types/raw/match-history.js.map create mode 100644 package/dist/types/raw/mmr.d.ts create mode 100644 package/dist/types/raw/mmr.js create mode 100644 package/dist/types/raw/mmr.js.map create mode 100644 package/dist/types/v1-content.d.ts create mode 100644 package/dist/types/v1-content.js create mode 100644 package/dist/types/v1-content.js.map create mode 100644 package/dist/types/v1-crosshair.d.ts create mode 100644 package/dist/types/v1-crosshair.js create mode 100644 package/dist/types/v1-crosshair.js.map create mode 100644 package/dist/types/v1-featured-items.d.ts create mode 100644 package/dist/types/v1-featured-items.js create mode 100644 package/dist/types/v1-featured-items.js.map create mode 100644 package/dist/types/v1-profile.d.ts create mode 100644 package/dist/types/v1-profile.js create mode 100644 package/dist/types/v1-profile.js.map create mode 100644 package/dist/types/v1-status.d.ts create mode 100644 package/dist/types/v1-status.js create mode 100644 package/dist/types/v1-status.js.map create mode 100644 package/dist/types/v1-store-offers.d.ts create mode 100644 package/dist/types/v1-store-offers.js create mode 100644 package/dist/types/v1-store-offers.js.map create mode 100644 package/dist/types/v1-version.d.ts create mode 100644 package/dist/types/v1-version.js create mode 100644 package/dist/types/v1-version.js.map create mode 100644 package/dist/types/v1-website.d.ts create mode 100644 package/dist/types/v1-website.js create mode 100644 package/dist/types/v1-website.js.map create mode 100644 package/dist/types/v2-leaderboard.d.ts create mode 100644 package/dist/types/v2-leaderboard.js create mode 100644 package/dist/types/v2-leaderboard.js.map create mode 100644 package/dist/types/v2-match.d.ts create mode 100644 package/dist/types/v2-match.js create mode 100644 package/dist/types/v2-match.js.map create mode 100644 package/dist/types/v2-mmr-history.d.ts create mode 100644 package/dist/types/v2-mmr-history.js create mode 100644 package/dist/types/v2-mmr-history.js.map create mode 100644 package/dist/types/v2-mmr.d.ts create mode 100644 package/dist/types/v2-mmr.js create mode 100644 package/dist/types/v2-mmr.js.map create mode 100644 package/dist/types/v3-matches.d.ts create mode 100644 package/dist/types/v3-matches.js create mode 100644 package/dist/types/v3-matches.js.map create mode 100644 package/dist/util.d.ts create mode 100644 package/dist/util.js create mode 100644 package/dist/util.js.map create mode 100644 package/src/oldIndex.js create mode 100644 package/src/types/raw/competitive-updates.ts create mode 100644 package/src/types/raw/match-details.ts create mode 100644 package/src/types/raw/match-history.ts create mode 100644 package/src/types/raw/mmr.ts create mode 100644 package/src/types/v1-content.ts create mode 100644 package/src/types/v1-status.ts create mode 100644 package/src/types/v2-leaderboard.ts create mode 100644 package/src/types/v2-match.ts create mode 100644 package/src/types/v2-mmr-history.ts delete mode 100644 package/src/util.ts delete mode 100644 package/test/test.ts diff --git a/.gitignore b/.gitignore index 258504b..b711c19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ .history/ node_modules/ -*.js -*.js.map pnpm-lock.yaml diff --git a/package/.eslintrc.cjs b/package/.eslintrc.cjs new file mode 100644 index 0000000..c77758d --- /dev/null +++ b/package/.eslintrc.cjs @@ -0,0 +1,61 @@ +// eslint-disable-next-line no-undef +module.exports = { + env: { + browser: true, + es2021: true + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + overrides: [ + ], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: "latest", + sourceType: "module" + }, + plugins: [ + "@typescript-eslint" + ], + ignorePatterns: [ + "**/*.js", + "**/*.d.ts" + ], + rules: { + indent: [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + quotes: [ + "error", + "double" + ], + semi: "off", + "@typescript-eslint/semi": ["error", "never"], + "@typescript-eslint/member-delimiter-style": [ + "error", + { + multiline: { + delimiter: "none", + requireLast: false + }, + singleline: { + delimiter: "comma", + requireLast: false + } + } + ], + "quote-props": [ + "warn", + "as-needed" + ], + "@typescript-eslint/no-explicit-any": [ + "off" + ] + } +} diff --git a/package/.npmignore b/package/.npmignore index 403f155..7f02f6b 100644 --- a/package/.npmignore +++ b/package/.npmignore @@ -1,2 +1,5 @@ examples/**/* test/**/* +src/**/* +.eslintrc.cjs +tsconfig.json diff --git a/package/dist/index.d.ts b/package/dist/index.d.ts new file mode 100644 index 0000000..2654364 --- /dev/null +++ b/package/dist/index.d.ts @@ -0,0 +1,300 @@ +/// +import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; +import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; +import type { RawMatchDetailsResponse } from "./types/raw/match-details"; +import type { RawMatchHistoryResponse } from "./types/raw/match-history"; +import type { RawMMRResponse } from "./types/raw/mmr"; +import type { ContentResponse } from "./types/v1-content"; +import type { FeaturedItemsResponse } from "./types/v1-featured-items"; +import type { ProfileResponse } from "./types/v1-profile"; +import type { StatusResponse } from "./types/v1-status"; +import type { StoreOffersResponse } from "./types/v1-store-offers"; +import type { VersionResponse } from "./types/v1-version"; +import type { WebsiteResponse } from "./types/v1-website"; +import type { LeaderboardResponse } from "./types/v2-leaderboard"; +import type { MMRResponse } from "./types/v2-mmr"; +import type { MMRHistoryResponse } from "./types/v2-mmr-history"; +import type { MatchesResponse } from "./types/v3-matches"; +interface APIResponse { + status: number; + /** + * Real response from API + */ + data?: dataType; + /** + * Information about current rate limits + */ + rateLimits: RateLimit; + /** + * Error object (if there is) + */ + error?: ErrorObject; + /** + * Original request URL + */ + url: string; +} +interface ErrorObject { + /** + * Error message + */ + message: string; + /** The response status of the API. Can be any of the following: + * - `1` Invalid API Key + * - `2` Forbidden endpoint + * - `3` Restricted endpoint + * - `101` No region found for this Player + * - `102` No matches found, can't get puuid + * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again + * - `104` Invalid region + * - `105` Invalid filter + * - `106` Invalid gamemode + * - `107` Invalid map + * - `108` Invalid locale + * - `109` Missing name + * - `110` Missing tag + * - `111` Player not found in leaderboard + * - `112` Invalid raw type + * - `113` Invalid match or player id + * - `114` Invalid country code + * - `115` Invalid season + */ + code: number; + /** + * Error details to help fix the problem + */ + details: string; +} +interface RateLimit { + /** + * Number of used API requests per 60s. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + used: number; + /** + * Remaining number of API requests per 60s. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + remaining: number; + /** + * In how many seconds (every 60s) your rate limit is going to reset. + * - `30 req/min` on free accounts, and `60 req/min` on regular token + */ + reset: number; +} +export default class { + private token?; + /** + * You must call `initUtils()` before using this! + */ + rankImages?: { + [key in Rank]: { + large: string; + small: string; + triangleUp: string; + triangleDown: string; + }; + }; + /** + * You must call `initUtils()` before using this! + */ + mapImages?: { + [key in ValorantMap | "The Range"]: { + splash: string; + minimap: string; + landscape: string; + }; + }; + /** + * The main class to call API functions from + * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + */ + constructor(token?: string); + initUtils(): Promise; + private _parseBody; + private _fetch; + /** + * Make sure each key in {@param input} has a non `null` or `undefined` value + * @param {{ [key: string]: any }} input - Arguments to check + */ + private _validateArgs; + /** + * Get a visualization of a valorant crosshair by its code + * @param {string} code - Valorant crosshair code + * @param {number} size - Image size (default: `1024`) + * @returns {Buffer} Image buffer for the preview + */ + getCrosshair(code: string, size?: number): Promise>; + /** + * Get all announcements from the valorant website of a country + * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` + */ + getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise>; + /** + * Get information about valorant in a region + * @param {Region} region - Region to get info about + */ + getVersion(region: Region): Promise>; + /** + * Get a list of featured items in Valorant + */ + getFeaturedItems(): Promise>; + /** + * Get a list of all in-app-purchases for valorant + * ! find out wtf this actually does + */ + getIAPs(): Promise>; + /** + * Will get information about the current maintenances and incidents about a region + * @param {Region} region - Region to get info about + */ + getStatus(region: Region): Promise>; + /** + * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatch` instead + * @param {string} matchID - The match ID to get details about + * @param {Region} region - Region of the match + * @param {any} queries - Extra queries + */ + getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise>; + /** + * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatches` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise>; + /** + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMRHistory` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise>; + /** + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMR` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + getRawMMR(puuid: string, region: Region, queries?: any): Promise>; + /** + * Get a list of rr changes of a player by their Riot ID + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot tag username of the player + * @param {Region} region - The player's region + */ + getMMRHistory(name: string, tag: string, region: Region): Promise>; + /** + * Get a list of rr changes of a player by their PUUID + * @param {string} name - The PUUID of the player + * @param {Region} region - The player's region + */ + getMMRHistoryByPUUID(puuid: string, region: Region): Promise>; + /** + * Get information about a match + * @param {string} matchID - The match's ID + */ + getMatch(matchID: string): Promise>; + /** + * Get the leaderboard of a region + * @param {Region} region - Region to get leaderboard from + * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value + * @param {number} end - (optional) Limit the amount of leaderboard players returned + * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID + * @param {string} puuid - Search for a specific player by their PUUID + * @param {Season} season - Get leaderboard from a specific season + */ + getLeaderboard(region: Region, start?: number, end?: number, riotID?: { + name: string; + tag: string; + }, puuid?: string, season?: Season): Promise>; + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + */ + getTranslations(locale?: Locale): Promise>; + /** + * Gets general info about a player's rank by their Riot ID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Season} seasonFilter - Filter results based on episode and act + */ + getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise>; + /** + * Gets general info about a player's rank by their PUUID + * - **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param {string} puuid - The PUUID of the player + * @param {Region} region - The region of the player + * @param {Season} seasonFilter - Filter results based on episode and act + */ + getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise>; + /** + * Gets the most recent 5 matches by a players Riot ID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot ID tag of the player + * @param {Region} region - The region of the player + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** + */ + getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; + /** + * Gets the most recent 5 matches by a players PUUID + * - **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param {string} puuid - The PUUID username of the player + * @param {Region} region - The region of the player + * @param {Mode} gamemodeFilter - Filter results based on gamemode + * @param {ValorantMap} mapFilter - Filter results based on map + * @param {any} size - Filter results based on ?? **{needs testing)** + */ + getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; + /** + * Get general information about a player from their Riot ID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} name The Riot ID username of the player + * @param {string} tag The Riot ID tag of the player + * @param {boolean} force Force data update? + */ + getProfile(name: string, tag: string, force?: boolean): Promise>; + /** + * Get general information about a player from their PUUID + * - **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param {string} puuid The PUUID of the player + * @param {boolean} force Force data update? + */ + getProfileByPUUID(puuid: string, force?: boolean): Promise>; +} +export {}; diff --git a/package/src/index.js b/package/dist/index.js similarity index 54% rename from package/src/index.js rename to package/dist/index.js index dc37437..415219f 100644 --- a/package/src/index.js +++ b/package/dist/index.js @@ -2,6 +2,14 @@ import axios from "axios"; const baseUrl = "https://api.henrikdev.xyz/valorant"; export default class { token; + /** + * You must call `initUtils()` before using this! + */ + rankImages; + /** + * You must call `initUtils()` before using this! + */ + mapImages; /** * The main class to call API functions from * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD @@ -9,6 +17,28 @@ export default class { constructor(token) { this.token = token; } + async initUtils() { + const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; + if (mapsReq) { + this.mapImages = {}; + mapsReq.forEach((map) => (this.mapImages[map.displayName] = { + splash: map.splash, + minimap: map.displayIcon, + landscape: map.listViewIcon + })); + } + const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; + if (tiersReq) { + const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1); + this.rankImages = {}; + tiersReq[tiersReq.length - 1].tiers.forEach((rank) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { + large: rank.largeIcon, + small: rank.smallIcon, + triangleUp: rank.rankTriangleUpIcon, + triangleDown: rank.rankTriangleDownIcon + })); + } + } _parseBody(body) { if (body.errors) return body.errors; @@ -58,9 +88,9 @@ export default class { } /** * Get a visualization of a valorant crosshair by its code - * @param {string} code Valorant crosshair code - * @param {number} size Image size (default: `1024`) - * @returns Image buffer for the preview + * @param {string} code - Valorant crosshair code + * @param {number} size - Image size (default: `1024`) + * @returns {Buffer} Image buffer for the preview */ async getCrosshair(code, size) { this._validateArgs({ code }); @@ -70,7 +100,7 @@ export default class { } /** * Get all announcements from the valorant website of a country - * @param countryCode Country code of website + * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` */ async getAnnouncements(countryCode) { this._validateArgs({ countryCode }); @@ -78,7 +108,7 @@ export default class { } /** * Get information about valorant in a region - * @param region Region to get info about + * @param {Region} region - Region to get info about */ async getVersion(region) { this._validateArgs({ region }); @@ -93,11 +123,124 @@ export default class { } /** * Get a list of all in-app-purchases for valorant - * TODO find out wtf this actually does + * ! find out wtf this actually does */ async getIAPs() { return this._fetch("v1/store-offers"); } + /** + * Will get information about the current maintenances and incidents about a region + * @param {Region} region - Region to get info about + */ + async getStatus(region) { + this._validateArgs({ region }); + return this._fetch(`v1/status/${region}`); + } + /** + * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatch` instead + * @param {string} matchID - The match ID to get details about + * @param {Region} region - Region of the match + * @param {any} queries - Extra queries + */ + async getRawMatchDetails(matchID, region, queries) { + this._validateArgs({ matchID, region }); + return await this._fetch("v1/raw", null, { + data: { type: "matchdetails", value: matchID, region, queries }, + method: "POST" + }); + } + /** + * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatches` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawMatchHistory(puuid, region, queries) { + this._validateArgs({ puuid, region }); + return await this._fetch("v1/raw", null, { + data: { type: "matchhistory", value: puuid, region, queries }, + method: "POST" + }); + } + /** + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMRHistory` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawCompetitiveUpdates(puuid, region, queries) { + this._validateArgs({ puuid, region }); + return await this._fetch("v1/raw", null, { + data: { type: "mmr", value: puuid, region, queries }, + method: "POST" + }); + } + /** + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMR` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawMMR(puuid, region, queries) { + this._validateArgs({ puuid, region }); + return await this._fetch("v1/raw", null, { + data: { type: "competitiveupdates", value: puuid, region, queries }, + method: "POST" + }); + } + /** + * Get a list of rr changes of a player by their Riot ID + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot tag username of the player + * @param {Region} region - The player's region + */ + async getMMRHistory(name, tag, region) { + this._validateArgs({ name, tag, region }); + return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`); + } + /** + * Get a list of rr changes of a player by their PUUID + * @param {string} name - The PUUID of the player + * @param {Region} region - The player's region + */ + async getMMRHistoryByPUUID(puuid, region) { + this._validateArgs({ puuid, region }); + return this._fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); + } + /** + * Get information about a match + * @param {string} matchID - The match's ID + */ + async getMatch(matchID) { + this._validateArgs({ matchID }); + return this._fetch(`v2/match/${matchID}`); + } + /** + * Get the leaderboard of a region + * @param {Region} region - Region to get leaderboard from + * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value + * @param {number} end - (optional) Limit the amount of leaderboard players returned + * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID + * @param {string} puuid - Search for a specific player by their PUUID + * @param {Season} season - Get leaderboard from a specific season + */ + async getLeaderboard(region, start, end, riotID, puuid, season) { + if (riotID && puuid) + throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); + this._validateArgs({ region }); + return this._fetch(`v2/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); + } + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + */ + async getTranslations(locale) { + return this._fetch("v1/content", { locale }); + } /** * Gets general info about a player's rank by their Riot ID * - **Returns:** diff --git a/package/dist/index.js.map b/package/dist/index.js.map new file mode 100644 index 0000000..4541efe --- /dev/null +++ b/package/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AA0FtD,MAAM,OAAO,GAAG,oCAAoC,CAAA;AACpD,MAAM,CAAC,OAAO;IAcU;IAbpB;;OAEG;IACH,UAAU,CAAgG;IAC1G;;OAEG;IACH,SAAS,CAAiG;IAE1G;;;OAGA;IACA,YAAoB,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAEtC,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACxG,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,SAAS,GAAG,EAAS,CAAA;YAC1B,OAAO,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG;gBAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,OAAO,EAAE,GAAG,CAAC,WAAW;gBACxB,SAAS,EAAE,GAAG,CAAC,YAAY;aAC9B,CAAC,CAAC,CAAA;SACN;QAED,MAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,8CAA8C,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACrH,IAAI,QAAQ,EAAE;YACV,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACvF,IAAI,CAAC,UAAU,GAAG,EAAS,CAAA;YAC3B,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG;gBACnH,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,UAAU,EAAE,IAAI,CAAC,kBAAkB;gBACnC,YAAY,EAAE,IAAI,CAAC,oBAAoB;aAC1C,CAAC,CAAC,CAAA;SACN;IACL,CAAC;IAEO,UAAU,CAAC,IAAS;QACxB,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,MAAM,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACzC,CAAC;IAEO,KAAK,CAAC,MAAM,CAAW,GAAW,EAAE,YAAqC,EAAE,SAA6B,EAAE;QAC9G,mDAAmD;QACnD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7E,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAA;YACrD,OAAO,GAAG,KAAK,EAAE;gBACb,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,EAAE;gBACpB,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;QAClC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAEX,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;YACpB,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,IAAI,GAAG,GAAG,WAAW,EAAE,CAAC;YACjD,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,IAAI,CAAC,KAAK;gBACf,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,uCAAuC,GAAG;gBACvF,CAAC,CAAC,EAAE,YAAY,EAAE,uCAAuC,GAAG;YAChE,GAAG,MAAM;SACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QAExB,sBAAsB;QACtB,OAAO;YACH,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM;YACvD,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI;YACtG,UAAU,EAAE;gBACR,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBACzG,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;gBACtH,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;aAC7G;YACD,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG;SACtB,CAAA;IACL,CAAC;IAED;;;OAGA;IACQ,KAAK,CAAC,aAAa,CAAC,KAA6B;QACrD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS;gBAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAA;QAC3G,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;;;OAKA;IACA,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,IAAa;QAC1C,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAoB,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YAC/E,YAAY,EAAE,aAAa;SAC9B,CAAC,CAAA;IACN,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,gBAAgB,CAAC,WAA4I;QAC/J,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,WAAW,EAAE,CAAC,CAAA;IACpE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,UAAU,CAAC,MAAc;QAC3B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED;;OAEA;IACA,KAAK,CAAC,gBAAgB;QAClB,iCAAiC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAwB,mBAAmB,CAAC,CAAA;IAClE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAsB,iBAAiB,CAAC,CAAA;IAC9D,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,SAAS,CAAC,MAAc;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAiB,aAAa,MAAM,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,MAAc,EAAE,OAAa;QACnE,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;YAC/D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACjE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YAC7D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,wBAAwB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACvE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAgC,QAAQ,EAAE,IAAI,EAAE;YACpE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACxD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAiB,QAAQ,EAAE,IAAI,EAAE;YACrD,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACnE,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc;QACzD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAqB,kBAAkB,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;IACrF,CAAC;IAED;;;;MAIE;IACF,KAAK,CAAC,oBAAoB,CAAC,KAAa,EAAE,MAAc;QACpD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAqB,2BAA2B,MAAM,IAAI,KAAK,EAAE,CAAC,CAAA;IACxF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAgB,YAAY,OAAO,EAAE,CAAC,CAAA;IAC5D,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAAC,MAAc,EAAE,KAAc,EAAE,GAAY,EAAE,MAAsC,EAAE,KAAc,EAAE,MAAe;QACtI,IAAI,MAAM,IAAI,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,yHAAyH,CAAC,CAAA;QAEnK,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAsB,kBAAkB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC5I,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,MAAe;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACjE,CAAC;IAED;;;;;;;;;;;OAWA;IACA,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,YAAqB;QACzE,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAc,UAAU,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAChG,CAAC;IAED;;;;;;;;;;OAUA;IACA,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,YAAqB;QACpE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAc,mBAAmB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IACnG,CAAC;IAED;;;;;;;;;;;;;;MAcD;IACC,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAClH,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;MAaD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAC7G,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAkB,oBAAoB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;OAUA;IACA,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,KAAe;QACvD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;;;;;MASD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,KAAe;QAClD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,uBAAuB,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAClF,CAAC;CACJ"} \ No newline at end of file diff --git a/package/dist/types/general.d.ts b/package/dist/types/general.d.ts new file mode 100644 index 0000000..42d36ca --- /dev/null +++ b/package/dist/types/general.d.ts @@ -0,0 +1,13 @@ +declare type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; +declare type SubRank = "1" | "2" | "3"; +export declare type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; +declare type Episodes = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"; +declare type Acts = "1" | "2" | "3"; +export declare type Season = `e${Episodes}a${Acts}`; +export declare type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; +export declare type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl"; +export declare type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br"; +export declare type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru"; +export declare type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee"; +export declare type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW"; +export {}; diff --git a/package/dist/types/general.js b/package/dist/types/general.js new file mode 100644 index 0000000..5caed73 --- /dev/null +++ b/package/dist/types/general.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=general.js.map \ No newline at end of file diff --git a/package/dist/types/general.js.map b/package/dist/types/general.js.map new file mode 100644 index 0000000..8ff32d2 --- /dev/null +++ b/package/dist/types/general.js.map @@ -0,0 +1 @@ +{"version":3,"file":"general.js","sourceRoot":"","sources":["../../src/types/general.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/competitive-updates.d.ts b/package/dist/types/raw/competitive-updates.d.ts new file mode 100644 index 0000000..aa41803 --- /dev/null +++ b/package/dist/types/raw/competitive-updates.d.ts @@ -0,0 +1,22 @@ +import { Region } from "../general"; +interface Match { + MatchID: string; + MapID: string; + SeasonID: string; + MatchStartTime: any; + TierAfterUpdate: number; + TierBeforeUpdate: number; + RankedRatingAfterUpdate: number; + RankedRatingBeforeUpdate: number; + RankedRatingEarned: number; + RankedRatingPerformanceBonus: number; + CompetitiveMovement: string; + AFKPenalty: number; +} +export interface RawCompetitiveUpdatesResponse { + Version: number; + Subject: string; + Matches: Match[]; + region: Region; +} +export {}; diff --git a/package/dist/types/raw/competitive-updates.js b/package/dist/types/raw/competitive-updates.js new file mode 100644 index 0000000..186ed06 --- /dev/null +++ b/package/dist/types/raw/competitive-updates.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=competitive-updates.js.map \ No newline at end of file diff --git a/package/dist/types/raw/competitive-updates.js.map b/package/dist/types/raw/competitive-updates.js.map new file mode 100644 index 0000000..d83d04b --- /dev/null +++ b/package/dist/types/raw/competitive-updates.js.map @@ -0,0 +1 @@ +{"version":3,"file":"competitive-updates.js","sourceRoot":"","sources":["../../../src/types/raw/competitive-updates.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/match-details.d.ts b/package/dist/types/raw/match-details.d.ts new file mode 100644 index 0000000..f74bb35 --- /dev/null +++ b/package/dist/types/raw/match-details.d.ts @@ -0,0 +1,228 @@ +import { Region } from "../general"; +interface PartyRRPenalties { + [key: string]: number; +} +interface MatchInfo { + matchId: string; + mapId: string; + gamePodId: string; + gameLoopZone: string; + gameServerAddress: string; + gameVersion: string; + gameLengthMillis: number; + gameStartMillis: number; + provisioningFlowID: string; + isCompleted: boolean; + customGameName: string; + forcePostProcessing: boolean; + queueID: string; + gameMode: string; + isRanked: boolean; + isMatchSampled: boolean; + seasonId: string; + completionState: string; + platformType: string; + partyRRPenalties: PartyRRPenalties; + shouldMatchDisablePenalties: boolean; +} +interface PlatformInfo { + platformType: string; + platformOS: string; + platformOSVersion: string; + platformChipset: string; +} +interface AbilityCasts { + grenadeCasts: number; + ability1Casts: number; + ability2Casts: number; + ultimateCasts: number; +} +interface Stats { + score: number; + roundsPlayed: number; + kills: number; + deaths: number; + assists: number; + playtimeMillis: number; + abilityCasts: AbilityCasts; +} +interface RoundDamage { + round: number; + receiver: string; + damage: number; +} +interface XpModification { + Value: number; + ID: string; +} +interface BehaviorFactors { + afkRounds: number; + collisions: number; + damageParticipationOutgoing: number; + friendlyFireIncoming: number; + friendlyFireOutgoing: number; + mouseMovement: number; + stayedInSpawnRounds: number; +} +interface BaseAction { + idleTimeMillis: number; + objectiveCompleteTimeMillis: number; +} +interface AdaptiveBots extends BaseAction { + adaptiveBotAverageDurationMillisAllAttempts: number; + adaptiveBotAverageDurationMillisFirstAttempt: number; + killDetailsFirstAttempt?: any; +} +interface DefendBombSite extends BaseAction { + success: boolean; +} +interface SettingStatus { + isMouseSensitivityDefault: boolean; + isCrosshairDefault: boolean; +} +interface NewPlayerExperienceDetails { + basicMovement: BaseAction; + basicGunSkill: BaseAction; + adaptiveBots: AdaptiveBots; + ability: BaseAction; + bombPlant: BaseAction; + defendBombSite: DefendBombSite; + settingStatus: SettingStatus; +} +interface Player { + subject: string; + gameName: string; + tagLine: string; + platformInfo: PlatformInfo; + teamId: string; + partyId: string; + characterId: string; + stats: Stats; + roundDamage: RoundDamage[]; + competitiveTier: number; + playerCard: string; + playerTitle: string; + preferredLevelBorder: string; + accountLevel: number; + sessionPlaytimeMinutes: number; + xpModifications: XpModification[]; + behaviorFactors: BehaviorFactors; + newPlayerExperienceDetails: NewPlayerExperienceDetails; +} +interface Team { + teamId: string; + won: boolean; + roundsPlayed: number; + roundsWon: number; + numPoints: number; +} +interface Location { + x: number; + y: number; +} +interface PlantPlayerLocation { + subject: string; + viewRadians: number; + location: Location; +} +interface DefusePlayerLocation { + subject: string; + viewRadians: number; + location: Location; +} +interface PlayerLocation { + subject: string; + viewRadians: number; + location: Location; +} +interface FinishingDamage { + damageType: string; + damageItem: string; + isSecondaryFireMode: boolean; +} +interface Kill { + gameTime: number; + roundTime: number; + killer: string; + victim: string; + victimLocation: Location; + assistants: string[]; + playerLocations: PlayerLocation[]; + finishingDamage: FinishingDamage; +} +interface MatchKill extends Kill { + round: number; +} +interface Damage { + receiver: string; + damage: number; + legshots: number; + bodyshots: number; + headshots: number; +} +interface Economy { + loadoutValue: number; + weapon: string; + armor: string; + remaining: number; + spent: number; +} +interface AbilityEffects { + grenadeEffects?: any; + ability1Effects?: any; + ability2Effects?: any; + ultimateEffects?: any; +} +interface PlayerStat { + subject: string; + kills: Kill[]; + damage: Damage[]; + score: number; + economy: Economy; + ability: AbilityEffects; + wasAfk: boolean; + wasPenalized: boolean; + stayedInSpawn: boolean; +} +interface PlayerEconomy { + subject: string; + loadoutValue: number; + weapon: string; + armor: string; + remaining: number; + spent: number; +} +interface PlayerScore { + subject: string; + score: number; +} +interface RoundResult { + roundNum: number; + roundResult: string; + roundCeremony: string; + winningTeam: string; + plantRoundTime: number; + plantPlayerLocations: PlantPlayerLocation[]; + plantLocation: Location; + plantSite: string; + defuseRoundTime: number; + defusePlayerLocations: DefusePlayerLocation[]; + defuseLocation: Location; + playerStats: PlayerStat[]; + roundResultCode: string; + playerEconomies: PlayerEconomy[]; + playerScores: PlayerScore[]; + bombPlanter: string; + bombDefuser: string; +} +export interface RawMatchDetailsResponse { + matchInfo: MatchInfo; + players: Player[]; + bots: any[]; + coaches: any[]; + teams: Team[]; + roundResults: RoundResult[]; + kills: MatchKill[]; + region: Region; +} +export {}; diff --git a/package/dist/types/raw/match-details.js b/package/dist/types/raw/match-details.js new file mode 100644 index 0000000..8d12500 --- /dev/null +++ b/package/dist/types/raw/match-details.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=match-details.js.map \ No newline at end of file diff --git a/package/dist/types/raw/match-details.js.map b/package/dist/types/raw/match-details.js.map new file mode 100644 index 0000000..1db11c7 --- /dev/null +++ b/package/dist/types/raw/match-details.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-details.js","sourceRoot":"","sources":["../../../src/types/raw/match-details.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/match-history.d.ts b/package/dist/types/raw/match-history.d.ts new file mode 100644 index 0000000..a1948b0 --- /dev/null +++ b/package/dist/types/raw/match-history.d.ts @@ -0,0 +1,15 @@ +import { Region } from "../general"; +interface History { + MatchID: string; + GameStartTime: any; + QueueID: string; +} +export interface RawMatchHistoryResponse { + Subject: string; + BeginIndex: number; + EndIndex: number; + Total: number; + History: History[]; + region: Region; +} +export {}; diff --git a/package/dist/types/raw/match-history.js b/package/dist/types/raw/match-history.js new file mode 100644 index 0000000..e88df83 --- /dev/null +++ b/package/dist/types/raw/match-history.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=match-history.js.map \ No newline at end of file diff --git a/package/dist/types/raw/match-history.js.map b/package/dist/types/raw/match-history.js.map new file mode 100644 index 0000000..95ce698 --- /dev/null +++ b/package/dist/types/raw/match-history.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-history.js","sourceRoot":"","sources":["../../../src/types/raw/match-history.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/mmr.d.ts b/package/dist/types/raw/mmr.d.ts new file mode 100644 index 0000000..e7ba889 --- /dev/null +++ b/package/dist/types/raw/mmr.d.ts @@ -0,0 +1,60 @@ +import { Region } from "../general"; +interface WinsByTier { + [tier: number]: number; +} +interface SeasonalInfoBySeasonID { + SeasonID: string; + NumberOfWins: number; + NumberOfWinsWithPlacements: number; + NumberOfGames: number; + Rank: number; + CapstoneWins: number; + LeaderboardRank: number; + CompetitiveTier: number; + RankedRating: number; + WinsByTier: WinsByTier; + GamesNeededForRating: number; + TotalWinsNeededForRank: number; +} +interface Queue { + TotalGamesNeededForRating: number; + TotalGamesNeededForLeaderboard: number; + CurrentSeasonGamesNeededForRating: number; + SeasonalInfoBySeasonID: SeasonalInfoBySeasonID; +} +interface QueueSkills { + competitive: Queue; + custom: Queue; + deathmatch: Queue; + ggteam: Queue; + onefa: Queue; + seeding: Queue; + snowball: Queue; + spikerush: Queue; + unrated: Queue; +} +interface LatestCompetitiveUpdate { + MatchID: string; + MapID: string; + SeasonID: string; + MatchStartTime: number; + TierAfterUpdate: number; + TierBeforeUpdate: number; + RankedRatingAfterUpdate: number; + RankedRatingBeforeUpdate: number; + RankedRatingEarned: number; + RankedRatingPerformanceBonus: number; + CompetitiveMovement: string; + AFKPenalty: number; +} +export interface RawMMRResponse { + Version: number; + Subject: string; + NewPlayerExperienceFinished: boolean; + QueueSkills: QueueSkills; + LatestCompetitiveUpdate: LatestCompetitiveUpdate; + IsLeaderboardAnonymized: boolean; + IsActRankBadgeHidden: boolean; + region: Region; +} +export {}; diff --git a/package/dist/types/raw/mmr.js b/package/dist/types/raw/mmr.js new file mode 100644 index 0000000..30f663a --- /dev/null +++ b/package/dist/types/raw/mmr.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=mmr.js.map \ No newline at end of file diff --git a/package/dist/types/raw/mmr.js.map b/package/dist/types/raw/mmr.js.map new file mode 100644 index 0000000..3efcce9 --- /dev/null +++ b/package/dist/types/raw/mmr.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mmr.js","sourceRoot":"","sources":["../../../src/types/raw/mmr.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-content.d.ts b/package/dist/types/v1-content.d.ts new file mode 100644 index 0000000..46266be --- /dev/null +++ b/package/dist/types/v1-content.d.ts @@ -0,0 +1,39 @@ +import { Locale } from "./general"; +export declare type LocalizedNames = { + [language in Locale]: string; +}; +export interface Asset { + name: string; + localizedNames?: LocalizedNames; + id: string; + assetName: string; +} +export interface AssetWithPath extends Asset { + assetPath: string; +} +export interface Act { + id: string; + parentId: string; + type: string; + name: string; + localizedNames?: LocalizedNames; + isActive: boolean; +} +export interface ContentResponse { + version: string; + characters: Asset[]; + maps: AssetWithPath[]; + chromas: Asset[]; + skins: Asset[]; + skinLevels: Asset[]; + equips: Asset[]; + gameModes: AssetWithPath[]; + sprays: Asset[]; + sprayLevels: Asset[]; + charms: Asset[]; + charmLevels: Asset[]; + playerCards: Asset[]; + playerTitles: Asset[]; + acts: Act[]; + ceremonies: Asset[]; +} diff --git a/package/dist/types/v1-content.js b/package/dist/types/v1-content.js new file mode 100644 index 0000000..94598be --- /dev/null +++ b/package/dist/types/v1-content.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-content.js.map \ No newline at end of file diff --git a/package/dist/types/v1-content.js.map b/package/dist/types/v1-content.js.map new file mode 100644 index 0000000..cd1cb25 --- /dev/null +++ b/package/dist/types/v1-content.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-content.js","sourceRoot":"","sources":["../../src/types/v1-content.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-crosshair.d.ts b/package/dist/types/v1-crosshair.d.ts new file mode 100644 index 0000000..2a0762c --- /dev/null +++ b/package/dist/types/v1-crosshair.d.ts @@ -0,0 +1,2 @@ +/// +export declare type CrosshairResponse = Buffer; diff --git a/package/dist/types/v1-crosshair.js b/package/dist/types/v1-crosshair.js new file mode 100644 index 0000000..5cedce2 --- /dev/null +++ b/package/dist/types/v1-crosshair.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-crosshair.js.map \ No newline at end of file diff --git a/package/dist/types/v1-crosshair.js.map b/package/dist/types/v1-crosshair.js.map new file mode 100644 index 0000000..5ba9a84 --- /dev/null +++ b/package/dist/types/v1-crosshair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-crosshair.js","sourceRoot":"","sources":["../../src/types/v1-crosshair.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-featured-items.d.ts b/package/dist/types/v1-featured-items.d.ts new file mode 100644 index 0000000..9082656 --- /dev/null +++ b/package/dist/types/v1-featured-items.d.ts @@ -0,0 +1,29 @@ +export interface BaseItem { + ItemTypeID: string; + ItemID: string; + Amount: number; +} +export interface Item { + Item: BaseItem; + BasePrice: number; + CurrencyID: string; + DiscountPercent: number; + DiscountedPrice: number; + IsPromoItem: boolean; +} +export interface Bundle { + ID: string; + DataAssetID: string; + CurrencyID: string; + Items: Item[]; + DurationRemainingInSeconds: number; + WholesaleOnly: boolean; +} +export interface FeaturedBundle { + Bundle: Bundle; + Bundles: Bundle[]; + BundleRemainingDurationInSeconds: number; +} +export interface FeaturedItemsResponse { + FeaturedBundle: FeaturedBundle; +} diff --git a/package/dist/types/v1-featured-items.js b/package/dist/types/v1-featured-items.js new file mode 100644 index 0000000..14a3970 --- /dev/null +++ b/package/dist/types/v1-featured-items.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-featured-items.js.map \ No newline at end of file diff --git a/package/dist/types/v1-featured-items.js.map b/package/dist/types/v1-featured-items.js.map new file mode 100644 index 0000000..bcf9e51 --- /dev/null +++ b/package/dist/types/v1-featured-items.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-featured-items.js","sourceRoot":"","sources":["../../src/types/v1-featured-items.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-profile.d.ts b/package/dist/types/v1-profile.d.ts new file mode 100644 index 0000000..570de6e --- /dev/null +++ b/package/dist/types/v1-profile.d.ts @@ -0,0 +1,17 @@ +import { Region } from "./general"; +export interface Card { + small: string; + large: string; + wide: string; + id: string; +} +export interface ProfileResponse { + puuid: string; + region: Region; + account_level: number; + name: string; + tag: string; + card: Card; + last_update: string; + last_update_raw: number; +} diff --git a/package/dist/types/v1-profile.js b/package/dist/types/v1-profile.js new file mode 100644 index 0000000..79aec3e --- /dev/null +++ b/package/dist/types/v1-profile.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-profile.js.map \ No newline at end of file diff --git a/package/dist/types/v1-profile.js.map b/package/dist/types/v1-profile.js.map new file mode 100644 index 0000000..793dbe3 --- /dev/null +++ b/package/dist/types/v1-profile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-profile.js","sourceRoot":"","sources":["../../src/types/v1-profile.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-status.d.ts b/package/dist/types/v1-status.d.ts new file mode 100644 index 0000000..4daae86 --- /dev/null +++ b/package/dist/types/v1-status.d.ts @@ -0,0 +1,29 @@ +import { Locale } from "./general"; +export interface Title { + content: string; + locale: Locale; +} +export interface Update { + created_at: Date; + updated_at: Date; + publish: boolean; + id: number; + translations: Title[]; + publish_locations: string[]; + author: string; +} +export interface Incident { + created_at: Date; + archive_at: Date; + updates: Update[]; + platforms: string[]; + updated_at: Date; + id: number; + titles: Title[]; + maintenance_status: string; + incident_severity: string; +} +export interface StatusResponse { + maintenances: Incident[]; + incidents: Incident[]; +} diff --git a/package/dist/types/v1-status.js b/package/dist/types/v1-status.js new file mode 100644 index 0000000..cb350ed --- /dev/null +++ b/package/dist/types/v1-status.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-status.js.map \ No newline at end of file diff --git a/package/dist/types/v1-status.js.map b/package/dist/types/v1-status.js.map new file mode 100644 index 0000000..cd0409e --- /dev/null +++ b/package/dist/types/v1-status.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-status.js","sourceRoot":"","sources":["../../src/types/v1-status.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-store-offers.d.ts b/package/dist/types/v1-store-offers.d.ts new file mode 100644 index 0000000..7f30d89 --- /dev/null +++ b/package/dist/types/v1-store-offers.d.ts @@ -0,0 +1,23 @@ +export interface Cost { + "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": number; +} +export interface Reward { + ItemTypeID: string; + ItemID: string; + Quantity: number; +} +export interface Offer { + OfferID: string; + IsDirectPurchase: boolean; + StartDate: Date; + Cost: Cost; + Rewards: Reward[]; +} +export interface UpgradeCurrencyOffer { + OfferID: string; + StorefrontItemID: string; +} +export interface StoreOffersResponse { + Offers: Offer[]; + UpgradeCurrencyOffers: UpgradeCurrencyOffer[]; +} diff --git a/package/dist/types/v1-store-offers.js b/package/dist/types/v1-store-offers.js new file mode 100644 index 0000000..8126510 --- /dev/null +++ b/package/dist/types/v1-store-offers.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-store-offers.js.map \ No newline at end of file diff --git a/package/dist/types/v1-store-offers.js.map b/package/dist/types/v1-store-offers.js.map new file mode 100644 index 0000000..659fe6f --- /dev/null +++ b/package/dist/types/v1-store-offers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-store-offers.js","sourceRoot":"","sources":["../../src/types/v1-store-offers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-version.d.ts b/package/dist/types/v1-version.d.ts new file mode 100644 index 0000000..1890966 --- /dev/null +++ b/package/dist/types/v1-version.d.ts @@ -0,0 +1,6 @@ +export interface VersionResponse { + version: string; + clientVersion: string; + branch: string; + region: string; +} diff --git a/package/dist/types/v1-version.js b/package/dist/types/v1-version.js new file mode 100644 index 0000000..c39aef4 --- /dev/null +++ b/package/dist/types/v1-version.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-version.js.map \ No newline at end of file diff --git a/package/dist/types/v1-version.js.map b/package/dist/types/v1-version.js.map new file mode 100644 index 0000000..26e867f --- /dev/null +++ b/package/dist/types/v1-version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-version.js","sourceRoot":"","sources":["../../src/types/v1-version.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-website.d.ts b/package/dist/types/v1-website.d.ts new file mode 100644 index 0000000..1ecd313 --- /dev/null +++ b/package/dist/types/v1-website.d.ts @@ -0,0 +1,16 @@ +export interface Post { + banner_url: string; + category: string; + date: Date; + external_link: string; + title: string; + url: string; +} +export interface WebsiteResponse { + banner_url: string; + category: string; + date: Date; + external_link: string; + title: string; + url: string; +} diff --git a/package/dist/types/v1-website.js b/package/dist/types/v1-website.js new file mode 100644 index 0000000..7cbedb4 --- /dev/null +++ b/package/dist/types/v1-website.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v1-website.js.map \ No newline at end of file diff --git a/package/dist/types/v1-website.js.map b/package/dist/types/v1-website.js.map new file mode 100644 index 0000000..6762982 --- /dev/null +++ b/package/dist/types/v1-website.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1-website.js","sourceRoot":"","sources":["../../src/types/v1-website.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-leaderboard.d.ts b/package/dist/types/v2-leaderboard.d.ts new file mode 100644 index 0000000..cbe16e6 --- /dev/null +++ b/package/dist/types/v2-leaderboard.d.ts @@ -0,0 +1,23 @@ +export interface Player { + PlayerCardID: string; + TitleID: string; + IsBanned: boolean; + IsAnonymized: boolean; + puuid: string; + gameName: string; + tagLine: string; + leaderboardRank: number; + rankedRating: number; + numberOfWins: number; + competitiveTier: number; +} +export interface LeaderboardResponse { + last_update: number; + next_update: number; + total_players: number; + radiant_threshold: number; + immortal_3_threshold: number; + immortal_2_threshold: number; + immortal_1_threshold: number; + players: Player[]; +} diff --git a/package/dist/types/v2-leaderboard.js b/package/dist/types/v2-leaderboard.js new file mode 100644 index 0000000..89af328 --- /dev/null +++ b/package/dist/types/v2-leaderboard.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v2-leaderboard.js.map \ No newline at end of file diff --git a/package/dist/types/v2-leaderboard.js.map b/package/dist/types/v2-leaderboard.js.map new file mode 100644 index 0000000..85fd64e --- /dev/null +++ b/package/dist/types/v2-leaderboard.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v2-leaderboard.js","sourceRoot":"","sources":["../../src/types/v2-leaderboard.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-match.d.ts b/package/dist/types/v2-match.d.ts new file mode 100644 index 0000000..fa64e9e --- /dev/null +++ b/package/dist/types/v2-match.d.ts @@ -0,0 +1,2 @@ +import { Match } from "./v3-matches"; +export declare type MatchResponse = Match; diff --git a/package/dist/types/v2-match.js b/package/dist/types/v2-match.js new file mode 100644 index 0000000..b4fb289 --- /dev/null +++ b/package/dist/types/v2-match.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v2-match.js.map \ No newline at end of file diff --git a/package/dist/types/v2-match.js.map b/package/dist/types/v2-match.js.map new file mode 100644 index 0000000..1f146e8 --- /dev/null +++ b/package/dist/types/v2-match.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v2-match.js","sourceRoot":"","sources":["../../src/types/v2-match.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-mmr-history.d.ts b/package/dist/types/v2-mmr-history.d.ts new file mode 100644 index 0000000..35755cb --- /dev/null +++ b/package/dist/types/v2-mmr-history.d.ts @@ -0,0 +1,18 @@ +import { Rank } from "./general"; +export interface Images { + small: string; + large: string; + triangle_down: string; + triangle_up: string; +} +export interface MMRHistoryGame { + currenttier: number; + currenttierpatched: Rank; + images: Images; + ranking_in_tier: number; + mmr_change_to_last_game: number; + elo: number; + date: string; + date_raw: number; +} +export declare type MMRHistoryResponse = MMRHistoryGame[]; diff --git a/package/dist/types/v2-mmr-history.js b/package/dist/types/v2-mmr-history.js new file mode 100644 index 0000000..e41be8b --- /dev/null +++ b/package/dist/types/v2-mmr-history.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v2-mmr-history.js.map \ No newline at end of file diff --git a/package/dist/types/v2-mmr-history.js.map b/package/dist/types/v2-mmr-history.js.map new file mode 100644 index 0000000..a3498e5 --- /dev/null +++ b/package/dist/types/v2-mmr-history.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v2-mmr-history.js","sourceRoot":"","sources":["../../src/types/v2-mmr-history.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-mmr.d.ts b/package/dist/types/v2-mmr.d.ts new file mode 100644 index 0000000..8b20e21 --- /dev/null +++ b/package/dist/types/v2-mmr.d.ts @@ -0,0 +1,35 @@ +import { Rank, Season } from "./general"; +export interface SeasonMMR { + error?: "No data available"; + wins: number; + number_of_games: number; + final_rank: number; + final_rank_patched: Rank; + act_rank_wins: { + patched_tier: Rank; + tier: number; + }[]; +} +export interface MMRResponse { + name: string; + tag: string; + puuid: string; + current_data: { + currenttier: number; + currenttierpatched: Rank; + images: { + small: string; + large: string; + triangle_up: string; + triangle_down: string; + }; + ranking_in_tier: number; + mmr_change_to_last_game: number; + elo: number; + games_needed_for_rating: number; + old: boolean; + }; + by_season: { + [key in Season]: SeasonMMR; + }; +} diff --git a/package/dist/types/v2-mmr.js b/package/dist/types/v2-mmr.js new file mode 100644 index 0000000..1e13b3c --- /dev/null +++ b/package/dist/types/v2-mmr.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v2-mmr.js.map \ No newline at end of file diff --git a/package/dist/types/v2-mmr.js.map b/package/dist/types/v2-mmr.js.map new file mode 100644 index 0000000..7a8dff4 --- /dev/null +++ b/package/dist/types/v2-mmr.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v2-mmr.js","sourceRoot":"","sources":["../../src/types/v2-mmr.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v3-matches.d.ts b/package/dist/types/v3-matches.d.ts new file mode 100644 index 0000000..bd3c5e7 --- /dev/null +++ b/package/dist/types/v3-matches.d.ts @@ -0,0 +1,227 @@ +import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general"; +export interface Player { + puuid: string; + name: string; + tag: string; + team: "Red" | "Blue"; + level: number; + character: Characters; + currenttier: number; + currenttier_patched: Rank; + player_card: string; + player_title: string; + party_id: string; + session_playtime: { + minutes: number; + seconds: number; + milliseconds: number; + }; + behavior: { + afk_rounds: number; + friendly_fire: { + incoming: number; + outgoing: number; + }; + rounds_in_spawn: number; + }; + platform: { + type: string; + os: { + name: string; + version: string; + }; + }; + ability_casts: { + c_cast: number; + q_cast: number; + e_cast: number; + x_cast: number; + }; + assets: { + card: { + small: string; + large: string; + wide: string; + }; + agent: { + small: string; + bust: string; + full: string; + killfeed: string; + }; + }; + stats: { + score: number; + kills: number; + deaths: number; + assists: number; + bodyshots: number; + headshots: number; + legshots: number; + }; + economy: { + spent: { + overall: number; + average: number; + }; + loadout_value: { + overall: number; + average: number; + }; + }; + damage_made: number; + damage_received: number; +} +declare type PlayerLocation = { + x: number; + y: number; +}; +export interface PlayerLocationOnEvent { + player_puuid: string; + player_display_name: string; + player_team: "Red" | "Blue"; + location: PlayerLocation; + view_radians: number; +} +export interface KillEvent { + kill_time_in_round: number; + kill_time_in_match: number; + killer_puuid: string; + killer_display_name: string; + killer_team: "Red" | "Blue"; + victim_puuid: string; + victim_display_name: string; + victim_team: "Red" | "Blue"; + victim_death_location: PlayerLocation; + damage_weapon_id: string; + damage_weapon_name: Weapon; + damage_weapon_assets: { + display_icon: string; + killfeed_icon: string; + }; + secondary_fire_mode: boolean; + player_locations_on_kill: PlayerLocationOnEvent[]; + assistants: { + assistant_puuid: string; + assistant_display_name: string; + assistant_team: "Red" | "Blue"; + }[]; +} +export interface Round { + winning_team: "Red" | "Blue"; + end_type: "Eliminated" | "Bomb defused" | "Bomb detonated"; + bomb_planted: boolean; + bomb_defused: boolean; + plant_events: { + plant_location?: PlayerLocation; + planted_by?: { + puuid: string; + display_name: string; + team: "Red" | "Blue"; + }; + plant_site?: "A" | "B" | "C"; + plant_time_in_round?: number; + player_locations_on_plant?: PlayerLocationOnEvent[]; + }; + defuse_events: { + defuse_location?: PlayerLocation; + defused_by?: { + puuid: string; + display_name: string; + team: "Red" | "Blue"; + }; + defuse_time_in_round?: number; + player_locations_on_defuse?: PlayerLocationOnEvent[]; + }; + player_stats: { + ability_casts: { + c_cast?: number; + q_cast?: number; + e_cast?: number; + x_cast?: number; + }; + player_puuid: string; + player_display_name: string; + player_team: "Red" | "Blue"; + damage_events: { + receiver_puuid: string; + receiver_display_name: string; + receiver_team: "Red" | "Blue"; + bodyshots: number; + damage: number; + headshots: number; + legshots: number; + }[]; + damage: number; + headshots: number; + bodyshots: number; + legshots: number; + kill_events: KillEvent[]; + kills: number; + score: number; + economy: { + loadout_value: number; + weapon: { + id: string; + name: Weapon; + assets: { + display_icon: string; + killfeed_icon: string; + }; + }; + armor: { + id: string; + name: "Heavy Shields" | "Light Shields"; + assets: { + display_icon: string; + }; + }; + remaining: number; + spent: number; + }; + was_afk: boolean; + was_penalized: boolean; + stayed_in_spawn: boolean; + }; +} +export interface KillEventMatch extends KillEvent { + round: number; +} +export interface Match { + metadata: { + map: ValorantMap; + game_version: string; + game_length: number; + game_start: number; + game_start_patched: string; + rounds_played: number; + mode: Mode; + queue: string; + season_id: "string"; + platform: "PC"; + matchid: string; + region: Region; + cluster: string; + }; + players: { + all_players: Player[]; + red: Player[]; + blue: Player[]; + }; + teams: { + red: { + has_won: false; + rounds_won: number; + rounds_lost: number; + }; + blue: { + has_won: false; + rounds_won: number; + rounds_lost: number; + }; + }; + rounds: Round[]; + kills: KillEventMatch[]; +} +export declare type MatchesResponse = Match[]; +export {}; diff --git a/package/dist/types/v3-matches.js b/package/dist/types/v3-matches.js new file mode 100644 index 0000000..f05eab6 --- /dev/null +++ b/package/dist/types/v3-matches.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=v3-matches.js.map \ No newline at end of file diff --git a/package/dist/types/v3-matches.js.map b/package/dist/types/v3-matches.js.map new file mode 100644 index 0000000..bf8f20f --- /dev/null +++ b/package/dist/types/v3-matches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v3-matches.js","sourceRoot":"","sources":["../../src/types/v3-matches.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/util.d.ts b/package/dist/util.d.ts new file mode 100644 index 0000000..cff5868 --- /dev/null +++ b/package/dist/util.d.ts @@ -0,0 +1,20 @@ +import type { Rank, ValorantMap } from "./types/general.js"; +/** + * Extra util. Useful for displaying info about a certain map + */ +export declare const mapImages: { + [key in ValorantMap]: { + splash: string; + minimap: string; + landscape: string; + }; +}; +/** + * Extra util. Useful for calls such as `matches` that don't include rank images on players + */ +export declare const rankImages: { + [key in Rank]: { + large: string; + small: string; + }; +}; diff --git a/package/dist/util.js b/package/dist/util.js new file mode 100644 index 0000000..62e86b7 --- /dev/null +++ b/package/dist/util.js @@ -0,0 +1,155 @@ +/** + * Extra util. Useful for displaying info about a certain map + */ +export const mapImages = { + Ascent: { + splash: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/splash.png", + minimap: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/displayicon.png", + landscape: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/listviewicon.png" + }, + Split: { + splash: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/splash.png", + minimap: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/displayicon.png", + landscape: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/listviewicon.png" + }, + Fracture: { + splash: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/splash.png", + minimap: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/displayicon.png", + landscape: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/listviewicon.png" + }, + Bind: { + splash: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/splash.png", + minimap: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/listviewicon.png" + }, + Breeze: { + splash: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/splash.png", + minimap: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/listviewicon.png" + }, + Pearl: { + splash: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/splash.png", + minimap: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/displayicon.png", + landscape: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/listviewicon.png" + }, + Icebox: { + splash: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/splash.png", + minimap: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/displayicon.png", + landscape: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/listviewicon.png" + }, + Haven: { + splash: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/splash.png", + minimap: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/displayicon.png", + landscape: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/listviewicon.png" + } +}; +/** + * Extra util. Useful for calls such as `matches` that don't include rank images on players + */ +export const rankImages = { + Unrated: { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/smallicon.png" + }, + "Iron 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/smallicon.png" + }, + "Iron 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/smallicon.png" + }, + "Iron 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/smallicon.png" + }, + "Bronze 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/smallicon.png" + }, + "Bronze 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/smallicon.png" + }, + "Bronze 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/smallicon.png" + }, + "Silver 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/smallicon.png" + }, + "Silver 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/smallicon.png" + }, + "Silver 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/smallicon.png" + }, + "Gold 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/smallicon.png" + }, + "Gold 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/smallicon.png" + }, + "Gold 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/smallicon.png" + }, + "Platinum 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/smallicon.png" + }, + "Platinum 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/smallicon.png" + }, + "Platinum 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/smallicon.png" + }, + "Diamond 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/smallicon.png" + }, + "Diamond 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/smallicon.png" + }, + "Diamond 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/smallicon.png" + }, + "Ascendant 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/smallicon.png" + }, + "Ascendant 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/smallicon.png" + }, + "Ascendant 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/smallicon.png" + }, + "Immortal 1": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/smallicon.png" + }, + "Immortal 2": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/smallicon.png" + }, + "Immortal 3": { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/smallicon.png" + }, + Radiant: { + large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/largeicon.png", + small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/smallicon.png" + } +}; +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/package/dist/util.js.map b/package/dist/util.js.map new file mode 100644 index 0000000..f86dbd4 --- /dev/null +++ b/package/dist/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAIhB;IACF,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,QAAQ,EAAE;QACN,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,IAAI,EAAE;QACF,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;CACJ,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAwD;IAC3E,OAAO,EAAE;QACL,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,OAAO,EAAE;QACL,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;CACJ,CAAA"} \ No newline at end of file diff --git a/package/examples/discord_bot.js b/package/examples/discord_bot.js index 21ab442..0f84766 100644 --- a/package/examples/discord_bot.js +++ b/package/examples/discord_bot.js @@ -1,42 +1,36 @@ -/** - * OUTDATED NEW EXAMPLES COMING SOON - */ - -//Discord.js v13.8.0 -import { Client, Intents } from 'discord.js'; -import HenrikDevValorantAPI from 'unofficial-valorant-api'; -const VAPI = new HenrikDevValorantAPI(); +// Discord.js v13.8.0 +import { Client, Intents } from "discord.js" +import _VAPI from "unofficial-valorant-api" +const VAPI = new _VAPI() const client = new Client({ - intents: [Intents.FLAGS.GUILDS], -}); + intents: [ Intents.FLAGS.GUILDS ], +}) -client.on('ready', () => console.info(`Bot ${client.user.tag} online.`)); +client.on("ready", () => console.info(`Bot ${client.user.tag} online.`)) -client.on('interactionCreate', async interaction => { +client.on("interactionCreate", async interaction => { if (interaction.isCommand()) { switch (interaction.commandName) { - case 'mmr': { - await interaction.deferReply({ephemeral: true}); - const mmr_data = await VAPI.getMMR({ - version: 'v1', - region: 'eu', - name: interaction.options.getString('name'), - tag: interaction.options.getString('tag'), - }); - if (mmr_data.error) + case "mmr": { + await interaction.deferReply({ ephemeral: true }) + const mmr_data = await VAPI.getMMR(interaction.options.getString("name"), interaction.options.getString("tag"), "na") + + if (mmr_data.error) { return interaction.editReply({ - content: `Error ${mmr_data.status}: \n\`\`\`${JSON.stringify(mmr_data.error)}\`\`\``, - }); + content: `Error ${mmr_data.status}: \n\`\`\`${JSON.stringify(mmr_data.error)}\`\`\`` + }) + } + interaction.editReply({ content: `[${mmr_data.data.currenttierpatched}] - ${mmr_data.data.elo} ELO`, - }); + }) } } } -}); +}) -client.login('TOKEN'); +client.login("TOKEN") //Slash Command Config /* diff --git a/package/examples/download_crosshair.js b/package/examples/download_crosshair.js index 384f3c7..ead369d 100644 --- a/package/examples/download_crosshair.js +++ b/package/examples/download_crosshair.js @@ -1,12 +1,11 @@ -/** - * OUTDATED NEW EXAMPLES COMING SOON - */ +import { writeFileSync } from 'fs' +import _VAPI from 'unofficial-valorant-api' -import { writeFileSync } from 'fs'; -import HenrikDevValorantAPI from 'unofficial-valorant-api'; -const VAPI = new HenrikDevValorantAPI(); -async function download(crosshair_code) { - const crosshair_data = await VAPI.getCrosshair({code: crosshair_code}); - writeFileSync(`${crosshair_code}.png`, crosshair_data.data); -} -download('0;P;c;5;t;3;o;1;f;0;m;1;0t;4;0l;5;0o;0;0a;1;0f;0;1t;8;1l;3;1o;0;1a;1;1m;0;1f;0'); +// Initialize API +const VAPI = new _VAPI() + +// Download crosshair +const crosshair = await VAPI.getCrosshair("CROSSHAIR CODE HERE") + +// Write crosshair to crosshair.png +writeFileSync(`crosshair.png`, crosshair.data) diff --git a/package/package.json b/package/package.json index 80bf5c1..4269623 100644 --- a/package/package.json +++ b/package/package.json @@ -2,7 +2,8 @@ "name": "unofficial-valorant-api", "version": "3.0.0-stable.0", "description": "Library for the Unofficial VALORANT API by api.henrikdev.xyz", - "main": "./src/index.js", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "dependencies": { "axios": "^0.27.2" }, @@ -23,6 +24,10 @@ "license": "ISC", "type": "module", "devDependencies": { - "@types/node": "^18.7.5" + "@types/node": "^18.7.5", + "@typescript-eslint/eslint-plugin": "^5.33.1", + "@typescript-eslint/parser": "^5.33.1", + "eslint": "^8.22.0", + "typescript": "^4.7.4" } } diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml index 7d5b451..2de76b7 100644 --- a/package/pnpm-lock.yaml +++ b/package/pnpm-lock.yaml @@ -2,20 +2,259 @@ lockfileVersion: 5.4 specifiers: '@types/node': ^18.7.5 + '@typescript-eslint/eslint-plugin': ^5.33.1 + '@typescript-eslint/parser': ^5.33.1 axios: ^0.27.2 + eslint: ^8.22.0 + typescript: ^4.7.4 dependencies: axios: 0.27.2 + typescript: 4.7.4 devDependencies: '@types/node': 18.7.5 + '@typescript-eslint/eslint-plugin': 5.33.1_vsoshirnpb7xw6mr7xomgfas2i + '@typescript-eslint/parser': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + eslint: 8.22.0 packages: + /@eslint/eslintrc/1.3.0: + resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.3.3 + globals: 13.17.0 + ignore: 5.2.0 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/config-array/0.10.4: + resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/gitignore-to-minimatch/1.0.2: + resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} + dev: true + + /@humanwhocodes/object-schema/1.2.1: + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + dev: true + + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.13.0 + dev: true + + /@types/json-schema/7.0.11: + resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + dev: true + /@types/node/18.7.5: resolution: {integrity: sha512-NcKK6Ts+9LqdHJaW6HQmgr7dT/i3GOHG+pt6BiWv++5SnjtRd4NXeiuN2kA153SjhXPR/AhHIPHPbrsbpUVOww==} dev: true + /@typescript-eslint/eslint-plugin/5.33.1_vsoshirnpb7xw6mr7xomgfas2i: + resolution: {integrity: sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/type-utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + debug: 4.3.4 + eslint: 8.22.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/typescript-estree': 5.33.1_typescript@4.7.4 + debug: 4.3.4 + eslint: 8.22.0 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager/5.33.1: + resolution: {integrity: sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/visitor-keys': 5.33.1 + dev: true + + /@typescript-eslint/type-utils/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + debug: 4.3.4 + eslint: 8.22.0 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types/5.33.1: + resolution: {integrity: sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/typescript-estree/5.33.1_typescript@4.7.4: + resolution: {integrity: sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/visitor-keys': 5.33.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/typescript-estree': 5.33.1_typescript@4.7.4 + eslint: 8.22.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.22.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.33.1: + resolution: {integrity: sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.33.1 + eslint-visitor-keys: 3.3.0 + dev: true + + /acorn-jsx/5.3.2_acorn@8.8.0: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.8.0 + dev: true + + /acorn/8.8.0: + resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv/6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex/5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /argparse/2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-union/2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false @@ -29,6 +268,48 @@ packages: - debug dev: false + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /callsites/3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /chalk/4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + /combined-stream/1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -36,11 +317,244 @@ packages: delayed-stream: 1.0.0 dev: false + /concat-map/0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /cross-spawn/7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is/0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + /delayed-stream/1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: false + /dir-glob/3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine/3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /escape-string-regexp/4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-scope/5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope/7.1.1: + resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.22.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.22.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-visitor-keys/2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + dev: true + + /eslint-visitor-keys/3.3.0: + resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint/8.22.0: + resolution: {integrity: sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.3.0 + '@humanwhocodes/config-array': 0.10.4 + '@humanwhocodes/gitignore-to-minimatch': 1.0.2 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.22.0 + eslint-visitor-keys: 3.3.0 + espree: 9.3.3 + esquery: 1.4.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + functional-red-black-tree: 1.0.1 + glob-parent: 6.0.2 + globals: 13.17.0 + globby: 11.1.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.0 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree/9.3.3: + resolution: {integrity: sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.0 + acorn-jsx: 5.3.2_acorn@8.8.0 + eslint-visitor-keys: 3.3.0 + dev: true + + /esquery/1.4.0: + resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse/4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse/4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + + /estraverse/5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils/2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /fast-deep-equal/3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify/2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein/2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq/1.13.0: + resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache/6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.0.4 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up/5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache/3.0.4: + resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.6 + rimraf: 3.0.2 + dev: true + + /flatted/3.2.6: + resolution: {integrity: sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==} + dev: true + /follow-redirects/1.15.1: resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} engines: {node: '>=4.0'} @@ -60,6 +574,171 @@ packages: mime-types: 2.1.35 dev: false + /fs.realpath/1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /functional-red-black-tree/1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + dev: true + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent/6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob/7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals/13.17.0: + resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globby/11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /grapheme-splitter/1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /ignore/5.2.0: + resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} + engines: {node: '>= 4'} + dev: true + + /import-fresh/3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash/0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight/1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits/2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-extglob/2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /isexe/2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /js-yaml/4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-schema-traverse/0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-stable-stringify-without-jsonify/1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /levn/0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /locate-path/6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge/4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /lru-cache/6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + /mime-db/1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -71,3 +750,245 @@ packages: dependencies: mime-db: 1.52.0 dev: false + + /minimatch/3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /ms/2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /natural-compare/1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /once/1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator/0.9.1: + resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.3 + dev: true + + /p-limit/3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate/5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module/1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists/4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute/1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key/3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-type/4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /prelude-ls/1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /punycode/2.1.1: + resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} + engines: {node: '>=6'} + dev: true + + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /regexpp/3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + dev: true + + /resolve-from/4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf/3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /semver/7.3.7: + resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command/2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex/3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /slash/3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /strip-ansi/6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-json-comments/3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /text-table/0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /tslib/1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tsutils/3.21.0_typescript@4.7.4: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.7.4 + dev: true + + /type-check/0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest/0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typescript/4.7.4: + resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + engines: {node: '>=4.2.0'} + hasBin: true + + /uri-js/4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.1.1 + dev: true + + /v8-compile-cache/2.3.0: + resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} + dev: true + + /which/2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /word-wrap/1.2.3: + resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} + engines: {node: '>=0.10.0'} + dev: true + + /wrappy/1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yallist/4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yocto-queue/0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true diff --git a/package/src/index.ts b/package/src/index.ts index 9882d28..a2ee24d 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,13 +1,22 @@ import axios, { type AxiosRequestConfig } from "axios" -import type { Mode, Region, Season, ValorantMap } from "./types/general.js" -import type { CrosshairResponse } from "./types/v1-crosshair.js" -import type { FeaturedItemsResponse } from "./types/v1-featured-items.js" -import type { ProfileResponse } from "./types/v1-profile.js" -import type { StoreOffersResponse } from "./types/v1-store-offers.js" -import type { VersionResponse } from "./types/v1-version.js" -import type { WebsiteResponse } from "./types/v1-website.js" -import type { MMRResponse } from "./types/v2-mmr.js" -import type { MatchesResponse } from "./types/v3-matches.js" +import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general" +import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates" +import type { RawMatchDetailsResponse } from "./types/raw/match-details" +import type { RawMatchHistoryResponse } from "./types/raw/match-history" +import type { RawMMRResponse } from "./types/raw/mmr" +import type { ContentResponse } from "./types/v1-content" +import type { CrosshairResponse } from "./types/v1-crosshair" +import type { FeaturedItemsResponse } from "./types/v1-featured-items" +import type { ProfileResponse } from "./types/v1-profile" +import type { StatusResponse } from "./types/v1-status" +import type { StoreOffersResponse } from "./types/v1-store-offers" +import type { VersionResponse } from "./types/v1-version" +import type { WebsiteResponse } from "./types/v1-website" +import type { LeaderboardResponse } from "./types/v2-leaderboard" +import type { MatchResponse } from "./types/v2-match" +import type { MMRResponse } from "./types/v2-mmr" +import type { MMRHistoryResponse } from "./types/v2-mmr-history" +import type { MatchesResponse } from "./types/v3-matches" interface APIResponse { status: number @@ -81,39 +90,72 @@ interface RateLimit { const baseUrl = "https://api.henrikdev.xyz/valorant" export default class { - /** + /** + * You must call `initUtils()` before using this! + */ + rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } } + /** + * You must call `initUtils()` before using this! + */ + mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } } + + /** * The main class to call API functions from * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD */ - constructor(private token?: string) {} + constructor(private token?: string) {} + + async initUtils() { + const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data + if (mapsReq) { + this.mapImages = {} as any + mapsReq.forEach((map: any) => (this.mapImages[map.displayName] = { + splash: map.splash, + minimap: map.displayIcon, + landscape: map.listViewIcon + })) + } + + const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data + if (tiersReq) { + const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1) + this.rankImages = {} as any + tiersReq[tiersReq.length - 1].tiers.forEach((rank: any) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { + large: rank.largeIcon, + small: rank.smallIcon, + triangleUp: rank.rankTriangleUpIcon, + triangleDown: rank.rankTriangleDownIcon + })) + } + } - private _parseBody(body: any) { + private _parseBody(body: any) { if (body.errors) return body.errors return body.status ? body.data : body } - private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { - // Format search params into `?something=like&this` - const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { - const value = searchParams[cur] - if (value === null || value === undefined) return acc - return acc === "" - ? `?${cur}=${value}` - : acc + `&${cur}=${value}` - }, "") : "" - - // Main request - const req = await axios({ - url: encodeURI(`${baseUrl}/${url}${queryParams}`), - responseType: "json", - headers: this.token - ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } - : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, - ...config - }).catch(error => error) - - // Formatting response - return { + private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { + // Format search params into `?something=like&this` + const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { + const value = searchParams[cur] + if (value === null || value === undefined) return acc + return acc === "" + ? `?${cur}=${value}` + : acc + `&${cur}=${value}` + }, "") : "" + + // Main request + const req = await axios({ + url: encodeURI(`${baseUrl}/${url}${queryParams}`), + responseType: "json", + headers: this.token + ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } + : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, + ...config + }).catch(error => error) + + // Formatting response + return { status: req.response ? req.response.status : req.status, data: req.response ? null : !req.config.headers["Content-Type"] ? this._parseBody(req.data) : req.data, rateLimits: { @@ -124,66 +166,189 @@ export default class { error: req.response ? this._parseBody(req.response.data) : null, url: req.config.url } - } + } - /** + /** * Make sure each key in {@param input} has a non `null` or `undefined` value * @param {{ [key: string]: any }} input - Arguments to check */ - private async _validateArgs(input: { [key: string]: any }) { - Object.keys(input).forEach(key => { - if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) - }) + private async _validateArgs(input: { [key: string]: any }) { + Object.keys(input).forEach(key => { + if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) + }) } - /** + /** * Get a visualization of a valorant crosshair by its code - * @param {string} code Valorant crosshair code - * @param {number} size Image size (default: `1024`) - * @returns Image buffer for the preview + * @param {string} code - Valorant crosshair code + * @param {number} size - Image size (default: `1024`) + * @returns {Buffer} Image buffer for the preview */ async getCrosshair(code: string, size?: number) { this._validateArgs({ code }) return this._fetch("v1/crosshair/generate", { id: code, size }, { - responseType: "arraybuffer" - }) + responseType: "arraybuffer" + }) } - /** + /** * Get all announcements from the valorant website of a country - * @param countryCode Country code of website + * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` */ - async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn") { + async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn") { this._validateArgs({ countryCode }) return this._fetch(`v1/website/${countryCode}`) - } + } - /** + /** * Get information about valorant in a region - * @param region Region to get info about + * @param {Region} region - Region to get info about */ async getVersion(region: Region) { this._validateArgs({ region }) return this._fetch(`v1/version/${region}`) } - /** + /** * Get a list of featured items in Valorant */ async getFeaturedItems() { - // ! v2 is bugged for some reason + // ! v2 is bugged for some reason return this._fetch("v1/store-featured") } - /** + /** * Get a list of all in-app-purchases for valorant - * TODO find out wtf this actually does + * ! find out wtf this actually does */ async getIAPs() { return this._fetch("v1/store-offers") } - /** + /** + * Will get information about the current maintenances and incidents about a region + * @param {Region} region - Region to get info about + */ + async getStatus(region: Region) { + this._validateArgs({ region }) + return this._fetch(`v1/status/${region}`) + } + + /** + * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatch` instead + * @param {string} matchID - The match ID to get details about + * @param {Region} region - Region of the match + * @param {any} queries - Extra queries + */ + async getRawMatchDetails(matchID: string, region: Region, queries?: any) { + this._validateArgs({ matchID, region }) + return await this._fetch("v1/raw", null, { + data: { type: "matchdetails", value: matchID, region, queries }, + method: "POST" + }) + } + + /** + * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMatches` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawMatchHistory(puuid: string, region: Region, queries?: any) { + this._validateArgs({ puuid, region }) + return await this._fetch("v1/raw", null, { + data: { type: "matchhistory", value: puuid, region, queries }, + method: "POST" + }) + } + + /** + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMRHistory` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any) { + this._validateArgs({ puuid, region }) + return await this._fetch("v1/raw", null, { + data: { type: "mmr", value: puuid, region, queries }, + method: "POST" + }) + } + + /** + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * - Use `getMMR` instead + * @param {string} puuid - The match ID to get details about + * @param {Region} region - Region of the player + * @param {any} queries - Extra queries + */ + async getRawMMR(puuid: string, region: Region, queries?: any) { + this._validateArgs({ puuid, region }) + return await this._fetch("v1/raw", null, { + data: { type: "competitiveupdates", value: puuid, region, queries }, + method: "POST" + }) + } + + /** + * Get a list of rr changes of a player by their Riot ID + * @param {string} name - The Riot ID username of the player + * @param {string} tag - The Riot tag username of the player + * @param {Region} region - The player's region + */ + async getMMRHistory(name: string, tag: string, region: Region) { + this._validateArgs({ name, tag, region }) + return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`) + } + + /** + * Get a list of rr changes of a player by their PUUID + * @param {string} name - The PUUID of the player + * @param {Region} region - The player's region + */ + async getMMRHistoryByPUUID(puuid: string, region: Region) { + this._validateArgs({ puuid, region }) + return this._fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`) + } + + /** + * Get information about a match + * @param {string} matchID - The match's ID + */ + async getMatch(matchID: string) { + this._validateArgs({ matchID }) + return this._fetch(`v2/match/${matchID}`) + } + + /** + * Get the leaderboard of a region + * @param {Region} region - Region to get leaderboard from + * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value + * @param {number} end - (optional) Limit the amount of leaderboard players returned + * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID + * @param {string} puuid - Search for a specific player by their PUUID + * @param {Season} season - Get leaderboard from a specific season + */ + async getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string, tag: string }, puuid?: string, season?: Season) { + if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid") + + this._validateArgs({ region }) + return this._fetch(`v2/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }) + } + + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + */ + async getTranslations(locale?: Locale) { + return this._fetch("v1/content", { locale }) + } + + /** * Gets general info about a player's rank by their Riot ID * - **Returns:** * - Current rank and info about their rank @@ -200,7 +365,7 @@ export default class { return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }) } - /** + /** * Gets general info about a player's rank by their PUUID * - **Returns:** * - Current rank and info about their rank @@ -216,7 +381,7 @@ export default class { return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }) } - /** + /** * Gets the most recent 5 matches by a players Riot ID * - **Returns:** * - Info about most recent 5 matches including: @@ -231,12 +396,12 @@ export default class { * @param {ValorantMap} mapFilter - Filter results based on map * @param {any} size - Filter results based on ?? **{needs testing)** */ - async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { + async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { this._validateArgs({ name, tag, region }) return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }) } - /** + /** * Gets the most recent 5 matches by a players PUUID * - **Returns:** * - Info about most recent 5 matches including: @@ -250,12 +415,12 @@ export default class { * @param {ValorantMap} mapFilter - Filter results based on map * @param {any} size - Filter results based on ?? **{needs testing)** */ - async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { + async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { this._validateArgs({ name: puuid, region }) return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }) } - /** + /** * Get general information about a player from their Riot ID * - **Returns:** * - Their PUUID @@ -266,12 +431,12 @@ export default class { * @param {string} tag The Riot ID tag of the player * @param {boolean} force Force data update? */ - async getProfile(name: string, tag: string, force?: boolean) { + async getProfile(name: string, tag: string, force?: boolean) { this._validateArgs({ name, tag }) return this._fetch(`v1/account/${name}/${tag}`, { force }) } - /** + /** * Get general information about a player from their PUUID * - **Returns:** * - Their PUUID @@ -281,7 +446,7 @@ export default class { * @param {string} puuid The PUUID of the player * @param {boolean} force Force data update? */ - async getProfileByPUUID(puuid: string, force?: boolean) { + async getProfileByPUUID(puuid: string, force?: boolean) { this._validateArgs({ name: puuid }) return this._fetch(`v1/by-puuid/account/${puuid}`, { force }) } diff --git a/package/src/oldIndex.js b/package/src/oldIndex.js new file mode 100644 index 0000000..df0a176 --- /dev/null +++ b/package/src/oldIndex.js @@ -0,0 +1,192 @@ +const axios = require("axios") + +module.exports = class { + constructor(token) { + this.token = token + } + _parsebody(body) { + if (body.errors) return body.errors + return body.status ? body.data : body + } + _parseresponse(req) { + return { + status: req.response ? req.response.status : req.status, + data: req.response ? null : !req.config.headers["Content-Type"] ? this._parsebody(req.data) : req.data, + ratelimits: { + used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), + remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), + reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), + }, + error: req.response ? this._parsebody(req.response.data) : null, + url: req.config.url, + } + } + _validate(input) { + for (let i = 0; Object.keys(input).length > i; i++) { + if (Object.values(input)[i] == null) throw new Error(`Missing parameter: ${Object.keys(input)[i]}`) + } + } + _query(input) { + let query = new URLSearchParams() + for (let i = 0; Object.values(input).length > i; i++) { + if (Object.values(input)[i] && Object.values(input)[i] != "undefined") query.append(Object.keys(input)[i], Object.values(input)[i]) + } + return query.toString().length ? query : null + } + async _fetch({url, type = "GET", body = null, rtype = null} = {}) { + const req = await axios({ + url: url, + method: type, + data: body, + responseType: rtype ? rtype : "json", + headers: this.token + ? { + Authorization: this.token, + "User-Agent": "unofficial-valorant-api/node.js/2.3.0", + } + : { + "User-Agent": "unofficial-valorant-api/node.js/2.3.0", + }, + }).catch(err => err) + return this._parseresponse(req) + } + + async getAccount({name, tag, force} = {}) { + this._validate({name, tag}) + const query = this._query({force}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/account/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, + }) + } + + async getAccountByPUUID({puuid, force} = {}) { + this._validate({puuid}) + const query = this._query({force}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/account/${puuid}${query ? `?${query}` : ""}`, + }) + } + + async getMMRByPUUID({version, region, puuid, filter} = {}) { + this._validate({version, region, puuid}) + const query = this._query({filter}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/${version}/by-puuid/mmr/${region}/${puuid}${query ? `?${query}` : ""}`, + }) + } + + async getMMRHistoryByPUUID({region, puuid} = {}) { + this._validate({region, puuid}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/mmr-history/${region}/${puuid}`, + }) + } + + async getMatchesByPUUID({region, puuid, filter, map, size} = {}) { + this._validate({region, puuid}) + const query = this._query({filter, map, size}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v3/by-puuid/matches/${region}/${puuid}${query ? `?${query}` : ""}`, + }) + } + + async getContent({locale} = {}) { + const query = this._query({locale}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/content${query ? `?${query}` : ""}`, + }) + } + + async getLeaderboard({version, region, start, end, name, tag, puuid, season} = {}) { + if (name && tag && puuid) + throw new Error("Too many parameters: You can't search for name/tag and puuid at the same time, please decide between name/tag and puuid") + this._validate({version, region}) + const query = this._query({start, end, name: encodeURI(name), tag: encodeURI(tag), puuid, season}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/${version}/leaderboard/${region}${query ? `?${query}` : ""}`, + }) + } + + async getMatches({region, name, tag, filter, map, size} = {}) { + this._validate({region, name, tag}) + const query = this._query({filter, map, size}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v3/matches/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, + }) + } + + async getMatch({match_id} = {}) { + this._validate({match_id}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v2/match/${match_id}`, + }) + } + + async getMMRHistory({region, name, tag} = {}) { + this._validate({region, name, tag}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/mmr-history/${region}/${encodeURI(name)}/${encodeURI(tag)}`, + }) + } + + async getMMR({version, region, name, tag, filter} = {}) { + this._validate({version, region, name, tag}) + const query = this._query({filter}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/${version}/mmr/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, + }) + } + + async getRawData({type, value, region, queries} = {}) { + this._validate({type, value, region, queries}) + return await this._fetch({ + url: "https://api.henrikdev.xyz/valorant/v1/raw", + body: {type, value, region, queries}, + type: "POST", + }) + } + + async getStatus({region} = {}) { + this._validate({region}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/status/${region}`, + }) + } + + async getFeaturedItems({version} = {}) { + this._validate({version}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/${version}/store-featured`, + }) + } + + async getOffers() { + return await this._fetch({ + url: "https://api.henrikdev.xyz/valorant/v1/store-offers", + }) + } + + async getVersion({region} = {}) { + this._validate({region}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/version/${region}`, + }) + } + + async getWebsite({country_code, filter} = {}) { + this._validate({country_code}) + const query = this._query({filter}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/website/${country_code}${query ? `?${query}` : ""}`, + }) + } + + async getCrosshair({code, size} = {}) { + this._validate({code}) + const query = this._query({id: code, size}) + return await this._fetch({ + url: `https://api.henrikdev.xyz/valorant/v1/crosshair/generate${query ? `?${query}` : ""}`, + rtype: "arraybuffer", + }) + } +} diff --git a/package/src/types/general.ts b/package/src/types/general.ts index 76511e9..ed81bcd 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -2,15 +2,15 @@ type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | type SubRank = "1" | "2" | "3" export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated" -type Episodes = "e1" | "e2" | "e3" | "e4" | "e5" -type Acts = "a1" | "a2" | "a3" -export type Season = `${Episodes}${Acts}` +type Episodes = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" +type Acts = "1" | "2" | "3" +export type Season = `e${Episodes}a${Acts}` export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball" export type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl" export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br" export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru" -/** - * TODO Check "Golden Gun" and "Tactical Knife" - */ +// TODO Check "Golden Gun" and "Tactical Knife" export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee" + +export type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW" diff --git a/package/src/types/raw/competitive-updates.ts b/package/src/types/raw/competitive-updates.ts new file mode 100644 index 0000000..aad409a --- /dev/null +++ b/package/src/types/raw/competitive-updates.ts @@ -0,0 +1,23 @@ +import { Region } from "../general" + +interface Match { + MatchID: string + MapID: string + SeasonID: string + MatchStartTime: any + TierAfterUpdate: number + TierBeforeUpdate: number + RankedRatingAfterUpdate: number + RankedRatingBeforeUpdate: number + RankedRatingEarned: number + RankedRatingPerformanceBonus: number + CompetitiveMovement: string + AFKPenalty: number +} + +export interface RawCompetitiveUpdatesResponse { + Version: number + Subject: string + Matches: Match[] + region: Region +} diff --git a/package/src/types/raw/match-details.ts b/package/src/types/raw/match-details.ts new file mode 100644 index 0000000..3bd553a --- /dev/null +++ b/package/src/types/raw/match-details.ts @@ -0,0 +1,257 @@ +import { Region } from "../general" + +interface PartyRRPenalties { + [key: string]: number +} + +interface MatchInfo { + matchId: string + mapId: string + gamePodId: string + gameLoopZone: string + gameServerAddress: string + gameVersion: string + gameLengthMillis: number + gameStartMillis: number + provisioningFlowID: string + isCompleted: boolean + customGameName: string + forcePostProcessing: boolean + queueID: string + gameMode: string + isRanked: boolean + isMatchSampled: boolean + seasonId: string + completionState: string + platformType: string + partyRRPenalties: PartyRRPenalties + shouldMatchDisablePenalties: boolean +} + +interface PlatformInfo { + platformType: string + platformOS: string + platformOSVersion: string + platformChipset: string +} + +interface AbilityCasts { + grenadeCasts: number + ability1Casts: number + ability2Casts: number + ultimateCasts: number +} + +interface Stats { + score: number + roundsPlayed: number + kills: number + deaths: number + assists: number + playtimeMillis: number + abilityCasts: AbilityCasts +} + +interface RoundDamage { + round: number + receiver: string + damage: number +} + +interface XpModification { + Value: number + ID: string +} + +interface BehaviorFactors { + afkRounds: number + collisions: number + damageParticipationOutgoing: number + friendlyFireIncoming: number + friendlyFireOutgoing: number + mouseMovement: number + stayedInSpawnRounds: number +} + +interface BaseAction { + idleTimeMillis: number + objectiveCompleteTimeMillis: number +} + +interface AdaptiveBots extends BaseAction { + adaptiveBotAverageDurationMillisAllAttempts: number + adaptiveBotAverageDurationMillisFirstAttempt: number + killDetailsFirstAttempt?: any +} + +interface DefendBombSite extends BaseAction { + success: boolean +} + +interface SettingStatus { + isMouseSensitivityDefault: boolean + isCrosshairDefault: boolean +} + +interface NewPlayerExperienceDetails { + basicMovement: BaseAction + basicGunSkill: BaseAction + adaptiveBots: AdaptiveBots + ability: BaseAction + bombPlant: BaseAction + defendBombSite: DefendBombSite + settingStatus: SettingStatus +} + +interface Player { + subject: string + gameName: string + tagLine: string + platformInfo: PlatformInfo + teamId: string + partyId: string + characterId: string + stats: Stats + roundDamage: RoundDamage[] + competitiveTier: number + playerCard: string + playerTitle: string + preferredLevelBorder: string + accountLevel: number + sessionPlaytimeMinutes: number + xpModifications: XpModification[] + behaviorFactors: BehaviorFactors + newPlayerExperienceDetails: NewPlayerExperienceDetails +} + +interface Team { + teamId: string + won: boolean + roundsPlayed: number + roundsWon: number + numPoints: number +} + +interface Location { + x: number + y: number +} + +interface PlantPlayerLocation { + subject: string + viewRadians: number + location: Location +} + +interface DefusePlayerLocation { + subject: string + viewRadians: number + location: Location +} + +interface PlayerLocation { + subject: string + viewRadians: number + location: Location +} + +interface FinishingDamage { + damageType: string + damageItem: string + isSecondaryFireMode: boolean +} + +interface Kill { + gameTime: number + roundTime: number + killer: string + victim: string + victimLocation: Location + assistants: string[] + playerLocations: PlayerLocation[] + finishingDamage: FinishingDamage +} + +interface MatchKill extends Kill { + round: number +} + +interface Damage { + receiver: string + damage: number + legshots: number + bodyshots: number + headshots: number +} + +interface Economy { + loadoutValue: number + weapon: string + armor: string + remaining: number + spent: number +} + +interface AbilityEffects { + grenadeEffects?: any + ability1Effects?: any + ability2Effects?: any + ultimateEffects?: any +} + +interface PlayerStat { + subject: string + kills: Kill[] + damage: Damage[] + score: number + economy: Economy + ability: AbilityEffects + wasAfk: boolean + wasPenalized: boolean + stayedInSpawn: boolean +} + +interface PlayerEconomy { + subject: string + loadoutValue: number + weapon: string + armor: string + remaining: number + spent: number +} + +interface PlayerScore { + subject: string + score: number +} + +interface RoundResult { + roundNum: number + roundResult: string + roundCeremony: string + winningTeam: string + plantRoundTime: number + plantPlayerLocations: PlantPlayerLocation[] + plantLocation: Location + plantSite: string + defuseRoundTime: number + defusePlayerLocations: DefusePlayerLocation[] + defuseLocation: Location + playerStats: PlayerStat[] + roundResultCode: string + playerEconomies: PlayerEconomy[] + playerScores: PlayerScore[] + bombPlanter: string + bombDefuser: string +} + +export interface RawMatchDetailsResponse { + matchInfo: MatchInfo + players: Player[] + bots: any[] + coaches: any[] + teams: Team[] + roundResults: RoundResult[] + kills: MatchKill[] + region: Region +} diff --git a/package/src/types/raw/match-history.ts b/package/src/types/raw/match-history.ts new file mode 100644 index 0000000..5f8f6c1 --- /dev/null +++ b/package/src/types/raw/match-history.ts @@ -0,0 +1,16 @@ +import { Region } from "../general" + +interface History { + MatchID: string + GameStartTime: any + QueueID: string +} + +export interface RawMatchHistoryResponse { + Subject: string + BeginIndex: number + EndIndex: number + Total: number + History: History[] + region: Region +} diff --git a/package/src/types/raw/mmr.ts b/package/src/types/raw/mmr.ts new file mode 100644 index 0000000..b0701d9 --- /dev/null +++ b/package/src/types/raw/mmr.ts @@ -0,0 +1,65 @@ +import { Region } from "../general" + +interface WinsByTier { + [tier: number]: number +} + +interface SeasonalInfoBySeasonID { + SeasonID: string + NumberOfWins: number + NumberOfWinsWithPlacements: number + NumberOfGames: number + Rank: number + CapstoneWins: number + LeaderboardRank: number + CompetitiveTier: number + RankedRating: number + WinsByTier: WinsByTier + GamesNeededForRating: number + TotalWinsNeededForRank: number +} + +interface Queue { + TotalGamesNeededForRating: number + TotalGamesNeededForLeaderboard: number + CurrentSeasonGamesNeededForRating: number + SeasonalInfoBySeasonID: SeasonalInfoBySeasonID +} + +interface QueueSkills { + competitive: Queue + custom: Queue + deathmatch: Queue + ggteam: Queue + onefa: Queue + seeding: Queue + snowball: Queue + spikerush: Queue + unrated: Queue +} + +interface LatestCompetitiveUpdate { + MatchID: string + MapID: string + SeasonID: string + MatchStartTime: number + TierAfterUpdate: number + TierBeforeUpdate: number + RankedRatingAfterUpdate: number + RankedRatingBeforeUpdate: number + RankedRatingEarned: number + RankedRatingPerformanceBonus: number + CompetitiveMovement: string + AFKPenalty: number +} + +export interface RawMMRResponse { + Version: number + Subject: string + NewPlayerExperienceFinished: boolean + QueueSkills: QueueSkills + LatestCompetitiveUpdate: LatestCompetitiveUpdate + IsLeaderboardAnonymized: boolean + IsActRankBadgeHidden: boolean + region: Region +} diff --git a/package/src/types/v1-content.ts b/package/src/types/v1-content.ts new file mode 100644 index 0000000..1bdfde9 --- /dev/null +++ b/package/src/types/v1-content.ts @@ -0,0 +1,44 @@ +import { Locale } from "./general" + +export type LocalizedNames = { + [language in Locale]: string +} + +export interface Asset { + name: string + localizedNames?: LocalizedNames + id: string + assetName: string +} + +export interface AssetWithPath extends Asset { + assetPath: string +} + +export interface Act { + id: string + parentId: string + type: string + name: string + localizedNames?: LocalizedNames + isActive: boolean +} + +export interface ContentResponse { + version: string + characters: Asset[] + maps: AssetWithPath[] + chromas: Asset[] + skins: Asset[] + skinLevels: Asset[] + equips: Asset[] + gameModes: AssetWithPath[] + sprays: Asset[] + sprayLevels: Asset[] + charms: Asset[] + charmLevels: Asset[] + playerCards: Asset[] + playerTitles: Asset[] + acts: Act[] + ceremonies: Asset[] +} diff --git a/package/src/types/v1-profile.ts b/package/src/types/v1-profile.ts index 3e46194..5f86910 100644 --- a/package/src/types/v1-profile.ts +++ b/package/src/types/v1-profile.ts @@ -1,4 +1,4 @@ -import { Region } from "./general.js" +import { Region } from "./general" export interface Card { small: string diff --git a/package/src/types/v1-status.ts b/package/src/types/v1-status.ts new file mode 100644 index 0000000..419c186 --- /dev/null +++ b/package/src/types/v1-status.ts @@ -0,0 +1,33 @@ +import { Locale } from "./general" + +export interface Title { + content: string + locale: Locale +} + +export interface Update { + created_at: Date + updated_at: Date + publish: boolean + id: number + translations: Title[] + publish_locations: string[] + author: string +} + +export interface Incident { + created_at: Date + archive_at: Date + updates: Update[] + platforms: string[] + updated_at: Date + id: number + titles: Title[] + maintenance_status: string + incident_severity: string +} + +export interface StatusResponse { + maintenances: Incident[] + incidents: Incident[] +} diff --git a/package/src/types/v1-store-offers.ts b/package/src/types/v1-store-offers.ts index 6dd792d..8408ace 100644 --- a/package/src/types/v1-store-offers.ts +++ b/package/src/types/v1-store-offers.ts @@ -11,7 +11,7 @@ export interface Reward { export interface Offer { OfferID: string IsDirectPurchase: boolean - StartDate: any + StartDate: Date Cost: Cost Rewards: Reward[] } diff --git a/package/src/types/v2-leaderboard.ts b/package/src/types/v2-leaderboard.ts new file mode 100644 index 0000000..2b3f115 --- /dev/null +++ b/package/src/types/v2-leaderboard.ts @@ -0,0 +1,24 @@ +export interface Player { + PlayerCardID: string + TitleID: string + IsBanned: boolean + IsAnonymized: boolean + puuid: string + gameName: string + tagLine: string + leaderboardRank: number + rankedRating: number + numberOfWins: number + competitiveTier: number +} + +export interface LeaderboardResponse { + last_update: number + next_update: number + total_players: number + radiant_threshold: number + immortal_3_threshold: number + immortal_2_threshold: number + immortal_1_threshold: number + players: Player[] +} diff --git a/package/src/types/v2-match.ts b/package/src/types/v2-match.ts new file mode 100644 index 0000000..57ada53 --- /dev/null +++ b/package/src/types/v2-match.ts @@ -0,0 +1,3 @@ +import { Match } from "./v3-matches" + +export type MatchResponse = Match diff --git a/package/src/types/v2-mmr-history.ts b/package/src/types/v2-mmr-history.ts new file mode 100644 index 0000000..64fbfde --- /dev/null +++ b/package/src/types/v2-mmr-history.ts @@ -0,0 +1,21 @@ +import { Rank } from "./general" + +export interface Images { + small: string + large: string + triangle_down: string + triangle_up: string +} + +export interface MMRHistoryGame { + currenttier: number + currenttierpatched: Rank + images: Images + ranking_in_tier: number + mmr_change_to_last_game: number + elo: number + date: string + date_raw: number +} + +export type MMRHistoryResponse = MMRHistoryGame[] diff --git a/package/src/types/v2-mmr.ts b/package/src/types/v2-mmr.ts index 6459a0a..33a602d 100644 --- a/package/src/types/v2-mmr.ts +++ b/package/src/types/v2-mmr.ts @@ -1,4 +1,4 @@ -import { Rank, Season } from "./general.js" +import { Rank, Season } from "./general" export interface SeasonMMR { error?: "No data available" diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index 6e58701..a6f22d8 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -1,4 +1,4 @@ -import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general.js" +import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general" export interface Player { puuid: string diff --git a/package/src/util.ts b/package/src/util.ts deleted file mode 100644 index 0f09374..0000000 --- a/package/src/util.ts +++ /dev/null @@ -1,161 +0,0 @@ -import type { Rank, ValorantMap } from "./types/general.js" - -/** - * Extra util. Useful for displaying info about a certain map - */ -export const mapImages: { [key in ValorantMap]: { - splash: string - minimap: string - landscape: string -} } = { - Ascent: { - splash: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/splash.png", - minimap: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/displayicon.png", - landscape: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/listviewicon.png" - }, - Split: { - splash: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/splash.png", - minimap: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/displayicon.png", - landscape: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/listviewicon.png" - }, - Fracture: { - splash: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/splash.png", - minimap: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/displayicon.png", - landscape: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/listviewicon.png" - }, - Bind: { - splash: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/splash.png", - minimap: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/listviewicon.png" - }, - Breeze: { - splash: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/splash.png", - minimap: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/listviewicon.png" - }, - Pearl: { - splash: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/splash.png", - minimap: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/displayicon.png", - landscape: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/listviewicon.png" - }, - Icebox: { - splash: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/splash.png", - minimap: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/displayicon.png", - landscape: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/listviewicon.png" - }, - Haven: { - splash: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/splash.png", - minimap: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/listviewicon.png" - } -} - -/** - * Extra util. Useful for calls such as `matches` that don't include rank images on players - */ -export const rankImages: { [key in Rank]: { large: string, small: string } } = { - "Unrated": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/smallicon.png" - }, - "Iron 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/smallicon.png" - }, - "Iron 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/smallicon.png" - }, - "Iron 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/smallicon.png" - }, - "Bronze 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/smallicon.png" - }, - "Bronze 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/smallicon.png" - }, - "Bronze 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/smallicon.png" - }, - "Silver 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/smallicon.png" - }, - "Silver 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/smallicon.png" - }, - "Silver 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/smallicon.png" - }, - "Gold 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/smallicon.png" - }, - "Gold 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/smallicon.png" - }, - "Gold 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/smallicon.png" - }, - "Platinum 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/smallicon.png" - }, - "Platinum 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/smallicon.png" - }, - "Platinum 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/smallicon.png" - }, - "Diamond 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/smallicon.png" - }, - "Diamond 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/smallicon.png" - }, - "Diamond 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/smallicon.png" - }, - "Ascendant 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/smallicon.png" - }, - "Ascendant 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/smallicon.png" - }, - "Ascendant 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/smallicon.png" - }, - "Immortal 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/smallicon.png" - }, - "Immortal 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/smallicon.png" - }, - "Immortal 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/smallicon.png" - }, - "Radiant": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/smallicon.png" - } -} diff --git a/package/test/test.js b/package/test/test.js index 7876199..1c8d804 100644 --- a/package/test/test.js +++ b/package/test/test.js @@ -1,5 +1,21 @@ -import _VAPI from "../src/index.js"; -const VAPI = new _VAPI(); -const res = await VAPI.getVersion("na"); -console.log(res); -//# sourceMappingURL=test.js.map \ No newline at end of file +import { spawn } from "child_process" +import _VAPI from "../dist/index.js" +const VAPI = new _VAPI() + +const clipboard = (data) => { + const proc = spawn("pbcopy") + proc.stdin.write(data) + proc.stdin.end() +} + +const res = await VAPI.initUtils() +// const object = Object.keys(res.data).reduce((acc, cur) => { +// if (Array.isArray(res.data[cur])) { +// acc[cur] = res.data[cur].slice(0, 2) +// } else { +// acc[cur] = res.data[cur] +// } +// return acc +// }, {}) +// console.log(object) +// clipboard(JSON.stringify(object)) diff --git a/package/test/test.ts b/package/test/test.ts deleted file mode 100644 index e56a449..0000000 --- a/package/test/test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import _VAPI from "../src/index.js" -const VAPI = new _VAPI() - -const res = await VAPI.getVersion("na") -console.log(res) diff --git a/package/tsconfig.json b/package/tsconfig.json index f27dd88..42e6ecd 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -10,11 +10,13 @@ "moduleResolution": "node", "sourceMap": true, "skipLibCheck": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "declaration": true, + "outDir": "./dist" }, "exclude": [ "node_modules", - "./node_modules", - "./node_modules/*" + "dist", + "test" ] } From 0aabd3f5b23d1e1ad4e00673e79ef91ab9f098d9 Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 14:22:48 -0500 Subject: [PATCH 06/50] Had to recompile /dist due to left over files --- package/dist/util.d.ts | 20 ----- package/dist/util.js | 155 --------------------------------------- package/dist/util.js.map | 1 - package/src/index.ts | 2 +- 4 files changed, 1 insertion(+), 177 deletions(-) delete mode 100644 package/dist/util.d.ts delete mode 100644 package/dist/util.js delete mode 100644 package/dist/util.js.map diff --git a/package/dist/util.d.ts b/package/dist/util.d.ts deleted file mode 100644 index cff5868..0000000 --- a/package/dist/util.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Rank, ValorantMap } from "./types/general.js"; -/** - * Extra util. Useful for displaying info about a certain map - */ -export declare const mapImages: { - [key in ValorantMap]: { - splash: string; - minimap: string; - landscape: string; - }; -}; -/** - * Extra util. Useful for calls such as `matches` that don't include rank images on players - */ -export declare const rankImages: { - [key in Rank]: { - large: string; - small: string; - }; -}; diff --git a/package/dist/util.js b/package/dist/util.js deleted file mode 100644 index 62e86b7..0000000 --- a/package/dist/util.js +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Extra util. Useful for displaying info about a certain map - */ -export const mapImages = { - Ascent: { - splash: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/splash.png", - minimap: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/displayicon.png", - landscape: "https://media.valorant-api.com/maps/7eaecc1b-4337-bbf6-6ab9-04b8f06b3319/listviewicon.png" - }, - Split: { - splash: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/splash.png", - minimap: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/displayicon.png", - landscape: "https://media.valorant-api.com/maps/d960549e-485c-e861-8d71-aa9d1aed12a2/listviewicon.png" - }, - Fracture: { - splash: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/splash.png", - minimap: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/displayicon.png", - landscape: "https://media.valorant-api.com/maps/b529448b-4d60-346e-e89e-00a4c527a405/listviewicon.png" - }, - Bind: { - splash: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/splash.png", - minimap: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2c9d57ec-4431-9c5e-2939-8f9ef6dd5cba/listviewicon.png" - }, - Breeze: { - splash: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/splash.png", - minimap: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2fb9a4fd-47b8-4e7d-a969-74b4046ebd53/listviewicon.png" - }, - Pearl: { - splash: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/splash.png", - minimap: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/displayicon.png", - landscape: "https://media.valorant-api.com/maps/fd267378-4d1d-484f-ff52-77821ed10dc2/listviewicon.png" - }, - Icebox: { - splash: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/splash.png", - minimap: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/displayicon.png", - landscape: "https://media.valorant-api.com/maps/e2ad5c54-4114-a870-9641-8ea21279579a/listviewicon.png" - }, - Haven: { - splash: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/splash.png", - minimap: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/displayicon.png", - landscape: "https://media.valorant-api.com/maps/2bee0dc9-4ffe-519b-1cbd-7fbe763a6047/listviewicon.png" - } -}; -/** - * Extra util. Useful for calls such as `matches` that don't include rank images on players - */ -export const rankImages = { - Unrated: { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/0/smallicon.png" - }, - "Iron 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/3/smallicon.png" - }, - "Iron 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/4/smallicon.png" - }, - "Iron 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/5/smallicon.png" - }, - "Bronze 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/6/smallicon.png" - }, - "Bronze 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/7/smallicon.png" - }, - "Bronze 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/8/smallicon.png" - }, - "Silver 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/9/smallicon.png" - }, - "Silver 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/10/smallicon.png" - }, - "Silver 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/11/smallicon.png" - }, - "Gold 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/12/smallicon.png" - }, - "Gold 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/13/smallicon.png" - }, - "Gold 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/14/smallicon.png" - }, - "Platinum 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/15/smallicon.png" - }, - "Platinum 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/16/smallicon.png" - }, - "Platinum 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/17/smallicon.png" - }, - "Diamond 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/18/smallicon.png" - }, - "Diamond 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/19/smallicon.png" - }, - "Diamond 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/20/smallicon.png" - }, - "Ascendant 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/21/smallicon.png" - }, - "Ascendant 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/22/smallicon.png" - }, - "Ascendant 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/23/smallicon.png" - }, - "Immortal 1": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/24/smallicon.png" - }, - "Immortal 2": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/25/smallicon.png" - }, - "Immortal 3": { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/26/smallicon.png" - }, - Radiant: { - large: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/largeicon.png", - small: "https://media.valorant-api.com/competitivetiers/03621f52-342b-cf4e-4f86-9350a49c6d04/27/smallicon.png" - } -}; -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/package/dist/util.js.map b/package/dist/util.js.map deleted file mode 100644 index f86dbd4..0000000 --- a/package/dist/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAIhB;IACF,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,QAAQ,EAAE;QACN,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,IAAI,EAAE;QACF,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;IACD,KAAK,EAAE;QACH,MAAM,EAAE,qFAAqF;QAC7F,OAAO,EAAE,0FAA0F;QACnG,SAAS,EAAE,2FAA2F;KACzG;CACJ,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAwD;IAC3E,OAAO,EAAE;QACL,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,sGAAsG;QAC7G,KAAK,EAAE,sGAAsG;KAChH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,UAAU,EAAE;QACR,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,WAAW,EAAE;QACT,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,aAAa,EAAE;QACX,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;IACD,OAAO,EAAE;QACL,KAAK,EAAE,uGAAuG;QAC9G,KAAK,EAAE,uGAAuG;KACjH;CACJ,CAAA"} \ No newline at end of file diff --git a/package/src/index.ts b/package/src/index.ts index a2ee24d..0661dc2 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -219,9 +219,9 @@ export default class { /** * Get a list of all in-app-purchases for valorant - * ! find out wtf this actually does */ async getIAPs() { + // ! find out wtf this actually does return this._fetch("v1/store-offers") } From 43bc7bbc2f4af28452493358d9a0d03a318c9d20 Mon Sep 17 00:00:00 2001 From: Linimik Date: Tue, 16 Aug 2022 15:48:38 -0500 Subject: [PATCH 07/50] Updated types --- .gitignore | 1 + package/dist/index.d.ts | 278 ++++++++++++++++++++++---------- package/dist/index.js | 247 ++++++++++++++++++++--------- package/dist/index.js.map | 2 +- package/src/index.ts | 323 ++++++++++++++++++++++++++------------ 5 files changed, 590 insertions(+), 261 deletions(-) diff --git a/.gitignore b/.gitignore index b711c19..afabccd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .history/ node_modules/ pnpm-lock.yaml +dist/ diff --git a/package/dist/index.d.ts b/package/dist/index.d.ts index 2654364..4847940 100644 --- a/package/dist/index.d.ts +++ b/package/dist/index.d.ts @@ -1,10 +1,10 @@ -/// import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; import type { RawMatchDetailsResponse } from "./types/raw/match-details"; import type { RawMatchHistoryResponse } from "./types/raw/match-history"; import type { RawMMRResponse } from "./types/raw/mmr"; import type { ContentResponse } from "./types/v1-content"; +import type { CrosshairResponse } from "./types/v1-crosshair"; import type { FeaturedItemsResponse } from "./types/v1-featured-items"; import type { ProfileResponse } from "./types/v1-profile"; import type { StatusResponse } from "./types/v1-status"; @@ -12,13 +12,22 @@ import type { StoreOffersResponse } from "./types/v1-store-offers"; import type { VersionResponse } from "./types/v1-version"; import type { WebsiteResponse } from "./types/v1-website"; import type { LeaderboardResponse } from "./types/v2-leaderboard"; +import type { MatchResponse } from "./types/v2-match"; import type { MMRResponse } from "./types/v2-mmr"; import type { MMRHistoryResponse } from "./types/v2-mmr-history"; import type { MatchesResponse } from "./types/v3-matches"; interface APIResponse { + /** + * Response status + * + * @remarks + * - `200-299` Successful response + * - `400-499` Client error response + * - `500-599` Server error response + */ status: number; /** - * Real response from API + * Response from API */ data?: dataType; /** @@ -39,7 +48,10 @@ interface ErrorObject { * Error message */ message: string; - /** The response status of the API. Can be any of the following: + /** The response status of the API. See remarks for info about specific error codes + * + * @remarks + * Can be any of the following: * - `1` Invalid API Key * - `2` Forbidden endpoint * - `3` Restricted endpoint @@ -68,24 +80,33 @@ interface ErrorObject { interface RateLimit { /** * Number of used API requests per 60s. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ used: number; /** * Remaining number of API requests per 60s. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ remaining: number; /** * In how many seconds (every 60s) your rate limit is going to reset. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ reset: number; } -export default class { +declare class VAPI { private token?; /** - * You must call `initUtils()` before using this! + * Images for every {@link Rank | Valorant rank} + * + * @remarks + * You must call {@link initUtils} before using this! */ rankImages?: { [key in Rank]: { @@ -96,7 +117,10 @@ export default class { }; }; /** - * You must call `initUtils()` before using this! + * Images for every {@link ValorantMap | Valorant Map} + * + * @remarks + * You must call {@link initUtils} before using this! */ mapImages?: { [key in ValorantMap | "The Range"]: { @@ -106,107 +130,171 @@ export default class { }; }; /** - * The main class to call API functions from - * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + * Create a new instance of the main API. All API calls are in this class + * + * @example + * Create a new instance + * ``` + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) */ constructor(token?: string); + /** + * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} + * + * @remarks + * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} + */ initUtils(): Promise; + /** + * @internal + * + * Parses the body of an axios response + */ private _parseBody; + /** + * @internal + * + * Main function to fetch from the API + * + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ private _fetch; /** - * Make sure each key in {@param input} has a non `null` or `undefined` value - * @param {{ [key: string]: any }} input - Arguments to check + * @internal + * + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * + * @throws {@link TypeError} - Only if there is a empty value to a key */ private _validateArgs; /** - * Get a visualization of a valorant crosshair by its code - * @param {string} code - Valorant crosshair code - * @param {number} size - Image size (default: `1024`) - * @returns {Buffer} Image buffer for the preview + * Get an image of a valorant crosshair by its code + * + * @example + * Load and write a crosshair to crosshair.png + * ``` + * import { writeFileSync } from "fs" + * + * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` + * + * @param code - Valorant crosshair code + * @param size - (optional) Image size (default: `1024`) + * @returns The image of the crosshair as a {@link Buffer} */ - getCrosshair(code: string, size?: number): Promise>; + getCrosshair(code: string, size?: number): Promise>; /** * Get all announcements from the valorant website of a country - * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` + * @param countryCode - Country code of website + * @returns List of announcements from the valorant website */ getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise>; /** - * Get information about valorant in a region - * @param {Region} region - Region to get info about + * Get information about valorant in a region, such as the client version, branch, and server version + * @param region - Region of valorant to get info about + * @returns Information about a regions valorant */ getVersion(region: Region): Promise>; /** - * Get a list of featured items in Valorant + * Get all of the featured items in the current valorant store + * @returns Featured items in the current valorant store */ getFeaturedItems(): Promise>; /** - * Get a list of all in-app-purchases for valorant - * ! find out wtf this actually does + * Get a list of all in-app-purchases for valorant, such as Radianite and VP + * @returns List of IAPs in valorant */ getIAPs(): Promise>; /** * Will get information about the current maintenances and incidents about a region - * @param {Region} region - Region to get info about + * @param region - Region to get info about + * @returns Info about undergoing maintenances and incidents in a region of valorant */ getStatus(region: Region): Promise>; /** - * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatch` instead - * @param {string} matchID - The match ID to get details about - * @param {Region} region - Region of the match - * @param {any} queries - Extra queries + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatch} for an easier response to use + * @param matchID - The match ID to get details about + * @param region - Region of the match + * @param queries - Extra queries + * @returns Information about the match */ getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise>; /** - * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatches` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatches} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players match history */ getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise>; /** * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMRHistory` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMRHistory} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players rr history */ getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise>; /** * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMR` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMR} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players mmr */ getRawMMR(puuid: string, region: Region, queries?: any): Promise>; /** * Get a list of rr changes of a player by their Riot ID - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot tag username of the player - * @param {Region} region - The player's region + * @param name - The Riot ID username of the player + * @param tag - The Riot tag username of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ getMMRHistory(name: string, tag: string, region: Region): Promise>; /** * Get a list of rr changes of a player by their PUUID - * @param {string} name - The PUUID of the player - * @param {Region} region - The player's region + * @param puuid - The PUUID of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ getMMRHistoryByPUUID(puuid: string, region: Region): Promise>; /** * Get information about a match - * @param {string} matchID - The match's ID + * @param matchID - The matchs ID + * @returns Information about the match */ - getMatch(matchID: string): Promise>; + getMatch(matchID: string): Promise>; /** * Get the leaderboard of a region - * @param {Region} region - Region to get leaderboard from - * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value - * @param {number} end - (optional) Limit the amount of leaderboard players returned - * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID - * @param {string} puuid - Search for a specific player by their PUUID - * @param {Season} season - Get leaderboard from a specific season + * + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * + * @param region - Region to get leaderboard from + * @param start - (optional) Get 1000 leaderboard players starting from the given start value + * @param end - (optional) Limit the amount of leaderboard players returned + * @param riotID - (optional) Search for a specific player by their Riot ID + * @param riotID.name - The Riot IDs username + * @param riotID.tag - The Riot IDs tag + * @param puuid - (optional) Search for a specific player by their PUUID + * @param season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * + * @throws {@link TypeError} - If both a riotID and puuid are supplied */ getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string; @@ -214,87 +302,111 @@ export default class { }, puuid?: string, season?: Season): Promise>; /** * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + * @param locale - If this is set, instead of all translations, it will return just translations for this language */ getTranslations(locale?: Locale): Promise>; /** - * Gets general info about a player's rank by their Riot ID + * Gets general info about a players rank by their Riot ID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise>; /** - * Gets general info about a player's rank by their PUUID + * Gets general info about a players rank by their PUUID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} puuid - The PUUID of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param puuid - The PUUID of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise>; /** * Gets the most recent 5 matches by a players Riot ID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; /** * Gets the most recent 5 matches by a players PUUID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} puuid - The PUUID username of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param puuid - The PUUID username of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; /** * Get general information about a player from their Riot ID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} name The Riot ID username of the player - * @param {string} tag The Riot ID tag of the player - * @param {boolean} force Force data update? + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param force - Force data update? + * @return General information on a players profile */ getProfile(name: string, tag: string, force?: boolean): Promise>; /** * Get general information about a player from their PUUID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} puuid The PUUID of the player - * @param {boolean} force Force data update? + * + * @param puuid The PUUID of the player + * @param force Force data update? + * @return General information on a players profile */ getProfileByPUUID(puuid: string, force?: boolean): Promise>; } -export {}; +export default VAPI; diff --git a/package/dist/index.js b/package/dist/index.js index 415219f..3658ebf 100644 --- a/package/dist/index.js +++ b/package/dist/index.js @@ -1,22 +1,45 @@ import axios from "axios"; +/** + * Base API endpoint + */ const baseUrl = "https://api.henrikdev.xyz/valorant"; -export default class { +class VAPI { token; /** - * You must call `initUtils()` before using this! + * Images for every {@link Rank | Valorant rank} + * + * @remarks + * You must call {@link initUtils} before using this! */ rankImages; /** - * You must call `initUtils()` before using this! + * Images for every {@link ValorantMap | Valorant Map} + * + * @remarks + * You must call {@link initUtils} before using this! */ mapImages; /** - * The main class to call API functions from - * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + * Create a new instance of the main API. All API calls are in this class + * + * @example + * Create a new instance + * ``` + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) */ constructor(token) { this.token = token; } + /** + * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} + * + * @remarks + * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} + */ async initUtils() { const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; if (mapsReq) { @@ -39,11 +62,27 @@ export default class { })); } } + /** + * @internal + * + * Parses the body of an axios response + */ _parseBody(body) { if (body.errors) return body.errors; return body.status ? body.data : body; } + /** + * @internal + * + * Main function to fetch from the API + * + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ async _fetch(url, searchParams, config = {}) { // Format search params into `?something=like&this` const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { @@ -77,8 +116,12 @@ export default class { }; } /** - * Make sure each key in {@param input} has a non `null` or `undefined` value - * @param {{ [key: string]: any }} input - Arguments to check + * @internal + * + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * + * @throws {@link TypeError} - Only if there is a empty value to a key */ async _validateArgs(input) { Object.keys(input).forEach(key => { @@ -87,10 +130,20 @@ export default class { }); } /** - * Get a visualization of a valorant crosshair by its code - * @param {string} code - Valorant crosshair code - * @param {number} size - Image size (default: `1024`) - * @returns {Buffer} Image buffer for the preview + * Get an image of a valorant crosshair by its code + * + * @example + * Load and write a crosshair to crosshair.png + * ``` + * import { writeFileSync } from "fs" + * + * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` + * + * @param code - Valorant crosshair code + * @param size - (optional) Image size (default: `1024`) + * @returns The image of the crosshair as a {@link Buffer} */ async getCrosshair(code, size) { this._validateArgs({ code }); @@ -100,48 +153,54 @@ export default class { } /** * Get all announcements from the valorant website of a country - * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` + * @param countryCode - Country code of website + * @returns List of announcements from the valorant website */ async getAnnouncements(countryCode) { this._validateArgs({ countryCode }); return this._fetch(`v1/website/${countryCode}`); } /** - * Get information about valorant in a region - * @param {Region} region - Region to get info about + * Get information about valorant in a region, such as the client version, branch, and server version + * @param region - Region of valorant to get info about + * @returns Information about a regions valorant */ async getVersion(region) { this._validateArgs({ region }); return this._fetch(`v1/version/${region}`); } /** - * Get a list of featured items in Valorant + * Get all of the featured items in the current valorant store + * @returns Featured items in the current valorant store */ async getFeaturedItems() { // ! v2 is bugged for some reason return this._fetch("v1/store-featured"); } /** - * Get a list of all in-app-purchases for valorant - * ! find out wtf this actually does + * Get a list of all in-app-purchases for valorant, such as Radianite and VP + * @returns List of IAPs in valorant */ async getIAPs() { + // ! find out wtf this actually does return this._fetch("v1/store-offers"); } /** * Will get information about the current maintenances and incidents about a region - * @param {Region} region - Region to get info about + * @param region - Region to get info about + * @returns Info about undergoing maintenances and incidents in a region of valorant */ async getStatus(region) { this._validateArgs({ region }); return this._fetch(`v1/status/${region}`); } /** - * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatch` instead - * @param {string} matchID - The match ID to get details about - * @param {Region} region - Region of the match - * @param {any} queries - Extra queries + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatch} for an easier response to use + * @param matchID - The match ID to get details about + * @param region - Region of the match + * @param queries - Extra queries + * @returns Information about the match */ async getRawMatchDetails(matchID, region, queries) { this._validateArgs({ matchID, region }); @@ -151,11 +210,12 @@ export default class { }); } /** - * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatches` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatches} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players match history */ async getRawMatchHistory(puuid, region, queries) { this._validateArgs({ puuid, region }); @@ -166,10 +226,11 @@ export default class { } /** * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMRHistory` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMRHistory} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players rr history */ async getRawCompetitiveUpdates(puuid, region, queries) { this._validateArgs({ puuid, region }); @@ -180,10 +241,11 @@ export default class { } /** * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMR` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMR} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players mmr */ async getRawMMR(puuid, region, queries) { this._validateArgs({ puuid, region }); @@ -194,9 +256,10 @@ export default class { } /** * Get a list of rr changes of a player by their Riot ID - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot tag username of the player - * @param {Region} region - The player's region + * @param name - The Riot ID username of the player + * @param tag - The Riot tag username of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ async getMMRHistory(name, tag, region) { this._validateArgs({ name, tag, region }); @@ -204,8 +267,9 @@ export default class { } /** * Get a list of rr changes of a player by their PUUID - * @param {string} name - The PUUID of the player - * @param {Region} region - The player's region + * @param puuid - The PUUID of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ async getMMRHistoryByPUUID(puuid, region) { this._validateArgs({ puuid, region }); @@ -213,7 +277,8 @@ export default class { } /** * Get information about a match - * @param {string} matchID - The match's ID + * @param matchID - The matchs ID + * @returns Information about the match */ async getMatch(matchID) { this._validateArgs({ matchID }); @@ -221,12 +286,21 @@ export default class { } /** * Get the leaderboard of a region - * @param {Region} region - Region to get leaderboard from - * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value - * @param {number} end - (optional) Limit the amount of leaderboard players returned - * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID - * @param {string} puuid - Search for a specific player by their PUUID - * @param {Season} season - Get leaderboard from a specific season + * + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * + * @param region - Region to get leaderboard from + * @param start - (optional) Get 1000 leaderboard players starting from the given start value + * @param end - (optional) Limit the amount of leaderboard players returned + * @param riotID - (optional) Search for a specific player by their Riot ID + * @param riotID.name - The Riot IDs username + * @param riotID.tag - The Riot IDs tag + * @param puuid - (optional) Search for a specific player by their PUUID + * @param season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * + * @throws {@link TypeError} - If both a riotID and puuid are supplied */ async getLeaderboard(region, start, end, riotID, puuid, season) { if (riotID && puuid) @@ -236,37 +310,45 @@ export default class { } /** * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + * @param locale - If this is set, instead of all translations, it will return just translations for this language */ async getTranslations(locale) { return this._fetch("v1/content", { locale }); } /** - * Gets general info about a player's rank by their Riot ID + * Gets general info about a players rank by their Riot ID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ async getMMR(name, tag, region, seasonFilter) { this._validateArgs({ name, tag, region }); return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }); } /** - * Gets general info about a player's rank by their PUUID + * Gets general info about a players rank by their PUUID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} puuid - The PUUID of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param puuid - The PUUID of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ async getMMRByPUUID(puuid, region, seasonFilter) { this._validateArgs({ puuid, region }); @@ -274,18 +356,22 @@ export default class { } /** * Gets the most recent 5 matches by a players Riot ID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ async getMatches(name, tag, region, gamemodeFilter, mapFilter, size) { this._validateArgs({ name, tag, region }); @@ -293,17 +379,21 @@ export default class { } /** * Gets the most recent 5 matches by a players PUUID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} puuid - The PUUID username of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param puuid - The PUUID username of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ async getMatchesByPUUID(puuid, region, gamemodeFilter, mapFilter, size) { this._validateArgs({ name: puuid, region }); @@ -311,14 +401,18 @@ export default class { } /** * Get general information about a player from their Riot ID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} name The Riot ID username of the player - * @param {string} tag The Riot ID tag of the player - * @param {boolean} force Force data update? + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param force - Force data update? + * @return General information on a players profile */ async getProfile(name, tag, force) { this._validateArgs({ name, tag }); @@ -326,17 +420,22 @@ export default class { } /** * Get general information about a player from their PUUID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} puuid The PUUID of the player - * @param {boolean} force Force data update? + * + * @param puuid The PUUID of the player + * @param force Force data update? + * @return General information on a players profile */ async getProfileByPUUID(puuid, force) { this._validateArgs({ name: puuid }); return this._fetch(`v1/by-puuid/account/${puuid}`, { force }); } } +export default VAPI; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package/dist/index.js.map b/package/dist/index.js.map index 4541efe..6dec68a 100644 --- a/package/dist/index.js.map +++ b/package/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AA0FtD,MAAM,OAAO,GAAG,oCAAoC,CAAA;AACpD,MAAM,CAAC,OAAO;IAcU;IAbpB;;OAEG;IACH,UAAU,CAAgG;IAC1G;;OAEG;IACH,SAAS,CAAiG;IAE1G;;;OAGA;IACA,YAAoB,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAEtC,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACxG,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,SAAS,GAAG,EAAS,CAAA;YAC1B,OAAO,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG;gBAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,OAAO,EAAE,GAAG,CAAC,WAAW;gBACxB,SAAS,EAAE,GAAG,CAAC,YAAY;aAC9B,CAAC,CAAC,CAAA;SACN;QAED,MAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,8CAA8C,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACrH,IAAI,QAAQ,EAAE;YACV,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACvF,IAAI,CAAC,UAAU,GAAG,EAAS,CAAA;YAC3B,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG;gBACnH,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,UAAU,EAAE,IAAI,CAAC,kBAAkB;gBACnC,YAAY,EAAE,IAAI,CAAC,oBAAoB;aAC1C,CAAC,CAAC,CAAA;SACN;IACL,CAAC;IAEO,UAAU,CAAC,IAAS;QACxB,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,MAAM,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACzC,CAAC;IAEO,KAAK,CAAC,MAAM,CAAW,GAAW,EAAE,YAAqC,EAAE,SAA6B,EAAE;QAC9G,mDAAmD;QACnD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7E,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAA;YACrD,OAAO,GAAG,KAAK,EAAE;gBACb,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,EAAE;gBACpB,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;QAClC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAEX,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;YACpB,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,IAAI,GAAG,GAAG,WAAW,EAAE,CAAC;YACjD,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,IAAI,CAAC,KAAK;gBACf,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,uCAAuC,GAAG;gBACvF,CAAC,CAAC,EAAE,YAAY,EAAE,uCAAuC,GAAG;YAChE,GAAG,MAAM;SACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QAExB,sBAAsB;QACtB,OAAO;YACH,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM;YACvD,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI;YACtG,UAAU,EAAE;gBACR,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBACzG,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;gBACtH,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;aAC7G;YACD,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG;SACtB,CAAA;IACL,CAAC;IAED;;;OAGA;IACQ,KAAK,CAAC,aAAa,CAAC,KAA6B;QACrD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS;gBAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAA;QAC3G,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;;;OAKA;IACA,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,IAAa;QAC1C,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAoB,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YAC/E,YAAY,EAAE,aAAa;SAC9B,CAAC,CAAA;IACN,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,gBAAgB,CAAC,WAA4I;QAC/J,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,WAAW,EAAE,CAAC,CAAA;IACpE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,UAAU,CAAC,MAAc;QAC3B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED;;OAEA;IACA,KAAK,CAAC,gBAAgB;QAClB,iCAAiC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAwB,mBAAmB,CAAC,CAAA;IAClE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAsB,iBAAiB,CAAC,CAAA;IAC9D,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,SAAS,CAAC,MAAc;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAiB,aAAa,MAAM,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,MAAc,EAAE,OAAa;QACnE,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;YAC/D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACjE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YAC7D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,wBAAwB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACvE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAgC,QAAQ,EAAE,IAAI,EAAE;YACpE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACxD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAiB,QAAQ,EAAE,IAAI,EAAE;YACrD,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACnE,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc;QACzD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAqB,kBAAkB,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;IACrF,CAAC;IAED;;;;MAIE;IACF,KAAK,CAAC,oBAAoB,CAAC,KAAa,EAAE,MAAc;QACpD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAqB,2BAA2B,MAAM,IAAI,KAAK,EAAE,CAAC,CAAA;IACxF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAgB,YAAY,OAAO,EAAE,CAAC,CAAA;IAC5D,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAAC,MAAc,EAAE,KAAc,EAAE,GAAY,EAAE,MAAsC,EAAE,KAAc,EAAE,MAAe;QACtI,IAAI,MAAM,IAAI,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,yHAAyH,CAAC,CAAA;QAEnK,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAsB,kBAAkB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC5I,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,MAAe;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACjE,CAAC;IAED;;;;;;;;;;;OAWA;IACA,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,YAAqB;QACzE,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAc,UAAU,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAChG,CAAC;IAED;;;;;;;;;;OAUA;IACA,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,YAAqB;QACpE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAc,mBAAmB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IACnG,CAAC;IAED;;;;;;;;;;;;;;MAcD;IACC,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAClH,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;MAaD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAC7G,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAkB,oBAAoB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;OAUA;IACA,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,KAAe;QACvD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;;;;;MASD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,KAAe;QAClD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,uBAAuB,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAClF,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AA2GtD;;GAEG;AACH,MAAM,OAAO,GAAG,oCAAoC,CAAA;AACpD,MAAM,IAAI;IA4Bc;IA3BpB;;;;;OAKG;IACH,UAAU,CAAgG;IAC1G;;;;;OAKG;IACH,SAAS,CAAiG;IAE1G;;;;;;;;;;;OAWA;IACA,YAAoB,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAEtC;;;;;OAKG;IACH,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACxG,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,SAAS,GAAG,EAAS,CAAA;YAC1B,OAAO,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG;gBAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,OAAO,EAAE,GAAG,CAAC,WAAW;gBACxB,SAAS,EAAE,GAAG,CAAC,YAAY;aAC9B,CAAC,CAAC,CAAA;SACN;QAED,MAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,8CAA8C,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACrH,IAAI,QAAQ,EAAE;YACV,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACvF,IAAI,CAAC,UAAU,GAAG,EAAS,CAAA;YAC3B,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG;gBACnH,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,UAAU,EAAE,IAAI,CAAC,kBAAkB;gBACnC,YAAY,EAAE,IAAI,CAAC,oBAAoB;aAC1C,CAAC,CAAC,CAAA;SACN;IACL,CAAC;IAED;;;;OAIG;IACK,UAAU,CAAC,IAAS;QACxB,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,MAAM,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACzC,CAAC;IAED;;;;;;;;;;OAUG;IACK,KAAK,CAAC,MAAM,CAAW,GAAW,EAAE,YAAqC,EAAE,SAA6B,EAAE;QAC9G,mDAAmD;QACnD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7E,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAA;YACrD,OAAO,GAAG,KAAK,EAAE;gBACb,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,EAAE;gBACpB,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;QAClC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAEX,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;YACpB,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,IAAI,GAAG,GAAG,WAAW,EAAE,CAAC;YACjD,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,IAAI,CAAC,KAAK;gBACf,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,uCAAuC,GAAG;gBACvF,CAAC,CAAC,EAAE,YAAY,EAAE,uCAAuC,GAAG;YAChE,GAAG,MAAM;SACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QAExB,sBAAsB;QACtB,OAAO;YACH,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM;YACvD,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI;YACtG,UAAU,EAAE;gBACR,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBACzG,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;gBACtH,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;aAC7G;YACD,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG;SACtB,CAAA;IACL,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,aAAa,CAAC,KAA6B;QACrD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS;gBAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAA;QAC3G,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;;;;;;;;;OAeA;IACA,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,IAAa;QAC1C,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAoB,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YAC/E,YAAY,EAAE,aAAa;SAC9B,CAAC,CAAA;IACN,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,gBAAgB,CAAC,WAA4I;QAC/J,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,WAAW,EAAE,CAAC,CAAA;IACpE,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,UAAU,CAAC,MAAc;QAC3B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,gBAAgB;QAClB,iCAAiC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAwB,mBAAmB,CAAC,CAAA;IAClE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,OAAO;QACT,oCAAoC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAsB,iBAAiB,CAAC,CAAA;IAC9D,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,SAAS,CAAC,MAAc;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAiB,aAAa,MAAM,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,MAAc,EAAE,OAAa;QACnE,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;YAC/D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACjE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YAC7D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,wBAAwB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACvE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAgC,QAAQ,EAAE,IAAI,EAAE;YACpE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,SAAS,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACxD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAiB,QAAQ,EAAE,IAAI,EAAE;YACrD,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACnE,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc;QACzD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAqB,kBAAkB,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;IACrF,CAAC;IAED;;;;;MAKE;IACF,KAAK,CAAC,oBAAoB,CAAC,KAAa,EAAE,MAAc;QACpD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAqB,2BAA2B,MAAM,IAAI,KAAK,EAAE,CAAC,CAAA;IACxF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAgB,YAAY,OAAO,EAAE,CAAC,CAAA;IAC5D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc,CAAC,MAAc,EAAE,KAAc,EAAE,GAAY,EAAE,MAAsC,EAAE,KAAc,EAAE,MAAe;QACtI,IAAI,MAAM,IAAI,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,yHAAyH,CAAC,CAAA;QAEnK,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAsB,kBAAkB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC5I,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,MAAe;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACjE,CAAC;IAED;;;;;;;;;;;;;;;OAeA;IACA,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,YAAqB;QACzE,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAc,UAAU,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAChG,CAAC;IAED;;;;;;;;;;;;;;OAcA;IACA,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,YAAqB;QACpE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAc,mBAAmB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;;MAkBD;IACC,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAClH,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;;;;;MAiBD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAC7G,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAkB,oBAAoB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;;OAcA;IACA,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,KAAe;QACvD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;;;;;;;;;MAaD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,KAAe;QAClD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,uBAAuB,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAClF,CAAC;CACJ;AAED,eAAe,IAAI,CAAA"} \ No newline at end of file diff --git a/package/src/index.ts b/package/src/index.ts index 0661dc2..e6fcb2a 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -19,9 +19,17 @@ import type { MMRHistoryResponse } from "./types/v2-mmr-history" import type { MatchesResponse } from "./types/v3-matches" interface APIResponse { + /** + * Response status + * + * @remarks + * - `200-299` Successful response + * - `400-499` Client error response + * - `500-599` Server error response + */ status: number /** - * Real response from API + * Response from API */ data?: dataType /** @@ -43,7 +51,10 @@ interface ErrorObject { * Error message */ message: string - /** The response status of the API. Can be any of the following: + /** The response status of the API. See remarks for info about specific error codes + * + * @remarks + * Can be any of the following: * - `1` Invalid API Key * - `2` Forbidden endpoint * - `3` Restricted endpoint @@ -72,40 +83,69 @@ interface ErrorObject { interface RateLimit { /** - * Number of used API requests per 60s. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * Number of used API requests per 60s. + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ used: number /** * Remaining number of API requests per 60s. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ remaining: number /** * In how many seconds (every 60s) your rate limit is going to reset. - * - `30 req/min` on free accounts, and `60 req/min` on regular token + * + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token */ reset: number } +/** + * Base API endpoint + */ const baseUrl = "https://api.henrikdev.xyz/valorant" -export default class { +class VAPI { /** - * You must call `initUtils()` before using this! + * Images for every {@link Rank | Valorant rank} + * + * @remarks + * You must call {@link initUtils} before using this! */ rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } } /** - * You must call `initUtils()` before using this! + * Images for every {@link ValorantMap | Valorant Map} + * + * @remarks + * You must call {@link initUtils} before using this! */ mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } } /** - * The main class to call API functions from - * @param {string} token - The token (optional). Get one from https://discord.gg/wXNMnqzvAD + * Create a new instance of the main API. All API calls are in this class + * + * @example + * Create a new instance + * ``` + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) */ constructor(private token?: string) {} - async initUtils() { + /** + * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} + * + * @remarks + * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} + */ + async initUtils(): Promise { const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data if (mapsReq) { this.mapImages = {} as any @@ -129,11 +169,27 @@ export default class { } } - private _parseBody(body: any) { + /** + * @internal + * + * Parses the body of an axios response + */ + private _parseBody(body: any): any { if (body.errors) return body.errors return body.status ? body.data : body } + /** + * @internal + * + * Main function to fetch from the API + * + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { // Format search params into `?something=like&this` const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { @@ -169,9 +225,13 @@ export default class { } /** - * Make sure each key in {@param input} has a non `null` or `undefined` value - * @param {{ [key: string]: any }} input - Arguments to check - */ + * @internal + * + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * + * @throws {@link TypeError} - Only if there is a empty value to a key + */ private async _validateArgs(input: { [key: string]: any }) { Object.keys(input).forEach(key => { if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) @@ -179,12 +239,22 @@ export default class { } /** - * Get a visualization of a valorant crosshair by its code - * @param {string} code - Valorant crosshair code - * @param {number} size - Image size (default: `1024`) - * @returns {Buffer} Image buffer for the preview + * Get an image of a valorant crosshair by its code + * + * @example + * Load and write a crosshair to crosshair.png + * ``` + * import { writeFileSync } from "fs" + * + * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` + * + * @param code - Valorant crosshair code + * @param size - (optional) Image size (default: `1024`) + * @returns The image of the crosshair as a {@link Buffer} */ - async getCrosshair(code: string, size?: number) { + async getCrosshair(code: string, size?: number): Promise> { this._validateArgs({ code }) return this._fetch("v1/crosshair/generate", { id: code, size }, { responseType: "arraybuffer" @@ -193,55 +263,61 @@ export default class { /** * Get all announcements from the valorant website of a country - * @param {string} countryCode - Country code of website. Cane be `en-us`, `en-gb`, `de-de`, `es-es`, `es-mx`, `fr-fr`, `it-it`, `ja-jp`, `ko-kr`, `pt-br`, `ru-ru`, `tr-tr`, or `vi-vn` + * @param countryCode - Country code of website + * @returns List of announcements from the valorant website */ - async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn") { + async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise> { this._validateArgs({ countryCode }) return this._fetch(`v1/website/${countryCode}`) } /** - * Get information about valorant in a region - * @param {Region} region - Region to get info about + * Get information about valorant in a region, such as the client version, branch, and server version + * @param region - Region of valorant to get info about + * @returns Information about a regions valorant */ - async getVersion(region: Region) { + async getVersion(region: Region): Promise> { this._validateArgs({ region }) return this._fetch(`v1/version/${region}`) } /** - * Get a list of featured items in Valorant + * Get all of the featured items in the current valorant store + * @returns Featured items in the current valorant store */ - async getFeaturedItems() { + async getFeaturedItems(): Promise> { // ! v2 is bugged for some reason return this._fetch("v1/store-featured") } /** - * Get a list of all in-app-purchases for valorant + * Get a list of all in-app-purchases for valorant, such as Radianite and VP + * @returns List of IAPs in valorant */ - async getIAPs() { + async getIAPs(): Promise> { // ! find out wtf this actually does return this._fetch("v1/store-offers") } /** * Will get information about the current maintenances and incidents about a region - * @param {Region} region - Region to get info about + * @param region - Region to get info about + * @returns Info about undergoing maintenances and incidents in a region of valorant */ - async getStatus(region: Region) { + async getStatus(region: Region): Promise> { this._validateArgs({ region }) return this._fetch(`v1/status/${region}`) } /** - * Gets raw data for a match from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatch` instead - * @param {string} matchID - The match ID to get details about - * @param {Region} region - Region of the match - * @param {any} queries - Extra queries + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatch} for an easier response to use + * @param matchID - The match ID to get details about + * @param region - Region of the match + * @param queries - Extra queries + * @returns Information about the match */ - async getRawMatchDetails(matchID: string, region: Region, queries?: any) { + async getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise> { this._validateArgs({ matchID, region }) return await this._fetch("v1/raw", null, { data: { type: "matchdetails", value: matchID, region, queries }, @@ -250,13 +326,14 @@ export default class { } /** - * Gets raw data for a players match history from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMatches` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link VAPI.getMatches} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players match history */ - async getRawMatchHistory(puuid: string, region: Region, queries?: any) { + async getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { data: { type: "matchhistory", value: puuid, region, queries }, @@ -266,12 +343,13 @@ export default class { /** * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMRHistory` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMRHistory} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players rr history */ - async getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any) { + async getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { data: { type: "mmr", value: puuid, region, queries }, @@ -281,12 +359,13 @@ export default class { /** * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * - Use `getMMR` instead - * @param {string} puuid - The match ID to get details about - * @param {Region} region - Region of the player - * @param {any} queries - Extra queries + * @see {@link VAPI.getMMR} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players mmr */ - async getRawMMR(puuid: string, region: Region, queries?: any) { + async getRawMMR(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { data: { type: "competitiveupdates", value: puuid, region, queries }, @@ -296,44 +375,56 @@ export default class { /** * Get a list of rr changes of a player by their Riot ID - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot tag username of the player - * @param {Region} region - The player's region + * @param name - The Riot ID username of the player + * @param tag - The Riot tag username of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ - async getMMRHistory(name: string, tag: string, region: Region) { + async getMMRHistory(name: string, tag: string, region: Region): Promise> { this._validateArgs({ name, tag, region }) return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`) } /** * Get a list of rr changes of a player by their PUUID - * @param {string} name - The PUUID of the player - * @param {Region} region - The player's region + * @param puuid - The PUUID of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ - async getMMRHistoryByPUUID(puuid: string, region: Region) { + async getMMRHistoryByPUUID(puuid: string, region: Region): Promise> { this._validateArgs({ puuid, region }) return this._fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`) } /** * Get information about a match - * @param {string} matchID - The match's ID + * @param matchID - The matchs ID + * @returns Information about the match */ - async getMatch(matchID: string) { + async getMatch(matchID: string): Promise> { this._validateArgs({ matchID }) return this._fetch(`v2/match/${matchID}`) } /** * Get the leaderboard of a region - * @param {Region} region - Region to get leaderboard from - * @param {number} start - (optional) Get 1000 leaderboard players starting from the given start value - * @param {number} end - (optional) Limit the amount of leaderboard players returned - * @param {{ name: string, tag: string }} riotID - Search for a specific player by their Riot ID - * @param {string} puuid - Search for a specific player by their PUUID - * @param {Season} season - Get leaderboard from a specific season + * + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * + * @param region - Region to get leaderboard from + * @param start - (optional) Get 1000 leaderboard players starting from the given start value + * @param end - (optional) Limit the amount of leaderboard players returned + * @param riotID - (optional) Search for a specific player by their Riot ID + * @param riotID.name - The Riot IDs username + * @param riotID.tag - The Riot IDs tag + * @param puuid - (optional) Search for a specific player by their PUUID + * @param season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * + * @throws {@link TypeError} - If both a riotID and puuid are supplied */ - async getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string, tag: string }, puuid?: string, season?: Season) { + async getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string, tag: string }, puuid?: string, season?: Season): Promise> { if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid") this._validateArgs({ region }) @@ -342,112 +433,138 @@ export default class { /** * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param {Locale} locale - If this is set, instead of all translations, it will return just translations for this language + * @param locale - If this is set, instead of all translations, it will return just translations for this language */ - async getTranslations(locale?: Locale) { + async getTranslations(locale?: Locale): Promise> { return this._fetch("v1/content", { locale }) } /** - * Gets general info about a player's rank by their Riot ID + * Gets general info about a players rank by their Riot ID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ - async getMMR(name: string, tag: string, region: Region, seasonFilter?: Season) { + async getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise> { this._validateArgs({ name, tag, region }) return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }) } /** - * Gets general info about a player's rank by their PUUID + * Gets general info about a players rank by their PUUID + * + * @remarks * - **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param {string} puuid - The PUUID of the player - * @param {Region} region - The region of the player - * @param {Season} seasonFilter - Filter results based on episode and act + * + * @param puuid - The PUUID of the player + * @param region - The region of the player + * @param seasonFilter - Filter results based on episode and act + * @returns Information about a players mmr/rank */ - async getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season) { + async getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise> { this._validateArgs({ puuid, region }) return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }) } /** * Gets the most recent 5 matches by a players Riot ID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} name - The Riot ID username of the player - * @param {string} tag - The Riot ID tag of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ - async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { + async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { this._validateArgs({ name, tag, region }) return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }) } /** * Gets the most recent 5 matches by a players PUUID + * + * @remarks * - **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param {string} puuid - The PUUID username of the player - * @param {Region} region - The region of the player - * @param {Mode} gamemodeFilter - Filter results based on gamemode - * @param {ValorantMap} mapFilter - Filter results based on map - * @param {any} size - Filter results based on ?? **{needs testing)** + * + * @param puuid - The PUUID username of the player + * @param region - The region of the player + * @param gamemodeFilter - Filter results based on gamemode + * @param mapFilter - Filter results based on map + * @param size - Filter results based on ?? **{needs testing)** + * @returns Info about a players last 5 matches */ - async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any) { + async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { this._validateArgs({ name: puuid, region }) return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }) } /** * Get general information about a player from their Riot ID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} name The Riot ID username of the player - * @param {string} tag The Riot ID tag of the player - * @param {boolean} force Force data update? + * + * @param name - The Riot ID username of the player + * @param tag - The Riot ID tag of the player + * @param force - Force data update? + * @return General information on a players profile */ - async getProfile(name: string, tag: string, force?: boolean) { + async getProfile(name: string, tag: string, force?: boolean): Promise> { this._validateArgs({ name, tag }) return this._fetch(`v1/account/${name}/${tag}`, { force }) } /** * Get general information about a player from their PUUID + * + * @remarks * - **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * @param {string} puuid The PUUID of the player - * @param {boolean} force Force data update? + * + * @param puuid The PUUID of the player + * @param force Force data update? + * @return General information on a players profile */ - async getProfileByPUUID(puuid: string, force?: boolean) { + async getProfileByPUUID(puuid: string, force?: boolean): Promise> { this._validateArgs({ name: puuid }) return this._fetch(`v1/by-puuid/account/${puuid}`, { force }) } } + +export default VAPI From 372bfa06a036bde5aaa2d39fb184169b7263e7f9 Mon Sep 17 00:00:00 2001 From: Linimik <63650909+jameslinimk@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:49:05 -0500 Subject: [PATCH 08/50] Delete package/dist directory --- package/dist/index.d.ts | 412 ---------------- package/dist/index.js | 441 ------------------ package/dist/index.js.map | 1 - package/dist/types/general.d.ts | 13 - package/dist/types/general.js | 2 - package/dist/types/general.js.map | 1 - .../dist/types/raw/competitive-updates.d.ts | 22 - package/dist/types/raw/competitive-updates.js | 2 - .../dist/types/raw/competitive-updates.js.map | 1 - package/dist/types/raw/match-details.d.ts | 228 --------- package/dist/types/raw/match-details.js | 2 - package/dist/types/raw/match-details.js.map | 1 - package/dist/types/raw/match-history.d.ts | 15 - package/dist/types/raw/match-history.js | 2 - package/dist/types/raw/match-history.js.map | 1 - package/dist/types/raw/mmr.d.ts | 60 --- package/dist/types/raw/mmr.js | 2 - package/dist/types/raw/mmr.js.map | 1 - package/dist/types/v1-content.d.ts | 39 -- package/dist/types/v1-content.js | 2 - package/dist/types/v1-content.js.map | 1 - package/dist/types/v1-crosshair.d.ts | 2 - package/dist/types/v1-crosshair.js | 2 - package/dist/types/v1-crosshair.js.map | 1 - package/dist/types/v1-featured-items.d.ts | 29 -- package/dist/types/v1-featured-items.js | 2 - package/dist/types/v1-featured-items.js.map | 1 - package/dist/types/v1-profile.d.ts | 17 - package/dist/types/v1-profile.js | 2 - package/dist/types/v1-profile.js.map | 1 - package/dist/types/v1-status.d.ts | 29 -- package/dist/types/v1-status.js | 2 - package/dist/types/v1-status.js.map | 1 - package/dist/types/v1-store-offers.d.ts | 23 - package/dist/types/v1-store-offers.js | 2 - package/dist/types/v1-store-offers.js.map | 1 - package/dist/types/v1-version.d.ts | 6 - package/dist/types/v1-version.js | 2 - package/dist/types/v1-version.js.map | 1 - package/dist/types/v1-website.d.ts | 16 - package/dist/types/v1-website.js | 2 - package/dist/types/v1-website.js.map | 1 - package/dist/types/v2-leaderboard.d.ts | 23 - package/dist/types/v2-leaderboard.js | 2 - package/dist/types/v2-leaderboard.js.map | 1 - package/dist/types/v2-match.d.ts | 2 - package/dist/types/v2-match.js | 2 - package/dist/types/v2-match.js.map | 1 - package/dist/types/v2-mmr-history.d.ts | 18 - package/dist/types/v2-mmr-history.js | 2 - package/dist/types/v2-mmr-history.js.map | 1 - package/dist/types/v2-mmr.d.ts | 35 -- package/dist/types/v2-mmr.js | 2 - package/dist/types/v2-mmr.js.map | 1 - package/dist/types/v3-matches.d.ts | 227 --------- package/dist/types/v3-matches.js | 2 - package/dist/types/v3-matches.js.map | 1 - 57 files changed, 1712 deletions(-) delete mode 100644 package/dist/index.d.ts delete mode 100644 package/dist/index.js delete mode 100644 package/dist/index.js.map delete mode 100644 package/dist/types/general.d.ts delete mode 100644 package/dist/types/general.js delete mode 100644 package/dist/types/general.js.map delete mode 100644 package/dist/types/raw/competitive-updates.d.ts delete mode 100644 package/dist/types/raw/competitive-updates.js delete mode 100644 package/dist/types/raw/competitive-updates.js.map delete mode 100644 package/dist/types/raw/match-details.d.ts delete mode 100644 package/dist/types/raw/match-details.js delete mode 100644 package/dist/types/raw/match-details.js.map delete mode 100644 package/dist/types/raw/match-history.d.ts delete mode 100644 package/dist/types/raw/match-history.js delete mode 100644 package/dist/types/raw/match-history.js.map delete mode 100644 package/dist/types/raw/mmr.d.ts delete mode 100644 package/dist/types/raw/mmr.js delete mode 100644 package/dist/types/raw/mmr.js.map delete mode 100644 package/dist/types/v1-content.d.ts delete mode 100644 package/dist/types/v1-content.js delete mode 100644 package/dist/types/v1-content.js.map delete mode 100644 package/dist/types/v1-crosshair.d.ts delete mode 100644 package/dist/types/v1-crosshair.js delete mode 100644 package/dist/types/v1-crosshair.js.map delete mode 100644 package/dist/types/v1-featured-items.d.ts delete mode 100644 package/dist/types/v1-featured-items.js delete mode 100644 package/dist/types/v1-featured-items.js.map delete mode 100644 package/dist/types/v1-profile.d.ts delete mode 100644 package/dist/types/v1-profile.js delete mode 100644 package/dist/types/v1-profile.js.map delete mode 100644 package/dist/types/v1-status.d.ts delete mode 100644 package/dist/types/v1-status.js delete mode 100644 package/dist/types/v1-status.js.map delete mode 100644 package/dist/types/v1-store-offers.d.ts delete mode 100644 package/dist/types/v1-store-offers.js delete mode 100644 package/dist/types/v1-store-offers.js.map delete mode 100644 package/dist/types/v1-version.d.ts delete mode 100644 package/dist/types/v1-version.js delete mode 100644 package/dist/types/v1-version.js.map delete mode 100644 package/dist/types/v1-website.d.ts delete mode 100644 package/dist/types/v1-website.js delete mode 100644 package/dist/types/v1-website.js.map delete mode 100644 package/dist/types/v2-leaderboard.d.ts delete mode 100644 package/dist/types/v2-leaderboard.js delete mode 100644 package/dist/types/v2-leaderboard.js.map delete mode 100644 package/dist/types/v2-match.d.ts delete mode 100644 package/dist/types/v2-match.js delete mode 100644 package/dist/types/v2-match.js.map delete mode 100644 package/dist/types/v2-mmr-history.d.ts delete mode 100644 package/dist/types/v2-mmr-history.js delete mode 100644 package/dist/types/v2-mmr-history.js.map delete mode 100644 package/dist/types/v2-mmr.d.ts delete mode 100644 package/dist/types/v2-mmr.js delete mode 100644 package/dist/types/v2-mmr.js.map delete mode 100644 package/dist/types/v3-matches.d.ts delete mode 100644 package/dist/types/v3-matches.js delete mode 100644 package/dist/types/v3-matches.js.map diff --git a/package/dist/index.d.ts b/package/dist/index.d.ts deleted file mode 100644 index 4847940..0000000 --- a/package/dist/index.d.ts +++ /dev/null @@ -1,412 +0,0 @@ -import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; -import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; -import type { RawMatchDetailsResponse } from "./types/raw/match-details"; -import type { RawMatchHistoryResponse } from "./types/raw/match-history"; -import type { RawMMRResponse } from "./types/raw/mmr"; -import type { ContentResponse } from "./types/v1-content"; -import type { CrosshairResponse } from "./types/v1-crosshair"; -import type { FeaturedItemsResponse } from "./types/v1-featured-items"; -import type { ProfileResponse } from "./types/v1-profile"; -import type { StatusResponse } from "./types/v1-status"; -import type { StoreOffersResponse } from "./types/v1-store-offers"; -import type { VersionResponse } from "./types/v1-version"; -import type { WebsiteResponse } from "./types/v1-website"; -import type { LeaderboardResponse } from "./types/v2-leaderboard"; -import type { MatchResponse } from "./types/v2-match"; -import type { MMRResponse } from "./types/v2-mmr"; -import type { MMRHistoryResponse } from "./types/v2-mmr-history"; -import type { MatchesResponse } from "./types/v3-matches"; -interface APIResponse { - /** - * Response status - * - * @remarks - * - `200-299` Successful response - * - `400-499` Client error response - * - `500-599` Server error response - */ - status: number; - /** - * Response from API - */ - data?: dataType; - /** - * Information about current rate limits - */ - rateLimits: RateLimit; - /** - * Error object (if there is) - */ - error?: ErrorObject; - /** - * Original request URL - */ - url: string; -} -interface ErrorObject { - /** - * Error message - */ - message: string; - /** The response status of the API. See remarks for info about specific error codes - * - * @remarks - * Can be any of the following: - * - `1` Invalid API Key - * - `2` Forbidden endpoint - * - `3` Restricted endpoint - * - `101` No region found for this Player - * - `102` No matches found, can't get puuid - * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again - * - `104` Invalid region - * - `105` Invalid filter - * - `106` Invalid gamemode - * - `107` Invalid map - * - `108` Invalid locale - * - `109` Missing name - * - `110` Missing tag - * - `111` Player not found in leaderboard - * - `112` Invalid raw type - * - `113` Invalid match or player id - * - `114` Invalid country code - * - `115` Invalid season - */ - code: number; - /** - * Error details to help fix the problem - */ - details: string; -} -interface RateLimit { - /** - * Number of used API requests per 60s. - * - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - used: number; - /** - * Remaining number of API requests per 60s. - * - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - remaining: number; - /** - * In how many seconds (every 60s) your rate limit is going to reset. - * - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - reset: number; -} -declare class VAPI { - private token?; - /** - * Images for every {@link Rank | Valorant rank} - * - * @remarks - * You must call {@link initUtils} before using this! - */ - rankImages?: { - [key in Rank]: { - large: string; - small: string; - triangleUp: string; - triangleDown: string; - }; - }; - /** - * Images for every {@link ValorantMap | Valorant Map} - * - * @remarks - * You must call {@link initUtils} before using this! - */ - mapImages?: { - [key in ValorantMap | "The Range"]: { - splash: string; - minimap: string; - landscape: string; - }; - }; - /** - * Create a new instance of the main API. All API calls are in this class - * - * @example - * Create a new instance - * ``` - * import _VAPI from "unofficial-valorant-api" - * const VAPI = new _VAPI("my super secret token") - * ``` - * - * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) - */ - constructor(token?: string); - /** - * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} - * - * @remarks - * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} - */ - initUtils(): Promise; - /** - * @internal - * - * Parses the body of an axios response - */ - private _parseBody; - /** - * @internal - * - * Main function to fetch from the API - * - * @typeParam dataType - The type of the response - * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded - * @param searchParams - Any extra search params. Empty values will be filtered out - * @param config - Override the default axios config with custom params - * @returns Formatted response - */ - private _fetch; - /** - * @internal - * - * Make sure each key has a non empty value - * @param input - Object to check for non empty values - * - * @throws {@link TypeError} - Only if there is a empty value to a key - */ - private _validateArgs; - /** - * Get an image of a valorant crosshair by its code - * - * @example - * Load and write a crosshair to crosshair.png - * ``` - * import { writeFileSync } from "fs" - * - * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") - * writeFileSync("crosshair.png", crosshair.data) - * ``` - * - * @param code - Valorant crosshair code - * @param size - (optional) Image size (default: `1024`) - * @returns The image of the crosshair as a {@link Buffer} - */ - getCrosshair(code: string, size?: number): Promise>; - /** - * Get all announcements from the valorant website of a country - * @param countryCode - Country code of website - * @returns List of announcements from the valorant website - */ - getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise>; - /** - * Get information about valorant in a region, such as the client version, branch, and server version - * @param region - Region of valorant to get info about - * @returns Information about a regions valorant - */ - getVersion(region: Region): Promise>; - /** - * Get all of the featured items in the current valorant store - * @returns Featured items in the current valorant store - */ - getFeaturedItems(): Promise>; - /** - * Get a list of all in-app-purchases for valorant, such as Radianite and VP - * @returns List of IAPs in valorant - */ - getIAPs(): Promise>; - /** - * Will get information about the current maintenances and incidents about a region - * @param region - Region to get info about - * @returns Info about undergoing maintenances and incidents in a region of valorant - */ - getStatus(region: Region): Promise>; - /** - * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatch} for an easier response to use - * @param matchID - The match ID to get details about - * @param region - Region of the match - * @param queries - Extra queries - * @returns Information about the match - */ - getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise>; - /** - * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatches} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players match history - */ - getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise>; - /** - * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMRHistory} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players rr history - */ - getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise>; - /** - * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMR} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players mmr - */ - getRawMMR(puuid: string, region: Region, queries?: any): Promise>; - /** - * Get a list of rr changes of a player by their Riot ID - * @param name - The Riot ID username of the player - * @param tag - The Riot tag username of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) - */ - getMMRHistory(name: string, tag: string, region: Region): Promise>; - /** - * Get a list of rr changes of a player by their PUUID - * @param puuid - The PUUID of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) - */ - getMMRHistoryByPUUID(puuid: string, region: Region): Promise>; - /** - * Get information about a match - * @param matchID - The matchs ID - * @returns Information about the match - */ - getMatch(matchID: string): Promise>; - /** - * Get the leaderboard of a region - * - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * - * @param region - Region to get leaderboard from - * @param start - (optional) Get 1000 leaderboard players starting from the given start value - * @param end - (optional) Limit the amount of leaderboard players returned - * @param riotID - (optional) Search for a specific player by their Riot ID - * @param riotID.name - The Riot IDs username - * @param riotID.tag - The Riot IDs tag - * @param puuid - (optional) Search for a specific player by their PUUID - * @param season - (optional) Get leaderboard from a specific season - * @returns Descending order of the highest ranked players. (Immortal and up) - * - * @throws {@link TypeError} - If both a riotID and puuid are supplied - */ - getLeaderboard(region: Region, start?: number, end?: number, riotID?: { - name: string; - tag: string; - }, puuid?: string, season?: Season): Promise>; - /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param locale - If this is set, instead of all translations, it will return just translations for this language - */ - getTranslations(locale?: Locale): Promise>; - /** - * Gets general info about a players rank by their Riot ID - * - * @remarks - * - **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise>; - /** - * Gets general info about a players rank by their PUUID - * - * @remarks - * - **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * - * @param puuid - The PUUID of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise>; - /** - * Gets the most recent 5 matches by a players Riot ID - * - * @remarks - * - **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches - */ - getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; - /** - * Gets the most recent 5 matches by a players PUUID - * - * @remarks - * - **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * - * @param puuid - The PUUID username of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches - */ - getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise>; - /** - * Get general information about a player from their Riot ID - * - * @remarks - * - **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param force - Force data update? - * @return General information on a players profile - */ - getProfile(name: string, tag: string, force?: boolean): Promise>; - /** - * Get general information about a player from their PUUID - * - * @remarks - * - **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * - * @param puuid The PUUID of the player - * @param force Force data update? - * @return General information on a players profile - */ - getProfileByPUUID(puuid: string, force?: boolean): Promise>; -} -export default VAPI; diff --git a/package/dist/index.js b/package/dist/index.js deleted file mode 100644 index 3658ebf..0000000 --- a/package/dist/index.js +++ /dev/null @@ -1,441 +0,0 @@ -import axios from "axios"; -/** - * Base API endpoint - */ -const baseUrl = "https://api.henrikdev.xyz/valorant"; -class VAPI { - token; - /** - * Images for every {@link Rank | Valorant rank} - * - * @remarks - * You must call {@link initUtils} before using this! - */ - rankImages; - /** - * Images for every {@link ValorantMap | Valorant Map} - * - * @remarks - * You must call {@link initUtils} before using this! - */ - mapImages; - /** - * Create a new instance of the main API. All API calls are in this class - * - * @example - * Create a new instance - * ``` - * import _VAPI from "unofficial-valorant-api" - * const VAPI = new _VAPI("my super secret token") - * ``` - * - * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) - */ - constructor(token) { - this.token = token; - } - /** - * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} - * - * @remarks - * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} - */ - async initUtils() { - const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; - if (mapsReq) { - this.mapImages = {}; - mapsReq.forEach((map) => (this.mapImages[map.displayName] = { - splash: map.splash, - minimap: map.displayIcon, - landscape: map.listViewIcon - })); - } - const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; - if (tiersReq) { - const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1); - this.rankImages = {}; - tiersReq[tiersReq.length - 1].tiers.forEach((rank) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { - large: rank.largeIcon, - small: rank.smallIcon, - triangleUp: rank.rankTriangleUpIcon, - triangleDown: rank.rankTriangleDownIcon - })); - } - } - /** - * @internal - * - * Parses the body of an axios response - */ - _parseBody(body) { - if (body.errors) - return body.errors; - return body.status ? body.data : body; - } - /** - * @internal - * - * Main function to fetch from the API - * - * @typeParam dataType - The type of the response - * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded - * @param searchParams - Any extra search params. Empty values will be filtered out - * @param config - Override the default axios config with custom params - * @returns Formatted response - */ - async _fetch(url, searchParams, config = {}) { - // Format search params into `?something=like&this` - const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { - const value = searchParams[cur]; - if (value === null || value === undefined) - return acc; - return acc === "" - ? `?${cur}=${value}` - : acc + `&${cur}=${value}`; - }, "") : ""; - // Main request - const req = await axios({ - url: encodeURI(`${baseUrl}/${url}${queryParams}`), - responseType: "json", - headers: this.token - ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } - : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, - ...config - }).catch(error => error); - // Formatting response - return { - status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers["Content-Type"] ? this._parseBody(req.data) : req.data, - rateLimits: { - used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), - remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), - reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), - }, - error: req.response ? this._parseBody(req.response.data) : null, - url: req.config.url - }; - } - /** - * @internal - * - * Make sure each key has a non empty value - * @param input - Object to check for non empty values - * - * @throws {@link TypeError} - Only if there is a empty value to a key - */ - async _validateArgs(input) { - Object.keys(input).forEach(key => { - if (input[key] === null || input[key] === undefined) - throw new TypeError(`Missing parameter: "${key}"`); - }); - } - /** - * Get an image of a valorant crosshair by its code - * - * @example - * Load and write a crosshair to crosshair.png - * ``` - * import { writeFileSync } from "fs" - * - * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") - * writeFileSync("crosshair.png", crosshair.data) - * ``` - * - * @param code - Valorant crosshair code - * @param size - (optional) Image size (default: `1024`) - * @returns The image of the crosshair as a {@link Buffer} - */ - async getCrosshair(code, size) { - this._validateArgs({ code }); - return this._fetch("v1/crosshair/generate", { id: code, size }, { - responseType: "arraybuffer" - }); - } - /** - * Get all announcements from the valorant website of a country - * @param countryCode - Country code of website - * @returns List of announcements from the valorant website - */ - async getAnnouncements(countryCode) { - this._validateArgs({ countryCode }); - return this._fetch(`v1/website/${countryCode}`); - } - /** - * Get information about valorant in a region, such as the client version, branch, and server version - * @param region - Region of valorant to get info about - * @returns Information about a regions valorant - */ - async getVersion(region) { - this._validateArgs({ region }); - return this._fetch(`v1/version/${region}`); - } - /** - * Get all of the featured items in the current valorant store - * @returns Featured items in the current valorant store - */ - async getFeaturedItems() { - // ! v2 is bugged for some reason - return this._fetch("v1/store-featured"); - } - /** - * Get a list of all in-app-purchases for valorant, such as Radianite and VP - * @returns List of IAPs in valorant - */ - async getIAPs() { - // ! find out wtf this actually does - return this._fetch("v1/store-offers"); - } - /** - * Will get information about the current maintenances and incidents about a region - * @param region - Region to get info about - * @returns Info about undergoing maintenances and incidents in a region of valorant - */ - async getStatus(region) { - this._validateArgs({ region }); - return this._fetch(`v1/status/${region}`); - } - /** - * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatch} for an easier response to use - * @param matchID - The match ID to get details about - * @param region - Region of the match - * @param queries - Extra queries - * @returns Information about the match - */ - async getRawMatchDetails(matchID, region, queries) { - this._validateArgs({ matchID, region }); - return await this._fetch("v1/raw", null, { - data: { type: "matchdetails", value: matchID, region, queries }, - method: "POST" - }); - } - /** - * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatches} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players match history - */ - async getRawMatchHistory(puuid, region, queries) { - this._validateArgs({ puuid, region }); - return await this._fetch("v1/raw", null, { - data: { type: "matchhistory", value: puuid, region, queries }, - method: "POST" - }); - } - /** - * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMRHistory} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players rr history - */ - async getRawCompetitiveUpdates(puuid, region, queries) { - this._validateArgs({ puuid, region }); - return await this._fetch("v1/raw", null, { - data: { type: "mmr", value: puuid, region, queries }, - method: "POST" - }); - } - /** - * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMR} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players mmr - */ - async getRawMMR(puuid, region, queries) { - this._validateArgs({ puuid, region }); - return await this._fetch("v1/raw", null, { - data: { type: "competitiveupdates", value: puuid, region, queries }, - method: "POST" - }); - } - /** - * Get a list of rr changes of a player by their Riot ID - * @param name - The Riot ID username of the player - * @param tag - The Riot tag username of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistory(name, tag, region) { - this._validateArgs({ name, tag, region }); - return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`); - } - /** - * Get a list of rr changes of a player by their PUUID - * @param puuid - The PUUID of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistoryByPUUID(puuid, region) { - this._validateArgs({ puuid, region }); - return this._fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); - } - /** - * Get information about a match - * @param matchID - The matchs ID - * @returns Information about the match - */ - async getMatch(matchID) { - this._validateArgs({ matchID }); - return this._fetch(`v2/match/${matchID}`); - } - /** - * Get the leaderboard of a region - * - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * - * @param region - Region to get leaderboard from - * @param start - (optional) Get 1000 leaderboard players starting from the given start value - * @param end - (optional) Limit the amount of leaderboard players returned - * @param riotID - (optional) Search for a specific player by their Riot ID - * @param riotID.name - The Riot IDs username - * @param riotID.tag - The Riot IDs tag - * @param puuid - (optional) Search for a specific player by their PUUID - * @param season - (optional) Get leaderboard from a specific season - * @returns Descending order of the highest ranked players. (Immortal and up) - * - * @throws {@link TypeError} - If both a riotID and puuid are supplied - */ - async getLeaderboard(region, start, end, riotID, puuid, season) { - if (riotID && puuid) - throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); - this._validateArgs({ region }); - return this._fetch(`v2/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); - } - /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param locale - If this is set, instead of all translations, it will return just translations for this language - */ - async getTranslations(locale) { - return this._fetch("v1/content", { locale }); - } - /** - * Gets general info about a players rank by their Riot ID - * - * @remarks - * - **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - async getMMR(name, tag, region, seasonFilter) { - this._validateArgs({ name, tag, region }); - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }); - } - /** - * Gets general info about a players rank by their PUUID - * - * @remarks - * - **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * - * @param puuid - The PUUID of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - async getMMRByPUUID(puuid, region, seasonFilter) { - this._validateArgs({ puuid, region }); - return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }); - } - /** - * Gets the most recent 5 matches by a players Riot ID - * - * @remarks - * - **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches - */ - async getMatches(name, tag, region, gamemodeFilter, mapFilter, size) { - this._validateArgs({ name, tag, region }); - return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); - } - /** - * Gets the most recent 5 matches by a players PUUID - * - * @remarks - * - **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * - * @param puuid - The PUUID username of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches - */ - async getMatchesByPUUID(puuid, region, gamemodeFilter, mapFilter, size) { - this._validateArgs({ name: puuid, region }); - return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); - } - /** - * Get general information about a player from their Riot ID - * - * @remarks - * - **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param force - Force data update? - * @return General information on a players profile - */ - async getProfile(name, tag, force) { - this._validateArgs({ name, tag }); - return this._fetch(`v1/account/${name}/${tag}`, { force }); - } - /** - * Get general information about a player from their PUUID - * - * @remarks - * - **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * - * @param puuid The PUUID of the player - * @param force Force data update? - * @return General information on a players profile - */ - async getProfileByPUUID(puuid, force) { - this._validateArgs({ name: puuid }); - return this._fetch(`v1/by-puuid/account/${puuid}`, { force }); - } -} -export default VAPI; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package/dist/index.js.map b/package/dist/index.js.map deleted file mode 100644 index 6dec68a..0000000 --- a/package/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AA2GtD;;GAEG;AACH,MAAM,OAAO,GAAG,oCAAoC,CAAA;AACpD,MAAM,IAAI;IA4Bc;IA3BpB;;;;;OAKG;IACH,UAAU,CAAgG;IAC1G;;;;;OAKG;IACH,SAAS,CAAiG;IAE1G;;;;;;;;;;;OAWA;IACA,YAAoB,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAEtC;;;;;OAKG;IACH,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACxG,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,SAAS,GAAG,EAAS,CAAA;YAC1B,OAAO,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG;gBAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,OAAO,EAAE,GAAG,CAAC,WAAW;gBACxB,SAAS,EAAE,GAAG,CAAC,YAAY;aAC9B,CAAC,CAAC,CAAA;SACN;QAED,MAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,GAAG,EAAE,8CAA8C,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAA;QACrH,IAAI,QAAQ,EAAE;YACV,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACvF,IAAI,CAAC,UAAU,GAAG,EAAS,CAAA;YAC3B,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG;gBACnH,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,KAAK,EAAE,IAAI,CAAC,SAAS;gBACrB,UAAU,EAAE,IAAI,CAAC,kBAAkB;gBACnC,YAAY,EAAE,IAAI,CAAC,oBAAoB;aAC1C,CAAC,CAAC,CAAA;SACN;IACL,CAAC;IAED;;;;OAIG;IACK,UAAU,CAAC,IAAS;QACxB,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,MAAM,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACzC,CAAC;IAED;;;;;;;;;;OAUG;IACK,KAAK,CAAC,MAAM,CAAW,GAAW,EAAE,YAAqC,EAAE,SAA6B,EAAE;QAC9G,mDAAmD;QACnD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7E,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAA;YACrD,OAAO,GAAG,KAAK,EAAE;gBACb,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,EAAE;gBACpB,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;QAClC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAEX,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;YACpB,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,IAAI,GAAG,GAAG,WAAW,EAAE,CAAC;YACjD,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,IAAI,CAAC,KAAK;gBACf,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,uCAAuC,GAAG;gBACvF,CAAC,CAAC,EAAE,YAAY,EAAE,uCAAuC,GAAG;YAChE,GAAG,MAAM;SACZ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QAExB,sBAAsB;QACtB,OAAO;YACH,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM;YACvD,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI;YACtG,UAAU,EAAE;gBACR,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBACzG,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;gBACtH,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;aAC7G;YACD,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG;SACtB,CAAA;IACL,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,aAAa,CAAC,KAA6B;QACrD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS;gBAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAA;QAC3G,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;;;;;;;;;OAeA;IACA,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,IAAa;QAC1C,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAoB,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YAC/E,YAAY,EAAE,aAAa;SAC9B,CAAC,CAAA;IACN,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,gBAAgB,CAAC,WAA4I;QAC/J,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,WAAW,EAAE,CAAC,CAAA;IACpE,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,UAAU,CAAC,MAAc;QAC3B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,gBAAgB;QAClB,iCAAiC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAwB,mBAAmB,CAAC,CAAA;IAClE,CAAC;IAED;;;OAGA;IACA,KAAK,CAAC,OAAO;QACT,oCAAoC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAsB,iBAAiB,CAAC,CAAA;IAC9D,CAAC;IAED;;;;OAIA;IACA,KAAK,CAAC,SAAS,CAAC,MAAc;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAiB,aAAa,MAAM,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,MAAc,EAAE,OAAa;QACnE,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;YAC/D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACjE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAA0B,QAAQ,EAAE,IAAI,EAAE;YAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YAC7D,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,wBAAwB,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACvE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAgC,QAAQ,EAAE,IAAI,EAAE;YACpE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,SAAS,CAAC,KAAa,EAAE,MAAc,EAAE,OAAa;QACxD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAiB,QAAQ,EAAE,IAAI,EAAE;YACrD,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;YACnE,MAAM,EAAE,MAAM;SACjB,CAAC,CAAA;IACN,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc;QACzD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAqB,kBAAkB,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;IACrF,CAAC;IAED;;;;;MAKE;IACF,KAAK,CAAC,oBAAoB,CAAC,KAAa,EAAE,MAAc;QACpD,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAqB,2BAA2B,MAAM,IAAI,KAAK,EAAE,CAAC,CAAA;IACxF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAgB,YAAY,OAAO,EAAE,CAAC,CAAA;IAC5D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc,CAAC,MAAc,EAAE,KAAc,EAAE,GAAY,EAAE,MAAsC,EAAE,KAAc,EAAE,MAAe;QACtI,IAAI,MAAM,IAAI,KAAK;YAAE,MAAM,IAAI,SAAS,CAAC,yHAAyH,CAAC,CAAA;QAEnK,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAsB,kBAAkB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC5I,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,MAAe;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACjE,CAAC;IAED;;;;;;;;;;;;;;;OAeA;IACA,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,YAAqB;QACzE,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAc,UAAU,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAChG,CAAC;IAED;;;;;;;;;;;;;;OAcA;IACA,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,YAAqB;QACpE,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAc,mBAAmB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;;MAkBD;IACC,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAClH,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;;;;;MAiBD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,MAAc,EAAE,cAAqB,EAAE,SAAuB,EAAE,IAAU;QAC7G,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAkB,oBAAoB,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChI,CAAC;IAED;;;;;;;;;;;;;;OAcA;IACA,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,KAAe;QACvD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;QACjC,OAAO,IAAI,CAAC,MAAM,CAAkB,cAAc,IAAI,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;;;;;;;;;MAaD;IACC,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,KAAe;QAClD,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,MAAM,CAAkB,uBAAuB,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAClF,CAAC;CACJ;AAED,eAAe,IAAI,CAAA"} \ No newline at end of file diff --git a/package/dist/types/general.d.ts b/package/dist/types/general.d.ts deleted file mode 100644 index 42d36ca..0000000 --- a/package/dist/types/general.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; -declare type SubRank = "1" | "2" | "3"; -export declare type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; -declare type Episodes = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"; -declare type Acts = "1" | "2" | "3"; -export declare type Season = `e${Episodes}a${Acts}`; -export declare type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; -export declare type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl"; -export declare type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br"; -export declare type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru"; -export declare type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee"; -export declare type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW"; -export {}; diff --git a/package/dist/types/general.js b/package/dist/types/general.js deleted file mode 100644 index 5caed73..0000000 --- a/package/dist/types/general.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=general.js.map \ No newline at end of file diff --git a/package/dist/types/general.js.map b/package/dist/types/general.js.map deleted file mode 100644 index 8ff32d2..0000000 --- a/package/dist/types/general.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"general.js","sourceRoot":"","sources":["../../src/types/general.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/competitive-updates.d.ts b/package/dist/types/raw/competitive-updates.d.ts deleted file mode 100644 index aa41803..0000000 --- a/package/dist/types/raw/competitive-updates.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Region } from "../general"; -interface Match { - MatchID: string; - MapID: string; - SeasonID: string; - MatchStartTime: any; - TierAfterUpdate: number; - TierBeforeUpdate: number; - RankedRatingAfterUpdate: number; - RankedRatingBeforeUpdate: number; - RankedRatingEarned: number; - RankedRatingPerformanceBonus: number; - CompetitiveMovement: string; - AFKPenalty: number; -} -export interface RawCompetitiveUpdatesResponse { - Version: number; - Subject: string; - Matches: Match[]; - region: Region; -} -export {}; diff --git a/package/dist/types/raw/competitive-updates.js b/package/dist/types/raw/competitive-updates.js deleted file mode 100644 index 186ed06..0000000 --- a/package/dist/types/raw/competitive-updates.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=competitive-updates.js.map \ No newline at end of file diff --git a/package/dist/types/raw/competitive-updates.js.map b/package/dist/types/raw/competitive-updates.js.map deleted file mode 100644 index d83d04b..0000000 --- a/package/dist/types/raw/competitive-updates.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"competitive-updates.js","sourceRoot":"","sources":["../../../src/types/raw/competitive-updates.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/match-details.d.ts b/package/dist/types/raw/match-details.d.ts deleted file mode 100644 index f74bb35..0000000 --- a/package/dist/types/raw/match-details.d.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { Region } from "../general"; -interface PartyRRPenalties { - [key: string]: number; -} -interface MatchInfo { - matchId: string; - mapId: string; - gamePodId: string; - gameLoopZone: string; - gameServerAddress: string; - gameVersion: string; - gameLengthMillis: number; - gameStartMillis: number; - provisioningFlowID: string; - isCompleted: boolean; - customGameName: string; - forcePostProcessing: boolean; - queueID: string; - gameMode: string; - isRanked: boolean; - isMatchSampled: boolean; - seasonId: string; - completionState: string; - platformType: string; - partyRRPenalties: PartyRRPenalties; - shouldMatchDisablePenalties: boolean; -} -interface PlatformInfo { - platformType: string; - platformOS: string; - platformOSVersion: string; - platformChipset: string; -} -interface AbilityCasts { - grenadeCasts: number; - ability1Casts: number; - ability2Casts: number; - ultimateCasts: number; -} -interface Stats { - score: number; - roundsPlayed: number; - kills: number; - deaths: number; - assists: number; - playtimeMillis: number; - abilityCasts: AbilityCasts; -} -interface RoundDamage { - round: number; - receiver: string; - damage: number; -} -interface XpModification { - Value: number; - ID: string; -} -interface BehaviorFactors { - afkRounds: number; - collisions: number; - damageParticipationOutgoing: number; - friendlyFireIncoming: number; - friendlyFireOutgoing: number; - mouseMovement: number; - stayedInSpawnRounds: number; -} -interface BaseAction { - idleTimeMillis: number; - objectiveCompleteTimeMillis: number; -} -interface AdaptiveBots extends BaseAction { - adaptiveBotAverageDurationMillisAllAttempts: number; - adaptiveBotAverageDurationMillisFirstAttempt: number; - killDetailsFirstAttempt?: any; -} -interface DefendBombSite extends BaseAction { - success: boolean; -} -interface SettingStatus { - isMouseSensitivityDefault: boolean; - isCrosshairDefault: boolean; -} -interface NewPlayerExperienceDetails { - basicMovement: BaseAction; - basicGunSkill: BaseAction; - adaptiveBots: AdaptiveBots; - ability: BaseAction; - bombPlant: BaseAction; - defendBombSite: DefendBombSite; - settingStatus: SettingStatus; -} -interface Player { - subject: string; - gameName: string; - tagLine: string; - platformInfo: PlatformInfo; - teamId: string; - partyId: string; - characterId: string; - stats: Stats; - roundDamage: RoundDamage[]; - competitiveTier: number; - playerCard: string; - playerTitle: string; - preferredLevelBorder: string; - accountLevel: number; - sessionPlaytimeMinutes: number; - xpModifications: XpModification[]; - behaviorFactors: BehaviorFactors; - newPlayerExperienceDetails: NewPlayerExperienceDetails; -} -interface Team { - teamId: string; - won: boolean; - roundsPlayed: number; - roundsWon: number; - numPoints: number; -} -interface Location { - x: number; - y: number; -} -interface PlantPlayerLocation { - subject: string; - viewRadians: number; - location: Location; -} -interface DefusePlayerLocation { - subject: string; - viewRadians: number; - location: Location; -} -interface PlayerLocation { - subject: string; - viewRadians: number; - location: Location; -} -interface FinishingDamage { - damageType: string; - damageItem: string; - isSecondaryFireMode: boolean; -} -interface Kill { - gameTime: number; - roundTime: number; - killer: string; - victim: string; - victimLocation: Location; - assistants: string[]; - playerLocations: PlayerLocation[]; - finishingDamage: FinishingDamage; -} -interface MatchKill extends Kill { - round: number; -} -interface Damage { - receiver: string; - damage: number; - legshots: number; - bodyshots: number; - headshots: number; -} -interface Economy { - loadoutValue: number; - weapon: string; - armor: string; - remaining: number; - spent: number; -} -interface AbilityEffects { - grenadeEffects?: any; - ability1Effects?: any; - ability2Effects?: any; - ultimateEffects?: any; -} -interface PlayerStat { - subject: string; - kills: Kill[]; - damage: Damage[]; - score: number; - economy: Economy; - ability: AbilityEffects; - wasAfk: boolean; - wasPenalized: boolean; - stayedInSpawn: boolean; -} -interface PlayerEconomy { - subject: string; - loadoutValue: number; - weapon: string; - armor: string; - remaining: number; - spent: number; -} -interface PlayerScore { - subject: string; - score: number; -} -interface RoundResult { - roundNum: number; - roundResult: string; - roundCeremony: string; - winningTeam: string; - plantRoundTime: number; - plantPlayerLocations: PlantPlayerLocation[]; - plantLocation: Location; - plantSite: string; - defuseRoundTime: number; - defusePlayerLocations: DefusePlayerLocation[]; - defuseLocation: Location; - playerStats: PlayerStat[]; - roundResultCode: string; - playerEconomies: PlayerEconomy[]; - playerScores: PlayerScore[]; - bombPlanter: string; - bombDefuser: string; -} -export interface RawMatchDetailsResponse { - matchInfo: MatchInfo; - players: Player[]; - bots: any[]; - coaches: any[]; - teams: Team[]; - roundResults: RoundResult[]; - kills: MatchKill[]; - region: Region; -} -export {}; diff --git a/package/dist/types/raw/match-details.js b/package/dist/types/raw/match-details.js deleted file mode 100644 index 8d12500..0000000 --- a/package/dist/types/raw/match-details.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=match-details.js.map \ No newline at end of file diff --git a/package/dist/types/raw/match-details.js.map b/package/dist/types/raw/match-details.js.map deleted file mode 100644 index 1db11c7..0000000 --- a/package/dist/types/raw/match-details.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"match-details.js","sourceRoot":"","sources":["../../../src/types/raw/match-details.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/match-history.d.ts b/package/dist/types/raw/match-history.d.ts deleted file mode 100644 index a1948b0..0000000 --- a/package/dist/types/raw/match-history.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Region } from "../general"; -interface History { - MatchID: string; - GameStartTime: any; - QueueID: string; -} -export interface RawMatchHistoryResponse { - Subject: string; - BeginIndex: number; - EndIndex: number; - Total: number; - History: History[]; - region: Region; -} -export {}; diff --git a/package/dist/types/raw/match-history.js b/package/dist/types/raw/match-history.js deleted file mode 100644 index e88df83..0000000 --- a/package/dist/types/raw/match-history.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=match-history.js.map \ No newline at end of file diff --git a/package/dist/types/raw/match-history.js.map b/package/dist/types/raw/match-history.js.map deleted file mode 100644 index 95ce698..0000000 --- a/package/dist/types/raw/match-history.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"match-history.js","sourceRoot":"","sources":["../../../src/types/raw/match-history.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/raw/mmr.d.ts b/package/dist/types/raw/mmr.d.ts deleted file mode 100644 index e7ba889..0000000 --- a/package/dist/types/raw/mmr.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Region } from "../general"; -interface WinsByTier { - [tier: number]: number; -} -interface SeasonalInfoBySeasonID { - SeasonID: string; - NumberOfWins: number; - NumberOfWinsWithPlacements: number; - NumberOfGames: number; - Rank: number; - CapstoneWins: number; - LeaderboardRank: number; - CompetitiveTier: number; - RankedRating: number; - WinsByTier: WinsByTier; - GamesNeededForRating: number; - TotalWinsNeededForRank: number; -} -interface Queue { - TotalGamesNeededForRating: number; - TotalGamesNeededForLeaderboard: number; - CurrentSeasonGamesNeededForRating: number; - SeasonalInfoBySeasonID: SeasonalInfoBySeasonID; -} -interface QueueSkills { - competitive: Queue; - custom: Queue; - deathmatch: Queue; - ggteam: Queue; - onefa: Queue; - seeding: Queue; - snowball: Queue; - spikerush: Queue; - unrated: Queue; -} -interface LatestCompetitiveUpdate { - MatchID: string; - MapID: string; - SeasonID: string; - MatchStartTime: number; - TierAfterUpdate: number; - TierBeforeUpdate: number; - RankedRatingAfterUpdate: number; - RankedRatingBeforeUpdate: number; - RankedRatingEarned: number; - RankedRatingPerformanceBonus: number; - CompetitiveMovement: string; - AFKPenalty: number; -} -export interface RawMMRResponse { - Version: number; - Subject: string; - NewPlayerExperienceFinished: boolean; - QueueSkills: QueueSkills; - LatestCompetitiveUpdate: LatestCompetitiveUpdate; - IsLeaderboardAnonymized: boolean; - IsActRankBadgeHidden: boolean; - region: Region; -} -export {}; diff --git a/package/dist/types/raw/mmr.js b/package/dist/types/raw/mmr.js deleted file mode 100644 index 30f663a..0000000 --- a/package/dist/types/raw/mmr.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=mmr.js.map \ No newline at end of file diff --git a/package/dist/types/raw/mmr.js.map b/package/dist/types/raw/mmr.js.map deleted file mode 100644 index 3efcce9..0000000 --- a/package/dist/types/raw/mmr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mmr.js","sourceRoot":"","sources":["../../../src/types/raw/mmr.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-content.d.ts b/package/dist/types/v1-content.d.ts deleted file mode 100644 index 46266be..0000000 --- a/package/dist/types/v1-content.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Locale } from "./general"; -export declare type LocalizedNames = { - [language in Locale]: string; -}; -export interface Asset { - name: string; - localizedNames?: LocalizedNames; - id: string; - assetName: string; -} -export interface AssetWithPath extends Asset { - assetPath: string; -} -export interface Act { - id: string; - parentId: string; - type: string; - name: string; - localizedNames?: LocalizedNames; - isActive: boolean; -} -export interface ContentResponse { - version: string; - characters: Asset[]; - maps: AssetWithPath[]; - chromas: Asset[]; - skins: Asset[]; - skinLevels: Asset[]; - equips: Asset[]; - gameModes: AssetWithPath[]; - sprays: Asset[]; - sprayLevels: Asset[]; - charms: Asset[]; - charmLevels: Asset[]; - playerCards: Asset[]; - playerTitles: Asset[]; - acts: Act[]; - ceremonies: Asset[]; -} diff --git a/package/dist/types/v1-content.js b/package/dist/types/v1-content.js deleted file mode 100644 index 94598be..0000000 --- a/package/dist/types/v1-content.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-content.js.map \ No newline at end of file diff --git a/package/dist/types/v1-content.js.map b/package/dist/types/v1-content.js.map deleted file mode 100644 index cd1cb25..0000000 --- a/package/dist/types/v1-content.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-content.js","sourceRoot":"","sources":["../../src/types/v1-content.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-crosshair.d.ts b/package/dist/types/v1-crosshair.d.ts deleted file mode 100644 index 2a0762c..0000000 --- a/package/dist/types/v1-crosshair.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -export declare type CrosshairResponse = Buffer; diff --git a/package/dist/types/v1-crosshair.js b/package/dist/types/v1-crosshair.js deleted file mode 100644 index 5cedce2..0000000 --- a/package/dist/types/v1-crosshair.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-crosshair.js.map \ No newline at end of file diff --git a/package/dist/types/v1-crosshair.js.map b/package/dist/types/v1-crosshair.js.map deleted file mode 100644 index 5ba9a84..0000000 --- a/package/dist/types/v1-crosshair.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-crosshair.js","sourceRoot":"","sources":["../../src/types/v1-crosshair.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-featured-items.d.ts b/package/dist/types/v1-featured-items.d.ts deleted file mode 100644 index 9082656..0000000 --- a/package/dist/types/v1-featured-items.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface BaseItem { - ItemTypeID: string; - ItemID: string; - Amount: number; -} -export interface Item { - Item: BaseItem; - BasePrice: number; - CurrencyID: string; - DiscountPercent: number; - DiscountedPrice: number; - IsPromoItem: boolean; -} -export interface Bundle { - ID: string; - DataAssetID: string; - CurrencyID: string; - Items: Item[]; - DurationRemainingInSeconds: number; - WholesaleOnly: boolean; -} -export interface FeaturedBundle { - Bundle: Bundle; - Bundles: Bundle[]; - BundleRemainingDurationInSeconds: number; -} -export interface FeaturedItemsResponse { - FeaturedBundle: FeaturedBundle; -} diff --git a/package/dist/types/v1-featured-items.js b/package/dist/types/v1-featured-items.js deleted file mode 100644 index 14a3970..0000000 --- a/package/dist/types/v1-featured-items.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-featured-items.js.map \ No newline at end of file diff --git a/package/dist/types/v1-featured-items.js.map b/package/dist/types/v1-featured-items.js.map deleted file mode 100644 index bcf9e51..0000000 --- a/package/dist/types/v1-featured-items.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-featured-items.js","sourceRoot":"","sources":["../../src/types/v1-featured-items.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-profile.d.ts b/package/dist/types/v1-profile.d.ts deleted file mode 100644 index 570de6e..0000000 --- a/package/dist/types/v1-profile.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Region } from "./general"; -export interface Card { - small: string; - large: string; - wide: string; - id: string; -} -export interface ProfileResponse { - puuid: string; - region: Region; - account_level: number; - name: string; - tag: string; - card: Card; - last_update: string; - last_update_raw: number; -} diff --git a/package/dist/types/v1-profile.js b/package/dist/types/v1-profile.js deleted file mode 100644 index 79aec3e..0000000 --- a/package/dist/types/v1-profile.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-profile.js.map \ No newline at end of file diff --git a/package/dist/types/v1-profile.js.map b/package/dist/types/v1-profile.js.map deleted file mode 100644 index 793dbe3..0000000 --- a/package/dist/types/v1-profile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-profile.js","sourceRoot":"","sources":["../../src/types/v1-profile.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-status.d.ts b/package/dist/types/v1-status.d.ts deleted file mode 100644 index 4daae86..0000000 --- a/package/dist/types/v1-status.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Locale } from "./general"; -export interface Title { - content: string; - locale: Locale; -} -export interface Update { - created_at: Date; - updated_at: Date; - publish: boolean; - id: number; - translations: Title[]; - publish_locations: string[]; - author: string; -} -export interface Incident { - created_at: Date; - archive_at: Date; - updates: Update[]; - platforms: string[]; - updated_at: Date; - id: number; - titles: Title[]; - maintenance_status: string; - incident_severity: string; -} -export interface StatusResponse { - maintenances: Incident[]; - incidents: Incident[]; -} diff --git a/package/dist/types/v1-status.js b/package/dist/types/v1-status.js deleted file mode 100644 index cb350ed..0000000 --- a/package/dist/types/v1-status.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-status.js.map \ No newline at end of file diff --git a/package/dist/types/v1-status.js.map b/package/dist/types/v1-status.js.map deleted file mode 100644 index cd0409e..0000000 --- a/package/dist/types/v1-status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-status.js","sourceRoot":"","sources":["../../src/types/v1-status.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-store-offers.d.ts b/package/dist/types/v1-store-offers.d.ts deleted file mode 100644 index 7f30d89..0000000 --- a/package/dist/types/v1-store-offers.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export interface Cost { - "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": number; -} -export interface Reward { - ItemTypeID: string; - ItemID: string; - Quantity: number; -} -export interface Offer { - OfferID: string; - IsDirectPurchase: boolean; - StartDate: Date; - Cost: Cost; - Rewards: Reward[]; -} -export interface UpgradeCurrencyOffer { - OfferID: string; - StorefrontItemID: string; -} -export interface StoreOffersResponse { - Offers: Offer[]; - UpgradeCurrencyOffers: UpgradeCurrencyOffer[]; -} diff --git a/package/dist/types/v1-store-offers.js b/package/dist/types/v1-store-offers.js deleted file mode 100644 index 8126510..0000000 --- a/package/dist/types/v1-store-offers.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-store-offers.js.map \ No newline at end of file diff --git a/package/dist/types/v1-store-offers.js.map b/package/dist/types/v1-store-offers.js.map deleted file mode 100644 index 659fe6f..0000000 --- a/package/dist/types/v1-store-offers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-store-offers.js","sourceRoot":"","sources":["../../src/types/v1-store-offers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-version.d.ts b/package/dist/types/v1-version.d.ts deleted file mode 100644 index 1890966..0000000 --- a/package/dist/types/v1-version.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface VersionResponse { - version: string; - clientVersion: string; - branch: string; - region: string; -} diff --git a/package/dist/types/v1-version.js b/package/dist/types/v1-version.js deleted file mode 100644 index c39aef4..0000000 --- a/package/dist/types/v1-version.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-version.js.map \ No newline at end of file diff --git a/package/dist/types/v1-version.js.map b/package/dist/types/v1-version.js.map deleted file mode 100644 index 26e867f..0000000 --- a/package/dist/types/v1-version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-version.js","sourceRoot":"","sources":["../../src/types/v1-version.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v1-website.d.ts b/package/dist/types/v1-website.d.ts deleted file mode 100644 index 1ecd313..0000000 --- a/package/dist/types/v1-website.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface Post { - banner_url: string; - category: string; - date: Date; - external_link: string; - title: string; - url: string; -} -export interface WebsiteResponse { - banner_url: string; - category: string; - date: Date; - external_link: string; - title: string; - url: string; -} diff --git a/package/dist/types/v1-website.js b/package/dist/types/v1-website.js deleted file mode 100644 index 7cbedb4..0000000 --- a/package/dist/types/v1-website.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v1-website.js.map \ No newline at end of file diff --git a/package/dist/types/v1-website.js.map b/package/dist/types/v1-website.js.map deleted file mode 100644 index 6762982..0000000 --- a/package/dist/types/v1-website.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1-website.js","sourceRoot":"","sources":["../../src/types/v1-website.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-leaderboard.d.ts b/package/dist/types/v2-leaderboard.d.ts deleted file mode 100644 index cbe16e6..0000000 --- a/package/dist/types/v2-leaderboard.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export interface Player { - PlayerCardID: string; - TitleID: string; - IsBanned: boolean; - IsAnonymized: boolean; - puuid: string; - gameName: string; - tagLine: string; - leaderboardRank: number; - rankedRating: number; - numberOfWins: number; - competitiveTier: number; -} -export interface LeaderboardResponse { - last_update: number; - next_update: number; - total_players: number; - radiant_threshold: number; - immortal_3_threshold: number; - immortal_2_threshold: number; - immortal_1_threshold: number; - players: Player[]; -} diff --git a/package/dist/types/v2-leaderboard.js b/package/dist/types/v2-leaderboard.js deleted file mode 100644 index 89af328..0000000 --- a/package/dist/types/v2-leaderboard.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v2-leaderboard.js.map \ No newline at end of file diff --git a/package/dist/types/v2-leaderboard.js.map b/package/dist/types/v2-leaderboard.js.map deleted file mode 100644 index 85fd64e..0000000 --- a/package/dist/types/v2-leaderboard.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2-leaderboard.js","sourceRoot":"","sources":["../../src/types/v2-leaderboard.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-match.d.ts b/package/dist/types/v2-match.d.ts deleted file mode 100644 index fa64e9e..0000000 --- a/package/dist/types/v2-match.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Match } from "./v3-matches"; -export declare type MatchResponse = Match; diff --git a/package/dist/types/v2-match.js b/package/dist/types/v2-match.js deleted file mode 100644 index b4fb289..0000000 --- a/package/dist/types/v2-match.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v2-match.js.map \ No newline at end of file diff --git a/package/dist/types/v2-match.js.map b/package/dist/types/v2-match.js.map deleted file mode 100644 index 1f146e8..0000000 --- a/package/dist/types/v2-match.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2-match.js","sourceRoot":"","sources":["../../src/types/v2-match.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-mmr-history.d.ts b/package/dist/types/v2-mmr-history.d.ts deleted file mode 100644 index 35755cb..0000000 --- a/package/dist/types/v2-mmr-history.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Rank } from "./general"; -export interface Images { - small: string; - large: string; - triangle_down: string; - triangle_up: string; -} -export interface MMRHistoryGame { - currenttier: number; - currenttierpatched: Rank; - images: Images; - ranking_in_tier: number; - mmr_change_to_last_game: number; - elo: number; - date: string; - date_raw: number; -} -export declare type MMRHistoryResponse = MMRHistoryGame[]; diff --git a/package/dist/types/v2-mmr-history.js b/package/dist/types/v2-mmr-history.js deleted file mode 100644 index e41be8b..0000000 --- a/package/dist/types/v2-mmr-history.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v2-mmr-history.js.map \ No newline at end of file diff --git a/package/dist/types/v2-mmr-history.js.map b/package/dist/types/v2-mmr-history.js.map deleted file mode 100644 index a3498e5..0000000 --- a/package/dist/types/v2-mmr-history.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2-mmr-history.js","sourceRoot":"","sources":["../../src/types/v2-mmr-history.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v2-mmr.d.ts b/package/dist/types/v2-mmr.d.ts deleted file mode 100644 index 8b20e21..0000000 --- a/package/dist/types/v2-mmr.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Rank, Season } from "./general"; -export interface SeasonMMR { - error?: "No data available"; - wins: number; - number_of_games: number; - final_rank: number; - final_rank_patched: Rank; - act_rank_wins: { - patched_tier: Rank; - tier: number; - }[]; -} -export interface MMRResponse { - name: string; - tag: string; - puuid: string; - current_data: { - currenttier: number; - currenttierpatched: Rank; - images: { - small: string; - large: string; - triangle_up: string; - triangle_down: string; - }; - ranking_in_tier: number; - mmr_change_to_last_game: number; - elo: number; - games_needed_for_rating: number; - old: boolean; - }; - by_season: { - [key in Season]: SeasonMMR; - }; -} diff --git a/package/dist/types/v2-mmr.js b/package/dist/types/v2-mmr.js deleted file mode 100644 index 1e13b3c..0000000 --- a/package/dist/types/v2-mmr.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v2-mmr.js.map \ No newline at end of file diff --git a/package/dist/types/v2-mmr.js.map b/package/dist/types/v2-mmr.js.map deleted file mode 100644 index 7a8dff4..0000000 --- a/package/dist/types/v2-mmr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2-mmr.js","sourceRoot":"","sources":["../../src/types/v2-mmr.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package/dist/types/v3-matches.d.ts b/package/dist/types/v3-matches.d.ts deleted file mode 100644 index bd3c5e7..0000000 --- a/package/dist/types/v3-matches.d.ts +++ /dev/null @@ -1,227 +0,0 @@ -import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general"; -export interface Player { - puuid: string; - name: string; - tag: string; - team: "Red" | "Blue"; - level: number; - character: Characters; - currenttier: number; - currenttier_patched: Rank; - player_card: string; - player_title: string; - party_id: string; - session_playtime: { - minutes: number; - seconds: number; - milliseconds: number; - }; - behavior: { - afk_rounds: number; - friendly_fire: { - incoming: number; - outgoing: number; - }; - rounds_in_spawn: number; - }; - platform: { - type: string; - os: { - name: string; - version: string; - }; - }; - ability_casts: { - c_cast: number; - q_cast: number; - e_cast: number; - x_cast: number; - }; - assets: { - card: { - small: string; - large: string; - wide: string; - }; - agent: { - small: string; - bust: string; - full: string; - killfeed: string; - }; - }; - stats: { - score: number; - kills: number; - deaths: number; - assists: number; - bodyshots: number; - headshots: number; - legshots: number; - }; - economy: { - spent: { - overall: number; - average: number; - }; - loadout_value: { - overall: number; - average: number; - }; - }; - damage_made: number; - damage_received: number; -} -declare type PlayerLocation = { - x: number; - y: number; -}; -export interface PlayerLocationOnEvent { - player_puuid: string; - player_display_name: string; - player_team: "Red" | "Blue"; - location: PlayerLocation; - view_radians: number; -} -export interface KillEvent { - kill_time_in_round: number; - kill_time_in_match: number; - killer_puuid: string; - killer_display_name: string; - killer_team: "Red" | "Blue"; - victim_puuid: string; - victim_display_name: string; - victim_team: "Red" | "Blue"; - victim_death_location: PlayerLocation; - damage_weapon_id: string; - damage_weapon_name: Weapon; - damage_weapon_assets: { - display_icon: string; - killfeed_icon: string; - }; - secondary_fire_mode: boolean; - player_locations_on_kill: PlayerLocationOnEvent[]; - assistants: { - assistant_puuid: string; - assistant_display_name: string; - assistant_team: "Red" | "Blue"; - }[]; -} -export interface Round { - winning_team: "Red" | "Blue"; - end_type: "Eliminated" | "Bomb defused" | "Bomb detonated"; - bomb_planted: boolean; - bomb_defused: boolean; - plant_events: { - plant_location?: PlayerLocation; - planted_by?: { - puuid: string; - display_name: string; - team: "Red" | "Blue"; - }; - plant_site?: "A" | "B" | "C"; - plant_time_in_round?: number; - player_locations_on_plant?: PlayerLocationOnEvent[]; - }; - defuse_events: { - defuse_location?: PlayerLocation; - defused_by?: { - puuid: string; - display_name: string; - team: "Red" | "Blue"; - }; - defuse_time_in_round?: number; - player_locations_on_defuse?: PlayerLocationOnEvent[]; - }; - player_stats: { - ability_casts: { - c_cast?: number; - q_cast?: number; - e_cast?: number; - x_cast?: number; - }; - player_puuid: string; - player_display_name: string; - player_team: "Red" | "Blue"; - damage_events: { - receiver_puuid: string; - receiver_display_name: string; - receiver_team: "Red" | "Blue"; - bodyshots: number; - damage: number; - headshots: number; - legshots: number; - }[]; - damage: number; - headshots: number; - bodyshots: number; - legshots: number; - kill_events: KillEvent[]; - kills: number; - score: number; - economy: { - loadout_value: number; - weapon: { - id: string; - name: Weapon; - assets: { - display_icon: string; - killfeed_icon: string; - }; - }; - armor: { - id: string; - name: "Heavy Shields" | "Light Shields"; - assets: { - display_icon: string; - }; - }; - remaining: number; - spent: number; - }; - was_afk: boolean; - was_penalized: boolean; - stayed_in_spawn: boolean; - }; -} -export interface KillEventMatch extends KillEvent { - round: number; -} -export interface Match { - metadata: { - map: ValorantMap; - game_version: string; - game_length: number; - game_start: number; - game_start_patched: string; - rounds_played: number; - mode: Mode; - queue: string; - season_id: "string"; - platform: "PC"; - matchid: string; - region: Region; - cluster: string; - }; - players: { - all_players: Player[]; - red: Player[]; - blue: Player[]; - }; - teams: { - red: { - has_won: false; - rounds_won: number; - rounds_lost: number; - }; - blue: { - has_won: false; - rounds_won: number; - rounds_lost: number; - }; - }; - rounds: Round[]; - kills: KillEventMatch[]; -} -export declare type MatchesResponse = Match[]; -export {}; diff --git a/package/dist/types/v3-matches.js b/package/dist/types/v3-matches.js deleted file mode 100644 index f05eab6..0000000 --- a/package/dist/types/v3-matches.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=v3-matches.js.map \ No newline at end of file diff --git a/package/dist/types/v3-matches.js.map b/package/dist/types/v3-matches.js.map deleted file mode 100644 index bf8f20f..0000000 --- a/package/dist/types/v3-matches.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v3-matches.js","sourceRoot":"","sources":["../../src/types/v3-matches.ts"],"names":[],"mappings":""} \ No newline at end of file From c148ced3adeaad7e93a3ef4dc8c853fe9512292a Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 00:15:02 -0500 Subject: [PATCH 09/50] Docs + minor changes --- package/README.md | 95 +-- package/doc/.nojekyll | 1 + package/doc/README.md | 79 ++ package/doc/classes/index.default.md | 772 ++++++++++++++++++ ...e_updates.RawCompetitiveUpdatesResponse.md | 52 ++ ...w_match_details.RawMatchDetailsResponse.md | 96 +++ ...w_match_history.RawMatchHistoryResponse.md | 74 ++ .../types_raw_mmr.RawMMRResponse.md | 96 +++ .../doc/interfaces/types_v1_content.Act.md | 74 ++ .../doc/interfaces/types_v1_content.Asset.md | 58 ++ .../types_v1_content.AssetWithPath.md | 85 ++ .../types_v1_content.ContentResponse.md | 184 +++++ .../types_v1_featured_items.BaseItem.md | 41 + .../types_v1_featured_items.Bundle.md | 74 ++ .../types_v1_featured_items.FeaturedBundle.md | 41 + ...v1_featured_items.FeaturedItemsResponse.md | 19 + .../types_v1_featured_items.Item.md | 74 ++ .../doc/interfaces/types_v1_profile.Card.md | 52 ++ .../types_v1_profile.ProfileResponse.md | 96 +++ .../interfaces/types_v1_status.Incident.md | 107 +++ .../types_v1_status.StatusResponse.md | 30 + .../doc/interfaces/types_v1_status.Title.md | 30 + .../doc/interfaces/types_v1_status.Update.md | 85 ++ .../interfaces/types_v1_store_offers.Cost.md | 19 + .../interfaces/types_v1_store_offers.Offer.md | 63 ++ .../types_v1_store_offers.Reward.md | 41 + ...pes_v1_store_offers.StoreOffersResponse.md | 30 + ...es_v1_store_offers.UpgradeCurrencyOffer.md | 30 + .../types_v1_version.VersionResponse.md | 52 ++ .../doc/interfaces/types_v1_website.Post.md | 74 ++ .../types_v1_website.WebsiteResponse.md | 74 ++ ...ypes_v2_leaderboard.LeaderboardResponse.md | 96 +++ .../interfaces/types_v2_leaderboard.Player.md | 129 +++ .../interfaces/types_v2_mmr.MMRResponse.md | 115 +++ .../doc/interfaces/types_v2_mmr.SeasonMMR.md | 74 ++ .../interfaces/types_v2_mmr_history.Images.md | 52 ++ .../types_v2_mmr_history.MMRHistoryGame.md | 96 +++ .../interfaces/types_v3_matches.KillEvent.md | 186 +++++ .../types_v3_matches.KillEventMatch.md | 257 ++++++ .../doc/interfaces/types_v3_matches.Match.md | 102 +++ .../doc/interfaces/types_v3_matches.Player.md | 301 +++++++ .../types_v3_matches.PlayerLocationOnEvent.md | 63 ++ .../doc/interfaces/types_v3_matches.Round.md | 149 ++++ package/doc/modules.md | 25 + package/doc/modules/index.md | 7 + package/doc/modules/types_general.md | 94 +++ .../modules/types_raw_competitive_updates.md | 7 + .../doc/modules/types_raw_match_details.md | 7 + .../doc/modules/types_raw_match_history.md | 7 + package/doc/modules/types_raw_mmr.md | 7 + package/doc/modules/types_v1_content.md | 24 + package/doc/modules/types_v1_crosshair.md | 17 + .../doc/modules/types_v1_featured_items.md | 11 + package/doc/modules/types_v1_profile.md | 8 + package/doc/modules/types_v1_status.md | 10 + package/doc/modules/types_v1_store_offers.md | 11 + package/doc/modules/types_v1_version.md | 7 + package/doc/modules/types_v1_website.md | 8 + package/doc/modules/types_v2_leaderboard.md | 8 + package/doc/modules/types_v2_match.md | 17 + package/doc/modules/types_v2_mmr.md | 8 + package/doc/modules/types_v2_mmr_history.md | 22 + package/doc/modules/types_v3_matches.md | 26 + package/package.json | 7 + package/src/index.ts | 313 ++++--- package/src/oldIndex.d.ts | 187 ----- package/src/oldIndex.js | 192 ----- package/test/editDocs.js | 35 + package/test/editDocs.js.map | 1 + package/test/editDocs.ts | 41 + package/test/test.js | 19 +- package/test/test.js.map | 1 + package/test/test.ts | 22 + package/test/tsconfig.json | 20 + package/tsconfig.json | 11 +- 75 files changed, 4869 insertions(+), 629 deletions(-) create mode 100644 package/doc/.nojekyll create mode 100644 package/doc/README.md create mode 100644 package/doc/classes/index.default.md create mode 100644 package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md create mode 100644 package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md create mode 100644 package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md create mode 100644 package/doc/interfaces/types_raw_mmr.RawMMRResponse.md create mode 100644 package/doc/interfaces/types_v1_content.Act.md create mode 100644 package/doc/interfaces/types_v1_content.Asset.md create mode 100644 package/doc/interfaces/types_v1_content.AssetWithPath.md create mode 100644 package/doc/interfaces/types_v1_content.ContentResponse.md create mode 100644 package/doc/interfaces/types_v1_featured_items.BaseItem.md create mode 100644 package/doc/interfaces/types_v1_featured_items.Bundle.md create mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md create mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md create mode 100644 package/doc/interfaces/types_v1_featured_items.Item.md create mode 100644 package/doc/interfaces/types_v1_profile.Card.md create mode 100644 package/doc/interfaces/types_v1_profile.ProfileResponse.md create mode 100644 package/doc/interfaces/types_v1_status.Incident.md create mode 100644 package/doc/interfaces/types_v1_status.StatusResponse.md create mode 100644 package/doc/interfaces/types_v1_status.Title.md create mode 100644 package/doc/interfaces/types_v1_status.Update.md create mode 100644 package/doc/interfaces/types_v1_store_offers.Cost.md create mode 100644 package/doc/interfaces/types_v1_store_offers.Offer.md create mode 100644 package/doc/interfaces/types_v1_store_offers.Reward.md create mode 100644 package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md create mode 100644 package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md create mode 100644 package/doc/interfaces/types_v1_version.VersionResponse.md create mode 100644 package/doc/interfaces/types_v1_website.Post.md create mode 100644 package/doc/interfaces/types_v1_website.WebsiteResponse.md create mode 100644 package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md create mode 100644 package/doc/interfaces/types_v2_leaderboard.Player.md create mode 100644 package/doc/interfaces/types_v2_mmr.MMRResponse.md create mode 100644 package/doc/interfaces/types_v2_mmr.SeasonMMR.md create mode 100644 package/doc/interfaces/types_v2_mmr_history.Images.md create mode 100644 package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md create mode 100644 package/doc/interfaces/types_v3_matches.KillEvent.md create mode 100644 package/doc/interfaces/types_v3_matches.KillEventMatch.md create mode 100644 package/doc/interfaces/types_v3_matches.Match.md create mode 100644 package/doc/interfaces/types_v3_matches.Player.md create mode 100644 package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md create mode 100644 package/doc/interfaces/types_v3_matches.Round.md create mode 100644 package/doc/modules.md create mode 100644 package/doc/modules/index.md create mode 100644 package/doc/modules/types_general.md create mode 100644 package/doc/modules/types_raw_competitive_updates.md create mode 100644 package/doc/modules/types_raw_match_details.md create mode 100644 package/doc/modules/types_raw_match_history.md create mode 100644 package/doc/modules/types_raw_mmr.md create mode 100644 package/doc/modules/types_v1_content.md create mode 100644 package/doc/modules/types_v1_crosshair.md create mode 100644 package/doc/modules/types_v1_featured_items.md create mode 100644 package/doc/modules/types_v1_profile.md create mode 100644 package/doc/modules/types_v1_status.md create mode 100644 package/doc/modules/types_v1_store_offers.md create mode 100644 package/doc/modules/types_v1_version.md create mode 100644 package/doc/modules/types_v1_website.md create mode 100644 package/doc/modules/types_v2_leaderboard.md create mode 100644 package/doc/modules/types_v2_match.md create mode 100644 package/doc/modules/types_v2_mmr.md create mode 100644 package/doc/modules/types_v2_mmr_history.md create mode 100644 package/doc/modules/types_v3_matches.md delete mode 100644 package/src/oldIndex.d.ts delete mode 100644 package/src/oldIndex.js create mode 100644 package/test/editDocs.js create mode 100644 package/test/editDocs.js.map create mode 100644 package/test/editDocs.ts create mode 100644 package/test/test.js.map create mode 100644 package/test/test.ts create mode 100644 package/test/tsconfig.json diff --git a/package/README.md b/package/README.md index c9e980b..be8ee02 100644 --- a/package/README.md +++ b/package/README.md @@ -1,79 +1,42 @@ -npm - -# unofficial-valorant-api - -NPM package for the [Unofficial VALORANT API](https://github.com/Henrik-3/unofficial-valorant-api) - - +

+ unofficial-valorant-api +

+ +

+ Wrapper for the Unofficial VALORANT API +

+

+ + + + + npm + +

# API -Find all inforamtion about the API itself here: https://github.com/Henrik-3/unofficial-valorant-api/ +Find all inforamtion about the API itself [here](https://github.com/Henrik-3/unofficial-valorant-api) # Installation -``` -npm i unofficial-valorant-api@latest -``` - -# Code Examples - -You find some examples [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/main/package/examples) - -# API Calls available +``` js +// npm +npm i unofficial-valorant-api -- [x] `getAccount({name, tag})` -- [x] `getContent({locale?})` -- [x] `getCrosshair({code})` -- [x] `getFeaturedItems()` -- [x] `getLeaderboard({version, region, name?, tag?, puuid?})` -- [x] `getMatchesByPUUID({region, puuid, size?, filter?, map?})` -- [x] `getMatches({region, name, tag, size?, filter?, map?})` -- [x] `getMatch({match_id})` -- [x] `getMMRByPUUID({version, region, puuid, filter?})` -- [x] `getMMR({version, region, name, tag, filter?})` -- [x] `getMMRHistoryByPUUID({region, puuid})` -- [x] `getMMRHistory({region, name, tag})` -- [x] `getOffers()` -- [x] `getRawData({type, uuid, region, queries?})` -- [x] `getStatus({region})` -- [x] `getVersion({region})` -- [x] `getWebsite({countrycode, filter?})` +// pnpm +pnpm add unofficial-valorant-api -``` -Values like countrycode, region, filter or type will be suggested -in IDE's like Visual Studio Code, otherwise you find these values here: https://github.com/Henrik-3/unofficial-valorant-api +// yarn +yarn add unofficial-valorant-api ``` -# Response Example +# Docs -```json -{ - "status": 200, - "data": { - "currenttier": 15, - "currenttierpatched": "Platinum 1", - "ranking_in_tier": 11, - "mmr_change_to_last_game": -21, - "elo": 1211, - "name": "Henrik3", - "tag": "VALO", - "old": true - }, - "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, - "error": null, - "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/VALO" -} -``` +You can find the documentation [here](./doc/classes/index.default.md) -# Error Response +Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) -```json -{ - "status": 404, - "data": null, - "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, - "error": {"message": "Not found"}, - "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/EUW3" -} -``` +# Code Examples + +You find some examples [here](./examples) diff --git a/package/doc/.nojekyll b/package/doc/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/package/doc/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/package/doc/README.md b/package/doc/README.md new file mode 100644 index 0000000..1052168 --- /dev/null +++ b/package/doc/README.md @@ -0,0 +1,79 @@ +npm + +# unofficial-valorant-api + +NPM package for the [Unofficial VALORANT API](https://github.com/Henrik-3/unofficial-valorant-api) + + + +# API + +Find all inforamtion about the API itself here: + +# Installation + +``` +npm i unofficial-valorant-api@latest +``` + +# Code Examples + +You find some examples [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/main/package/examples) + +# API Calls available + +- [x] `getAccount({name, tag})` +- [x] `getContent({locale?})` +- [x] `getCrosshair({code})` +- [x] `getFeaturedItems()` +- [x] `getLeaderboard({version, region, name?, tag?, puuid?})` +- [x] `getMatchesByPUUID({region, puuid, size?, filter?, map?})` +- [x] `getMatches({region, name, tag, size?, filter?, map?})` +- [x] `getMatch({match_id})` +- [x] `getMMRByPUUID({version, region, puuid, filter?})` +- [x] `getMMR({version, region, name, tag, filter?})` +- [x] `getMMRHistoryByPUUID({region, puuid})` +- [x] `getMMRHistory({region, name, tag})` +- [x] `getOffers()` +- [x] `getRawData({type, uuid, region, queries?})` +- [x] `getStatus({region})` +- [x] `getVersion({region})` +- [x] `getWebsite({countrycode, filter?})` + +``` +Values like countrycode, region, filter or type will be suggested +in IDE's like Visual Studio Code, otherwise you find these values here: https://github.com/Henrik-3/unofficial-valorant-api +``` + +# Response Example + +```json +{ + "status": 200, + "data": { + "currenttier": 15, + "currenttierpatched": "Platinum 1", + "ranking_in_tier": 11, + "mmr_change_to_last_game": -21, + "elo": 1211, + "name": "Henrik3", + "tag": "VALO", + "old": true + }, + "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, + "error": null, + "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/VALO" +} +``` + +# Error Response + +```json +{ + "status": 404, + "data": null, + "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, + "error": {"message": "Not found"}, + "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/EUW3" +} +``` diff --git a/package/doc/classes/index.default.md b/package/doc/classes/index.default.md new file mode 100644 index 0000000..4864371 --- /dev/null +++ b/package/doc/classes/index.default.md @@ -0,0 +1,772 @@ +# Welcome to the VAPI docs + +Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD) + +## Table of contents + +### Constructors + +- [constructor](index.default.md#constructor) + +### Properties + +- [mapImages](index.default.md#mapimages) +- [rankImages](index.default.md#rankimages) + +### Methods + +- [getAnnouncements](index.default.md#getannouncements) +- [getCrosshair](index.default.md#getcrosshair) +- [getFeaturedItems](index.default.md#getfeatureditems) +- [getIAPs](index.default.md#getiaps) +- [getLeaderboard](index.default.md#getleaderboard) +- [getMMR](index.default.md#getmmr) +- [getMMRByPUUID](index.default.md#getmmrbypuuid) +- [getMMRHistory](index.default.md#getmmrhistory) +- [getMMRHistoryByPUUID](index.default.md#getmmrhistorybypuuid) +- [getMatch](index.default.md#getmatch) +- [getMatches](index.default.md#getmatches) +- [getMatchesByPUUID](index.default.md#getmatchesbypuuid) +- [getProfile](index.default.md#getprofile) +- [getProfileByPUUID](index.default.md#getprofilebypuuid) +- [getRawCompetitiveUpdates](index.default.md#getrawcompetitiveupdates) +- [getRawMMR](index.default.md#getrawmmr) +- [getRawMatchDetails](index.default.md#getrawmatchdetails) +- [getRawMatchHistory](index.default.md#getrawmatchhistory) +- [getStatus](index.default.md#getstatus) +- [getTranslations](index.default.md#gettranslations) +- [getVersion](index.default.md#getversion) +- [initUtils](index.default.md#initutils) + +## Constructors + +### constructor + +• **new default**(`token?`) + +Create a new instance of the main API. All API calls are in this class + +**`Example`** + +Create a new instance +``` +import _VAPI from "unofficial-valorant-api" +const VAPI = new _VAPI("my super secret token") +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `token?` | `string` | (optional) The token, if you have one. Get one from the Discord server ([https://discord.gg/wXNMnqzvAD](https://discord.gg/wXNMnqzvAD)) | + +#### Defined in + +[index.ts:132](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L132) + +## Properties + +### mapImages + +• `Optional` **mapImages**: `Object` + +Images for every ValorantMap + +**`Remarks`** + +You must call [initUtils](index.default.md#initutils) before using this! + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `Ascent` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Bind` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Breeze` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Fracture` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Haven` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Icebox` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Pearl` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `Split` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | +| `The Range` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | + +#### Defined in + +[index.ts:120](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L120) + +___ + +### rankImages + +• `Optional` **rankImages**: `Object` + +Images for every Rank + +**`Remarks`** + +You must call [initUtils](index.default.md#initutils) before using this! + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `Ascendant 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Ascendant 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Ascendant 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Bronze 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Bronze 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Bronze 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Diamond 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Diamond 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Diamond 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Gold 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Gold 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Gold 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Immortal 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Immortal 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Immortal 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Iron 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Iron 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Iron 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Platinum 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Platinum 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Platinum 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Radiant` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Silver 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Silver 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Silver 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | +| `Unrated` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | + +#### Defined in + +[index.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L114) + +## Methods + +### getAnnouncements + +▸ **getAnnouncements**(`countryCode`): `Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> + +Get all announcements from the valorant website of a country + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `countryCode` | ``"en-us"`` \| ``"en-gb"`` \| ``"de-de"`` \| ``"es-es"`` \| ``"es-mx"`` \| ``"fr-fr"`` \| ``"it-it"`` \| ``"ja-jp"`` \| ``"ko-kr"`` \| ``"pt-br"`` \| ``"ru-ru"`` \| ``"tr-tr"`` \| ``"vi-vn"`` | Country code of website | + +#### Returns + +`Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> + +List of announcements from the valorant website + +#### Defined in + +[index.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L253) + +___ + +### getCrosshair + +▸ **getCrosshair**(`code`, `size?`): `Promise`<`APIResponse`<`Buffer`\>\> + +Get an image of a valorant crosshair by its code + +**`Example`** + +Load and write a crosshair to crosshair.png +``` +import { writeFileSync } from "fs" + +const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") +writeFileSync("crosshair.png", crosshair.data) +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `code` | `string` | Valorant crosshair code | +| `size?` | `number` | (optional) Image size (default: `1024`) | + +#### Returns + +`Promise`<`APIResponse`<`Buffer`\>\> + +The image of the crosshair as a Buffer + +#### Defined in + +[index.ts:241](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L241) + +___ + +### getFeaturedItems + +▸ **getFeaturedItems**(): `Promise`<`APIResponse`<[`FeaturedItemsResponse`](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md)\>\> + +Get all of the featured items in the current valorant store + +#### Returns + +`Promise`<`APIResponse`<[`FeaturedItemsResponse`](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md)\>\> + +Featured items in the current valorant store + +#### Defined in + +[index.ts:272](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L272) + +___ + +### getIAPs + +▸ **getIAPs**(): `Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> + +Get a list of all in-app-purchases for valorant, such as Radianite and VP + +#### Returns + +`Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> + +List of IAPs in valorant + +#### Defined in + +[index.ts:281](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L281) + +___ + +### getLeaderboard + +▸ **getLeaderboard**(`region`, `start?`, `end?`, `riotID?`, `puuid?`, `season?`): `Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> + +Get the leaderboard of a region + +**`Remarks`** + +In order for player filtering to work, they must be Immortal or higher + +**`Throws`** + +TypeError - If both a riotID and puuid are supplied + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `region` | [`Region`](../modules/types_general.md#region) | Region to get leaderboard from | +| `start?` | `number` | (optional) Get 1000 leaderboard players starting from the given start value | +| `end?` | `number` | (optional) Limit the amount of leaderboard players returned | +| `riotID?` | `Object` | (optional) Search for a specific player by their Riot ID | +| `riotID.name` | `string` | The Riot IDs username | +| `riotID.tag` | `string` | The Riot IDs tag | +| `puuid?` | `string` | (optional) Search for a specific player by their PUUID | +| `season?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | (optional) Get leaderboard from a specific season | + +#### Returns + +`Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> + +Descending order of the highest ranked players. (Immortal and up) + +#### Defined in + +[index.ts:408](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L408) + +___ + +### getMMR + +▸ **getMMR**(`name`, `tag`, `region`, `seasonFilter?`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> + +Gets general info about a players rank by their Riot ID + +**`Remarks`** + +**Returns:** +- Current rank and info about their rank +- RR change on their last game +- Their PUUID +- Their peak rank from every season + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | The Riot ID username of the player | +| `tag` | `string` | The Riot ID tag of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | +| `seasonFilter?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | Filter results based on episode and act | + +#### Returns + +`Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> + +Information about a players mmr/rank + +#### Defined in + +[index.ts:437](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L437) + +___ + +### getMMRByPUUID + +▸ **getMMRByPUUID**(`puuid`, `region`, `seasonFilter?`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> + +Gets general info about a players rank by their PUUID + +**`Remarks`** + +**Returns:** +- Current rank and info about their rank +- RR change on their last game +- Their PUUID +- Their peak rank from every season + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The PUUID of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | +| `seasonFilter?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | Filter results based on episode and act | + +#### Returns + +`Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> + +Information about a players mmr/rank + +#### Defined in + +[index.ts:455](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L455) + +___ + +### getMMRHistory + +▸ **getMMRHistory**(`name`, `tag`, `region`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> + +Get a list of rr changes of a player by their Riot ID + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | The Riot ID username of the player | +| `tag` | `string` | The Riot tag username of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The players region | + +#### Returns + +`Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> + +List of rr changes (recent competitive games) + +#### Defined in + +[index.ts:367](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L367) + +___ + +### getMMRHistoryByPUUID + +▸ **getMMRHistoryByPUUID**(`puuid`, `region`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> + +Get a list of rr changes of a player by their PUUID + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The PUUID of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The players region | + +#### Returns + +`Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> + +List of rr changes (recent competitive games) + +#### Defined in + +[index.ts:378](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L378) + +___ + +### getMatch + +▸ **getMatch**(`matchID`): `Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> + +Get information about a match + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `matchID` | `string` | The matchs ID | + +#### Returns + +`Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> + +Information about the match + +#### Defined in + +[index.ts:388](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L388) + +___ + +### getMatches + +▸ **getMatches**(`name`, `tag`, `region`, `gamemodeFilter?`, `mapFilter?`, `size?`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> + +Gets the most recent 5 matches by a players Riot ID + +**`Remarks`** + +**Returns:** +- Info about most recent 5 matches including: + - Metadata info about the match such as length, time, map, score, etc + - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + - Information about every round in the match such as plant/defuse info, etc + - Information about every kill in the game including killer, victim, assist, etc + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | The Riot ID username of the player | +| `tag` | `string` | The Riot ID tag of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | +| `gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | Filter results based on gamemode | +| `mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | Filter results based on map | +| `size?` | `any` | Filter results based on ?? **{needs testing)** | + +#### Returns + +`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> + +Info about a players last 5 matches + +#### Defined in + +[index.ts:477](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L477) + +___ + +### getMatchesByPUUID + +▸ **getMatchesByPUUID**(`puuid`, `region`, `gamemodeFilter?`, `mapFilter?`, `size?`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> + +Gets the most recent 5 matches by a players PUUID + +**`Remarks`** + +**Returns:** +- Info about most recent 5 matches including: + - Metadata info about the match such as length, time, map, score, etc + - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + - Information about every round in the match such as plant/defuse info, etc + - Information about every kill in the game including killer, victim, assist, etc + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The PUUID username of the player | +| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | +| `gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | Filter results based on gamemode | +| `mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | Filter results based on map | +| `size?` | `any` | Filter results based on ?? **{needs testing)** | + +#### Returns + +`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> + +Info about a players last 5 matches + +#### Defined in + +[index.ts:498](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L498) + +___ + +### getProfile + +▸ **getProfile**(`name`, `tag`, `force?`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +Get general information about a player from their Riot ID + +**`Remarks`** + +**Returns:** +- Their PUUID +- Their region +- Their account level +- Their current card + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | The Riot ID username of the player | +| `tag` | `string` | The Riot ID tag of the player | +| `force?` | `boolean` | Force data update? | + +#### Returns + +`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +General information on a players profile + +#### Defined in + +[index.ts:516](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L516) + +___ + +### getProfileByPUUID + +▸ **getProfileByPUUID**(`puuid`, `force?`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +Get general information about a player from their PUUID + +**`Remarks`** + +**Returns:** +- Their PUUID +- Their region +- Their account level +- Their current card + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The PUUID of the player | +| `force?` | `boolean` | Force data update? | + +#### Returns + +`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +General information on a players profile + +#### Defined in + +[index.ts:533](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L533) + +___ + +### getRawCompetitiveUpdates + +▸ **getRawCompetitiveUpdates**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> + +Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + +**`See`** + +[getMMRHistory](index.default.md#getmmrhistory) for an easier response to use + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The match ID to get details about | +| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | +| `queries?` | `any` | Extra queries | + +#### Returns + +`Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> + +Information about the players rr history + +#### Defined in + +[index.ts:336](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L336) + +___ + +### getRawMMR + +▸ **getRawMMR**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> + +Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + +**`See`** + +[getMMR](index.default.md#getmmr) for an easier response to use + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The match ID to get details about | +| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | +| `queries?` | `any` | Extra queries | + +#### Returns + +`Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> + +Information about the players mmr + +#### Defined in + +[index.ts:352](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L352) + +___ + +### getRawMatchDetails + +▸ **getRawMatchDetails**(`matchID`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> + +Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + +**`See`** + +[getMatch](index.default.md#getmatch) for an easier response to use + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `matchID` | `string` | The match ID to get details about | +| `region` | [`Region`](../modules/types_general.md#region) | Region of the match | +| `queries?` | `any` | Extra queries | + +#### Returns + +`Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> + +Information about the match + +#### Defined in + +[index.ts:304](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L304) + +___ + +### getRawMatchHistory + +▸ **getRawMatchHistory**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> + +Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + +**`See`** + +[getMatches](index.default.md#getmatches) for an easier response to use + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `puuid` | `string` | The match ID to get details about | +| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | +| `queries?` | `any` | Extra queries | + +#### Returns + +`Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> + +Information about the players match history + +#### Defined in + +[index.ts:320](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L320) + +___ + +### getStatus + +▸ **getStatus**(`region`): `Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> + +Will get information about the current maintenances and incidents about a region + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `region` | [`Region`](../modules/types_general.md#region) | Region to get info about | + +#### Returns + +`Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> + +Info about undergoing maintenances and incidents in a region of valorant + +#### Defined in + +[index.ts:291](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L291) + +___ + +### getTranslations + +▸ **getTranslations**(`locale?`): `Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> + +Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `locale?` | [`Locale`](../modules/types_general.md#locale) | If this is set, instead of all translations, it will return just translations for this language | + +#### Returns + +`Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> + +#### Defined in + +[index.ts:419](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L419) + +___ + +### getVersion + +▸ **getVersion**(`region`): `Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> + +Get information about valorant in a region, such as the client version, branch, and server version + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `region` | [`Region`](../modules/types_general.md#region) | Region of valorant to get info about | + +#### Returns + +`Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> + +Information about a regions valorant + +#### Defined in + +[index.ts:263](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L263) + +___ + +### initUtils + +▸ **initUtils**(): `Promise`<`void`\> + +Creates [rankImages](index.default.md#rankimages) and [mapImages](index.default.md#mapimages) by pulling the images from [https://valorant-api.com](https://valorant-api.com) + +**`Remarks`** + +Must be called before using [rankImages](index.default.md#rankimages) and [mapImages](index.default.md#mapimages) + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[index.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L139) diff --git a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md new file mode 100644 index 0000000..177875f --- /dev/null +++ b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md @@ -0,0 +1,52 @@ +# Interface: RawCompetitiveUpdatesResponse + +[types/raw/competitive-updates](../modules/types_raw_competitive_updates.md).RawCompetitiveUpdatesResponse + +## Table of contents + +### Properties + +- [Matches](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#matches) +- [Subject](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#subject) +- [Version](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#version) +- [region](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#region) + +## Properties + +### Matches + +• **Matches**: `Match`[] + +#### Defined in + +[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L21) + +___ + +### Subject + +• **Subject**: `string` + +#### Defined in + +[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L20) + +___ + +### Version + +• **Version**: `number` + +#### Defined in + +[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L19) + +___ + +### region + +• **region**: [`Region`](../modules/types_general.md#region) + +#### Defined in + +[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L22) diff --git a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md new file mode 100644 index 0000000..a47439f --- /dev/null +++ b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md @@ -0,0 +1,96 @@ +# Interface: RawMatchDetailsResponse + +[types/raw/match-details](../modules/types_raw_match_details.md).RawMatchDetailsResponse + +## Table of contents + +### Properties + +- [bots](types_raw_match_details.RawMatchDetailsResponse.md#bots) +- [coaches](types_raw_match_details.RawMatchDetailsResponse.md#coaches) +- [kills](types_raw_match_details.RawMatchDetailsResponse.md#kills) +- [matchInfo](types_raw_match_details.RawMatchDetailsResponse.md#matchinfo) +- [players](types_raw_match_details.RawMatchDetailsResponse.md#players) +- [region](types_raw_match_details.RawMatchDetailsResponse.md#region) +- [roundResults](types_raw_match_details.RawMatchDetailsResponse.md#roundresults) +- [teams](types_raw_match_details.RawMatchDetailsResponse.md#teams) + +## Properties + +### bots + +• **bots**: `any`[] + +#### Defined in + +[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L251) + +___ + +### coaches + +• **coaches**: `any`[] + +#### Defined in + +[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L252) + +___ + +### kills + +• **kills**: `MatchKill`[] + +#### Defined in + +[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L255) + +___ + +### matchInfo + +• **matchInfo**: `MatchInfo` + +#### Defined in + +[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L249) + +___ + +### players + +• **players**: `Player`[] + +#### Defined in + +[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L250) + +___ + +### region + +• **region**: [`Region`](../modules/types_general.md#region) + +#### Defined in + +[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L256) + +___ + +### roundResults + +• **roundResults**: `RoundResult`[] + +#### Defined in + +[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L254) + +___ + +### teams + +• **teams**: `Team`[] + +#### Defined in + +[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L253) diff --git a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md new file mode 100644 index 0000000..eb4ac5c --- /dev/null +++ b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md @@ -0,0 +1,74 @@ +# Interface: RawMatchHistoryResponse + +[types/raw/match-history](../modules/types_raw_match_history.md).RawMatchHistoryResponse + +## Table of contents + +### Properties + +- [BeginIndex](types_raw_match_history.RawMatchHistoryResponse.md#beginindex) +- [EndIndex](types_raw_match_history.RawMatchHistoryResponse.md#endindex) +- [History](types_raw_match_history.RawMatchHistoryResponse.md#history) +- [Subject](types_raw_match_history.RawMatchHistoryResponse.md#subject) +- [Total](types_raw_match_history.RawMatchHistoryResponse.md#total) +- [region](types_raw_match_history.RawMatchHistoryResponse.md#region) + +## Properties + +### BeginIndex + +• **BeginIndex**: `number` + +#### Defined in + +[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L11) + +___ + +### EndIndex + +• **EndIndex**: `number` + +#### Defined in + +[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L12) + +___ + +### History + +• **History**: `History`[] + +#### Defined in + +[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L14) + +___ + +### Subject + +• **Subject**: `string` + +#### Defined in + +[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L10) + +___ + +### Total + +• **Total**: `number` + +#### Defined in + +[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L13) + +___ + +### region + +• **region**: [`Region`](../modules/types_general.md#region) + +#### Defined in + +[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L15) diff --git a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md new file mode 100644 index 0000000..b15d574 --- /dev/null +++ b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md @@ -0,0 +1,96 @@ +# Interface: RawMMRResponse + +[types/raw/mmr](../modules/types_raw_mmr.md).RawMMRResponse + +## Table of contents + +### Properties + +- [IsActRankBadgeHidden](types_raw_mmr.RawMMRResponse.md#isactrankbadgehidden) +- [IsLeaderboardAnonymized](types_raw_mmr.RawMMRResponse.md#isleaderboardanonymized) +- [LatestCompetitiveUpdate](types_raw_mmr.RawMMRResponse.md#latestcompetitiveupdate) +- [NewPlayerExperienceFinished](types_raw_mmr.RawMMRResponse.md#newplayerexperiencefinished) +- [QueueSkills](types_raw_mmr.RawMMRResponse.md#queueskills) +- [Subject](types_raw_mmr.RawMMRResponse.md#subject) +- [Version](types_raw_mmr.RawMMRResponse.md#version) +- [region](types_raw_mmr.RawMMRResponse.md#region) + +## Properties + +### IsActRankBadgeHidden + +• **IsActRankBadgeHidden**: `boolean` + +#### Defined in + +[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L63) + +___ + +### IsLeaderboardAnonymized + +• **IsLeaderboardAnonymized**: `boolean` + +#### Defined in + +[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L62) + +___ + +### LatestCompetitiveUpdate + +• **LatestCompetitiveUpdate**: `LatestCompetitiveUpdate` + +#### Defined in + +[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L61) + +___ + +### NewPlayerExperienceFinished + +• **NewPlayerExperienceFinished**: `boolean` + +#### Defined in + +[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L59) + +___ + +### QueueSkills + +• **QueueSkills**: `QueueSkills` + +#### Defined in + +[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L60) + +___ + +### Subject + +• **Subject**: `string` + +#### Defined in + +[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L58) + +___ + +### Version + +• **Version**: `number` + +#### Defined in + +[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L57) + +___ + +### region + +• **region**: [`Region`](../modules/types_general.md#region) + +#### Defined in + +[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L64) diff --git a/package/doc/interfaces/types_v1_content.Act.md b/package/doc/interfaces/types_v1_content.Act.md new file mode 100644 index 0000000..42321fb --- /dev/null +++ b/package/doc/interfaces/types_v1_content.Act.md @@ -0,0 +1,74 @@ +# Interface: Act + +[types/v1-content](../modules/types_v1_content.md).Act + +## Table of contents + +### Properties + +- [id](types_v1_content.Act.md#id) +- [isActive](types_v1_content.Act.md#isactive) +- [localizedNames](types_v1_content.Act.md#localizednames) +- [name](types_v1_content.Act.md#name) +- [parentId](types_v1_content.Act.md#parentid) +- [type](types_v1_content.Act.md#type) + +## Properties + +### id + +• **id**: `string` + +#### Defined in + +[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L19) + +___ + +### isActive + +• **isActive**: `boolean` + +#### Defined in + +[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L24) + +___ + +### localizedNames + +• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) + +#### Defined in + +[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L23) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L22) + +___ + +### parentId + +• **parentId**: `string` + +#### Defined in + +[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L20) + +___ + +### type + +• **type**: `string` + +#### Defined in + +[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L21) diff --git a/package/doc/interfaces/types_v1_content.Asset.md b/package/doc/interfaces/types_v1_content.Asset.md new file mode 100644 index 0000000..e4afbde --- /dev/null +++ b/package/doc/interfaces/types_v1_content.Asset.md @@ -0,0 +1,58 @@ +# Interface: Asset + +[types/v1-content](../modules/types_v1_content.md).Asset + +## Hierarchy + +- **`Asset`** + + ↳ [`AssetWithPath`](types_v1_content.AssetWithPath.md) + +## Table of contents + +### Properties + +- [assetName](types_v1_content.Asset.md#assetname) +- [id](types_v1_content.Asset.md#id) +- [localizedNames](types_v1_content.Asset.md#localizednames) +- [name](types_v1_content.Asset.md#name) + +## Properties + +### assetName + +• **assetName**: `string` + +#### Defined in + +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L11) + +___ + +### id + +• **id**: `string` + +#### Defined in + +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L10) + +___ + +### localizedNames + +• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) + +#### Defined in + +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L9) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.AssetWithPath.md b/package/doc/interfaces/types_v1_content.AssetWithPath.md new file mode 100644 index 0000000..b4f846b --- /dev/null +++ b/package/doc/interfaces/types_v1_content.AssetWithPath.md @@ -0,0 +1,85 @@ +# Interface: AssetWithPath + +[types/v1-content](../modules/types_v1_content.md).AssetWithPath + +## Hierarchy + +- [`Asset`](types_v1_content.Asset.md) + + ↳ **`AssetWithPath`** + +## Table of contents + +### Properties + +- [assetName](types_v1_content.AssetWithPath.md#assetname) +- [assetPath](types_v1_content.AssetWithPath.md#assetpath) +- [id](types_v1_content.AssetWithPath.md#id) +- [localizedNames](types_v1_content.AssetWithPath.md#localizednames) +- [name](types_v1_content.AssetWithPath.md#name) + +## Properties + +### assetName + +• **assetName**: `string` + +#### Inherited from + +[Asset](types_v1_content.Asset.md).[assetName](types_v1_content.Asset.md#assetname) + +#### Defined in + +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L11) + +___ + +### assetPath + +• **assetPath**: `string` + +#### Defined in + +[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L15) + +___ + +### id + +• **id**: `string` + +#### Inherited from + +[Asset](types_v1_content.Asset.md).[id](types_v1_content.Asset.md#id) + +#### Defined in + +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L10) + +___ + +### localizedNames + +• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) + +#### Inherited from + +[Asset](types_v1_content.Asset.md).[localizedNames](types_v1_content.Asset.md#localizednames) + +#### Defined in + +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L9) + +___ + +### name + +• **name**: `string` + +#### Inherited from + +[Asset](types_v1_content.Asset.md).[name](types_v1_content.Asset.md#name) + +#### Defined in + +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.ContentResponse.md b/package/doc/interfaces/types_v1_content.ContentResponse.md new file mode 100644 index 0000000..53430f9 --- /dev/null +++ b/package/doc/interfaces/types_v1_content.ContentResponse.md @@ -0,0 +1,184 @@ +# Interface: ContentResponse + +[types/v1-content](../modules/types_v1_content.md).ContentResponse + +## Table of contents + +### Properties + +- [acts](types_v1_content.ContentResponse.md#acts) +- [ceremonies](types_v1_content.ContentResponse.md#ceremonies) +- [characters](types_v1_content.ContentResponse.md#characters) +- [charmLevels](types_v1_content.ContentResponse.md#charmlevels) +- [charms](types_v1_content.ContentResponse.md#charms) +- [chromas](types_v1_content.ContentResponse.md#chromas) +- [equips](types_v1_content.ContentResponse.md#equips) +- [gameModes](types_v1_content.ContentResponse.md#gamemodes) +- [maps](types_v1_content.ContentResponse.md#maps) +- [playerCards](types_v1_content.ContentResponse.md#playercards) +- [playerTitles](types_v1_content.ContentResponse.md#playertitles) +- [skinLevels](types_v1_content.ContentResponse.md#skinlevels) +- [skins](types_v1_content.ContentResponse.md#skins) +- [sprayLevels](types_v1_content.ContentResponse.md#spraylevels) +- [sprays](types_v1_content.ContentResponse.md#sprays) +- [version](types_v1_content.ContentResponse.md#version) + +## Properties + +### acts + +• **acts**: [`Act`](types_v1_content.Act.md)[] + +#### Defined in + +[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L42) + +___ + +### ceremonies + +• **ceremonies**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L43) + +___ + +### characters + +• **characters**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L29) + +___ + +### charmLevels + +• **charmLevels**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L39) + +___ + +### charms + +• **charms**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L38) + +___ + +### chromas + +• **chromas**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L31) + +___ + +### equips + +• **equips**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L34) + +___ + +### gameModes + +• **gameModes**: [`AssetWithPath`](types_v1_content.AssetWithPath.md)[] + +#### Defined in + +[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L35) + +___ + +### maps + +• **maps**: [`AssetWithPath`](types_v1_content.AssetWithPath.md)[] + +#### Defined in + +[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L30) + +___ + +### playerCards + +• **playerCards**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L40) + +___ + +### playerTitles + +• **playerTitles**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L41) + +___ + +### skinLevels + +• **skinLevels**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L33) + +___ + +### skins + +• **skins**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L32) + +___ + +### sprayLevels + +• **sprayLevels**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L37) + +___ + +### sprays + +• **sprays**: [`Asset`](types_v1_content.Asset.md)[] + +#### Defined in + +[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L36) + +___ + +### version + +• **version**: `string` + +#### Defined in + +[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L28) diff --git a/package/doc/interfaces/types_v1_featured_items.BaseItem.md b/package/doc/interfaces/types_v1_featured_items.BaseItem.md new file mode 100644 index 0000000..947fda0 --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.BaseItem.md @@ -0,0 +1,41 @@ +# Interface: BaseItem + +[types/v1-featured-items](../modules/types_v1_featured_items.md).BaseItem + +## Table of contents + +### Properties + +- [Amount](types_v1_featured_items.BaseItem.md#amount) +- [ItemID](types_v1_featured_items.BaseItem.md#itemid) +- [ItemTypeID](types_v1_featured_items.BaseItem.md#itemtypeid) + +## Properties + +### Amount + +• **Amount**: `number` + +#### Defined in + +[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L4) + +___ + +### ItemID + +• **ItemID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L3) + +___ + +### ItemTypeID + +• **ItemTypeID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L2) diff --git a/package/doc/interfaces/types_v1_featured_items.Bundle.md b/package/doc/interfaces/types_v1_featured_items.Bundle.md new file mode 100644 index 0000000..4cebf3b --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.Bundle.md @@ -0,0 +1,74 @@ +# Interface: Bundle + +[types/v1-featured-items](../modules/types_v1_featured_items.md).Bundle + +## Table of contents + +### Properties + +- [CurrencyID](types_v1_featured_items.Bundle.md#currencyid) +- [DataAssetID](types_v1_featured_items.Bundle.md#dataassetid) +- [DurationRemainingInSeconds](types_v1_featured_items.Bundle.md#durationremaininginseconds) +- [ID](types_v1_featured_items.Bundle.md#id) +- [Items](types_v1_featured_items.Bundle.md#items) +- [WholesaleOnly](types_v1_featured_items.Bundle.md#wholesaleonly) + +## Properties + +### CurrencyID + +• **CurrencyID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L19) + +___ + +### DataAssetID + +• **DataAssetID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L18) + +___ + +### DurationRemainingInSeconds + +• **DurationRemainingInSeconds**: `number` + +#### Defined in + +[types/v1-featured-items.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L21) + +___ + +### ID + +• **ID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L17) + +___ + +### Items + +• **Items**: [`Item`](types_v1_featured_items.Item.md)[] + +#### Defined in + +[types/v1-featured-items.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L20) + +___ + +### WholesaleOnly + +• **WholesaleOnly**: `boolean` + +#### Defined in + +[types/v1-featured-items.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L22) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md b/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md new file mode 100644 index 0000000..95e1d83 --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md @@ -0,0 +1,41 @@ +# Interface: FeaturedBundle + +[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedBundle + +## Table of contents + +### Properties + +- [Bundle](types_v1_featured_items.FeaturedBundle.md#bundle) +- [BundleRemainingDurationInSeconds](types_v1_featured_items.FeaturedBundle.md#bundleremainingdurationinseconds) +- [Bundles](types_v1_featured_items.FeaturedBundle.md#bundles) + +## Properties + +### Bundle + +• **Bundle**: [`Bundle`](types_v1_featured_items.Bundle.md) + +#### Defined in + +[types/v1-featured-items.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L26) + +___ + +### BundleRemainingDurationInSeconds + +• **BundleRemainingDurationInSeconds**: `number` + +#### Defined in + +[types/v1-featured-items.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L28) + +___ + +### Bundles + +• **Bundles**: [`Bundle`](types_v1_featured_items.Bundle.md)[] + +#### Defined in + +[types/v1-featured-items.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L27) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md b/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md new file mode 100644 index 0000000..54c76cd --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md @@ -0,0 +1,19 @@ +# Interface: FeaturedItemsResponse + +[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedItemsResponse + +## Table of contents + +### Properties + +- [FeaturedBundle](types_v1_featured_items.FeaturedItemsResponse.md#featuredbundle) + +## Properties + +### FeaturedBundle + +• **FeaturedBundle**: [`FeaturedBundle`](types_v1_featured_items.FeaturedBundle.md) + +#### Defined in + +[types/v1-featured-items.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L32) diff --git a/package/doc/interfaces/types_v1_featured_items.Item.md b/package/doc/interfaces/types_v1_featured_items.Item.md new file mode 100644 index 0000000..255d674 --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.Item.md @@ -0,0 +1,74 @@ +# Interface: Item + +[types/v1-featured-items](../modules/types_v1_featured_items.md).Item + +## Table of contents + +### Properties + +- [BasePrice](types_v1_featured_items.Item.md#baseprice) +- [CurrencyID](types_v1_featured_items.Item.md#currencyid) +- [DiscountPercent](types_v1_featured_items.Item.md#discountpercent) +- [DiscountedPrice](types_v1_featured_items.Item.md#discountedprice) +- [IsPromoItem](types_v1_featured_items.Item.md#ispromoitem) +- [Item](types_v1_featured_items.Item.md#item) + +## Properties + +### BasePrice + +• **BasePrice**: `number` + +#### Defined in + +[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L9) + +___ + +### CurrencyID + +• **CurrencyID**: `string` + +#### Defined in + +[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L10) + +___ + +### DiscountPercent + +• **DiscountPercent**: `number` + +#### Defined in + +[types/v1-featured-items.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L11) + +___ + +### DiscountedPrice + +• **DiscountedPrice**: `number` + +#### Defined in + +[types/v1-featured-items.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L12) + +___ + +### IsPromoItem + +• **IsPromoItem**: `boolean` + +#### Defined in + +[types/v1-featured-items.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L13) + +___ + +### Item + +• **Item**: [`BaseItem`](types_v1_featured_items.BaseItem.md) + +#### Defined in + +[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L8) diff --git a/package/doc/interfaces/types_v1_profile.Card.md b/package/doc/interfaces/types_v1_profile.Card.md new file mode 100644 index 0000000..caea023 --- /dev/null +++ b/package/doc/interfaces/types_v1_profile.Card.md @@ -0,0 +1,52 @@ +# Interface: Card + +[types/v1-profile](../modules/types_v1_profile.md).Card + +## Table of contents + +### Properties + +- [id](types_v1_profile.Card.md#id) +- [large](types_v1_profile.Card.md#large) +- [small](types_v1_profile.Card.md#small) +- [wide](types_v1_profile.Card.md#wide) + +## Properties + +### id + +• **id**: `string` + +#### Defined in + +[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L7) + +___ + +### large + +• **large**: `string` + +#### Defined in + +[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L5) + +___ + +### small + +• **small**: `string` + +#### Defined in + +[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L4) + +___ + +### wide + +• **wide**: `string` + +#### Defined in + +[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L6) diff --git a/package/doc/interfaces/types_v1_profile.ProfileResponse.md b/package/doc/interfaces/types_v1_profile.ProfileResponse.md new file mode 100644 index 0000000..c1ecf6d --- /dev/null +++ b/package/doc/interfaces/types_v1_profile.ProfileResponse.md @@ -0,0 +1,96 @@ +# Interface: ProfileResponse + +[types/v1-profile](../modules/types_v1_profile.md).ProfileResponse + +## Table of contents + +### Properties + +- [account\_level](types_v1_profile.ProfileResponse.md#account_level) +- [card](types_v1_profile.ProfileResponse.md#card) +- [last\_update](types_v1_profile.ProfileResponse.md#last_update) +- [last\_update\_raw](types_v1_profile.ProfileResponse.md#last_update_raw) +- [name](types_v1_profile.ProfileResponse.md#name) +- [puuid](types_v1_profile.ProfileResponse.md#puuid) +- [region](types_v1_profile.ProfileResponse.md#region) +- [tag](types_v1_profile.ProfileResponse.md#tag) + +## Properties + +### account\_level + +• **account\_level**: `number` + +#### Defined in + +[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L13) + +___ + +### card + +• **card**: [`Card`](types_v1_profile.Card.md) + +#### Defined in + +[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L16) + +___ + +### last\_update + +• **last\_update**: `string` + +#### Defined in + +[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L17) + +___ + +### last\_update\_raw + +• **last\_update\_raw**: `number` + +#### Defined in + +[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L18) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L14) + +___ + +### puuid + +• **puuid**: `string` + +#### Defined in + +[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L11) + +___ + +### region + +• **region**: [`Region`](../modules/types_general.md#region) + +#### Defined in + +[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L12) + +___ + +### tag + +• **tag**: `string` + +#### Defined in + +[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L15) diff --git a/package/doc/interfaces/types_v1_status.Incident.md b/package/doc/interfaces/types_v1_status.Incident.md new file mode 100644 index 0000000..ffc6703 --- /dev/null +++ b/package/doc/interfaces/types_v1_status.Incident.md @@ -0,0 +1,107 @@ +# Interface: Incident + +[types/v1-status](../modules/types_v1_status.md).Incident + +## Table of contents + +### Properties + +- [archive\_at](types_v1_status.Incident.md#archive_at) +- [created\_at](types_v1_status.Incident.md#created_at) +- [id](types_v1_status.Incident.md#id) +- [incident\_severity](types_v1_status.Incident.md#incident_severity) +- [maintenance\_status](types_v1_status.Incident.md#maintenance_status) +- [platforms](types_v1_status.Incident.md#platforms) +- [titles](types_v1_status.Incident.md#titles) +- [updated\_at](types_v1_status.Incident.md#updated_at) +- [updates](types_v1_status.Incident.md#updates) + +## Properties + +### archive\_at + +• **archive\_at**: `Date` + +#### Defined in + +[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L20) + +___ + +### created\_at + +• **created\_at**: `Date` + +#### Defined in + +[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L19) + +___ + +### id + +• **id**: `number` + +#### Defined in + +[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L24) + +___ + +### incident\_severity + +• **incident\_severity**: `string` + +#### Defined in + +[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L27) + +___ + +### maintenance\_status + +• **maintenance\_status**: `string` + +#### Defined in + +[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L26) + +___ + +### platforms + +• **platforms**: `string`[] + +#### Defined in + +[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L22) + +___ + +### titles + +• **titles**: [`Title`](types_v1_status.Title.md)[] + +#### Defined in + +[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L25) + +___ + +### updated\_at + +• **updated\_at**: `Date` + +#### Defined in + +[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L23) + +___ + +### updates + +• **updates**: [`Update`](types_v1_status.Update.md)[] + +#### Defined in + +[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L21) diff --git a/package/doc/interfaces/types_v1_status.StatusResponse.md b/package/doc/interfaces/types_v1_status.StatusResponse.md new file mode 100644 index 0000000..21ae8ec --- /dev/null +++ b/package/doc/interfaces/types_v1_status.StatusResponse.md @@ -0,0 +1,30 @@ +# Interface: StatusResponse + +[types/v1-status](../modules/types_v1_status.md).StatusResponse + +## Table of contents + +### Properties + +- [incidents](types_v1_status.StatusResponse.md#incidents) +- [maintenances](types_v1_status.StatusResponse.md#maintenances) + +## Properties + +### incidents + +• **incidents**: [`Incident`](types_v1_status.Incident.md)[] + +#### Defined in + +[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L32) + +___ + +### maintenances + +• **maintenances**: [`Incident`](types_v1_status.Incident.md)[] + +#### Defined in + +[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L31) diff --git a/package/doc/interfaces/types_v1_status.Title.md b/package/doc/interfaces/types_v1_status.Title.md new file mode 100644 index 0000000..9efebd9 --- /dev/null +++ b/package/doc/interfaces/types_v1_status.Title.md @@ -0,0 +1,30 @@ +# Interface: Title + +[types/v1-status](../modules/types_v1_status.md).Title + +## Table of contents + +### Properties + +- [content](types_v1_status.Title.md#content) +- [locale](types_v1_status.Title.md#locale) + +## Properties + +### content + +• **content**: `string` + +#### Defined in + +[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L4) + +___ + +### locale + +• **locale**: [`Locale`](../modules/types_general.md#locale) + +#### Defined in + +[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L5) diff --git a/package/doc/interfaces/types_v1_status.Update.md b/package/doc/interfaces/types_v1_status.Update.md new file mode 100644 index 0000000..5c267e0 --- /dev/null +++ b/package/doc/interfaces/types_v1_status.Update.md @@ -0,0 +1,85 @@ +# Interface: Update + +[types/v1-status](../modules/types_v1_status.md).Update + +## Table of contents + +### Properties + +- [author](types_v1_status.Update.md#author) +- [created\_at](types_v1_status.Update.md#created_at) +- [id](types_v1_status.Update.md#id) +- [publish](types_v1_status.Update.md#publish) +- [publish\_locations](types_v1_status.Update.md#publish_locations) +- [translations](types_v1_status.Update.md#translations) +- [updated\_at](types_v1_status.Update.md#updated_at) + +## Properties + +### author + +• **author**: `string` + +#### Defined in + +[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L15) + +___ + +### created\_at + +• **created\_at**: `Date` + +#### Defined in + +[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L9) + +___ + +### id + +• **id**: `number` + +#### Defined in + +[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L12) + +___ + +### publish + +• **publish**: `boolean` + +#### Defined in + +[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L11) + +___ + +### publish\_locations + +• **publish\_locations**: `string`[] + +#### Defined in + +[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L14) + +___ + +### translations + +• **translations**: [`Title`](types_v1_status.Title.md)[] + +#### Defined in + +[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L13) + +___ + +### updated\_at + +• **updated\_at**: `Date` + +#### Defined in + +[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L10) diff --git a/package/doc/interfaces/types_v1_store_offers.Cost.md b/package/doc/interfaces/types_v1_store_offers.Cost.md new file mode 100644 index 0000000..6dfb47f --- /dev/null +++ b/package/doc/interfaces/types_v1_store_offers.Cost.md @@ -0,0 +1,19 @@ +# Interface: Cost + +[types/v1-store-offers](../modules/types_v1_store_offers.md).Cost + +## Table of contents + +### Properties + +- [85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741](types_v1_store_offers.Cost.md#85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741) + +## Properties + +### 85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741 + +• **85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741**: `number` + +#### Defined in + +[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L2) diff --git a/package/doc/interfaces/types_v1_store_offers.Offer.md b/package/doc/interfaces/types_v1_store_offers.Offer.md new file mode 100644 index 0000000..938df47 --- /dev/null +++ b/package/doc/interfaces/types_v1_store_offers.Offer.md @@ -0,0 +1,63 @@ +# Interface: Offer + +[types/v1-store-offers](../modules/types_v1_store_offers.md).Offer + +## Table of contents + +### Properties + +- [Cost](types_v1_store_offers.Offer.md#cost) +- [IsDirectPurchase](types_v1_store_offers.Offer.md#isdirectpurchase) +- [OfferID](types_v1_store_offers.Offer.md#offerid) +- [Rewards](types_v1_store_offers.Offer.md#rewards) +- [StartDate](types_v1_store_offers.Offer.md#startdate) + +## Properties + +### Cost + +• **Cost**: [`Cost`](types_v1_store_offers.Cost.md) + +#### Defined in + +[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L15) + +___ + +### IsDirectPurchase + +• **IsDirectPurchase**: `boolean` + +#### Defined in + +[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L13) + +___ + +### OfferID + +• **OfferID**: `string` + +#### Defined in + +[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L12) + +___ + +### Rewards + +• **Rewards**: [`Reward`](types_v1_store_offers.Reward.md)[] + +#### Defined in + +[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L16) + +___ + +### StartDate + +• **StartDate**: `Date` + +#### Defined in + +[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L14) diff --git a/package/doc/interfaces/types_v1_store_offers.Reward.md b/package/doc/interfaces/types_v1_store_offers.Reward.md new file mode 100644 index 0000000..22296fd --- /dev/null +++ b/package/doc/interfaces/types_v1_store_offers.Reward.md @@ -0,0 +1,41 @@ +# Interface: Reward + +[types/v1-store-offers](../modules/types_v1_store_offers.md).Reward + +## Table of contents + +### Properties + +- [ItemID](types_v1_store_offers.Reward.md#itemid) +- [ItemTypeID](types_v1_store_offers.Reward.md#itemtypeid) +- [Quantity](types_v1_store_offers.Reward.md#quantity) + +## Properties + +### ItemID + +• **ItemID**: `string` + +#### Defined in + +[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L7) + +___ + +### ItemTypeID + +• **ItemTypeID**: `string` + +#### Defined in + +[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L6) + +___ + +### Quantity + +• **Quantity**: `number` + +#### Defined in + +[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L8) diff --git a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md new file mode 100644 index 0000000..8d6e1ba --- /dev/null +++ b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md @@ -0,0 +1,30 @@ +# Interface: StoreOffersResponse + +[types/v1-store-offers](../modules/types_v1_store_offers.md).StoreOffersResponse + +## Table of contents + +### Properties + +- [Offers](types_v1_store_offers.StoreOffersResponse.md#offers) +- [UpgradeCurrencyOffers](types_v1_store_offers.StoreOffersResponse.md#upgradecurrencyoffers) + +## Properties + +### Offers + +• **Offers**: [`Offer`](types_v1_store_offers.Offer.md)[] + +#### Defined in + +[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L25) + +___ + +### UpgradeCurrencyOffers + +• **UpgradeCurrencyOffers**: [`UpgradeCurrencyOffer`](types_v1_store_offers.UpgradeCurrencyOffer.md)[] + +#### Defined in + +[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L26) diff --git a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md new file mode 100644 index 0000000..7d12155 --- /dev/null +++ b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md @@ -0,0 +1,30 @@ +# Interface: UpgradeCurrencyOffer + +[types/v1-store-offers](../modules/types_v1_store_offers.md).UpgradeCurrencyOffer + +## Table of contents + +### Properties + +- [OfferID](types_v1_store_offers.UpgradeCurrencyOffer.md#offerid) +- [StorefrontItemID](types_v1_store_offers.UpgradeCurrencyOffer.md#storefrontitemid) + +## Properties + +### OfferID + +• **OfferID**: `string` + +#### Defined in + +[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L20) + +___ + +### StorefrontItemID + +• **StorefrontItemID**: `string` + +#### Defined in + +[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L21) diff --git a/package/doc/interfaces/types_v1_version.VersionResponse.md b/package/doc/interfaces/types_v1_version.VersionResponse.md new file mode 100644 index 0000000..9a7f4b4 --- /dev/null +++ b/package/doc/interfaces/types_v1_version.VersionResponse.md @@ -0,0 +1,52 @@ +# Interface: VersionResponse + +[types/v1-version](../modules/types_v1_version.md).VersionResponse + +## Table of contents + +### Properties + +- [branch](types_v1_version.VersionResponse.md#branch) +- [clientVersion](types_v1_version.VersionResponse.md#clientversion) +- [region](types_v1_version.VersionResponse.md#region) +- [version](types_v1_version.VersionResponse.md#version) + +## Properties + +### branch + +• **branch**: `string` + +#### Defined in + +[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L4) + +___ + +### clientVersion + +• **clientVersion**: `string` + +#### Defined in + +[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L3) + +___ + +### region + +• **region**: `string` + +#### Defined in + +[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L5) + +___ + +### version + +• **version**: `string` + +#### Defined in + +[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L2) diff --git a/package/doc/interfaces/types_v1_website.Post.md b/package/doc/interfaces/types_v1_website.Post.md new file mode 100644 index 0000000..f946d48 --- /dev/null +++ b/package/doc/interfaces/types_v1_website.Post.md @@ -0,0 +1,74 @@ +# Interface: Post + +[types/v1-website](../modules/types_v1_website.md).Post + +## Table of contents + +### Properties + +- [banner\_url](types_v1_website.Post.md#banner_url) +- [category](types_v1_website.Post.md#category) +- [date](types_v1_website.Post.md#date) +- [external\_link](types_v1_website.Post.md#external_link) +- [title](types_v1_website.Post.md#title) +- [url](types_v1_website.Post.md#url) + +## Properties + +### banner\_url + +• **banner\_url**: `string` + +#### Defined in + +[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L2) + +___ + +### category + +• **category**: `string` + +#### Defined in + +[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L3) + +___ + +### date + +• **date**: `Date` + +#### Defined in + +[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L4) + +___ + +### external\_link + +• **external\_link**: `string` + +#### Defined in + +[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L5) + +___ + +### title + +• **title**: `string` + +#### Defined in + +[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L6) + +___ + +### url + +• **url**: `string` + +#### Defined in + +[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L7) diff --git a/package/doc/interfaces/types_v1_website.WebsiteResponse.md b/package/doc/interfaces/types_v1_website.WebsiteResponse.md new file mode 100644 index 0000000..39bcf75 --- /dev/null +++ b/package/doc/interfaces/types_v1_website.WebsiteResponse.md @@ -0,0 +1,74 @@ +# Interface: WebsiteResponse + +[types/v1-website](../modules/types_v1_website.md).WebsiteResponse + +## Table of contents + +### Properties + +- [banner\_url](types_v1_website.WebsiteResponse.md#banner_url) +- [category](types_v1_website.WebsiteResponse.md#category) +- [date](types_v1_website.WebsiteResponse.md#date) +- [external\_link](types_v1_website.WebsiteResponse.md#external_link) +- [title](types_v1_website.WebsiteResponse.md#title) +- [url](types_v1_website.WebsiteResponse.md#url) + +## Properties + +### banner\_url + +• **banner\_url**: `string` + +#### Defined in + +[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L11) + +___ + +### category + +• **category**: `string` + +#### Defined in + +[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L12) + +___ + +### date + +• **date**: `Date` + +#### Defined in + +[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L13) + +___ + +### external\_link + +• **external\_link**: `string` + +#### Defined in + +[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L14) + +___ + +### title + +• **title**: `string` + +#### Defined in + +[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L15) + +___ + +### url + +• **url**: `string` + +#### Defined in + +[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L16) diff --git a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md new file mode 100644 index 0000000..17fb2c0 --- /dev/null +++ b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md @@ -0,0 +1,96 @@ +# Interface: LeaderboardResponse + +[types/v2-leaderboard](../modules/types_v2_leaderboard.md).LeaderboardResponse + +## Table of contents + +### Properties + +- [immortal\_1\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_1_threshold) +- [immortal\_2\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_2_threshold) +- [immortal\_3\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_3_threshold) +- [last\_update](types_v2_leaderboard.LeaderboardResponse.md#last_update) +- [next\_update](types_v2_leaderboard.LeaderboardResponse.md#next_update) +- [players](types_v2_leaderboard.LeaderboardResponse.md#players) +- [radiant\_threshold](types_v2_leaderboard.LeaderboardResponse.md#radiant_threshold) +- [total\_players](types_v2_leaderboard.LeaderboardResponse.md#total_players) + +## Properties + +### immortal\_1\_threshold + +• **immortal\_1\_threshold**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L22) + +___ + +### immortal\_2\_threshold + +• **immortal\_2\_threshold**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L21) + +___ + +### immortal\_3\_threshold + +• **immortal\_3\_threshold**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L20) + +___ + +### last\_update + +• **last\_update**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L16) + +___ + +### next\_update + +• **next\_update**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L17) + +___ + +### players + +• **players**: [`Player`](types_v2_leaderboard.Player.md)[] + +#### Defined in + +[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L23) + +___ + +### radiant\_threshold + +• **radiant\_threshold**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L19) + +___ + +### total\_players + +• **total\_players**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L18) diff --git a/package/doc/interfaces/types_v2_leaderboard.Player.md b/package/doc/interfaces/types_v2_leaderboard.Player.md new file mode 100644 index 0000000..4937c73 --- /dev/null +++ b/package/doc/interfaces/types_v2_leaderboard.Player.md @@ -0,0 +1,129 @@ +# Interface: Player + +[types/v2-leaderboard](../modules/types_v2_leaderboard.md).Player + +## Table of contents + +### Properties + +- [IsAnonymized](types_v2_leaderboard.Player.md#isanonymized) +- [IsBanned](types_v2_leaderboard.Player.md#isbanned) +- [PlayerCardID](types_v2_leaderboard.Player.md#playercardid) +- [TitleID](types_v2_leaderboard.Player.md#titleid) +- [competitiveTier](types_v2_leaderboard.Player.md#competitivetier) +- [gameName](types_v2_leaderboard.Player.md#gamename) +- [leaderboardRank](types_v2_leaderboard.Player.md#leaderboardrank) +- [numberOfWins](types_v2_leaderboard.Player.md#numberofwins) +- [puuid](types_v2_leaderboard.Player.md#puuid) +- [rankedRating](types_v2_leaderboard.Player.md#rankedrating) +- [tagLine](types_v2_leaderboard.Player.md#tagline) + +## Properties + +### IsAnonymized + +• **IsAnonymized**: `boolean` + +#### Defined in + +[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L5) + +___ + +### IsBanned + +• **IsBanned**: `boolean` + +#### Defined in + +[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L4) + +___ + +### PlayerCardID + +• **PlayerCardID**: `string` + +#### Defined in + +[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L2) + +___ + +### TitleID + +• **TitleID**: `string` + +#### Defined in + +[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L3) + +___ + +### competitiveTier + +• **competitiveTier**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L12) + +___ + +### gameName + +• **gameName**: `string` + +#### Defined in + +[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L7) + +___ + +### leaderboardRank + +• **leaderboardRank**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L9) + +___ + +### numberOfWins + +• **numberOfWins**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L11) + +___ + +### puuid + +• **puuid**: `string` + +#### Defined in + +[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L6) + +___ + +### rankedRating + +• **rankedRating**: `number` + +#### Defined in + +[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L10) + +___ + +### tagLine + +• **tagLine**: `string` + +#### Defined in + +[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L8) diff --git a/package/doc/interfaces/types_v2_mmr.MMRResponse.md b/package/doc/interfaces/types_v2_mmr.MMRResponse.md new file mode 100644 index 0000000..a41dd46 --- /dev/null +++ b/package/doc/interfaces/types_v2_mmr.MMRResponse.md @@ -0,0 +1,115 @@ +# Interface: MMRResponse + +[types/v2-mmr](../modules/types_v2_mmr.md).MMRResponse + +## Table of contents + +### Properties + +- [by\_season](types_v2_mmr.MMRResponse.md#by_season) +- [current\_data](types_v2_mmr.MMRResponse.md#current_data) +- [name](types_v2_mmr.MMRResponse.md#name) +- [puuid](types_v2_mmr.MMRResponse.md#puuid) +- [tag](types_v2_mmr.MMRResponse.md#tag) + +## Properties + +### by\_season + +• **by\_season**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `e10a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e10a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e10a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e1a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e1a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e1a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e2a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e2a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e2a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e3a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e3a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e3a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e4a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e4a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e4a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e5a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e5a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e5a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e6a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e6a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e6a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e7a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e7a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e7a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e8a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e8a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e8a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e9a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e9a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | +| `e9a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | + +#### Defined in + +[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L35) + +___ + +### current\_data + +• **current\_data**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `currenttier` | `number` | +| `currenttierpatched` | [`Rank`](../modules/types_general.md#rank) | +| `elo` | `number` | +| `games_needed_for_rating` | `number` | +| `images` | { `large`: `string` ; `small`: `string` ; `triangle_down`: `string` ; `triangle_up`: `string` } | +| `images.large` | `string` | +| `images.small` | `string` | +| `images.triangle_down` | `string` | +| `images.triangle_up` | `string` | +| `mmr_change_to_last_game` | `number` | +| `old` | `boolean` | +| `ranking_in_tier` | `number` | + +#### Defined in + +[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L19) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L16) + +___ + +### puuid + +• **puuid**: `string` + +#### Defined in + +[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L18) + +___ + +### tag + +• **tag**: `string` + +#### Defined in + +[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L17) diff --git a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md new file mode 100644 index 0000000..783108c --- /dev/null +++ b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md @@ -0,0 +1,74 @@ +# Interface: SeasonMMR + +[types/v2-mmr](../modules/types_v2_mmr.md).SeasonMMR + +## Table of contents + +### Properties + +- [act\_rank\_wins](types_v2_mmr.SeasonMMR.md#act_rank_wins) +- [error](types_v2_mmr.SeasonMMR.md#error) +- [final\_rank](types_v2_mmr.SeasonMMR.md#final_rank) +- [final\_rank\_patched](types_v2_mmr.SeasonMMR.md#final_rank_patched) +- [number\_of\_games](types_v2_mmr.SeasonMMR.md#number_of_games) +- [wins](types_v2_mmr.SeasonMMR.md#wins) + +## Properties + +### act\_rank\_wins + +• **act\_rank\_wins**: { `patched_tier`: [`Rank`](../modules/types_general.md#rank) ; `tier`: `number` }[] + +#### Defined in + +[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L9) + +___ + +### error + +• `Optional` **error**: ``"No data available"`` + +#### Defined in + +[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L4) + +___ + +### final\_rank + +• **final\_rank**: `number` + +#### Defined in + +[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L7) + +___ + +### final\_rank\_patched + +• **final\_rank\_patched**: [`Rank`](../modules/types_general.md#rank) + +#### Defined in + +[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L8) + +___ + +### number\_of\_games + +• **number\_of\_games**: `number` + +#### Defined in + +[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L6) + +___ + +### wins + +• **wins**: `number` + +#### Defined in + +[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L5) diff --git a/package/doc/interfaces/types_v2_mmr_history.Images.md b/package/doc/interfaces/types_v2_mmr_history.Images.md new file mode 100644 index 0000000..7cbb7b2 --- /dev/null +++ b/package/doc/interfaces/types_v2_mmr_history.Images.md @@ -0,0 +1,52 @@ +# Interface: Images + +[types/v2-mmr-history](../modules/types_v2_mmr_history.md).Images + +## Table of contents + +### Properties + +- [large](types_v2_mmr_history.Images.md#large) +- [small](types_v2_mmr_history.Images.md#small) +- [triangle\_down](types_v2_mmr_history.Images.md#triangle_down) +- [triangle\_up](types_v2_mmr_history.Images.md#triangle_up) + +## Properties + +### large + +• **large**: `string` + +#### Defined in + +[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L5) + +___ + +### small + +• **small**: `string` + +#### Defined in + +[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L4) + +___ + +### triangle\_down + +• **triangle\_down**: `string` + +#### Defined in + +[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L6) + +___ + +### triangle\_up + +• **triangle\_up**: `string` + +#### Defined in + +[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L7) diff --git a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md new file mode 100644 index 0000000..b21919e --- /dev/null +++ b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md @@ -0,0 +1,96 @@ +# Interface: MMRHistoryGame + +[types/v2-mmr-history](../modules/types_v2_mmr_history.md).MMRHistoryGame + +## Table of contents + +### Properties + +- [currenttier](types_v2_mmr_history.MMRHistoryGame.md#currenttier) +- [currenttierpatched](types_v2_mmr_history.MMRHistoryGame.md#currenttierpatched) +- [date](types_v2_mmr_history.MMRHistoryGame.md#date) +- [date\_raw](types_v2_mmr_history.MMRHistoryGame.md#date_raw) +- [elo](types_v2_mmr_history.MMRHistoryGame.md#elo) +- [images](types_v2_mmr_history.MMRHistoryGame.md#images) +- [mmr\_change\_to\_last\_game](types_v2_mmr_history.MMRHistoryGame.md#mmr_change_to_last_game) +- [ranking\_in\_tier](types_v2_mmr_history.MMRHistoryGame.md#ranking_in_tier) + +## Properties + +### currenttier + +• **currenttier**: `number` + +#### Defined in + +[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L11) + +___ + +### currenttierpatched + +• **currenttierpatched**: [`Rank`](../modules/types_general.md#rank) + +#### Defined in + +[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L12) + +___ + +### date + +• **date**: `string` + +#### Defined in + +[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L17) + +___ + +### date\_raw + +• **date\_raw**: `number` + +#### Defined in + +[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L18) + +___ + +### elo + +• **elo**: `number` + +#### Defined in + +[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L16) + +___ + +### images + +• **images**: [`Images`](types_v2_mmr_history.Images.md) + +#### Defined in + +[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L13) + +___ + +### mmr\_change\_to\_last\_game + +• **mmr\_change\_to\_last\_game**: `number` + +#### Defined in + +[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L15) + +___ + +### ranking\_in\_tier + +• **ranking\_in\_tier**: `number` + +#### Defined in + +[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L14) diff --git a/package/doc/interfaces/types_v3_matches.KillEvent.md b/package/doc/interfaces/types_v3_matches.KillEvent.md new file mode 100644 index 0000000..6472030 --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.KillEvent.md @@ -0,0 +1,186 @@ +# Interface: KillEvent + +[types/v3-matches](../modules/types_v3_matches.md).KillEvent + +## Hierarchy + +- **`KillEvent`** + + ↳ [`KillEventMatch`](types_v3_matches.KillEventMatch.md) + +## Table of contents + +### Properties + +- [assistants](types_v3_matches.KillEvent.md#assistants) +- [damage\_weapon\_assets](types_v3_matches.KillEvent.md#damage_weapon_assets) +- [damage\_weapon\_id](types_v3_matches.KillEvent.md#damage_weapon_id) +- [damage\_weapon\_name](types_v3_matches.KillEvent.md#damage_weapon_name) +- [kill\_time\_in\_match](types_v3_matches.KillEvent.md#kill_time_in_match) +- [kill\_time\_in\_round](types_v3_matches.KillEvent.md#kill_time_in_round) +- [killer\_display\_name](types_v3_matches.KillEvent.md#killer_display_name) +- [killer\_puuid](types_v3_matches.KillEvent.md#killer_puuid) +- [killer\_team](types_v3_matches.KillEvent.md#killer_team) +- [player\_locations\_on\_kill](types_v3_matches.KillEvent.md#player_locations_on_kill) +- [secondary\_fire\_mode](types_v3_matches.KillEvent.md#secondary_fire_mode) +- [victim\_death\_location](types_v3_matches.KillEvent.md#victim_death_location) +- [victim\_display\_name](types_v3_matches.KillEvent.md#victim_display_name) +- [victim\_puuid](types_v3_matches.KillEvent.md#victim_puuid) +- [victim\_team](types_v3_matches.KillEvent.md#victim_team) + +## Properties + +### assistants + +• **assistants**: { `assistant_display_name`: `string` ; `assistant_puuid`: `string` ; `assistant_team`: ``"Red"`` \| ``"Blue"`` }[] + +#### Defined in + +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L106) + +___ + +### damage\_weapon\_assets + +• **damage\_weapon\_assets**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `display_icon` | `string` | +| `killfeed_icon` | `string` | + +#### Defined in + +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L100) + +___ + +### damage\_weapon\_id + +• **damage\_weapon\_id**: `string` + +#### Defined in + +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L98) + +___ + +### damage\_weapon\_name + +• **damage\_weapon\_name**: [`Weapon`](../modules/types_general.md#weapon) + +#### Defined in + +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L99) + +___ + +### kill\_time\_in\_match + +• **kill\_time\_in\_match**: `number` + +#### Defined in + +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L90) + +___ + +### kill\_time\_in\_round + +• **kill\_time\_in\_round**: `number` + +#### Defined in + +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L89) + +___ + +### killer\_display\_name + +• **killer\_display\_name**: `string` + +#### Defined in + +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L92) + +___ + +### killer\_puuid + +• **killer\_puuid**: `string` + +#### Defined in + +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L91) + +___ + +### killer\_team + +• **killer\_team**: ``"Red"`` \| ``"Blue"`` + +#### Defined in + +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L93) + +___ + +### player\_locations\_on\_kill + +• **player\_locations\_on\_kill**: [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] + +#### Defined in + +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L105) + +___ + +### secondary\_fire\_mode + +• **secondary\_fire\_mode**: `boolean` + +#### Defined in + +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L104) + +___ + +### victim\_death\_location + +• **victim\_death\_location**: `PlayerLocation` + +#### Defined in + +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L97) + +___ + +### victim\_display\_name + +• **victim\_display\_name**: `string` + +#### Defined in + +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L95) + +___ + +### victim\_puuid + +• **victim\_puuid**: `string` + +#### Defined in + +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L94) + +___ + +### victim\_team + +• **victim\_team**: ``"Red"`` \| ``"Blue"`` + +#### Defined in + +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.KillEventMatch.md b/package/doc/interfaces/types_v3_matches.KillEventMatch.md new file mode 100644 index 0000000..9b1e75d --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.KillEventMatch.md @@ -0,0 +1,257 @@ +# Interface: KillEventMatch + +[types/v3-matches](../modules/types_v3_matches.md).KillEventMatch + +## Hierarchy + +- [`KillEvent`](types_v3_matches.KillEvent.md) + + ↳ **`KillEventMatch`** + +## Table of contents + +### Properties + +- [assistants](types_v3_matches.KillEventMatch.md#assistants) +- [damage\_weapon\_assets](types_v3_matches.KillEventMatch.md#damage_weapon_assets) +- [damage\_weapon\_id](types_v3_matches.KillEventMatch.md#damage_weapon_id) +- [damage\_weapon\_name](types_v3_matches.KillEventMatch.md#damage_weapon_name) +- [kill\_time\_in\_match](types_v3_matches.KillEventMatch.md#kill_time_in_match) +- [kill\_time\_in\_round](types_v3_matches.KillEventMatch.md#kill_time_in_round) +- [killer\_display\_name](types_v3_matches.KillEventMatch.md#killer_display_name) +- [killer\_puuid](types_v3_matches.KillEventMatch.md#killer_puuid) +- [killer\_team](types_v3_matches.KillEventMatch.md#killer_team) +- [player\_locations\_on\_kill](types_v3_matches.KillEventMatch.md#player_locations_on_kill) +- [round](types_v3_matches.KillEventMatch.md#round) +- [secondary\_fire\_mode](types_v3_matches.KillEventMatch.md#secondary_fire_mode) +- [victim\_death\_location](types_v3_matches.KillEventMatch.md#victim_death_location) +- [victim\_display\_name](types_v3_matches.KillEventMatch.md#victim_display_name) +- [victim\_puuid](types_v3_matches.KillEventMatch.md#victim_puuid) +- [victim\_team](types_v3_matches.KillEventMatch.md#victim_team) + +## Properties + +### assistants + +• **assistants**: { `assistant_display_name`: `string` ; `assistant_puuid`: `string` ; `assistant_team`: ``"Red"`` \| ``"Blue"`` }[] + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[assistants](types_v3_matches.KillEvent.md#assistants) + +#### Defined in + +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L106) + +___ + +### damage\_weapon\_assets + +• **damage\_weapon\_assets**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `display_icon` | `string` | +| `killfeed_icon` | `string` | + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_assets](types_v3_matches.KillEvent.md#damage_weapon_assets) + +#### Defined in + +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L100) + +___ + +### damage\_weapon\_id + +• **damage\_weapon\_id**: `string` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_id](types_v3_matches.KillEvent.md#damage_weapon_id) + +#### Defined in + +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L98) + +___ + +### damage\_weapon\_name + +• **damage\_weapon\_name**: [`Weapon`](../modules/types_general.md#weapon) + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_name](types_v3_matches.KillEvent.md#damage_weapon_name) + +#### Defined in + +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L99) + +___ + +### kill\_time\_in\_match + +• **kill\_time\_in\_match**: `number` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[kill_time_in_match](types_v3_matches.KillEvent.md#kill_time_in_match) + +#### Defined in + +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L90) + +___ + +### kill\_time\_in\_round + +• **kill\_time\_in\_round**: `number` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[kill_time_in_round](types_v3_matches.KillEvent.md#kill_time_in_round) + +#### Defined in + +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L89) + +___ + +### killer\_display\_name + +• **killer\_display\_name**: `string` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[killer_display_name](types_v3_matches.KillEvent.md#killer_display_name) + +#### Defined in + +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L92) + +___ + +### killer\_puuid + +• **killer\_puuid**: `string` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[killer_puuid](types_v3_matches.KillEvent.md#killer_puuid) + +#### Defined in + +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L91) + +___ + +### killer\_team + +• **killer\_team**: ``"Red"`` \| ``"Blue"`` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[killer_team](types_v3_matches.KillEvent.md#killer_team) + +#### Defined in + +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L93) + +___ + +### player\_locations\_on\_kill + +• **player\_locations\_on\_kill**: [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[player_locations_on_kill](types_v3_matches.KillEvent.md#player_locations_on_kill) + +#### Defined in + +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L105) + +___ + +### round + +• **round**: `number` + +#### Defined in + +[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L192) + +___ + +### secondary\_fire\_mode + +• **secondary\_fire\_mode**: `boolean` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[secondary_fire_mode](types_v3_matches.KillEvent.md#secondary_fire_mode) + +#### Defined in + +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L104) + +___ + +### victim\_death\_location + +• **victim\_death\_location**: `PlayerLocation` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[victim_death_location](types_v3_matches.KillEvent.md#victim_death_location) + +#### Defined in + +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L97) + +___ + +### victim\_display\_name + +• **victim\_display\_name**: `string` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[victim_display_name](types_v3_matches.KillEvent.md#victim_display_name) + +#### Defined in + +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L95) + +___ + +### victim\_puuid + +• **victim\_puuid**: `string` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[victim_puuid](types_v3_matches.KillEvent.md#victim_puuid) + +#### Defined in + +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L94) + +___ + +### victim\_team + +• **victim\_team**: ``"Red"`` \| ``"Blue"`` + +#### Inherited from + +[KillEvent](types_v3_matches.KillEvent.md).[victim_team](types_v3_matches.KillEvent.md#victim_team) + +#### Defined in + +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.Match.md b/package/doc/interfaces/types_v3_matches.Match.md new file mode 100644 index 0000000..8ae518b --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.Match.md @@ -0,0 +1,102 @@ +# Interface: Match + +[types/v3-matches](../modules/types_v3_matches.md).Match + +## Table of contents + +### Properties + +- [kills](types_v3_matches.Match.md#kills) +- [metadata](types_v3_matches.Match.md#metadata) +- [players](types_v3_matches.Match.md#players) +- [rounds](types_v3_matches.Match.md#rounds) +- [teams](types_v3_matches.Match.md#teams) + +## Properties + +### kills + +• **kills**: [`KillEventMatch`](types_v3_matches.KillEventMatch.md)[] + +#### Defined in + +[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L229) + +___ + +### metadata + +• **metadata**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `cluster` | `string` | +| `game_length` | `number` | +| `game_start` | `number` | +| `game_start_patched` | `string` | +| `game_version` | `string` | +| `map` | [`ValorantMap`](../modules/types_general.md#valorantmap) | +| `matchid` | `string` | +| `mode` | [`Mode`](../modules/types_general.md#mode) | +| `platform` | ``"PC"`` | +| `queue` | `string` | +| `region` | [`Region`](../modules/types_general.md#region) | +| `rounds_played` | `number` | +| `season_id` | ``"string"`` | + +#### Defined in + +[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L196) + +___ + +### players + +• **players**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `all_players` | [`Player`](types_v3_matches.Player.md)[] | +| `blue` | [`Player`](types_v3_matches.Player.md)[] | +| `red` | [`Player`](types_v3_matches.Player.md)[] | + +#### Defined in + +[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L211) + +___ + +### rounds + +• **rounds**: [`Round`](types_v3_matches.Round.md)[] + +#### Defined in + +[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L228) + +___ + +### teams + +• **teams**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `blue` | { `has_won`: ``false`` ; `rounds_lost`: `number` ; `rounds_won`: `number` } | +| `blue.has_won` | ``false`` | +| `blue.rounds_lost` | `number` | +| `blue.rounds_won` | `number` | +| `red` | { `has_won`: ``false`` ; `rounds_lost`: `number` ; `rounds_won`: `number` } | +| `red.has_won` | ``false`` | +| `red.rounds_lost` | `number` | +| `red.rounds_won` | `number` | + +#### Defined in + +[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L216) diff --git a/package/doc/interfaces/types_v3_matches.Player.md b/package/doc/interfaces/types_v3_matches.Player.md new file mode 100644 index 0000000..dbe3cb6 --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.Player.md @@ -0,0 +1,301 @@ +# Interface: Player + +[types/v3-matches](../modules/types_v3_matches.md).Player + +## Table of contents + +### Properties + +- [ability\_casts](types_v3_matches.Player.md#ability_casts) +- [assets](types_v3_matches.Player.md#assets) +- [behavior](types_v3_matches.Player.md#behavior) +- [character](types_v3_matches.Player.md#character) +- [currenttier](types_v3_matches.Player.md#currenttier) +- [currenttier\_patched](types_v3_matches.Player.md#currenttier_patched) +- [damage\_made](types_v3_matches.Player.md#damage_made) +- [damage\_received](types_v3_matches.Player.md#damage_received) +- [economy](types_v3_matches.Player.md#economy) +- [level](types_v3_matches.Player.md#level) +- [name](types_v3_matches.Player.md#name) +- [party\_id](types_v3_matches.Player.md#party_id) +- [platform](types_v3_matches.Player.md#platform) +- [player\_card](types_v3_matches.Player.md#player_card) +- [player\_title](types_v3_matches.Player.md#player_title) +- [puuid](types_v3_matches.Player.md#puuid) +- [session\_playtime](types_v3_matches.Player.md#session_playtime) +- [stats](types_v3_matches.Player.md#stats) +- [tag](types_v3_matches.Player.md#tag) +- [team](types_v3_matches.Player.md#team) + +## Properties + +### ability\_casts + +• **ability\_casts**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `c_cast` | `number` | +| `e_cast` | `number` | +| `q_cast` | `number` | +| `x_cast` | `number` | + +#### Defined in + +[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L35) + +___ + +### assets + +• **assets**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `agent` | { `bust`: `string` ; `full`: `string` ; `killfeed`: `string` ; `small`: `string` } | +| `agent.bust` | `string` | +| `agent.full` | `string` | +| `agent.killfeed` | `string` | +| `agent.small` | `string` | +| `card` | { `large`: `string` ; `small`: `string` ; `wide`: `string` } | +| `card.large` | `string` | +| `card.small` | `string` | +| `card.wide` | `string` | + +#### Defined in + +[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L41) + +___ + +### behavior + +• **behavior**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `afk_rounds` | `number` | +| `friendly_fire` | { `incoming`: `number` ; `outgoing`: `number` } | +| `friendly_fire.incoming` | `number` | +| `friendly_fire.outgoing` | `number` | +| `rounds_in_spawn` | `number` | + +#### Defined in + +[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L20) + +___ + +### character + +• **character**: [`Characters`](../modules/types_general.md#characters) + +#### Defined in + +[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L9) + +___ + +### currenttier + +• **currenttier**: `number` + +#### Defined in + +[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L10) + +___ + +### currenttier\_patched + +• **currenttier\_patched**: [`Rank`](../modules/types_general.md#rank) + +#### Defined in + +[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L11) + +___ + +### damage\_made + +• **damage\_made**: `number` + +#### Defined in + +[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L74) + +___ + +### damage\_received + +• **damage\_received**: `number` + +#### Defined in + +[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L75) + +___ + +### economy + +• **economy**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `loadout_value` | { `average`: `number` ; `overall`: `number` } | +| `loadout_value.average` | `number` | +| `loadout_value.overall` | `number` | +| `spent` | { `average`: `number` ; `overall`: `number` } | +| `spent.average` | `number` | +| `spent.overall` | `number` | + +#### Defined in + +[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L64) + +___ + +### level + +• **level**: `number` + +#### Defined in + +[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L8) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L5) + +___ + +### party\_id + +• **party\_id**: `string` + +#### Defined in + +[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L14) + +___ + +### platform + +• **platform**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `os` | { `name`: `string` ; `version`: `string` } | +| `os.name` | `string` | +| `os.version` | `string` | +| `type` | `string` | + +#### Defined in + +[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L28) + +___ + +### player\_card + +• **player\_card**: `string` + +#### Defined in + +[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L12) + +___ + +### player\_title + +• **player\_title**: `string` + +#### Defined in + +[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L13) + +___ + +### puuid + +• **puuid**: `string` + +#### Defined in + +[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L4) + +___ + +### session\_playtime + +• **session\_playtime**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `milliseconds` | `number` | +| `minutes` | `number` | +| `seconds` | `number` | + +#### Defined in + +[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L15) + +___ + +### stats + +• **stats**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `assists` | `number` | +| `bodyshots` | `number` | +| `deaths` | `number` | +| `headshots` | `number` | +| `kills` | `number` | +| `legshots` | `number` | +| `score` | `number` | + +#### Defined in + +[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L55) + +___ + +### tag + +• **tag**: `string` + +#### Defined in + +[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L6) + +___ + +### team + +• **team**: ``"Red"`` \| ``"Blue"`` + +#### Defined in + +[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L7) diff --git a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md new file mode 100644 index 0000000..cf75aa7 --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md @@ -0,0 +1,63 @@ +# Interface: PlayerLocationOnEvent + +[types/v3-matches](../modules/types_v3_matches.md).PlayerLocationOnEvent + +## Table of contents + +### Properties + +- [location](types_v3_matches.PlayerLocationOnEvent.md#location) +- [player\_display\_name](types_v3_matches.PlayerLocationOnEvent.md#player_display_name) +- [player\_puuid](types_v3_matches.PlayerLocationOnEvent.md#player_puuid) +- [player\_team](types_v3_matches.PlayerLocationOnEvent.md#player_team) +- [view\_radians](types_v3_matches.PlayerLocationOnEvent.md#view_radians) + +## Properties + +### location + +• **location**: `PlayerLocation` + +#### Defined in + +[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L84) + +___ + +### player\_display\_name + +• **player\_display\_name**: `string` + +#### Defined in + +[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L82) + +___ + +### player\_puuid + +• **player\_puuid**: `string` + +#### Defined in + +[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L81) + +___ + +### player\_team + +• **player\_team**: ``"Red"`` \| ``"Blue"`` + +#### Defined in + +[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L83) + +___ + +### view\_radians + +• **view\_radians**: `number` + +#### Defined in + +[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L85) diff --git a/package/doc/interfaces/types_v3_matches.Round.md b/package/doc/interfaces/types_v3_matches.Round.md new file mode 100644 index 0000000..7121c59 --- /dev/null +++ b/package/doc/interfaces/types_v3_matches.Round.md @@ -0,0 +1,149 @@ +# Interface: Round + +[types/v3-matches](../modules/types_v3_matches.md).Round + +## Table of contents + +### Properties + +- [bomb\_defused](types_v3_matches.Round.md#bomb_defused) +- [bomb\_planted](types_v3_matches.Round.md#bomb_planted) +- [defuse\_events](types_v3_matches.Round.md#defuse_events) +- [end\_type](types_v3_matches.Round.md#end_type) +- [plant\_events](types_v3_matches.Round.md#plant_events) +- [player\_stats](types_v3_matches.Round.md#player_stats) +- [winning\_team](types_v3_matches.Round.md#winning_team) + +## Properties + +### bomb\_defused + +• **bomb\_defused**: `boolean` + +#### Defined in + +[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L117) + +___ + +### bomb\_planted + +• **bomb\_planted**: `boolean` + +#### Defined in + +[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L116) + +___ + +### defuse\_events + +• **defuse\_events**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `defuse_location?` | `PlayerLocation` | +| `defuse_time_in_round?` | `number` | +| `defused_by?` | { `display_name`: `string` ; `puuid`: `string` ; `team`: ``"Red"`` \| ``"Blue"`` } | +| `defused_by.display_name` | `string` | +| `defused_by.puuid` | `string` | +| `defused_by.team` | ``"Red"`` \| ``"Blue"`` | +| `player_locations_on_defuse?` | [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] | + +#### Defined in + +[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L129) + +___ + +### end\_type + +• **end\_type**: ``"Eliminated"`` \| ``"Bomb defused"`` \| ``"Bomb detonated"`` + +#### Defined in + +[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L115) + +___ + +### plant\_events + +• **plant\_events**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `plant_location?` | `PlayerLocation` | +| `plant_site?` | ``"A"`` \| ``"B"`` \| ``"C"`` | +| `plant_time_in_round?` | `number` | +| `planted_by?` | { `display_name`: `string` ; `puuid`: `string` ; `team`: ``"Red"`` \| ``"Blue"`` } | +| `planted_by.display_name` | `string` | +| `planted_by.puuid` | `string` | +| `planted_by.team` | ``"Red"`` \| ``"Blue"`` | +| `player_locations_on_plant?` | [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] | + +#### Defined in + +[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L118) + +___ + +### player\_stats + +• **player\_stats**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `ability_casts` | { `c_cast?`: `number` ; `e_cast?`: `number` ; `q_cast?`: `number` ; `x_cast?`: `number` } | +| `ability_casts.c_cast?` | `number` | +| `ability_casts.e_cast?` | `number` | +| `ability_casts.q_cast?` | `number` | +| `ability_casts.x_cast?` | `number` | +| `bodyshots` | `number` | +| `damage` | `number` | +| `damage_events` | { `bodyshots`: `number` ; `damage`: `number` ; `headshots`: `number` ; `legshots`: `number` ; `receiver_display_name`: `string` ; `receiver_puuid`: `string` ; `receiver_team`: ``"Red"`` \| ``"Blue"`` }[] | +| `economy` | { `armor`: { `assets`: { `display_icon`: `string` } ; `id`: `string` ; `name`: ``"Heavy Shields"`` \| ``"Light Shields"`` } ; `loadout_value`: `number` ; `remaining`: `number` ; `spent`: `number` ; `weapon`: { `assets`: { `display_icon`: `string` ; `killfeed_icon`: `string` } ; `id`: `string` ; `name`: [`Weapon`](../modules/types_general.md#weapon) } } | +| `economy.armor` | { `assets`: { `display_icon`: `string` } ; `id`: `string` ; `name`: ``"Heavy Shields"`` \| ``"Light Shields"`` } | +| `economy.armor.assets` | { `display_icon`: `string` } | +| `economy.armor.assets.display_icon` | `string` | +| `economy.armor.id` | `string` | +| `economy.armor.name` | ``"Heavy Shields"`` \| ``"Light Shields"`` | +| `economy.loadout_value` | `number` | +| `economy.remaining` | `number` | +| `economy.spent` | `number` | +| `economy.weapon` | { `assets`: { `display_icon`: `string` ; `killfeed_icon`: `string` } ; `id`: `string` ; `name`: [`Weapon`](../modules/types_general.md#weapon) } | +| `economy.weapon.assets` | { `display_icon`: `string` ; `killfeed_icon`: `string` } | +| `economy.weapon.assets.display_icon` | `string` | +| `economy.weapon.assets.killfeed_icon` | `string` | +| `economy.weapon.id` | `string` | +| `economy.weapon.name` | [`Weapon`](../modules/types_general.md#weapon) | +| `headshots` | `number` | +| `kill_events` | [`KillEvent`](types_v3_matches.KillEvent.md)[] | +| `kills` | `number` | +| `legshots` | `number` | +| `player_display_name` | `string` | +| `player_puuid` | `string` | +| `player_team` | ``"Red"`` \| ``"Blue"`` | +| `score` | `number` | +| `stayed_in_spawn` | `boolean` | +| `was_afk` | `boolean` | +| `was_penalized` | `boolean` | + +#### Defined in + +[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L139) + +___ + +### winning\_team + +• **winning\_team**: ``"Red"`` \| ``"Blue"`` + +#### Defined in + +[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L114) diff --git a/package/doc/modules.md b/package/doc/modules.md new file mode 100644 index 0000000..812e3cd --- /dev/null +++ b/package/doc/modules.md @@ -0,0 +1,25 @@ +# unofficial-valorant-api + +## Table of contents + +### Modules + +- [index](modules/index.md) +- [types/general](modules/types_general.md) +- [types/raw/competitive-updates](modules/types_raw_competitive_updates.md) +- [types/raw/match-details](modules/types_raw_match_details.md) +- [types/raw/match-history](modules/types_raw_match_history.md) +- [types/raw/mmr](modules/types_raw_mmr.md) +- [types/v1-content](modules/types_v1_content.md) +- [types/v1-crosshair](modules/types_v1_crosshair.md) +- [types/v1-featured-items](modules/types_v1_featured_items.md) +- [types/v1-profile](modules/types_v1_profile.md) +- [types/v1-status](modules/types_v1_status.md) +- [types/v1-store-offers](modules/types_v1_store_offers.md) +- [types/v1-version](modules/types_v1_version.md) +- [types/v1-website](modules/types_v1_website.md) +- [types/v2-leaderboard](modules/types_v2_leaderboard.md) +- [types/v2-match](modules/types_v2_match.md) +- [types/v2-mmr](modules/types_v2_mmr.md) +- [types/v2-mmr-history](modules/types_v2_mmr_history.md) +- [types/v3-matches](modules/types_v3_matches.md) diff --git a/package/doc/modules/index.md b/package/doc/modules/index.md new file mode 100644 index 0000000..de9dae6 --- /dev/null +++ b/package/doc/modules/index.md @@ -0,0 +1,7 @@ +# Module: index + +## Table of contents + +### Classes + +- [default](../classes/index.default.md) diff --git a/package/doc/modules/types_general.md b/package/doc/modules/types_general.md new file mode 100644 index 0000000..c9f3d55 --- /dev/null +++ b/package/doc/modules/types_general.md @@ -0,0 +1,94 @@ +# Module: types/general + +## Table of contents + +### Type Aliases + +- [Characters](types_general.md#characters) +- [Locale](types_general.md#locale) +- [Mode](types_general.md#mode) +- [Rank](types_general.md#rank) +- [Region](types_general.md#region) +- [Season](types_general.md#season) +- [ValorantMap](types_general.md#valorantmap) +- [Weapon](types_general.md#weapon) + +## Type Aliases + +### Characters + +Ƭ **Characters**: ``"Astra"`` \| ``"Breach"`` \| ``"Brimstone"`` \| ``"Chamber"`` \| ``"Cypher"`` \| ``"Fade"`` \| ``"Jett"`` \| ``"KAY/O"`` \| ``"Killjoy"`` \| ``"Neon"`` \| ``"Omen"`` \| ``"Phoenix"`` \| ``"Raze"`` \| ``"Reyna"`` \| ``"Sage"`` \| ``"Skye"`` \| ``"Sova"`` \| ``"Viper"`` \| ``"Yoru"`` + +#### Defined in + +[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L12) + +___ + +### Locale + +Ƭ **Locale**: ``"ar-AE"`` \| ``"de-DE"`` \| ``"en-GB"`` \| ``"en-US"`` \| ``"es-ES"`` \| ``"es-MX"`` \| ``"fr-FR"`` \| ``"id-ID"`` \| ``"it-IT"`` \| ``"ja-JP"`` \| ``"ko-KR"`` \| ``"pl-PL"`` \| ``"pt-BR"`` \| ``"ru-RU"`` \| ``"th-TH"`` \| ``"tr-TR"`` \| ``"vi-VN"`` \| ``"zn-CN"`` \| ``"zn-TW"`` + +#### Defined in + +[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L16) + +___ + +### Mode + +Ƭ **Mode**: ``"Escalation"`` \| ``"Spikerush"`` \| ``"Deathmatch"`` \| ``"Competitive"`` \| ``"Unrated"`` \| ``"Replication"`` \| ``"Custom"`` \| ``"Newmap"`` \| ``"Snowball"`` + +#### Defined in + +[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L9) + +___ + +### Rank + +Ƭ **Rank**: \`${BaseRank} ${SubRank}\` \| ``"Radiant"`` \| ``"Unrated"`` + +#### Defined in + +[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L3) + +___ + +### Region + +Ƭ **Region**: ``"eu"`` \| ``"na"`` \| ``"kr"`` \| ``"ap"`` \| ``"latam"`` \| ``"br"`` + +#### Defined in + +[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L11) + +___ + +### Season + +Ƭ **Season**: \`e${Episodes}a${Acts}\` + +#### Defined in + +[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L7) + +___ + +### ValorantMap + +Ƭ **ValorantMap**: ``"Ascent"`` \| ``"Split"`` \| ``"Fracture"`` \| ``"Bind"`` \| ``"Breeze"`` \| ``"Icebox"`` \| ``"Haven"`` \| ``"Pearl"`` + +#### Defined in + +[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L10) + +___ + +### Weapon + +Ƭ **Weapon**: ``"Classic"`` \| ``"Shorty"`` \| ``"Frenzy"`` \| ``"Ghost"`` \| ``"Sheriff"`` \| ``"Golden Gun"`` \| ``"Stinger"`` \| ``"Spectre"`` \| ``"Bucky"`` \| ``"Judge"`` \| ``"Bulldog"`` \| ``"Guardian"`` \| ``"Phantom"`` \| ``"Vandal"`` \| ``"Marshal"`` \| ``"Operator"`` \| ``"Ares"`` \| ``"Odin"`` \| ``"Melee"`` + +#### Defined in + +[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L14) diff --git a/package/doc/modules/types_raw_competitive_updates.md b/package/doc/modules/types_raw_competitive_updates.md new file mode 100644 index 0000000..5946374 --- /dev/null +++ b/package/doc/modules/types_raw_competitive_updates.md @@ -0,0 +1,7 @@ +# Module: types/raw/competitive-updates + +## Table of contents + +### Interfaces + +- [RawCompetitiveUpdatesResponse](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md) diff --git a/package/doc/modules/types_raw_match_details.md b/package/doc/modules/types_raw_match_details.md new file mode 100644 index 0000000..7ef4ebb --- /dev/null +++ b/package/doc/modules/types_raw_match_details.md @@ -0,0 +1,7 @@ +# Module: types/raw/match-details + +## Table of contents + +### Interfaces + +- [RawMatchDetailsResponse](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md) diff --git a/package/doc/modules/types_raw_match_history.md b/package/doc/modules/types_raw_match_history.md new file mode 100644 index 0000000..b8b1520 --- /dev/null +++ b/package/doc/modules/types_raw_match_history.md @@ -0,0 +1,7 @@ +# Module: types/raw/match-history + +## Table of contents + +### Interfaces + +- [RawMatchHistoryResponse](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md) diff --git a/package/doc/modules/types_raw_mmr.md b/package/doc/modules/types_raw_mmr.md new file mode 100644 index 0000000..369190c --- /dev/null +++ b/package/doc/modules/types_raw_mmr.md @@ -0,0 +1,7 @@ +# Module: types/raw/mmr + +## Table of contents + +### Interfaces + +- [RawMMRResponse](../interfaces/types_raw_mmr.RawMMRResponse.md) diff --git a/package/doc/modules/types_v1_content.md b/package/doc/modules/types_v1_content.md new file mode 100644 index 0000000..6797aea --- /dev/null +++ b/package/doc/modules/types_v1_content.md @@ -0,0 +1,24 @@ +# Module: types/v1-content + +## Table of contents + +### Interfaces + +- [Act](../interfaces/types_v1_content.Act.md) +- [Asset](../interfaces/types_v1_content.Asset.md) +- [AssetWithPath](../interfaces/types_v1_content.AssetWithPath.md) +- [ContentResponse](../interfaces/types_v1_content.ContentResponse.md) + +### Type Aliases + +- [LocalizedNames](types_v1_content.md#localizednames) + +## Type Aliases + +### LocalizedNames + +Ƭ **LocalizedNames**: { [language in Locale]: string } + +#### Defined in + +[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L3) diff --git a/package/doc/modules/types_v1_crosshair.md b/package/doc/modules/types_v1_crosshair.md new file mode 100644 index 0000000..c4a9994 --- /dev/null +++ b/package/doc/modules/types_v1_crosshair.md @@ -0,0 +1,17 @@ +# Module: types/v1-crosshair + +## Table of contents + +### Type Aliases + +- [CrosshairResponse](types_v1_crosshair.md#crosshairresponse) + +## Type Aliases + +### CrosshairResponse + +Ƭ **CrosshairResponse**: `Buffer` + +#### Defined in + +[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-crosshair.ts#L1) diff --git a/package/doc/modules/types_v1_featured_items.md b/package/doc/modules/types_v1_featured_items.md new file mode 100644 index 0000000..7a1ad2f --- /dev/null +++ b/package/doc/modules/types_v1_featured_items.md @@ -0,0 +1,11 @@ +# Module: types/v1-featured-items + +## Table of contents + +### Interfaces + +- [BaseItem](../interfaces/types_v1_featured_items.BaseItem.md) +- [Bundle](../interfaces/types_v1_featured_items.Bundle.md) +- [FeaturedBundle](../interfaces/types_v1_featured_items.FeaturedBundle.md) +- [FeaturedItemsResponse](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md) +- [Item](../interfaces/types_v1_featured_items.Item.md) diff --git a/package/doc/modules/types_v1_profile.md b/package/doc/modules/types_v1_profile.md new file mode 100644 index 0000000..0b65db7 --- /dev/null +++ b/package/doc/modules/types_v1_profile.md @@ -0,0 +1,8 @@ +# Module: types/v1-profile + +## Table of contents + +### Interfaces + +- [Card](../interfaces/types_v1_profile.Card.md) +- [ProfileResponse](../interfaces/types_v1_profile.ProfileResponse.md) diff --git a/package/doc/modules/types_v1_status.md b/package/doc/modules/types_v1_status.md new file mode 100644 index 0000000..c4f21b3 --- /dev/null +++ b/package/doc/modules/types_v1_status.md @@ -0,0 +1,10 @@ +# Module: types/v1-status + +## Table of contents + +### Interfaces + +- [Incident](../interfaces/types_v1_status.Incident.md) +- [StatusResponse](../interfaces/types_v1_status.StatusResponse.md) +- [Title](../interfaces/types_v1_status.Title.md) +- [Update](../interfaces/types_v1_status.Update.md) diff --git a/package/doc/modules/types_v1_store_offers.md b/package/doc/modules/types_v1_store_offers.md new file mode 100644 index 0000000..acd65bc --- /dev/null +++ b/package/doc/modules/types_v1_store_offers.md @@ -0,0 +1,11 @@ +# Module: types/v1-store-offers + +## Table of contents + +### Interfaces + +- [Cost](../interfaces/types_v1_store_offers.Cost.md) +- [Offer](../interfaces/types_v1_store_offers.Offer.md) +- [Reward](../interfaces/types_v1_store_offers.Reward.md) +- [StoreOffersResponse](../interfaces/types_v1_store_offers.StoreOffersResponse.md) +- [UpgradeCurrencyOffer](../interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md) diff --git a/package/doc/modules/types_v1_version.md b/package/doc/modules/types_v1_version.md new file mode 100644 index 0000000..c1a4915 --- /dev/null +++ b/package/doc/modules/types_v1_version.md @@ -0,0 +1,7 @@ +# Module: types/v1-version + +## Table of contents + +### Interfaces + +- [VersionResponse](../interfaces/types_v1_version.VersionResponse.md) diff --git a/package/doc/modules/types_v1_website.md b/package/doc/modules/types_v1_website.md new file mode 100644 index 0000000..ef010c4 --- /dev/null +++ b/package/doc/modules/types_v1_website.md @@ -0,0 +1,8 @@ +# Module: types/v1-website + +## Table of contents + +### Interfaces + +- [Post](../interfaces/types_v1_website.Post.md) +- [WebsiteResponse](../interfaces/types_v1_website.WebsiteResponse.md) diff --git a/package/doc/modules/types_v2_leaderboard.md b/package/doc/modules/types_v2_leaderboard.md new file mode 100644 index 0000000..7e6dab0 --- /dev/null +++ b/package/doc/modules/types_v2_leaderboard.md @@ -0,0 +1,8 @@ +# Module: types/v2-leaderboard + +## Table of contents + +### Interfaces + +- [LeaderboardResponse](../interfaces/types_v2_leaderboard.LeaderboardResponse.md) +- [Player](../interfaces/types_v2_leaderboard.Player.md) diff --git a/package/doc/modules/types_v2_match.md b/package/doc/modules/types_v2_match.md new file mode 100644 index 0000000..5468bd3 --- /dev/null +++ b/package/doc/modules/types_v2_match.md @@ -0,0 +1,17 @@ +# Module: types/v2-match + +## Table of contents + +### Type Aliases + +- [MatchResponse](types_v2_match.md#matchresponse) + +## Type Aliases + +### MatchResponse + +Ƭ **MatchResponse**: [`Match`](../interfaces/types_v3_matches.Match.md) + +#### Defined in + +[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-match.ts#L3) diff --git a/package/doc/modules/types_v2_mmr.md b/package/doc/modules/types_v2_mmr.md new file mode 100644 index 0000000..84918fa --- /dev/null +++ b/package/doc/modules/types_v2_mmr.md @@ -0,0 +1,8 @@ +# Module: types/v2-mmr + +## Table of contents + +### Interfaces + +- [MMRResponse](../interfaces/types_v2_mmr.MMRResponse.md) +- [SeasonMMR](../interfaces/types_v2_mmr.SeasonMMR.md) diff --git a/package/doc/modules/types_v2_mmr_history.md b/package/doc/modules/types_v2_mmr_history.md new file mode 100644 index 0000000..98b579c --- /dev/null +++ b/package/doc/modules/types_v2_mmr_history.md @@ -0,0 +1,22 @@ +# Module: types/v2-mmr-history + +## Table of contents + +### Interfaces + +- [Images](../interfaces/types_v2_mmr_history.Images.md) +- [MMRHistoryGame](../interfaces/types_v2_mmr_history.MMRHistoryGame.md) + +### Type Aliases + +- [MMRHistoryResponse](types_v2_mmr_history.md#mmrhistoryresponse) + +## Type Aliases + +### MMRHistoryResponse + +Ƭ **MMRHistoryResponse**: [`MMRHistoryGame`](../interfaces/types_v2_mmr_history.MMRHistoryGame.md)[] + +#### Defined in + +[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L21) diff --git a/package/doc/modules/types_v3_matches.md b/package/doc/modules/types_v3_matches.md new file mode 100644 index 0000000..5e4a2da --- /dev/null +++ b/package/doc/modules/types_v3_matches.md @@ -0,0 +1,26 @@ +# Module: types/v3-matches + +## Table of contents + +### Interfaces + +- [KillEvent](../interfaces/types_v3_matches.KillEvent.md) +- [KillEventMatch](../interfaces/types_v3_matches.KillEventMatch.md) +- [Match](../interfaces/types_v3_matches.Match.md) +- [Player](../interfaces/types_v3_matches.Player.md) +- [PlayerLocationOnEvent](../interfaces/types_v3_matches.PlayerLocationOnEvent.md) +- [Round](../interfaces/types_v3_matches.Round.md) + +### Type Aliases + +- [MatchesResponse](types_v3_matches.md#matchesresponse) + +## Type Aliases + +### MatchesResponse + +Ƭ **MatchesResponse**: [`Match`](../interfaces/types_v3_matches.Match.md)[] + +#### Defined in + +[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L232) diff --git a/package/package.json b/package/package.json index 4269623..7b2c4ee 100644 --- a/package/package.json +++ b/package/package.json @@ -28,6 +28,13 @@ "@typescript-eslint/eslint-plugin": "^5.33.1", "@typescript-eslint/parser": "^5.33.1", "eslint": "^8.22.0", + "typedoc": "^0.23.10", + "typedoc-plugin-markdown": "^3.13.4", "typescript": "^4.7.4" + }, + "scripts": { + "docGen": "typedoc --plugin typedoc-plugin-markdown && node ./test/editDocs.js", + "tsc": "tsc", + "testTsc": "cd test && tsc" } } diff --git a/package/src/index.ts b/package/src/index.ts index e6fcb2a..7e0f00e 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -20,13 +20,12 @@ import type { MatchesResponse } from "./types/v3-matches" interface APIResponse { /** - * Response status - * - * @remarks - * - `200-299` Successful response - * - `400-499` Client error response - * - `500-599` Server error response - */ + * Response status + * @remarks + * - `200-299` Successful response + * - `400-499` Client error response + * - `500-599` Server error response + */ status: number /** * Response from API @@ -51,10 +50,10 @@ interface ErrorObject { * Error message */ message: string - /** The response status of the API. See remarks for info about specific error codes - * - * @remarks - * Can be any of the following: + /** + * The response status of the API. See remarks for info about specific error codes + * @remarks + * Can be any of the following: * - `1` Invalid API Key * - `2` Forbidden endpoint * - `3` Restricted endpoint @@ -84,22 +83,19 @@ interface ErrorObject { interface RateLimit { /** * Number of used API requests per 60s. - * - * @remarks + * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ used: number /** * Remaining number of API requests per 60s. - * - * @remarks + * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ remaining: number /** * In how many seconds (every 60s) your rate limit is going to reset. - * - * @remarks + * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ reset: number @@ -109,42 +105,37 @@ interface RateLimit { * Base API endpoint */ const baseUrl = "https://api.henrikdev.xyz/valorant" -class VAPI { +export default class { /** - * Images for every {@link Rank | Valorant rank} - * - * @remarks - * You must call {@link initUtils} before using this! - */ + * Images for every {@link Rank} + * @remarks + * You must call {@link initUtils} before using this! + */ rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } } /** - * Images for every {@link ValorantMap | Valorant Map} - * - * @remarks - * You must call {@link initUtils} before using this! - */ + * Images for every {@link ValorantMap} + * @remarks + * You must call {@link initUtils} before using this! + */ mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } } /** - * Create a new instance of the main API. All API calls are in this class - * - * @example - * Create a new instance - * ``` - * import _VAPI from "unofficial-valorant-api" - * const VAPI = new _VAPI("my super secret token") - * ``` - * - * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) + * Create a new instance of the main API. All API calls are in this class + * @example + * Create a new instance + * ``` + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) */ constructor(private token?: string) {} /** - * Creates {@link VAPI.rankImages} and {@link VAPI.mapImages} by pulling the images from {@link https://valorant-api.com} - * - * @remarks - * Must be called before using {@link VAPI.rankImages} and {@link VAPI.mapImages} - */ + * Creates {@link default.rankImages} and {@link default.mapImages} by pulling the images from {@link https://valorant-api.com} + * @remarks + * Must be called before using {@link default.rankImages} and {@link default.mapImages} + */ async initUtils(): Promise { const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data if (mapsReq) { @@ -170,26 +161,23 @@ class VAPI { } /** - * @internal - * - * Parses the body of an axios response - */ + * @internal + * Parses the body of an axios response + */ private _parseBody(body: any): any { if (body.errors) return body.errors return body.status ? body.data : body } /** - * @internal - * - * Main function to fetch from the API - * - * @typeParam dataType - The type of the response - * @param url - URl to fetch. Appended to {@link baseUrl} and automatically encoded - * @param searchParams - Any extra search params. Empty values will be filtered out - * @param config - Override the default axios config with custom params - * @returns Formatted response - */ + * @internal + * Main function to fetch from the API + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to the base url and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { // Format search params into `?something=like&this` const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { @@ -225,13 +213,11 @@ class VAPI { } /** - * @internal - * - * Make sure each key has a non empty value - * @param input - Object to check for non empty values - * - * @throws {@link TypeError} - Only if there is a empty value to a key - */ + * @internal + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * @throws {@link TypeError} - Only if there is a empty value to a key + */ private async _validateArgs(input: { [key: string]: any }) { Object.keys(input).forEach(key => { if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) @@ -240,16 +226,14 @@ class VAPI { /** * Get an image of a valorant crosshair by its code - * - * @example - * Load and write a crosshair to crosshair.png - * ``` - * import { writeFileSync } from "fs" - * - * const crosshair = await VAPI.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") - * writeFileSync("crosshair.png", crosshair.data) - * ``` - * + * @example + * Load and write a crosshair to crosshair.png + * ``` + * import { writeFileSync } from "fs" + * + * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` * @param code - Valorant crosshair code * @param size - (optional) Image size (default: `1024`) * @returns The image of the crosshair as a {@link Buffer} @@ -264,7 +248,7 @@ class VAPI { /** * Get all announcements from the valorant website of a country * @param countryCode - Country code of website - * @returns List of announcements from the valorant website + * @returns List of announcements from the valorant website */ async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise> { this._validateArgs({ countryCode }) @@ -274,7 +258,7 @@ class VAPI { /** * Get information about valorant in a region, such as the client version, branch, and server version * @param region - Region of valorant to get info about - * @returns Information about a regions valorant + * @returns Information about a regions valorant */ async getVersion(region: Region): Promise> { this._validateArgs({ region }) @@ -283,7 +267,7 @@ class VAPI { /** * Get all of the featured items in the current valorant store - * @returns Featured items in the current valorant store + * @returns Featured items in the current valorant store */ async getFeaturedItems(): Promise> { // ! v2 is bugged for some reason @@ -292,7 +276,7 @@ class VAPI { /** * Get a list of all in-app-purchases for valorant, such as Radianite and VP - * @returns List of IAPs in valorant + * @returns List of IAPs in valorant */ async getIAPs(): Promise> { // ! find out wtf this actually does @@ -302,7 +286,7 @@ class VAPI { /** * Will get information about the current maintenances and incidents about a region * @param region - Region to get info about - * @returns Info about undergoing maintenances and incidents in a region of valorant + * @returns Info about undergoing maintenances and incidents in a region of valorant */ async getStatus(region: Region): Promise> { this._validateArgs({ region }) @@ -310,13 +294,13 @@ class VAPI { } /** - * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatch} for an easier response to use - * @param matchID - The match ID to get details about - * @param region - Region of the match - * @param queries - Extra queries - * @returns Information about the match - */ + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatch} for an easier response to use + * @param matchID - The match ID to get details about + * @param region - Region of the match + * @param queries - Extra queries + * @returns Information about the match + */ async getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise> { this._validateArgs({ matchID, region }) return await this._fetch("v1/raw", null, { @@ -326,13 +310,13 @@ class VAPI { } /** - * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link VAPI.getMatches} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players match history - */ + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatches} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players match history + */ async getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { @@ -342,13 +326,13 @@ class VAPI { } /** - * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMRHistory} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players rr history - */ + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMRHistory} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players rr history + */ async getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { @@ -358,13 +342,13 @@ class VAPI { } /** - * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link VAPI.getMMR} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries - * @returns Information about the players mmr - */ + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMR} for an easier response to use + * @param puuid - The match ID to get details about + * @param region - Region of the player + * @param queries - Extra queries + * @returns Information about the players mmr + */ async getRawMMR(puuid: string, region: Region, queries?: any): Promise> { this._validateArgs({ puuid, region }) return await this._fetch("v1/raw", null, { @@ -374,22 +358,22 @@ class VAPI { } /** - * Get a list of rr changes of a player by their Riot ID - * @param name - The Riot ID username of the player - * @param tag - The Riot tag username of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) - */ + * Get a list of rr changes of a player by their Riot ID + * @param name - The Riot ID username of the player + * @param tag - The Riot tag username of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) + */ async getMMRHistory(name: string, tag: string, region: Region): Promise> { this._validateArgs({ name, tag, region }) return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`) } /** - * Get a list of rr changes of a player by their PUUID - * @param puuid - The PUUID of the player - * @param region - The players region - * @return List of rr changes (recent competitive games) + * Get a list of rr changes of a player by their PUUID + * @param puuid - The PUUID of the player + * @param region - The players region + * @return List of rr changes (recent competitive games) */ async getMMRHistoryByPUUID(puuid: string, region: Region): Promise> { this._validateArgs({ puuid, region }) @@ -397,33 +381,30 @@ class VAPI { } /** - * Get information about a match - * @param matchID - The matchs ID - * @returns Information about the match - */ + * Get information about a match + * @param matchID - The matchs ID + * @returns Information about the match + */ async getMatch(matchID: string): Promise> { this._validateArgs({ matchID }) return this._fetch(`v2/match/${matchID}`) } /** - * Get the leaderboard of a region - * - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * - * @param region - Region to get leaderboard from - * @param start - (optional) Get 1000 leaderboard players starting from the given start value - * @param end - (optional) Limit the amount of leaderboard players returned - * @param riotID - (optional) Search for a specific player by their Riot ID - * @param riotID.name - The Riot IDs username - * @param riotID.tag - The Riot IDs tag - * @param puuid - (optional) Search for a specific player by their PUUID - * @param season - (optional) Get leaderboard from a specific season - * @returns Descending order of the highest ranked players. (Immortal and up) - * - * @throws {@link TypeError} - If both a riotID and puuid are supplied - */ + * Get the leaderboard of a region + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * @param region - Region to get leaderboard from + * @param start - (optional) Get 1000 leaderboard players starting from the given start value + * @param end - (optional) Limit the amount of leaderboard players returned + * @param riotID - (optional) Search for a specific player by their Riot ID + * @param riotID.name - The Riot IDs username + * @param riotID.tag - The Riot IDs tag + * @param puuid - (optional) Search for a specific player by their PUUID + * @param season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * @throws {@link TypeError} - If both a riotID and puuid are supplied + */ async getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string, tag: string }, puuid?: string, season?: Season): Promise> { if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid") @@ -432,28 +413,26 @@ class VAPI { } /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param locale - If this is set, instead of all translations, it will return just translations for this language - */ + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param locale - If this is set, instead of all translations, it will return just translations for this language + */ async getTranslations(locale?: Locale): Promise> { return this._fetch("v1/content", { locale }) } /** * Gets general info about a players rank by their Riot ID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * * @param name - The Riot ID username of the player * @param tag - The Riot ID tag of the player * @param region - The region of the player * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank + * @returns Information about a players mmr/rank */ async getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise> { this._validateArgs({ name, tag, region }) @@ -462,18 +441,16 @@ class VAPI { /** * Gets general info about a players rank by their PUUID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Current rank and info about their rank * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * * @param puuid - The PUUID of the player * @param region - The region of the player * @param seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank + * @returns Information about a players mmr/rank */ async getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise> { this._validateArgs({ puuid, region }) @@ -482,22 +459,20 @@ class VAPI { /** * Gets the most recent 5 matches by a players Riot ID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * * @param name - The Riot ID username of the player * @param tag - The Riot ID tag of the player * @param region - The region of the player * @param gamemodeFilter - Filter results based on gamemode * @param mapFilter - Filter results based on map * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches + * @returns Info about a players last 5 matches */ async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { this._validateArgs({ name, tag, region }) @@ -506,21 +481,19 @@ class VAPI { /** * Gets the most recent 5 matches by a players PUUID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Info about most recent 5 matches including: * - Metadata info about the match such as length, time, map, score, etc * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * * @param puuid - The PUUID username of the player * @param region - The region of the player * @param gamemodeFilter - Filter results based on gamemode * @param mapFilter - Filter results based on map * @param size - Filter results based on ?? **{needs testing)** - * @returns Info about a players last 5 matches + * @returns Info about a players last 5 matches */ async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { this._validateArgs({ name: puuid, region }) @@ -529,18 +502,16 @@ class VAPI { /** * Get general information about a player from their Riot ID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * * @param name - The Riot ID username of the player * @param tag - The Riot ID tag of the player * @param force - Force data update? - * @return General information on a players profile + * @return General information on a players profile */ async getProfile(name: string, tag: string, force?: boolean): Promise> { this._validateArgs({ name, tag }) @@ -549,22 +520,18 @@ class VAPI { /** * Get general information about a player from their PUUID - * - * @remarks - * - **Returns:** + * @remarks + * **Returns:** * - Their PUUID * - Their region * - Their account level * - Their current card - * * @param puuid The PUUID of the player * @param force Force data update? - * @return General information on a players profile + * @return General information on a players profile */ async getProfileByPUUID(puuid: string, force?: boolean): Promise> { this._validateArgs({ name: puuid }) return this._fetch(`v1/by-puuid/account/${puuid}`, { force }) } } - -export default VAPI diff --git a/package/src/oldIndex.d.ts b/package/src/oldIndex.d.ts deleted file mode 100644 index 065975a..0000000 --- a/package/src/oldIndex.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -export type Episodes = 'e1a1' | 'e1a2' | 'e1a3' | 'e2a1' | 'e2a2' | 'e2a3' | 'e3a1' | 'e3a2' | 'e3a3' | 'e4a1' | 'e4a2' | 'e4a3' | 'e5a1' | 'e5a2' | 'e5a3'; - -export type LeaderboardEpisodes = 'e2a1' | 'e2a2' | 'e2a3' | 'e3a1' | 'e3a2' | 'e3a3' | 'e4a1' | 'e4a2' | 'e4a3' | 'e5a1' | 'e5a2' | 'e5a3'; - -export type Modes = 'escalation' | 'spikerush' | 'deathmatch' | 'competitive' | 'unrated' | 'replication' | 'custom' | 'newmap' | 'snowball'; - -export type Maps = 'ascent' | 'split' | 'fracture' | 'bind' | 'breeze' | 'icebox' | 'haven' | 'pearl'; - -export type CCRegions = 'en-gb' | 'en-us' | 'es-es' | 'es-mx' | 'fr-fr' | 'it-it' | 'ja-jp' | 'ko-kr' | 'pt-br' | 'ru-ru' | 'tr-tr' | 'vi-vn'; - -export type Locales = - | 'ar-AE' - | 'de-DE' - | 'en-GB' - | 'en-US' - | 'es-ES' - | 'es-MX' - | 'fr-FR' - | 'id-ID' - | 'it-IT' - | 'ja-JP' - | 'ko-KR' - | 'pl-PL' - | 'pt-BR' - | 'ru-RU' - | 'th-TH' - | 'tr-TR' - | 'vi-VN' - | 'zn-CN' - | 'zn-TW'; - -export type RawTypes = 'competitiveupdates' | 'mmr' | 'matchdetails' | 'matchhistory'; - -export type MMRVersions = 'v1' | 'v2'; - -export type FeaturedItemsVersion = 'v1' | 'v2'; - -export type LeaderboardVersions = 'v1' | 'v2'; - -export type Regions = 'eu' | 'na' | 'kr' | 'ap' | 'latam' | 'br'; - -export default class { - private _parsebody(body: any): any; - private _parseresponse(req: any): APIResponse; - private _validate(input: any): any; - private _fetch(options: _fetch): Promise; - public getAccount(options: AccountFetchOptions): Promise; - public getAccountByPUUID(options: AccountFetchByPUUIDOptions): Promise; - public getMMRByPUUID(options: getMMRByPUUIDFetchOptions): Promise; - public getMMRHistoryByPUUID(options: getMMRHistoryByPUUIDFetchOptions): Promise; - public getMatchesByPUUID(options: getMatchesByPUUIDFetchOptions): Promise; - public getContent(options: getContentFetchOptions): Promise; - public getLeaderboard(options: getLeaderboardOptions): Promise; - public getMatches(options: getMatchesFetchOptions): Promise; - public getMatch(options: getMatchFetchOptions): Promise; - public getMMRHistory(options: getMMRHistoryFetchOptions): Promise; - public getMMR(options: getMMRFetchOptions): Promise; - public getRawData(options: getRawFetchOptions): Promise; - public getStatus(options: getStatusFetchOptions): Promise; - public getFeaturedItems(options: getFeaturedItemsFetchOptions): Promise; - public getOffers(): Promise; - public getVersion(options: getVersionFetchOptions): Promise; - public getWebsite(options: getWebsiteFetchOptions): Promise; - public getCrosshair(options: getCrosshairFetchOptions): Promise; -} - -export interface _fetch { - url: string; - type: string; -} - -export interface APIResponse { - status: number; - data: object | null; - ratelimits: RateLimit; - error: ErrorObject | null; -} - -export interface ErrorObject { - message: string; -} - -export interface RateLimit { - used: number; - remaining: number; - reset: number; -} - -export interface AccountFetchOptions { - name: string; - tag: string; - force?: boolean; -} - -export interface AccountFetchByPUUIDOptions { - puuid: string; - force?: boolean; -} - -export interface getMMRByPUUIDFetchOptions { - version: MMRVersions; - region: Regions; - puuid: string; - filter?: Episodes; -} - -export interface getMMRHistoryByPUUIDFetchOptions { - region: Regions; - puuid: string; -} - -export interface getMatchesByPUUIDFetchOptions { - region: Regions; - puuid: string; - filter?: Modes; - map?: Maps; - size?: number; -} - -export interface getContentFetchOptions { - locale?: Locales; -} - -export interface getLeaderboardOptions { - version: LeaderboardVersions; - region: Regions; - name?: string; - tag?: string; - puuid?: string; - season?: LeaderboardEpisodes; -} - -export interface getMatchesFetchOptions { - region: Regions; - name: string; - tag: string; - filter?: Modes; - map?: Maps; - size?: number; -} - -export interface getMatchFetchOptions { - match_id: string; -} - -export interface getMMRHistoryFetchOptions { - region: Regions; - name: string; - tag: string; -} - -export interface getMMRFetchOptions { - version: MMRVersions; - region: Regions; - name: string; - tag: string; - filter?: Episodes; -} - -export interface getRawFetchOptions { - type: RawTypes; - uuid: string; - region: Regions; - queries: string; -} - -export interface getStatusFetchOptions { - region: Regions; -} - -export interface getVersionFetchOptions { - region: Regions; -} - -export interface getWebsiteFetchOptions { - country_code: CCRegions; - filter?: string; -} - -export interface getCrosshairFetchOptions { - code: string; - size?: number; -} - -export interface getFeaturedItemsFetchOptions { - version: FeaturedItemsVersion; -} diff --git a/package/src/oldIndex.js b/package/src/oldIndex.js deleted file mode 100644 index df0a176..0000000 --- a/package/src/oldIndex.js +++ /dev/null @@ -1,192 +0,0 @@ -const axios = require("axios") - -module.exports = class { - constructor(token) { - this.token = token - } - _parsebody(body) { - if (body.errors) return body.errors - return body.status ? body.data : body - } - _parseresponse(req) { - return { - status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers["Content-Type"] ? this._parsebody(req.data) : req.data, - ratelimits: { - used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), - remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), - reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), - }, - error: req.response ? this._parsebody(req.response.data) : null, - url: req.config.url, - } - } - _validate(input) { - for (let i = 0; Object.keys(input).length > i; i++) { - if (Object.values(input)[i] == null) throw new Error(`Missing parameter: ${Object.keys(input)[i]}`) - } - } - _query(input) { - let query = new URLSearchParams() - for (let i = 0; Object.values(input).length > i; i++) { - if (Object.values(input)[i] && Object.values(input)[i] != "undefined") query.append(Object.keys(input)[i], Object.values(input)[i]) - } - return query.toString().length ? query : null - } - async _fetch({url, type = "GET", body = null, rtype = null} = {}) { - const req = await axios({ - url: url, - method: type, - data: body, - responseType: rtype ? rtype : "json", - headers: this.token - ? { - Authorization: this.token, - "User-Agent": "unofficial-valorant-api/node.js/2.3.0", - } - : { - "User-Agent": "unofficial-valorant-api/node.js/2.3.0", - }, - }).catch(err => err) - return this._parseresponse(req) - } - - async getAccount({name, tag, force} = {}) { - this._validate({name, tag}) - const query = this._query({force}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/account/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, - }) - } - - async getAccountByPUUID({puuid, force} = {}) { - this._validate({puuid}) - const query = this._query({force}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/account/${puuid}${query ? `?${query}` : ""}`, - }) - } - - async getMMRByPUUID({version, region, puuid, filter} = {}) { - this._validate({version, region, puuid}) - const query = this._query({filter}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/by-puuid/mmr/${region}/${puuid}${query ? `?${query}` : ""}`, - }) - } - - async getMMRHistoryByPUUID({region, puuid} = {}) { - this._validate({region, puuid}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/by-puuid/mmr-history/${region}/${puuid}`, - }) - } - - async getMatchesByPUUID({region, puuid, filter, map, size} = {}) { - this._validate({region, puuid}) - const query = this._query({filter, map, size}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v3/by-puuid/matches/${region}/${puuid}${query ? `?${query}` : ""}`, - }) - } - - async getContent({locale} = {}) { - const query = this._query({locale}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/content${query ? `?${query}` : ""}`, - }) - } - - async getLeaderboard({version, region, start, end, name, tag, puuid, season} = {}) { - if (name && tag && puuid) - throw new Error("Too many parameters: You can't search for name/tag and puuid at the same time, please decide between name/tag and puuid") - this._validate({version, region}) - const query = this._query({start, end, name: encodeURI(name), tag: encodeURI(tag), puuid, season}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/leaderboard/${region}${query ? `?${query}` : ""}`, - }) - } - - async getMatches({region, name, tag, filter, map, size} = {}) { - this._validate({region, name, tag}) - const query = this._query({filter, map, size}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v3/matches/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, - }) - } - - async getMatch({match_id} = {}) { - this._validate({match_id}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v2/match/${match_id}`, - }) - } - - async getMMRHistory({region, name, tag} = {}) { - this._validate({region, name, tag}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/mmr-history/${region}/${encodeURI(name)}/${encodeURI(tag)}`, - }) - } - - async getMMR({version, region, name, tag, filter} = {}) { - this._validate({version, region, name, tag}) - const query = this._query({filter}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/mmr/${region}/${encodeURI(name)}/${encodeURI(tag)}${query ? `?${query}` : ""}`, - }) - } - - async getRawData({type, value, region, queries} = {}) { - this._validate({type, value, region, queries}) - return await this._fetch({ - url: "https://api.henrikdev.xyz/valorant/v1/raw", - body: {type, value, region, queries}, - type: "POST", - }) - } - - async getStatus({region} = {}) { - this._validate({region}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/status/${region}`, - }) - } - - async getFeaturedItems({version} = {}) { - this._validate({version}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/${version}/store-featured`, - }) - } - - async getOffers() { - return await this._fetch({ - url: "https://api.henrikdev.xyz/valorant/v1/store-offers", - }) - } - - async getVersion({region} = {}) { - this._validate({region}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/version/${region}`, - }) - } - - async getWebsite({country_code, filter} = {}) { - this._validate({country_code}) - const query = this._query({filter}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/website/${country_code}${query ? `?${query}` : ""}`, - }) - } - - async getCrosshair({code, size} = {}) { - this._validate({code}) - const query = this._query({id: code, size}) - return await this._fetch({ - url: `https://api.henrikdev.xyz/valorant/v1/crosshair/generate${query ? `?${query}` : ""}`, - rtype: "arraybuffer", - }) - } -} diff --git a/package/test/editDocs.js b/package/test/editDocs.js new file mode 100644 index 0000000..1d0c4a1 --- /dev/null +++ b/package/test/editDocs.js @@ -0,0 +1,35 @@ +import fs from "fs"; +const path = "./doc/classes/index.default.md"; +const file = fs.readFileSync(path, "utf-8"); +const lines = file.split("\n"); +const newLines = [...lines]; +lines.forEach((line, i) => { + const header = line.split(" ")[0]; + if (header === "#") { + newLines[i] = "# Welcome to the VAPI docs"; + newLines[i + 2] = "Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD)"; + } + if (header !== "###") + return; + const name = line.split(" ")[1]; + if (name !== "mapImages" && name !== "rankImages") + return; + let typeIndex = i + 1; + while (lines[typeIndex].split(" ")[0] !== "####") + typeIndex++; + typeIndex++; + while (lines[typeIndex].split(" ")[0] !== "####") { + const key = lines[typeIndex].split("|")[1]?.trim()?.slice(1, -1); + const type = lines[typeIndex].split("|")[2]?.trim()?.slice(1, -1); + if (!key || !type) { + typeIndex++; + continue; + } + if (type === "string") { + newLines[typeIndex] = null; + } + typeIndex++; + } +}); +fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")); +//# sourceMappingURL=editDocs.js.map \ No newline at end of file diff --git a/package/test/editDocs.js.map b/package/test/editDocs.js.map new file mode 100644 index 0000000..7be617a --- /dev/null +++ b/package/test/editDocs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"editDocs.js","sourceRoot":"","sources":["editDocs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,IAAI,GAAG,gCAAgC,CAAA;AAE7C,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC9B,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AAE3B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACjC,IAAI,MAAM,KAAK,GAAG,EAAE;QAChB,QAAQ,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAA;QAC1C,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,uKAAuK,CAAA;KAC5L;IACD,IAAI,MAAM,KAAK,KAAK;QAAE,OAAM;IAE5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/B,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY;QAAE,OAAM;IAEzD,IAAI,SAAS,GAAG,CAAC,GAAG,CAAC,CAAA;IACrB,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM;QAAE,SAAS,EAAE,CAAA;IAC7D,SAAS,EAAE,CAAA;IAEX,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE;QAC9C,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAChE,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAEjE,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE;YACf,SAAS,EAAE,CAAA;YACX,SAAQ;SACX;QAED,IAAI,IAAI,KAAK,QAAQ,EAAE;YACnB,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;SAC7B;QAED,SAAS,EAAE,CAAA;KACd;AACL,CAAC,CAAC,CAAA;AAEF,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts new file mode 100644 index 0000000..fd8bb95 --- /dev/null +++ b/package/test/editDocs.ts @@ -0,0 +1,41 @@ +import fs from "fs" + +const path = "./doc/classes/index.default.md" + +const file = fs.readFileSync(path, "utf-8") +const lines = file.split("\n") +const newLines = [...lines] + +lines.forEach((line, i) => { + const header = line.split(" ")[0] + if (header === "#") { + newLines[i] = "# Welcome to the VAPI docs" + newLines[i + 2] = "Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD)" + } + if (header !== "###") return + + const name = line.split(" ")[1] + if (name !== "mapImages" && name !== "rankImages") return + + let typeIndex = i + 1 + while (lines[typeIndex].split(" ")[0] !== "####") typeIndex++ + typeIndex++ + + while (lines[typeIndex].split(" ")[0] !== "####") { + const key = lines[typeIndex].split("|")[1]?.trim()?.slice(1, -1) + const type = lines[typeIndex].split("|")[2]?.trim()?.slice(1, -1) + + if (!key || !type) { + typeIndex++ + continue + } + + if (type === "string") { + newLines[typeIndex] = null + } + + typeIndex++ + } +}) + +fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")) diff --git a/package/test/test.js b/package/test/test.js index 1c8d804..c73c974 100644 --- a/package/test/test.js +++ b/package/test/test.js @@ -1,14 +1,12 @@ -import { spawn } from "child_process" -import _VAPI from "../dist/index.js" -const VAPI = new _VAPI() - +import { spawn } from "child_process"; +import _VAPI from "../dist/index.js"; +const VAPI = new _VAPI(); const clipboard = (data) => { - const proc = spawn("pbcopy") - proc.stdin.write(data) - proc.stdin.end() -} - -const res = await VAPI.initUtils() + const proc = spawn("pbcopy"); + proc.stdin.write(data); + proc.stdin.end(); +}; +const res = await VAPI.initUtils(); // const object = Object.keys(res.data).reduce((acc, cur) => { // if (Array.isArray(res.data[cur])) { // acc[cur] = res.data[cur].slice(0, 2) @@ -19,3 +17,4 @@ const res = await VAPI.initUtils() // }, {}) // console.log(object) // clipboard(JSON.stringify(object)) +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.js.map b/package/test/test.js.map new file mode 100644 index 0000000..15fb598 --- /dev/null +++ b/package/test/test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,MAAM,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;AAExB,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,EAAE;IACvB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC5B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAA;AAElC,8DAA8D;AAC9D,0CAA0C;AAC1C,+CAA+C;AAC/C,eAAe;AACf,mCAAmC;AACnC,QAAQ;AACR,iBAAiB;AACjB,SAAS;AACT,sBAAsB;AACtB,oCAAoC"} \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts new file mode 100644 index 0000000..32f09a9 --- /dev/null +++ b/package/test/test.ts @@ -0,0 +1,22 @@ +import { spawn } from "child_process" +import _VAPI from "../dist/index.js" +const VAPI = new _VAPI() + +const clipboard = (data) => { + const proc = spawn("pbcopy") + proc.stdin.write(data) + proc.stdin.end() +} + +const res = await VAPI.initUtils() + +// const object = Object.keys(res.data).reduce((acc, cur) => { +// if (Array.isArray(res.data[cur])) { +// acc[cur] = res.data[cur].slice(0, 2) +// } else { +// acc[cur] = res.data[cur] +// } +// return acc +// }, {}) +// console.log(object) +// clipboard(JSON.stringify(object)) diff --git a/package/test/tsconfig.json b/package/test/tsconfig.json new file mode 100644 index 0000000..f27dd88 --- /dev/null +++ b/package/test/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ESNext", + "watch": true, + "lib": [ + "ESNext", + "DOM" + ], + "module": "ESNext", + "moduleResolution": "node", + "sourceMap": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true + }, + "exclude": [ + "node_modules", + "./node_modules", + "./node_modules/*" + ] +} diff --git a/package/tsconfig.json b/package/tsconfig.json index 42e6ecd..1732e5a 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -18,5 +18,14 @@ "node_modules", "dist", "test" - ] + ], + "typedocOptions": { + "entryPoints": [ + "./src" + ], + "entryPointStrategy": "expand", + "out": "./doc", + "excludeInternal": true, + "hideBreadcrumbs": true + } } From 2dbdb4aa47368e6745022e1b47d444e5f49d83dc Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 01:00:06 -0500 Subject: [PATCH 10/50] Added docs to npmignore and added languages to the code blocks --- package/.npmignore | 1 + package/doc/README.md | 95 ++++++------------- package/doc/classes/index.default.md | 54 +++++------ ...e_updates.RawCompetitiveUpdatesResponse.md | 8 +- ...w_match_details.RawMatchDetailsResponse.md | 16 ++-- ...w_match_history.RawMatchHistoryResponse.md | 12 +-- .../types_raw_mmr.RawMMRResponse.md | 16 ++-- .../doc/interfaces/types_v1_content.Act.md | 12 +-- .../doc/interfaces/types_v1_content.Asset.md | 8 +- .../types_v1_content.AssetWithPath.md | 10 +- .../types_v1_content.ContentResponse.md | 32 +++---- .../types_v1_featured_items.BaseItem.md | 6 +- .../types_v1_featured_items.Bundle.md | 12 +-- .../types_v1_featured_items.FeaturedBundle.md | 6 +- ...v1_featured_items.FeaturedItemsResponse.md | 2 +- .../types_v1_featured_items.Item.md | 12 +-- .../doc/interfaces/types_v1_profile.Card.md | 8 +- .../types_v1_profile.ProfileResponse.md | 16 ++-- .../interfaces/types_v1_status.Incident.md | 18 ++-- .../types_v1_status.StatusResponse.md | 4 +- .../doc/interfaces/types_v1_status.Title.md | 4 +- .../doc/interfaces/types_v1_status.Update.md | 14 +-- .../interfaces/types_v1_store_offers.Cost.md | 2 +- .../interfaces/types_v1_store_offers.Offer.md | 10 +- .../types_v1_store_offers.Reward.md | 6 +- ...pes_v1_store_offers.StoreOffersResponse.md | 4 +- ...es_v1_store_offers.UpgradeCurrencyOffer.md | 4 +- .../types_v1_version.VersionResponse.md | 8 +- .../doc/interfaces/types_v1_website.Post.md | 12 +-- .../types_v1_website.WebsiteResponse.md | 12 +-- ...ypes_v2_leaderboard.LeaderboardResponse.md | 16 ++-- .../interfaces/types_v2_leaderboard.Player.md | 22 ++--- .../interfaces/types_v2_mmr.MMRResponse.md | 10 +- .../doc/interfaces/types_v2_mmr.SeasonMMR.md | 12 +-- .../interfaces/types_v2_mmr_history.Images.md | 8 +- .../types_v2_mmr_history.MMRHistoryGame.md | 16 ++-- .../interfaces/types_v3_matches.KillEvent.md | 30 +++--- .../types_v3_matches.KillEventMatch.md | 32 +++---- .../doc/interfaces/types_v3_matches.Match.md | 10 +- .../doc/interfaces/types_v3_matches.Player.md | 40 ++++---- .../types_v3_matches.PlayerLocationOnEvent.md | 10 +- .../doc/interfaces/types_v3_matches.Round.md | 14 +-- package/doc/modules/types_general.md | 16 ++-- package/doc/modules/types_v1_content.md | 2 +- package/doc/modules/types_v1_crosshair.md | 2 +- package/doc/modules/types_v2_match.md | 2 +- package/doc/modules/types_v2_mmr_history.md | 2 +- package/doc/modules/types_v3_matches.md | 2 +- package/src/index.ts | 4 +- 49 files changed, 319 insertions(+), 355 deletions(-) diff --git a/package/.npmignore b/package/.npmignore index 7f02f6b..ee539b5 100644 --- a/package/.npmignore +++ b/package/.npmignore @@ -1,5 +1,6 @@ examples/**/* test/**/* src/**/* +doc/**/* .eslintrc.cjs tsconfig.json diff --git a/package/doc/README.md b/package/doc/README.md index 1052168..be8ee02 100644 --- a/package/doc/README.md +++ b/package/doc/README.md @@ -1,79 +1,42 @@ -npm - -# unofficial-valorant-api - -NPM package for the [Unofficial VALORANT API](https://github.com/Henrik-3/unofficial-valorant-api) - - +

+ unofficial-valorant-api +

+ +

+ Wrapper for the Unofficial VALORANT API +

+

+ + + + + npm + +

# API -Find all inforamtion about the API itself here: +Find all inforamtion about the API itself [here](https://github.com/Henrik-3/unofficial-valorant-api) # Installation -``` -npm i unofficial-valorant-api@latest -``` - -# Code Examples - -You find some examples [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/main/package/examples) - -# API Calls available +``` js +// npm +npm i unofficial-valorant-api -- [x] `getAccount({name, tag})` -- [x] `getContent({locale?})` -- [x] `getCrosshair({code})` -- [x] `getFeaturedItems()` -- [x] `getLeaderboard({version, region, name?, tag?, puuid?})` -- [x] `getMatchesByPUUID({region, puuid, size?, filter?, map?})` -- [x] `getMatches({region, name, tag, size?, filter?, map?})` -- [x] `getMatch({match_id})` -- [x] `getMMRByPUUID({version, region, puuid, filter?})` -- [x] `getMMR({version, region, name, tag, filter?})` -- [x] `getMMRHistoryByPUUID({region, puuid})` -- [x] `getMMRHistory({region, name, tag})` -- [x] `getOffers()` -- [x] `getRawData({type, uuid, region, queries?})` -- [x] `getStatus({region})` -- [x] `getVersion({region})` -- [x] `getWebsite({countrycode, filter?})` +// pnpm +pnpm add unofficial-valorant-api -``` -Values like countrycode, region, filter or type will be suggested -in IDE's like Visual Studio Code, otherwise you find these values here: https://github.com/Henrik-3/unofficial-valorant-api +// yarn +yarn add unofficial-valorant-api ``` -# Response Example +# Docs -```json -{ - "status": 200, - "data": { - "currenttier": 15, - "currenttierpatched": "Platinum 1", - "ranking_in_tier": 11, - "mmr_change_to_last_game": -21, - "elo": 1211, - "name": "Henrik3", - "tag": "VALO", - "old": true - }, - "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, - "error": null, - "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/VALO" -} -``` +You can find the documentation [here](./doc/classes/index.default.md) -# Error Response +Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) -```json -{ - "status": 404, - "data": null, - "ratelimits": {"used": 1, "remaining": 249, "reset": 150}, - "error": {"message": "Not found"}, - "url": "https://api.henrikdev.xyz/valorant/v1/mmr/eu/Henrik3/EUW3" -} -``` +# Code Examples + +You find some examples [here](./examples) diff --git a/package/doc/classes/index.default.md b/package/doc/classes/index.default.md index 4864371..990af59 100644 --- a/package/doc/classes/index.default.md +++ b/package/doc/classes/index.default.md @@ -49,7 +49,7 @@ Create a new instance of the main API. All API calls are in this class **`Example`** Create a new instance -``` +```js import _VAPI from "unofficial-valorant-api" const VAPI = new _VAPI("my super secret token") ``` @@ -62,7 +62,7 @@ const VAPI = new _VAPI("my super secret token") #### Defined in -[index.ts:132](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L132) +[index.ts:132](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L132) ## Properties @@ -92,7 +92,7 @@ You must call [initUtils](index.default.md#initutils) before using this! #### Defined in -[index.ts:120](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L120) +[index.ts:120](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L120) ___ @@ -139,7 +139,7 @@ You must call [initUtils](index.default.md#initutils) before using this! #### Defined in -[index.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L114) +[index.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L114) ## Methods @@ -163,7 +163,7 @@ List of announcements from the valorant website #### Defined in -[index.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L253) +[index.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L253) ___ @@ -176,7 +176,7 @@ Get an image of a valorant crosshair by its code **`Example`** Load and write a crosshair to crosshair.png -``` +```js import { writeFileSync } from "fs" const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") @@ -198,7 +198,7 @@ The image of the crosshair as a Buffer #### Defined in -[index.ts:241](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L241) +[index.ts:241](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L241) ___ @@ -216,7 +216,7 @@ Featured items in the current valorant store #### Defined in -[index.ts:272](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L272) +[index.ts:272](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L272) ___ @@ -234,7 +234,7 @@ List of IAPs in valorant #### Defined in -[index.ts:281](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L281) +[index.ts:281](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L281) ___ @@ -273,7 +273,7 @@ Descending order of the highest ranked players. (Immortal and up) #### Defined in -[index.ts:408](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L408) +[index.ts:408](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L408) ___ @@ -308,7 +308,7 @@ Information about a players mmr/rank #### Defined in -[index.ts:437](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L437) +[index.ts:437](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L437) ___ @@ -342,7 +342,7 @@ Information about a players mmr/rank #### Defined in -[index.ts:455](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L455) +[index.ts:455](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L455) ___ @@ -368,7 +368,7 @@ List of rr changes (recent competitive games) #### Defined in -[index.ts:367](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L367) +[index.ts:367](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L367) ___ @@ -393,7 +393,7 @@ List of rr changes (recent competitive games) #### Defined in -[index.ts:378](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L378) +[index.ts:378](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L378) ___ @@ -417,7 +417,7 @@ Information about the match #### Defined in -[index.ts:388](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L388) +[index.ts:388](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L388) ___ @@ -455,7 +455,7 @@ Info about a players last 5 matches #### Defined in -[index.ts:477](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L477) +[index.ts:477](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L477) ___ @@ -492,7 +492,7 @@ Info about a players last 5 matches #### Defined in -[index.ts:498](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L498) +[index.ts:498](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L498) ___ @@ -526,7 +526,7 @@ General information on a players profile #### Defined in -[index.ts:516](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L516) +[index.ts:516](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L516) ___ @@ -559,7 +559,7 @@ General information on a players profile #### Defined in -[index.ts:533](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L533) +[index.ts:533](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L533) ___ @@ -589,7 +589,7 @@ Information about the players rr history #### Defined in -[index.ts:336](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L336) +[index.ts:336](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L336) ___ @@ -619,7 +619,7 @@ Information about the players mmr #### Defined in -[index.ts:352](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L352) +[index.ts:352](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L352) ___ @@ -649,7 +649,7 @@ Information about the match #### Defined in -[index.ts:304](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L304) +[index.ts:304](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L304) ___ @@ -679,7 +679,7 @@ Information about the players match history #### Defined in -[index.ts:320](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L320) +[index.ts:320](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L320) ___ @@ -703,7 +703,7 @@ Info about undergoing maintenances and incidents in a region of valorant #### Defined in -[index.ts:291](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L291) +[index.ts:291](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L291) ___ @@ -725,7 +725,7 @@ Get all translations for every character, skin, map, ability, spray, charm, play #### Defined in -[index.ts:419](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L419) +[index.ts:419](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L419) ___ @@ -749,7 +749,7 @@ Information about a regions valorant #### Defined in -[index.ts:263](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L263) +[index.ts:263](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L263) ___ @@ -769,4 +769,4 @@ Must be called before using [rankImages](index.default.md#rankimages) and [mapIm #### Defined in -[index.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/index.ts#L139) +[index.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L139) diff --git a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md index 177875f..94719bb 100644 --- a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md +++ b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md @@ -19,7 +19,7 @@ #### Defined in -[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L21) +[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L21) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L20) +[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L20) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L19) +[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L19) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/competitive-updates.ts#L22) +[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L22) diff --git a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md index a47439f..57014f9 100644 --- a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md +++ b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L251) +[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L251) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L252) +[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L252) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L255) +[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L255) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L249) +[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L249) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L250) +[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L250) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L256) +[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L256) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L254) +[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L254) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-details.ts#L253) +[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L253) diff --git a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md index eb4ac5c..a28ed6b 100644 --- a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md +++ b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md @@ -21,7 +21,7 @@ #### Defined in -[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L11) +[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L11) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L12) +[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L12) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L14) +[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L14) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L10) +[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L10) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L13) +[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L13) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/match-history.ts#L15) +[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L15) diff --git a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md index b15d574..59c6440 100644 --- a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md +++ b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L63) +[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L63) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L62) +[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L62) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L61) +[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L61) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L59) +[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L59) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L60) +[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L60) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L58) +[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L58) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L57) +[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L57) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/raw/mmr.ts#L64) +[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L64) diff --git a/package/doc/interfaces/types_v1_content.Act.md b/package/doc/interfaces/types_v1_content.Act.md index 42321fb..51cc163 100644 --- a/package/doc/interfaces/types_v1_content.Act.md +++ b/package/doc/interfaces/types_v1_content.Act.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L19) +[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L19) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L24) +[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L24) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L23) +[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L23) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L22) +[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L22) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L20) +[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L20) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L21) +[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L21) diff --git a/package/doc/interfaces/types_v1_content.Asset.md b/package/doc/interfaces/types_v1_content.Asset.md index e4afbde..6ee860b 100644 --- a/package/doc/interfaces/types_v1_content.Asset.md +++ b/package/doc/interfaces/types_v1_content.Asset.md @@ -25,7 +25,7 @@ #### Defined in -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L11) +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L11) ___ @@ -35,7 +35,7 @@ ___ #### Defined in -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L10) +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L10) ___ @@ -45,7 +45,7 @@ ___ #### Defined in -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L9) +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L9) ___ @@ -55,4 +55,4 @@ ___ #### Defined in -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L8) +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.AssetWithPath.md b/package/doc/interfaces/types_v1_content.AssetWithPath.md index b4f846b..1962311 100644 --- a/package/doc/interfaces/types_v1_content.AssetWithPath.md +++ b/package/doc/interfaces/types_v1_content.AssetWithPath.md @@ -30,7 +30,7 @@ #### Defined in -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L11) +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L11) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L15) +[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L15) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L10) +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L10) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L9) +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L9) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L8) +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.ContentResponse.md b/package/doc/interfaces/types_v1_content.ContentResponse.md index 53430f9..dc25da9 100644 --- a/package/doc/interfaces/types_v1_content.ContentResponse.md +++ b/package/doc/interfaces/types_v1_content.ContentResponse.md @@ -31,7 +31,7 @@ #### Defined in -[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L42) +[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L42) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L43) +[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L43) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L29) +[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L29) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L39) +[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L39) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L38) +[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L38) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L31) +[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L31) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L34) +[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L34) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L35) +[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L35) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L30) +[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L30) ___ @@ -121,7 +121,7 @@ ___ #### Defined in -[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L40) +[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L40) ___ @@ -131,7 +131,7 @@ ___ #### Defined in -[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L41) +[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L41) ___ @@ -141,7 +141,7 @@ ___ #### Defined in -[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L33) +[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L33) ___ @@ -151,7 +151,7 @@ ___ #### Defined in -[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L32) +[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L32) ___ @@ -161,7 +161,7 @@ ___ #### Defined in -[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L37) +[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L37) ___ @@ -171,7 +171,7 @@ ___ #### Defined in -[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L36) +[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L36) ___ @@ -181,4 +181,4 @@ ___ #### Defined in -[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L28) +[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L28) diff --git a/package/doc/interfaces/types_v1_featured_items.BaseItem.md b/package/doc/interfaces/types_v1_featured_items.BaseItem.md index 947fda0..5c0fe46 100644 --- a/package/doc/interfaces/types_v1_featured_items.BaseItem.md +++ b/package/doc/interfaces/types_v1_featured_items.BaseItem.md @@ -18,7 +18,7 @@ #### Defined in -[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L4) +[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L4) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L3) +[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L3) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L2) +[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L2) diff --git a/package/doc/interfaces/types_v1_featured_items.Bundle.md b/package/doc/interfaces/types_v1_featured_items.Bundle.md index 4cebf3b..22b41dd 100644 --- a/package/doc/interfaces/types_v1_featured_items.Bundle.md +++ b/package/doc/interfaces/types_v1_featured_items.Bundle.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L19) +[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L19) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L18) +[types/v1-featured-items.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L18) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L21) +[types/v1-featured-items.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L21) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L17) +[types/v1-featured-items.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L17) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L20) +[types/v1-featured-items.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L20) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-featured-items.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L22) +[types/v1-featured-items.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L22) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md b/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md index 95e1d83..aac96f3 100644 --- a/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md +++ b/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md @@ -18,7 +18,7 @@ #### Defined in -[types/v1-featured-items.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L26) +[types/v1-featured-items.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L26) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L28) +[types/v1-featured-items.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L28) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[types/v1-featured-items.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L27) +[types/v1-featured-items.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L27) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md b/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md index 54c76cd..d32f444 100644 --- a/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md +++ b/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md @@ -16,4 +16,4 @@ #### Defined in -[types/v1-featured-items.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L32) +[types/v1-featured-items.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L32) diff --git a/package/doc/interfaces/types_v1_featured_items.Item.md b/package/doc/interfaces/types_v1_featured_items.Item.md index 255d674..4e48b87 100644 --- a/package/doc/interfaces/types_v1_featured_items.Item.md +++ b/package/doc/interfaces/types_v1_featured_items.Item.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L9) +[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L9) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L10) +[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L10) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L11) +[types/v1-featured-items.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L11) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L12) +[types/v1-featured-items.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L12) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-featured-items.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L13) +[types/v1-featured-items.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L13) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-featured-items.ts#L8) +[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L8) diff --git a/package/doc/interfaces/types_v1_profile.Card.md b/package/doc/interfaces/types_v1_profile.Card.md index caea023..2874ca1 100644 --- a/package/doc/interfaces/types_v1_profile.Card.md +++ b/package/doc/interfaces/types_v1_profile.Card.md @@ -19,7 +19,7 @@ #### Defined in -[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L7) +[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L7) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L5) +[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L5) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L4) +[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L4) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L6) +[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L6) diff --git a/package/doc/interfaces/types_v1_profile.ProfileResponse.md b/package/doc/interfaces/types_v1_profile.ProfileResponse.md index c1ecf6d..1552608 100644 --- a/package/doc/interfaces/types_v1_profile.ProfileResponse.md +++ b/package/doc/interfaces/types_v1_profile.ProfileResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L13) +[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L13) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L16) +[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L16) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L17) +[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L17) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L18) +[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L18) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L14) +[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L14) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L11) +[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L11) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L12) +[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L12) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-profile.ts#L15) +[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L15) diff --git a/package/doc/interfaces/types_v1_status.Incident.md b/package/doc/interfaces/types_v1_status.Incident.md index ffc6703..fad1106 100644 --- a/package/doc/interfaces/types_v1_status.Incident.md +++ b/package/doc/interfaces/types_v1_status.Incident.md @@ -24,7 +24,7 @@ #### Defined in -[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L20) +[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L20) ___ @@ -34,7 +34,7 @@ ___ #### Defined in -[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L19) +[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L19) ___ @@ -44,7 +44,7 @@ ___ #### Defined in -[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L24) +[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L24) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L27) +[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L27) ___ @@ -64,7 +64,7 @@ ___ #### Defined in -[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L26) +[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L26) ___ @@ -74,7 +74,7 @@ ___ #### Defined in -[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L22) +[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L22) ___ @@ -84,7 +84,7 @@ ___ #### Defined in -[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L25) +[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L25) ___ @@ -94,7 +94,7 @@ ___ #### Defined in -[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L23) +[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L23) ___ @@ -104,4 +104,4 @@ ___ #### Defined in -[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L21) +[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L21) diff --git a/package/doc/interfaces/types_v1_status.StatusResponse.md b/package/doc/interfaces/types_v1_status.StatusResponse.md index 21ae8ec..57bfbf5 100644 --- a/package/doc/interfaces/types_v1_status.StatusResponse.md +++ b/package/doc/interfaces/types_v1_status.StatusResponse.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L32) +[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L32) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L31) +[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L31) diff --git a/package/doc/interfaces/types_v1_status.Title.md b/package/doc/interfaces/types_v1_status.Title.md index 9efebd9..052074d 100644 --- a/package/doc/interfaces/types_v1_status.Title.md +++ b/package/doc/interfaces/types_v1_status.Title.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L4) +[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L4) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L5) +[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L5) diff --git a/package/doc/interfaces/types_v1_status.Update.md b/package/doc/interfaces/types_v1_status.Update.md index 5c267e0..dde04a8 100644 --- a/package/doc/interfaces/types_v1_status.Update.md +++ b/package/doc/interfaces/types_v1_status.Update.md @@ -22,7 +22,7 @@ #### Defined in -[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L15) +[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L15) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L9) +[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L9) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L12) +[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L12) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L11) +[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L11) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L14) +[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L14) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L13) +[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L13) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-status.ts#L10) +[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L10) diff --git a/package/doc/interfaces/types_v1_store_offers.Cost.md b/package/doc/interfaces/types_v1_store_offers.Cost.md index 6dfb47f..924e093 100644 --- a/package/doc/interfaces/types_v1_store_offers.Cost.md +++ b/package/doc/interfaces/types_v1_store_offers.Cost.md @@ -16,4 +16,4 @@ #### Defined in -[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L2) +[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L2) diff --git a/package/doc/interfaces/types_v1_store_offers.Offer.md b/package/doc/interfaces/types_v1_store_offers.Offer.md index 938df47..8d850c6 100644 --- a/package/doc/interfaces/types_v1_store_offers.Offer.md +++ b/package/doc/interfaces/types_v1_store_offers.Offer.md @@ -20,7 +20,7 @@ #### Defined in -[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L15) +[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L15) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L13) +[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L13) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L12) +[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L12) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L16) +[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L16) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L14) +[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L14) diff --git a/package/doc/interfaces/types_v1_store_offers.Reward.md b/package/doc/interfaces/types_v1_store_offers.Reward.md index 22296fd..6ea9435 100644 --- a/package/doc/interfaces/types_v1_store_offers.Reward.md +++ b/package/doc/interfaces/types_v1_store_offers.Reward.md @@ -18,7 +18,7 @@ #### Defined in -[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L7) +[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L7) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L6) +[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L6) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L8) +[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L8) diff --git a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md index 8d6e1ba..182c03e 100644 --- a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md +++ b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L25) +[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L25) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L26) +[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L26) diff --git a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md index 7d12155..31c18f8 100644 --- a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md +++ b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L20) +[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L20) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-store-offers.ts#L21) +[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L21) diff --git a/package/doc/interfaces/types_v1_version.VersionResponse.md b/package/doc/interfaces/types_v1_version.VersionResponse.md index 9a7f4b4..1494d48 100644 --- a/package/doc/interfaces/types_v1_version.VersionResponse.md +++ b/package/doc/interfaces/types_v1_version.VersionResponse.md @@ -19,7 +19,7 @@ #### Defined in -[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L4) +[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L4) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L3) +[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L3) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L5) +[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L5) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-version.ts#L2) +[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L2) diff --git a/package/doc/interfaces/types_v1_website.Post.md b/package/doc/interfaces/types_v1_website.Post.md index f946d48..7cd1392 100644 --- a/package/doc/interfaces/types_v1_website.Post.md +++ b/package/doc/interfaces/types_v1_website.Post.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L2) +[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L2) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L3) +[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L3) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L4) +[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L4) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L5) +[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L5) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L6) +[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L6) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L7) +[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L7) diff --git a/package/doc/interfaces/types_v1_website.WebsiteResponse.md b/package/doc/interfaces/types_v1_website.WebsiteResponse.md index 39bcf75..1d27e4c 100644 --- a/package/doc/interfaces/types_v1_website.WebsiteResponse.md +++ b/package/doc/interfaces/types_v1_website.WebsiteResponse.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L11) +[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L11) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L12) +[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L12) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L13) +[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L13) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L14) +[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L14) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L15) +[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L15) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-website.ts#L16) +[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L16) diff --git a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md index 17fb2c0..cd1f6ee 100644 --- a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md +++ b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L22) +[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L22) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L21) +[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L21) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L20) +[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L20) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L16) +[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L16) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L17) +[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L17) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L23) +[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L23) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L19) +[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L19) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L18) +[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L18) diff --git a/package/doc/interfaces/types_v2_leaderboard.Player.md b/package/doc/interfaces/types_v2_leaderboard.Player.md index 4937c73..51045e8 100644 --- a/package/doc/interfaces/types_v2_leaderboard.Player.md +++ b/package/doc/interfaces/types_v2_leaderboard.Player.md @@ -26,7 +26,7 @@ #### Defined in -[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L5) +[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L5) ___ @@ -36,7 +36,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L4) +[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L4) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L2) +[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L2) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L3) +[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L3) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L12) +[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L12) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L7) +[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L7) ___ @@ -86,7 +86,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L9) +[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L9) ___ @@ -96,7 +96,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L11) +[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L11) ___ @@ -106,7 +106,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L6) +[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L6) ___ @@ -116,7 +116,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L10) +[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L10) ___ @@ -126,4 +126,4 @@ ___ #### Defined in -[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-leaderboard.ts#L8) +[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L8) diff --git a/package/doc/interfaces/types_v2_mmr.MMRResponse.md b/package/doc/interfaces/types_v2_mmr.MMRResponse.md index a41dd46..58fb5ed 100644 --- a/package/doc/interfaces/types_v2_mmr.MMRResponse.md +++ b/package/doc/interfaces/types_v2_mmr.MMRResponse.md @@ -55,7 +55,7 @@ #### Defined in -[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L35) +[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L35) ___ @@ -82,7 +82,7 @@ ___ #### Defined in -[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L19) +[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L19) ___ @@ -92,7 +92,7 @@ ___ #### Defined in -[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L16) +[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L16) ___ @@ -102,7 +102,7 @@ ___ #### Defined in -[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L18) +[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L18) ___ @@ -112,4 +112,4 @@ ___ #### Defined in -[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L17) +[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L17) diff --git a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md index 783108c..bfe9c8d 100644 --- a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md +++ b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md @@ -21,7 +21,7 @@ #### Defined in -[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L9) +[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L9) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L4) +[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L4) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L7) +[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L7) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L8) +[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L8) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L6) +[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L6) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr.ts#L5) +[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L5) diff --git a/package/doc/interfaces/types_v2_mmr_history.Images.md b/package/doc/interfaces/types_v2_mmr_history.Images.md index 7cbb7b2..8e44a31 100644 --- a/package/doc/interfaces/types_v2_mmr_history.Images.md +++ b/package/doc/interfaces/types_v2_mmr_history.Images.md @@ -19,7 +19,7 @@ #### Defined in -[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L5) +[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L5) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L4) +[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L4) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L6) +[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L6) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L7) +[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L7) diff --git a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md index b21919e..cea6216 100644 --- a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md +++ b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md @@ -23,7 +23,7 @@ #### Defined in -[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L11) +[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L11) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L12) +[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L12) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L17) +[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L17) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L18) +[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L18) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L16) +[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L16) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L13) +[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L13) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L15) +[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L15) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L14) +[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L14) diff --git a/package/doc/interfaces/types_v3_matches.KillEvent.md b/package/doc/interfaces/types_v3_matches.KillEvent.md index 6472030..9169481 100644 --- a/package/doc/interfaces/types_v3_matches.KillEvent.md +++ b/package/doc/interfaces/types_v3_matches.KillEvent.md @@ -36,7 +36,7 @@ #### Defined in -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L106) +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L106) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L100) +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L100) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L98) +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L98) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L99) +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L99) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L90) +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L90) ___ @@ -93,7 +93,7 @@ ___ #### Defined in -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L89) +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L89) ___ @@ -103,7 +103,7 @@ ___ #### Defined in -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L92) +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L92) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L91) +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L91) ___ @@ -123,7 +123,7 @@ ___ #### Defined in -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L93) +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L93) ___ @@ -133,7 +133,7 @@ ___ #### Defined in -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L105) +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L105) ___ @@ -143,7 +143,7 @@ ___ #### Defined in -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L104) +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L104) ___ @@ -153,7 +153,7 @@ ___ #### Defined in -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L97) +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L97) ___ @@ -163,7 +163,7 @@ ___ #### Defined in -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L95) +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L95) ___ @@ -173,7 +173,7 @@ ___ #### Defined in -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L94) +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L94) ___ @@ -183,4 +183,4 @@ ___ #### Defined in -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L96) +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.KillEventMatch.md b/package/doc/interfaces/types_v3_matches.KillEventMatch.md index 9b1e75d..d4a3a64 100644 --- a/package/doc/interfaces/types_v3_matches.KillEventMatch.md +++ b/package/doc/interfaces/types_v3_matches.KillEventMatch.md @@ -41,7 +41,7 @@ #### Defined in -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L106) +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L106) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L100) +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L100) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L98) +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L98) ___ @@ -90,7 +90,7 @@ ___ #### Defined in -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L99) +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L99) ___ @@ -104,7 +104,7 @@ ___ #### Defined in -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L90) +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L90) ___ @@ -118,7 +118,7 @@ ___ #### Defined in -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L89) +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L89) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L92) +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L92) ___ @@ -146,7 +146,7 @@ ___ #### Defined in -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L91) +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L91) ___ @@ -160,7 +160,7 @@ ___ #### Defined in -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L93) +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L93) ___ @@ -174,7 +174,7 @@ ___ #### Defined in -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L105) +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L105) ___ @@ -184,7 +184,7 @@ ___ #### Defined in -[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L192) +[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L192) ___ @@ -198,7 +198,7 @@ ___ #### Defined in -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L104) +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L104) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L97) +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L97) ___ @@ -226,7 +226,7 @@ ___ #### Defined in -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L95) +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L95) ___ @@ -240,7 +240,7 @@ ___ #### Defined in -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L94) +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L94) ___ @@ -254,4 +254,4 @@ ___ #### Defined in -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L96) +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.Match.md b/package/doc/interfaces/types_v3_matches.Match.md index 8ae518b..7d3357f 100644 --- a/package/doc/interfaces/types_v3_matches.Match.md +++ b/package/doc/interfaces/types_v3_matches.Match.md @@ -20,7 +20,7 @@ #### Defined in -[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L229) +[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L229) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L196) +[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L196) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L211) +[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L211) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L228) +[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L228) ___ @@ -99,4 +99,4 @@ ___ #### Defined in -[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L216) +[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L216) diff --git a/package/doc/interfaces/types_v3_matches.Player.md b/package/doc/interfaces/types_v3_matches.Player.md index dbe3cb6..3554142 100644 --- a/package/doc/interfaces/types_v3_matches.Player.md +++ b/package/doc/interfaces/types_v3_matches.Player.md @@ -44,7 +44,7 @@ #### Defined in -[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L35) +[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L35) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L41) +[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L41) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L20) +[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L20) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L9) +[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L9) ___ @@ -108,7 +108,7 @@ ___ #### Defined in -[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L10) +[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L10) ___ @@ -118,7 +118,7 @@ ___ #### Defined in -[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L11) +[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L11) ___ @@ -128,7 +128,7 @@ ___ #### Defined in -[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L74) +[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L74) ___ @@ -138,7 +138,7 @@ ___ #### Defined in -[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L75) +[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L75) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L64) +[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L64) ___ @@ -169,7 +169,7 @@ ___ #### Defined in -[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L8) +[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L8) ___ @@ -179,7 +179,7 @@ ___ #### Defined in -[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L5) +[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L5) ___ @@ -189,7 +189,7 @@ ___ #### Defined in -[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L14) +[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L14) ___ @@ -208,7 +208,7 @@ ___ #### Defined in -[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L28) +[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L28) ___ @@ -218,7 +218,7 @@ ___ #### Defined in -[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L12) +[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L12) ___ @@ -228,7 +228,7 @@ ___ #### Defined in -[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L13) +[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L13) ___ @@ -238,7 +238,7 @@ ___ #### Defined in -[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L4) +[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L4) ___ @@ -256,7 +256,7 @@ ___ #### Defined in -[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L15) +[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L15) ___ @@ -278,7 +278,7 @@ ___ #### Defined in -[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L55) +[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L55) ___ @@ -288,7 +288,7 @@ ___ #### Defined in -[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L6) +[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L6) ___ @@ -298,4 +298,4 @@ ___ #### Defined in -[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L7) +[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L7) diff --git a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md index cf75aa7..1916a52 100644 --- a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md +++ b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md @@ -20,7 +20,7 @@ #### Defined in -[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L84) +[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L84) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L82) +[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L82) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L81) +[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L81) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L83) +[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L83) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L85) +[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L85) diff --git a/package/doc/interfaces/types_v3_matches.Round.md b/package/doc/interfaces/types_v3_matches.Round.md index 7121c59..5b9f32a 100644 --- a/package/doc/interfaces/types_v3_matches.Round.md +++ b/package/doc/interfaces/types_v3_matches.Round.md @@ -22,7 +22,7 @@ #### Defined in -[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L117) +[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L117) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L116) +[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L116) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L129) +[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L129) ___ @@ -64,7 +64,7 @@ ___ #### Defined in -[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L115) +[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L115) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L118) +[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L118) ___ @@ -136,7 +136,7 @@ ___ #### Defined in -[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L139) +[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L139) ___ @@ -146,4 +146,4 @@ ___ #### Defined in -[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L114) +[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L114) diff --git a/package/doc/modules/types_general.md b/package/doc/modules/types_general.md index c9f3d55..174ca93 100644 --- a/package/doc/modules/types_general.md +++ b/package/doc/modules/types_general.md @@ -21,7 +21,7 @@ #### Defined in -[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L12) +[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L12) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L16) +[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L16) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L9) +[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L9) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L3) +[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L3) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L11) +[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L11) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L7) +[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L7) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L10) +[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L10) ___ @@ -91,4 +91,4 @@ ___ #### Defined in -[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/general.ts#L14) +[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L14) diff --git a/package/doc/modules/types_v1_content.md b/package/doc/modules/types_v1_content.md index 6797aea..81afb3c 100644 --- a/package/doc/modules/types_v1_content.md +++ b/package/doc/modules/types_v1_content.md @@ -21,4 +21,4 @@ #### Defined in -[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-content.ts#L3) +[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L3) diff --git a/package/doc/modules/types_v1_crosshair.md b/package/doc/modules/types_v1_crosshair.md index c4a9994..8795f87 100644 --- a/package/doc/modules/types_v1_crosshair.md +++ b/package/doc/modules/types_v1_crosshair.md @@ -14,4 +14,4 @@ #### Defined in -[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v1-crosshair.ts#L1) +[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-crosshair.ts#L1) diff --git a/package/doc/modules/types_v2_match.md b/package/doc/modules/types_v2_match.md index 5468bd3..e2bde99 100644 --- a/package/doc/modules/types_v2_match.md +++ b/package/doc/modules/types_v2_match.md @@ -14,4 +14,4 @@ #### Defined in -[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-match.ts#L3) +[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-match.ts#L3) diff --git a/package/doc/modules/types_v2_mmr_history.md b/package/doc/modules/types_v2_mmr_history.md index 98b579c..5e747f0 100644 --- a/package/doc/modules/types_v2_mmr_history.md +++ b/package/doc/modules/types_v2_mmr_history.md @@ -19,4 +19,4 @@ #### Defined in -[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v2-mmr-history.ts#L21) +[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L21) diff --git a/package/doc/modules/types_v3_matches.md b/package/doc/modules/types_v3_matches.md index 5e4a2da..b005f43 100644 --- a/package/doc/modules/types_v3_matches.md +++ b/package/doc/modules/types_v3_matches.md @@ -23,4 +23,4 @@ #### Defined in -[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/372bfa0/package/src/types/v3-matches.ts#L232) +[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L232) diff --git a/package/src/index.ts b/package/src/index.ts index 7e0f00e..a92fa9f 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -123,7 +123,7 @@ export default class { * Create a new instance of the main API. All API calls are in this class * @example * Create a new instance - * ``` + * ```js * import _VAPI from "unofficial-valorant-api" * const VAPI = new _VAPI("my super secret token") * ``` @@ -228,7 +228,7 @@ export default class { * Get an image of a valorant crosshair by its code * @example * Load and write a crosshair to crosshair.png - * ``` + * ```js * import { writeFileSync } from "fs" * * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") From 82c3715a88cb771849ec363bedf2af248803e555 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 18:25:50 -0500 Subject: [PATCH 11/50] Updated most things. Gotta work on tests and workflow --- .gitignore | 1 + package/.eslintrc.cjs | 11 +- package/doc/classes/index.default.md | 446 ++++++++++-------- ...e_updates.RawCompetitiveUpdatesResponse.md | 8 +- ...w_match_details.RawMatchDetailsResponse.md | 16 +- ...w_match_history.RawMatchHistoryResponse.md | 12 +- .../types_raw_mmr.RawMMRResponse.md | 16 +- .../doc/interfaces/types_v1_content.Act.md | 12 +- .../doc/interfaces/types_v1_content.Asset.md | 8 +- .../types_v1_content.AssetWithPath.md | 10 +- .../types_v1_content.ContentResponse.md | 32 +- .../types_v1_featured_items.BaseItem.md | 41 -- .../types_v1_featured_items.Bundle.md | 74 --- .../types_v1_featured_items.FeaturedBundle.md | 41 -- .../types_v1_featured_items.FeaturedItems.md | 41 ++ ...v1_featured_items.FeaturedItemsResponse.md | 19 - .../types_v1_featured_items.Item.md | 81 +++- .../doc/interfaces/types_v1_profile.Card.md | 8 +- .../types_v1_profile.ProfileResponse.md | 16 +- .../interfaces/types_v1_status.Incident.md | 18 +- .../types_v1_status.StatusResponse.md | 4 +- .../doc/interfaces/types_v1_status.Title.md | 4 +- .../doc/interfaces/types_v1_status.Update.md | 14 +- .../interfaces/types_v1_store_offers.Cost.md | 2 +- .../interfaces/types_v1_store_offers.Offer.md | 10 +- .../types_v1_store_offers.Reward.md | 6 +- ...pes_v1_store_offers.StoreOffersResponse.md | 4 +- ...es_v1_store_offers.UpgradeCurrencyOffer.md | 4 +- .../types_v1_version.VersionResponse.md | 8 +- .../doc/interfaces/types_v1_website.Post.md | 12 +- .../types_v1_website.WebsiteResponse.md | 12 +- ...ypes_v2_leaderboard.LeaderboardResponse.md | 16 +- .../interfaces/types_v2_leaderboard.Player.md | 22 +- .../interfaces/types_v2_mmr.MMRResponse.md | 45 +- .../doc/interfaces/types_v2_mmr.SeasonMMR.md | 12 +- .../interfaces/types_v2_mmr_history.Images.md | 8 +- .../types_v2_mmr_history.MMRHistoryGame.md | 16 +- .../interfaces/types_v3_matches.KillEvent.md | 30 +- .../types_v3_matches.KillEventMatch.md | 32 +- .../doc/interfaces/types_v3_matches.Match.md | 10 +- .../doc/interfaces/types_v3_matches.Player.md | 40 +- .../types_v3_matches.PlayerLocationOnEvent.md | 10 +- .../doc/interfaces/types_v3_matches.Round.md | 14 +- package/doc/modules/types_general.md | 16 +- package/doc/modules/types_v1_content.md | 2 +- package/doc/modules/types_v1_crosshair.md | 2 +- .../doc/modules/types_v1_featured_items.md | 19 +- package/doc/modules/types_v2_match.md | 2 +- package/doc/modules/types_v2_mmr_history.md | 2 +- package/doc/modules/types_v3_matches.md | 2 +- package/examples/discord_bot.js | 2 +- package/package.json | 12 +- package/src/index.ts | 394 ++++++++-------- package/src/types/general.ts | 24 +- package/src/types/raw/competitive-updates.ts | 34 +- package/src/types/raw/match-details.ts | 334 ++++++------- package/src/types/raw/match-history.ts | 20 +- package/src/types/raw/mmr.ts | 94 ++-- package/src/types/v1-content.ts | 60 +-- package/src/types/v1-crosshair.ts | 2 +- package/src/types/v1-featured-items.ts | 41 +- package/src/types/v1-profile.ts | 26 +- package/src/types/v1-status.ts | 42 +- package/src/types/v1-store-offers.ts | 26 +- package/src/types/v1-version.ts | 8 +- package/src/types/v1-website.ts | 24 +- package/src/types/v2-leaderboard.ts | 38 +- package/src/types/v2-match.ts | 4 +- package/src/types/v2-mmr-history.ts | 28 +- package/src/types/v2-mmr.ts | 62 +-- package/src/types/v3-matches.ts | 422 ++++++++--------- package/test/editDocs.js.map | 1 - package/test/editDocs.ts | 44 +- package/test/test.js | 20 - package/test/test.js.map | 1 - package/test/test.ts | 22 - package/test/tsconfig.json | 7 +- package/tsconfig.json | 3 +- 78 files changed, 1469 insertions(+), 1617 deletions(-) delete mode 100644 package/doc/interfaces/types_v1_featured_items.BaseItem.md delete mode 100644 package/doc/interfaces/types_v1_featured_items.Bundle.md delete mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md create mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedItems.md delete mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md delete mode 100644 package/test/editDocs.js.map delete mode 100644 package/test/test.js delete mode 100644 package/test/test.js.map delete mode 100644 package/test/test.ts diff --git a/.gitignore b/.gitignore index afabccd..63e7fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ pnpm-lock.yaml dist/ +*.js.map diff --git a/package/.eslintrc.cjs b/package/.eslintrc.cjs index c77758d..65c4071 100644 --- a/package/.eslintrc.cjs +++ b/package/.eslintrc.cjs @@ -23,7 +23,8 @@ module.exports = { "**/*.d.ts" ], rules: { - indent: [ + indent: "off", + "@typescript-eslint/indent": [ "error", 4 ], @@ -36,13 +37,13 @@ module.exports = { "double" ], semi: "off", - "@typescript-eslint/semi": ["error", "never"], + "@typescript-eslint/semi": ["error", "always"], "@typescript-eslint/member-delimiter-style": [ "error", { multiline: { - delimiter: "none", - requireLast: false + delimiter: "semi", + requireLast: true }, singleline: { delimiter: "comma", @@ -58,4 +59,4 @@ module.exports = { "off" ] } -} +}; diff --git a/package/doc/classes/index.default.md b/package/doc/classes/index.default.md index 990af59..cfa63f3 100644 --- a/package/doc/classes/index.default.md +++ b/package/doc/classes/index.default.md @@ -15,10 +15,10 @@ Below is a list of all the properties of the API including all properties and me ### Methods -- [getAnnouncements](index.default.md#getannouncements) +- [getAccount](index.default.md#getaccount) +- [getAccountByPUUID](index.default.md#getaccountbypuuid) - [getCrosshair](index.default.md#getcrosshair) - [getFeaturedItems](index.default.md#getfeatureditems) -- [getIAPs](index.default.md#getiaps) - [getLeaderboard](index.default.md#getleaderboard) - [getMMR](index.default.md#getmmr) - [getMMRByPUUID](index.default.md#getmmrbypuuid) @@ -27,8 +27,7 @@ Below is a list of all the properties of the API including all properties and me - [getMatch](index.default.md#getmatch) - [getMatches](index.default.md#getmatches) - [getMatchesByPUUID](index.default.md#getmatchesbypuuid) -- [getProfile](index.default.md#getprofile) -- [getProfileByPUUID](index.default.md#getprofilebypuuid) +- [getOffers](index.default.md#getoffers) - [getRawCompetitiveUpdates](index.default.md#getrawcompetitiveupdates) - [getRawMMR](index.default.md#getrawmmr) - [getRawMatchDetails](index.default.md#getrawmatchdetails) @@ -36,6 +35,7 @@ Below is a list of all the properties of the API including all properties and me - [getStatus](index.default.md#getstatus) - [getTranslations](index.default.md#gettranslations) - [getVersion](index.default.md#getversion) +- [getWebsite](index.default.md#getwebsite) - [initUtils](index.default.md#initutils) ## Constructors @@ -56,13 +56,13 @@ const VAPI = new _VAPI("my super secret token") #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `token?` | `string` | (optional) The token, if you have one. Get one from the Discord server ([https://discord.gg/wXNMnqzvAD](https://discord.gg/wXNMnqzvAD)) | +| Name | Type | +| :------ | :------ | +| `token?` | `string` | #### Defined in -[index.ts:132](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L132) +[index.ts:133](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L133) ## Properties @@ -92,7 +92,7 @@ You must call [initUtils](index.default.md#initutils) before using this! #### Defined in -[index.ts:120](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L120) +[index.ts:121](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L121) ___ @@ -139,37 +139,82 @@ You must call [initUtils](index.default.md#initutils) before using this! #### Defined in -[index.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L114) +[index.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L115) ## Methods -### getAnnouncements +### getAccount -▸ **getAnnouncements**(`countryCode`): `Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> +▸ **getAccount**(`__namedParameters`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> -Get all announcements from the valorant website of a country +Get general information about a player from their Riot ID + +**`Remarks`** + +**Returns:** +- Their PUUID +- Their region +- Their account level +- Their current card #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `countryCode` | ``"en-us"`` \| ``"en-gb"`` \| ``"de-de"`` \| ``"es-es"`` \| ``"es-mx"`` \| ``"fr-fr"`` \| ``"it-it"`` \| ``"ja-jp"`` \| ``"ko-kr"`` \| ``"pt-br"`` \| ``"ru-ru"`` \| ``"tr-tr"`` \| ``"vi-vn"`` | Country code of website | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.force?` | `boolean` | +| `__namedParameters.name` | `string` | +| `__namedParameters.tag` | `string` | #### Returns -`Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> +`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> -List of announcements from the valorant website +General information on a players profile #### Defined in -[index.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L253) +[index.ts:522](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L522) + +___ + +### getAccountByPUUID + +▸ **getAccountByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +Get general information about a player from their PUUID + +**`Remarks`** + +**Returns:** +- Their PUUID +- Their region +- Their account level +- Their current card + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.force?` | `boolean` | +| `__namedParameters.puuid` | `string` | + +#### Returns + +`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> + +General information on a players profile + +#### Defined in + +[index.ts:539](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L539) ___ ### getCrosshair -▸ **getCrosshair**(`code`, `size?`): `Promise`<`APIResponse`<`Buffer`\>\> +▸ **getCrosshair**(`__namedParameters`): `Promise`<`APIResponse`<`Buffer`\>\> Get an image of a valorant crosshair by its code @@ -185,10 +230,11 @@ writeFileSync("crosshair.png", crosshair.data) #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `code` | `string` | Valorant crosshair code | -| `size?` | `number` | (optional) Image size (default: `1024`) | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.code` | `string` | +| `__namedParameters.size?` | `number` | #### Returns @@ -198,49 +244,31 @@ The image of the crosshair as a Buffer #### Defined in -[index.ts:241](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L241) +[index.ts:242](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L242) ___ ### getFeaturedItems -▸ **getFeaturedItems**(): `Promise`<`APIResponse`<[`FeaturedItemsResponse`](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md)\>\> +▸ **getFeaturedItems**(): `Promise`<`APIResponse`<[`FeaturedItemsResponse`](../modules/types_v1_featured_items.md#featureditemsresponse)\>\> Get all of the featured items in the current valorant store #### Returns -`Promise`<`APIResponse`<[`FeaturedItemsResponse`](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md)\>\> +`Promise`<`APIResponse`<[`FeaturedItemsResponse`](../modules/types_v1_featured_items.md#featureditemsresponse)\>\> Featured items in the current valorant store #### Defined in -[index.ts:272](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L272) - -___ - -### getIAPs - -▸ **getIAPs**(): `Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> - -Get a list of all in-app-purchases for valorant, such as Radianite and VP - -#### Returns - -`Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> - -List of IAPs in valorant - -#### Defined in - -[index.ts:281](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L281) +[index.ts:273](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L273) ___ ### getLeaderboard -▸ **getLeaderboard**(`region`, `start?`, `end?`, `riotID?`, `puuid?`, `season?`): `Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> +▸ **getLeaderboard**(`__namedParameters`): `Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> Get the leaderboard of a region @@ -254,16 +282,18 @@ TypeError - If both a riotID and puuid are supplied #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `region` | [`Region`](../modules/types_general.md#region) | Region to get leaderboard from | -| `start?` | `number` | (optional) Get 1000 leaderboard players starting from the given start value | -| `end?` | `number` | (optional) Limit the amount of leaderboard players returned | -| `riotID?` | `Object` | (optional) Search for a specific player by their Riot ID | -| `riotID.name` | `string` | The Riot IDs username | -| `riotID.tag` | `string` | The Riot IDs tag | -| `puuid?` | `string` | (optional) Search for a specific player by their PUUID | -| `season?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | (optional) Get leaderboard from a specific season | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.end?` | `number` | +| `__namedParameters.puuid?` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.riotID?` | `Object` | +| `__namedParameters.riotID.name` | `string` | +| `__namedParameters.riotID.tag` | `string` | +| `__namedParameters.season?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | +| `__namedParameters.start?` | `number` | +| `__namedParameters.version?` | ``"v1"`` \| ``"v2"`` | #### Returns @@ -273,13 +303,13 @@ Descending order of the highest ranked players. (Immortal and up) #### Defined in -[index.ts:408](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L408) +[index.ts:409](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L409) ___ ### getMMR -▸ **getMMR**(`name`, `tag`, `region`, `seasonFilter?`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> +▸ **getMMR**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> Gets general info about a players rank by their Riot ID @@ -293,12 +323,13 @@ Gets general info about a players rank by their Riot ID #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | The Riot ID username of the player | -| `tag` | `string` | The Riot ID tag of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | -| `seasonFilter?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | Filter results based on episode and act | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.name` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.seasonFilter?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | +| `__namedParameters.tag` | `string` | #### Returns @@ -308,13 +339,13 @@ Information about a players mmr/rank #### Defined in -[index.ts:437](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L437) +[index.ts:439](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L439) ___ ### getMMRByPUUID -▸ **getMMRByPUUID**(`puuid`, `region`, `seasonFilter?`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> +▸ **getMMRByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> Gets general info about a players rank by their PUUID @@ -328,11 +359,12 @@ Gets general info about a players rank by their PUUID #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The PUUID of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | -| `seasonFilter?` | ``"e1a1"`` \| ``"e1a2"`` \| ``"e1a3"`` \| ``"e2a1"`` \| ``"e2a2"`` \| ``"e2a3"`` \| ``"e3a1"`` \| ``"e3a2"`` \| ``"e3a3"`` \| ``"e4a1"`` \| ``"e4a2"`` \| ``"e4a3"`` \| ``"e5a1"`` \| ``"e5a2"`` \| ``"e5a3"`` \| ``"e6a1"`` \| ``"e6a2"`` \| ``"e6a3"`` \| ``"e7a1"`` \| ``"e7a2"`` \| ``"e7a3"`` \| ``"e8a1"`` \| ``"e8a2"`` \| ``"e8a3"`` \| ``"e9a1"`` \| ``"e9a2"`` \| ``"e9a3"`` \| ``"e10a1"`` \| ``"e10a2"`` \| ``"e10a3"`` | Filter results based on episode and act | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.seasonFilter?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | #### Returns @@ -342,23 +374,24 @@ Information about a players mmr/rank #### Defined in -[index.ts:455](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L455) +[index.ts:457](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L457) ___ ### getMMRHistory -▸ **getMMRHistory**(`name`, `tag`, `region`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> +▸ **getMMRHistory**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> Get a list of rr changes of a player by their Riot ID #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | The Riot ID username of the player | -| `tag` | `string` | The Riot tag username of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The players region | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.name` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.tag` | `string` | #### Returns @@ -368,22 +401,23 @@ List of rr changes (recent competitive games) #### Defined in -[index.ts:367](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L367) +[index.ts:368](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L368) ___ ### getMMRHistoryByPUUID -▸ **getMMRHistoryByPUUID**(`puuid`, `region`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> +▸ **getMMRHistoryByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> Get a list of rr changes of a player by their PUUID #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The PUUID of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The players region | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -393,21 +427,22 @@ List of rr changes (recent competitive games) #### Defined in -[index.ts:378](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L378) +[index.ts:379](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L379) ___ ### getMatch -▸ **getMatch**(`matchID`): `Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> +▸ **getMatch**(`__namedParameters`): `Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> Get information about a match #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `matchID` | `string` | The matchs ID | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.matchID` | `string` | #### Returns @@ -417,13 +452,13 @@ Information about the match #### Defined in -[index.ts:388](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L388) +[index.ts:389](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L389) ___ ### getMatches -▸ **getMatches**(`name`, `tag`, `region`, `gamemodeFilter?`, `mapFilter?`, `size?`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> +▸ **getMatches**(`__namedParameters`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> Gets the most recent 5 matches by a players Riot ID @@ -436,16 +471,21 @@ Gets the most recent 5 matches by a players Riot ID - Information about every round in the match such as plant/defuse info, etc - Information about every kill in the game including killer, victim, assist, etc +**`Throws`** + +TypeError - Only if the size parameter is set and not between 1-10 + #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | The Riot ID username of the player | -| `tag` | `string` | The Riot ID tag of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | -| `gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | Filter results based on gamemode | -| `mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | Filter results based on map | -| `size?` | `any` | Filter results based on ?? **{needs testing)** | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | +| `__namedParameters.mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | +| `__namedParameters.name` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.size?` | `number` | +| `__namedParameters.tag` | `string` | #### Returns @@ -455,13 +495,13 @@ Info about a players last 5 matches #### Defined in -[index.ts:477](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L477) +[index.ts:480](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L480) ___ ### getMatchesByPUUID -▸ **getMatchesByPUUID**(`puuid`, `region`, `gamemodeFilter?`, `mapFilter?`, `size?`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> +▸ **getMatchesByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> Gets the most recent 5 matches by a players PUUID @@ -474,98 +514,54 @@ Gets the most recent 5 matches by a players PUUID - Information about every round in the match such as plant/defuse info, etc - Information about every kill in the game including killer, victim, assist, etc -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The PUUID username of the player | -| `region` | [`Region`](../modules/types_general.md#region) | The region of the player | -| `gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | Filter results based on gamemode | -| `mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | Filter results based on map | -| `size?` | `any` | Filter results based on ?? **{needs testing)** | - -#### Returns - -`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> - -Info about a players last 5 matches - -#### Defined in - -[index.ts:498](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L498) - -___ - -### getProfile - -▸ **getProfile**(`name`, `tag`, `force?`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> - -Get general information about a player from their Riot ID - -**`Remarks`** +**`Throws`** -**Returns:** -- Their PUUID -- Their region -- Their account level -- Their current card +TypeError - Only if the size parameter is set and not between 1-10 #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | The Riot ID username of the player | -| `tag` | `string` | The Riot ID tag of the player | -| `force?` | `boolean` | Force data update? | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | +| `__namedParameters.mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | +| `__namedParameters.size?` | `number` | #### Returns -`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> +`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> -General information on a players profile +Info about a players last 5 matches #### Defined in -[index.ts:516](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L516) +[index.ts:503](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L503) ___ -### getProfileByPUUID +### getOffers -▸ **getProfileByPUUID**(`puuid`, `force?`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> +▸ **getOffers**(): `Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> -Get general information about a player from their PUUID - -**`Remarks`** - -**Returns:** -- Their PUUID -- Their region -- Their account level -- Their current card - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The PUUID of the player | -| `force?` | `boolean` | Force data update? | +Get a list of all the prices of every skin in the game #### Returns -`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> +`Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> -General information on a players profile +List of skin prices #### Defined in -[index.ts:533](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L533) +[index.ts:282](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L282) ___ ### getRawCompetitiveUpdates -▸ **getRawCompetitiveUpdates**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> +▸ **getRawCompetitiveUpdates**(`__namedParameters`): `Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** @@ -575,11 +571,12 @@ Gets raw data for a players competitive updates (rr changes) from the valorant A #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The match ID to get details about | -| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | -| `queries?` | `any` | Extra queries | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.queries?` | `any` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -589,13 +586,13 @@ Information about the players rr history #### Defined in -[index.ts:336](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L336) +[index.ts:337](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L337) ___ ### getRawMMR -▸ **getRawMMR**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> +▸ **getRawMMR**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** @@ -605,11 +602,12 @@ Gets raw data for a players mmr from the valorant API. **(Not formatted, use onl #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The match ID to get details about | -| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | -| `queries?` | `any` | Extra queries | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.queries?` | `any` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -619,13 +617,13 @@ Information about the players mmr #### Defined in -[index.ts:352](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L352) +[index.ts:353](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L353) ___ ### getRawMatchDetails -▸ **getRawMatchDetails**(`matchID`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> +▸ **getRawMatchDetails**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) @@ -635,11 +633,12 @@ Gets raw data for a match from the valorant API. (Not formatted, use only if you #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `matchID` | `string` | The match ID to get details about | -| `region` | [`Region`](../modules/types_general.md#region) | Region of the match | -| `queries?` | `any` | Extra queries | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.matchID` | `string` | +| `__namedParameters.queries?` | `any` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -649,13 +648,13 @@ Information about the match #### Defined in -[index.ts:304](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L304) +[index.ts:305](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L305) ___ ### getRawMatchHistory -▸ **getRawMatchHistory**(`puuid`, `region`, `queries?`): `Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> +▸ **getRawMatchHistory**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) @@ -665,11 +664,12 @@ Gets raw data for a players match history from the valorant API. (Not formatted, #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `puuid` | `string` | The match ID to get details about | -| `region` | [`Region`](../modules/types_general.md#region) | Region of the player | -| `queries?` | `any` | Extra queries | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.puuid` | `string` | +| `__namedParameters.queries?` | `any` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -679,21 +679,22 @@ Information about the players match history #### Defined in -[index.ts:320](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L320) +[index.ts:321](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L321) ___ ### getStatus -▸ **getStatus**(`region`): `Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> +▸ **getStatus**(`__namedParameters`): `Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> Will get information about the current maintenances and incidents about a region #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `region` | [`Region`](../modules/types_general.md#region) | Region to get info about | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -703,21 +704,22 @@ Info about undergoing maintenances and incidents in a region of valorant #### Defined in -[index.ts:291](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L291) +[index.ts:292](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L292) ___ ### getTranslations -▸ **getTranslations**(`locale?`): `Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> +▸ **getTranslations**(`__namedParameters?`): `Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `locale?` | [`Locale`](../modules/types_general.md#locale) | If this is set, instead of all translations, it will return just translations for this language | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.locale?` | [`Locale`](../modules/types_general.md#locale) | #### Returns @@ -725,21 +727,22 @@ Get all translations for every character, skin, map, ability, spray, charm, play #### Defined in -[index.ts:419](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L419) +[index.ts:421](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L421) ___ ### getVersion -▸ **getVersion**(`region`): `Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> +▸ **getVersion**(`__namedParameters`): `Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> Get information about valorant in a region, such as the client version, branch, and server version #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `region` | [`Region`](../modules/types_general.md#region) | Region of valorant to get info about | +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | #### Returns @@ -749,7 +752,32 @@ Information about a regions valorant #### Defined in -[index.ts:263](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L263) +[index.ts:264](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L264) + +___ + +### getWebsite + +▸ **getWebsite**(`__namedParameters`): `Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> + +Get all announcements from the valorant website of a country + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `__namedParameters` | `Object` | +| `__namedParameters.countryCode` | ``"en-us"`` \| ``"en-gb"`` \| ``"de-de"`` \| ``"es-es"`` \| ``"es-mx"`` \| ``"fr-fr"`` \| ``"it-it"`` \| ``"ja-jp"`` \| ``"ko-kr"`` \| ``"pt-br"`` \| ``"ru-ru"`` \| ``"tr-tr"`` \| ``"vi-vn"`` | + +#### Returns + +`Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> + +List of announcements from the valorant website + +#### Defined in + +[index.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L254) ___ @@ -769,4 +797,4 @@ Must be called before using [rankImages](index.default.md#rankimages) and [mapIm #### Defined in -[index.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/index.ts#L139) +[index.ts:140](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L140) diff --git a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md index 94719bb..c863b8a 100644 --- a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md +++ b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md @@ -19,7 +19,7 @@ #### Defined in -[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L21) +[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L21) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L20) +[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L20) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L19) +[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L19) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/competitive-updates.ts#L22) +[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L22) diff --git a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md index 57014f9..73b4cc2 100644 --- a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md +++ b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L251) +[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L251) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L252) +[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L252) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L255) +[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L255) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L249) +[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L249) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L250) +[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L250) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L256) +[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L256) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L254) +[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L254) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-details.ts#L253) +[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L253) diff --git a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md index a28ed6b..ae875cf 100644 --- a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md +++ b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md @@ -21,7 +21,7 @@ #### Defined in -[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L11) +[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L11) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L12) +[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L12) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L14) +[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L14) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L10) +[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L10) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L13) +[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L13) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/match-history.ts#L15) +[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L15) diff --git a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md index 59c6440..144415e 100644 --- a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md +++ b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L63) +[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L63) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L62) +[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L62) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L61) +[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L61) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L59) +[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L59) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L60) +[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L60) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L58) +[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L58) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L57) +[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L57) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/raw/mmr.ts#L64) +[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L64) diff --git a/package/doc/interfaces/types_v1_content.Act.md b/package/doc/interfaces/types_v1_content.Act.md index 51cc163..42bb227 100644 --- a/package/doc/interfaces/types_v1_content.Act.md +++ b/package/doc/interfaces/types_v1_content.Act.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L19) +[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L19) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L24) +[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L24) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L23) +[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L23) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L22) +[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L22) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L20) +[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L20) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L21) +[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L21) diff --git a/package/doc/interfaces/types_v1_content.Asset.md b/package/doc/interfaces/types_v1_content.Asset.md index 6ee860b..7222f65 100644 --- a/package/doc/interfaces/types_v1_content.Asset.md +++ b/package/doc/interfaces/types_v1_content.Asset.md @@ -25,7 +25,7 @@ #### Defined in -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L11) +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L11) ___ @@ -35,7 +35,7 @@ ___ #### Defined in -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L10) +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L10) ___ @@ -45,7 +45,7 @@ ___ #### Defined in -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L9) +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L9) ___ @@ -55,4 +55,4 @@ ___ #### Defined in -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L8) +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.AssetWithPath.md b/package/doc/interfaces/types_v1_content.AssetWithPath.md index 1962311..3c242b5 100644 --- a/package/doc/interfaces/types_v1_content.AssetWithPath.md +++ b/package/doc/interfaces/types_v1_content.AssetWithPath.md @@ -30,7 +30,7 @@ #### Defined in -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L11) +[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L11) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L15) +[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L15) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L10) +[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L10) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L9) +[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L9) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L8) +[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.ContentResponse.md b/package/doc/interfaces/types_v1_content.ContentResponse.md index dc25da9..d24d981 100644 --- a/package/doc/interfaces/types_v1_content.ContentResponse.md +++ b/package/doc/interfaces/types_v1_content.ContentResponse.md @@ -31,7 +31,7 @@ #### Defined in -[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L42) +[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L42) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L43) +[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L43) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L29) +[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L29) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L39) +[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L39) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L38) +[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L38) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L31) +[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L31) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L34) +[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L34) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L35) +[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L35) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L30) +[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L30) ___ @@ -121,7 +121,7 @@ ___ #### Defined in -[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L40) +[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L40) ___ @@ -131,7 +131,7 @@ ___ #### Defined in -[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L41) +[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L41) ___ @@ -141,7 +141,7 @@ ___ #### Defined in -[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L33) +[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L33) ___ @@ -151,7 +151,7 @@ ___ #### Defined in -[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L32) +[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L32) ___ @@ -161,7 +161,7 @@ ___ #### Defined in -[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L37) +[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L37) ___ @@ -171,7 +171,7 @@ ___ #### Defined in -[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L36) +[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L36) ___ @@ -181,4 +181,4 @@ ___ #### Defined in -[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L28) +[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L28) diff --git a/package/doc/interfaces/types_v1_featured_items.BaseItem.md b/package/doc/interfaces/types_v1_featured_items.BaseItem.md deleted file mode 100644 index 5c0fe46..0000000 --- a/package/doc/interfaces/types_v1_featured_items.BaseItem.md +++ /dev/null @@ -1,41 +0,0 @@ -# Interface: BaseItem - -[types/v1-featured-items](../modules/types_v1_featured_items.md).BaseItem - -## Table of contents - -### Properties - -- [Amount](types_v1_featured_items.BaseItem.md#amount) -- [ItemID](types_v1_featured_items.BaseItem.md#itemid) -- [ItemTypeID](types_v1_featured_items.BaseItem.md#itemtypeid) - -## Properties - -### Amount - -• **Amount**: `number` - -#### Defined in - -[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L4) - -___ - -### ItemID - -• **ItemID**: `string` - -#### Defined in - -[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L3) - -___ - -### ItemTypeID - -• **ItemTypeID**: `string` - -#### Defined in - -[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L2) diff --git a/package/doc/interfaces/types_v1_featured_items.Bundle.md b/package/doc/interfaces/types_v1_featured_items.Bundle.md deleted file mode 100644 index 22b41dd..0000000 --- a/package/doc/interfaces/types_v1_featured_items.Bundle.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: Bundle - -[types/v1-featured-items](../modules/types_v1_featured_items.md).Bundle - -## Table of contents - -### Properties - -- [CurrencyID](types_v1_featured_items.Bundle.md#currencyid) -- [DataAssetID](types_v1_featured_items.Bundle.md#dataassetid) -- [DurationRemainingInSeconds](types_v1_featured_items.Bundle.md#durationremaininginseconds) -- [ID](types_v1_featured_items.Bundle.md#id) -- [Items](types_v1_featured_items.Bundle.md#items) -- [WholesaleOnly](types_v1_featured_items.Bundle.md#wholesaleonly) - -## Properties - -### CurrencyID - -• **CurrencyID**: `string` - -#### Defined in - -[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L19) - -___ - -### DataAssetID - -• **DataAssetID**: `string` - -#### Defined in - -[types/v1-featured-items.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L18) - -___ - -### DurationRemainingInSeconds - -• **DurationRemainingInSeconds**: `number` - -#### Defined in - -[types/v1-featured-items.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L21) - -___ - -### ID - -• **ID**: `string` - -#### Defined in - -[types/v1-featured-items.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L17) - -___ - -### Items - -• **Items**: [`Item`](types_v1_featured_items.Item.md)[] - -#### Defined in - -[types/v1-featured-items.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L20) - -___ - -### WholesaleOnly - -• **WholesaleOnly**: `boolean` - -#### Defined in - -[types/v1-featured-items.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L22) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md b/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md deleted file mode 100644 index aac96f3..0000000 --- a/package/doc/interfaces/types_v1_featured_items.FeaturedBundle.md +++ /dev/null @@ -1,41 +0,0 @@ -# Interface: FeaturedBundle - -[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedBundle - -## Table of contents - -### Properties - -- [Bundle](types_v1_featured_items.FeaturedBundle.md#bundle) -- [BundleRemainingDurationInSeconds](types_v1_featured_items.FeaturedBundle.md#bundleremainingdurationinseconds) -- [Bundles](types_v1_featured_items.FeaturedBundle.md#bundles) - -## Properties - -### Bundle - -• **Bundle**: [`Bundle`](types_v1_featured_items.Bundle.md) - -#### Defined in - -[types/v1-featured-items.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L26) - -___ - -### BundleRemainingDurationInSeconds - -• **BundleRemainingDurationInSeconds**: `number` - -#### Defined in - -[types/v1-featured-items.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L28) - -___ - -### Bundles - -• **Bundles**: [`Bundle`](types_v1_featured_items.Bundle.md)[] - -#### Defined in - -[types/v1-featured-items.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L27) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md b/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md new file mode 100644 index 0000000..236eabb --- /dev/null +++ b/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md @@ -0,0 +1,41 @@ +# Interface: FeaturedItems + +[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedItems + +## Table of contents + +### Properties + +- [bundle\_uuid](types_v1_featured_items.FeaturedItems.md#bundle_uuid) +- [items](types_v1_featured_items.FeaturedItems.md#items) +- [seconds\_remaining](types_v1_featured_items.FeaturedItems.md#seconds_remaining) + +## Properties + +### bundle\_uuid + +• **bundle\_uuid**: `string` + +#### Defined in + +[types/v1-featured-items.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L14) + +___ + +### items + +• **items**: [`Item`](types_v1_featured_items.Item.md)[] + +#### Defined in + +[types/v1-featured-items.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L15) + +___ + +### seconds\_remaining + +• **seconds\_remaining**: `number` + +#### Defined in + +[types/v1-featured-items.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L16) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md b/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md deleted file mode 100644 index d32f444..0000000 --- a/package/doc/interfaces/types_v1_featured_items.FeaturedItemsResponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# Interface: FeaturedItemsResponse - -[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedItemsResponse - -## Table of contents - -### Properties - -- [FeaturedBundle](types_v1_featured_items.FeaturedItemsResponse.md#featuredbundle) - -## Properties - -### FeaturedBundle - -• **FeaturedBundle**: [`FeaturedBundle`](types_v1_featured_items.FeaturedBundle.md) - -#### Defined in - -[types/v1-featured-items.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L32) diff --git a/package/doc/interfaces/types_v1_featured_items.Item.md b/package/doc/interfaces/types_v1_featured_items.Item.md index 4e48b87..91d7a63 100644 --- a/package/doc/interfaces/types_v1_featured_items.Item.md +++ b/package/doc/interfaces/types_v1_featured_items.Item.md @@ -6,69 +6,102 @@ ### Properties -- [BasePrice](types_v1_featured_items.Item.md#baseprice) -- [CurrencyID](types_v1_featured_items.Item.md#currencyid) -- [DiscountPercent](types_v1_featured_items.Item.md#discountpercent) -- [DiscountedPrice](types_v1_featured_items.Item.md#discountedprice) -- [IsPromoItem](types_v1_featured_items.Item.md#ispromoitem) -- [Item](types_v1_featured_items.Item.md#item) +- [amount](types_v1_featured_items.Item.md#amount) +- [base\_price](types_v1_featured_items.Item.md#base_price) +- [discount\_percent](types_v1_featured_items.Item.md#discount_percent) +- [discounted\_price](types_v1_featured_items.Item.md#discounted_price) +- [image](types_v1_featured_items.Item.md#image) +- [name](types_v1_featured_items.Item.md#name) +- [promo\_item](types_v1_featured_items.Item.md#promo_item) +- [type](types_v1_featured_items.Item.md#type) +- [uuid](types_v1_featured_items.Item.md#uuid) ## Properties -### BasePrice +### amount -• **BasePrice**: `number` +• **amount**: `number` #### Defined in -[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L9) +[types/v1-featured-items.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L6) ___ -### CurrencyID +### base\_price -• **CurrencyID**: `string` +• **base\_price**: `number` #### Defined in -[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L10) +[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L8) ___ -### DiscountPercent +### discount\_percent -• **DiscountPercent**: `number` +• **discount\_percent**: `number` #### Defined in -[types/v1-featured-items.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L11) +[types/v1-featured-items.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L7) ___ -### DiscountedPrice +### discounted\_price -• **DiscountedPrice**: `number` +• **discounted\_price**: `number` #### Defined in -[types/v1-featured-items.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L12) +[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L9) ___ -### IsPromoItem +### image -• **IsPromoItem**: `boolean` +• **image**: `string` #### Defined in -[types/v1-featured-items.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L13) +[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L4) ___ -### Item +### name -• **Item**: [`BaseItem`](types_v1_featured_items.BaseItem.md) +• **name**: `string` #### Defined in -[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-featured-items.ts#L8) +[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L3) + +___ + +### promo\_item + +• **promo\_item**: `boolean` + +#### Defined in + +[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L10) + +___ + +### type + +• **type**: `string` + +#### Defined in + +[types/v1-featured-items.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L5) + +___ + +### uuid + +• **uuid**: `string` + +#### Defined in + +[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L2) diff --git a/package/doc/interfaces/types_v1_profile.Card.md b/package/doc/interfaces/types_v1_profile.Card.md index 2874ca1..cde6132 100644 --- a/package/doc/interfaces/types_v1_profile.Card.md +++ b/package/doc/interfaces/types_v1_profile.Card.md @@ -19,7 +19,7 @@ #### Defined in -[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L7) +[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L7) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L5) +[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L5) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L4) +[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L4) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L6) +[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L6) diff --git a/package/doc/interfaces/types_v1_profile.ProfileResponse.md b/package/doc/interfaces/types_v1_profile.ProfileResponse.md index 1552608..602f9a7 100644 --- a/package/doc/interfaces/types_v1_profile.ProfileResponse.md +++ b/package/doc/interfaces/types_v1_profile.ProfileResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L13) +[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L13) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L16) +[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L16) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L17) +[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L17) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L18) +[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L18) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L14) +[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L14) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L11) +[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L11) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L12) +[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L12) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-profile.ts#L15) +[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L15) diff --git a/package/doc/interfaces/types_v1_status.Incident.md b/package/doc/interfaces/types_v1_status.Incident.md index fad1106..e264bb7 100644 --- a/package/doc/interfaces/types_v1_status.Incident.md +++ b/package/doc/interfaces/types_v1_status.Incident.md @@ -24,7 +24,7 @@ #### Defined in -[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L20) +[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L20) ___ @@ -34,7 +34,7 @@ ___ #### Defined in -[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L19) +[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L19) ___ @@ -44,7 +44,7 @@ ___ #### Defined in -[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L24) +[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L24) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L27) +[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L27) ___ @@ -64,7 +64,7 @@ ___ #### Defined in -[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L26) +[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L26) ___ @@ -74,7 +74,7 @@ ___ #### Defined in -[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L22) +[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L22) ___ @@ -84,7 +84,7 @@ ___ #### Defined in -[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L25) +[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L25) ___ @@ -94,7 +94,7 @@ ___ #### Defined in -[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L23) +[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L23) ___ @@ -104,4 +104,4 @@ ___ #### Defined in -[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L21) +[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L21) diff --git a/package/doc/interfaces/types_v1_status.StatusResponse.md b/package/doc/interfaces/types_v1_status.StatusResponse.md index 57bfbf5..52ddaeb 100644 --- a/package/doc/interfaces/types_v1_status.StatusResponse.md +++ b/package/doc/interfaces/types_v1_status.StatusResponse.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L32) +[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L32) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L31) +[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L31) diff --git a/package/doc/interfaces/types_v1_status.Title.md b/package/doc/interfaces/types_v1_status.Title.md index 052074d..5a01cf3 100644 --- a/package/doc/interfaces/types_v1_status.Title.md +++ b/package/doc/interfaces/types_v1_status.Title.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L4) +[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L4) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L5) +[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L5) diff --git a/package/doc/interfaces/types_v1_status.Update.md b/package/doc/interfaces/types_v1_status.Update.md index dde04a8..efca417 100644 --- a/package/doc/interfaces/types_v1_status.Update.md +++ b/package/doc/interfaces/types_v1_status.Update.md @@ -22,7 +22,7 @@ #### Defined in -[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L15) +[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L15) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L9) +[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L9) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L12) +[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L12) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L11) +[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L11) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L14) +[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L14) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L13) +[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L13) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-status.ts#L10) +[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L10) diff --git a/package/doc/interfaces/types_v1_store_offers.Cost.md b/package/doc/interfaces/types_v1_store_offers.Cost.md index 924e093..961e924 100644 --- a/package/doc/interfaces/types_v1_store_offers.Cost.md +++ b/package/doc/interfaces/types_v1_store_offers.Cost.md @@ -16,4 +16,4 @@ #### Defined in -[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L2) +[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L2) diff --git a/package/doc/interfaces/types_v1_store_offers.Offer.md b/package/doc/interfaces/types_v1_store_offers.Offer.md index 8d850c6..65daf53 100644 --- a/package/doc/interfaces/types_v1_store_offers.Offer.md +++ b/package/doc/interfaces/types_v1_store_offers.Offer.md @@ -20,7 +20,7 @@ #### Defined in -[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L15) +[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L15) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L13) +[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L13) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L12) +[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L12) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L16) +[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L16) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L14) +[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L14) diff --git a/package/doc/interfaces/types_v1_store_offers.Reward.md b/package/doc/interfaces/types_v1_store_offers.Reward.md index 6ea9435..d552364 100644 --- a/package/doc/interfaces/types_v1_store_offers.Reward.md +++ b/package/doc/interfaces/types_v1_store_offers.Reward.md @@ -18,7 +18,7 @@ #### Defined in -[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L7) +[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L7) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L6) +[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L6) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L8) +[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L8) diff --git a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md index 182c03e..3a4f84c 100644 --- a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md +++ b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L25) +[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L25) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L26) +[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L26) diff --git a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md index 31c18f8..25f5451 100644 --- a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md +++ b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md @@ -17,7 +17,7 @@ #### Defined in -[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L20) +[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L20) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-store-offers.ts#L21) +[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L21) diff --git a/package/doc/interfaces/types_v1_version.VersionResponse.md b/package/doc/interfaces/types_v1_version.VersionResponse.md index 1494d48..da0adf0 100644 --- a/package/doc/interfaces/types_v1_version.VersionResponse.md +++ b/package/doc/interfaces/types_v1_version.VersionResponse.md @@ -19,7 +19,7 @@ #### Defined in -[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L4) +[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L4) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L3) +[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L3) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L5) +[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L5) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-version.ts#L2) +[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L2) diff --git a/package/doc/interfaces/types_v1_website.Post.md b/package/doc/interfaces/types_v1_website.Post.md index 7cd1392..34b4ad6 100644 --- a/package/doc/interfaces/types_v1_website.Post.md +++ b/package/doc/interfaces/types_v1_website.Post.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L2) +[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L2) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L3) +[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L3) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L4) +[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L4) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L5) +[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L5) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L6) +[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L6) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L7) +[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L7) diff --git a/package/doc/interfaces/types_v1_website.WebsiteResponse.md b/package/doc/interfaces/types_v1_website.WebsiteResponse.md index 1d27e4c..4f2cf45 100644 --- a/package/doc/interfaces/types_v1_website.WebsiteResponse.md +++ b/package/doc/interfaces/types_v1_website.WebsiteResponse.md @@ -21,7 +21,7 @@ #### Defined in -[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L11) +[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L11) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L12) +[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L12) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L13) +[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L13) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L14) +[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L14) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L15) +[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L15) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-website.ts#L16) +[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L16) diff --git a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md index cd1f6ee..c1da65d 100644 --- a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md +++ b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md @@ -23,7 +23,7 @@ #### Defined in -[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L22) +[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L22) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L21) +[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L21) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L20) +[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L20) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L16) +[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L16) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L17) +[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L17) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L23) +[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L23) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L19) +[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L19) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L18) +[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L18) diff --git a/package/doc/interfaces/types_v2_leaderboard.Player.md b/package/doc/interfaces/types_v2_leaderboard.Player.md index 51045e8..b6ed6bd 100644 --- a/package/doc/interfaces/types_v2_leaderboard.Player.md +++ b/package/doc/interfaces/types_v2_leaderboard.Player.md @@ -26,7 +26,7 @@ #### Defined in -[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L5) +[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L5) ___ @@ -36,7 +36,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L4) +[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L4) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L2) +[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L2) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L3) +[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L3) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L12) +[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L12) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L7) +[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L7) ___ @@ -86,7 +86,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L9) +[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L9) ___ @@ -96,7 +96,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L11) +[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L11) ___ @@ -106,7 +106,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L6) +[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L6) ___ @@ -116,7 +116,7 @@ ___ #### Defined in -[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L10) +[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L10) ___ @@ -126,4 +126,4 @@ ___ #### Defined in -[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-leaderboard.ts#L8) +[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L8) diff --git a/package/doc/interfaces/types_v2_mmr.MMRResponse.md b/package/doc/interfaces/types_v2_mmr.MMRResponse.md index 58fb5ed..0511305 100644 --- a/package/doc/interfaces/types_v2_mmr.MMRResponse.md +++ b/package/doc/interfaces/types_v2_mmr.MMRResponse.md @@ -18,44 +18,9 @@ • **by\_season**: `Object` -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `e10a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e10a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e10a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e1a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e1a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e1a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e2a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e2a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e2a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e3a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e3a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e3a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e4a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e4a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e4a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e5a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e5a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e5a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e6a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e6a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e6a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e7a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e7a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e7a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e8a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e8a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e8a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e9a1` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e9a2` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | -| `e9a3` | [`SeasonMMR`](types_v2_mmr.SeasonMMR.md) | - #### Defined in -[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L35) +[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L35) ___ @@ -82,7 +47,7 @@ ___ #### Defined in -[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L19) +[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L19) ___ @@ -92,7 +57,7 @@ ___ #### Defined in -[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L16) +[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L16) ___ @@ -102,7 +67,7 @@ ___ #### Defined in -[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L18) +[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L18) ___ @@ -112,4 +77,4 @@ ___ #### Defined in -[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L17) +[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L17) diff --git a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md index bfe9c8d..b2c19c4 100644 --- a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md +++ b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md @@ -21,7 +21,7 @@ #### Defined in -[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L9) +[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L9) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L4) +[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L4) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L7) +[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L7) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L8) +[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L8) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L6) +[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L6) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr.ts#L5) +[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L5) diff --git a/package/doc/interfaces/types_v2_mmr_history.Images.md b/package/doc/interfaces/types_v2_mmr_history.Images.md index 8e44a31..f682568 100644 --- a/package/doc/interfaces/types_v2_mmr_history.Images.md +++ b/package/doc/interfaces/types_v2_mmr_history.Images.md @@ -19,7 +19,7 @@ #### Defined in -[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L5) +[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L5) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L4) +[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L4) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L6) +[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L6) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L7) +[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L7) diff --git a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md index cea6216..ebff520 100644 --- a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md +++ b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md @@ -23,7 +23,7 @@ #### Defined in -[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L11) +[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L11) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L12) +[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L12) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L17) +[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L17) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L18) +[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L18) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L16) +[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L16) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L13) +[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L13) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L15) +[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L15) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L14) +[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L14) diff --git a/package/doc/interfaces/types_v3_matches.KillEvent.md b/package/doc/interfaces/types_v3_matches.KillEvent.md index 9169481..e55e638 100644 --- a/package/doc/interfaces/types_v3_matches.KillEvent.md +++ b/package/doc/interfaces/types_v3_matches.KillEvent.md @@ -36,7 +36,7 @@ #### Defined in -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L106) +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L106) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L100) +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L100) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L98) +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L98) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L99) +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L99) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L90) +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L90) ___ @@ -93,7 +93,7 @@ ___ #### Defined in -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L89) +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L89) ___ @@ -103,7 +103,7 @@ ___ #### Defined in -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L92) +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L92) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L91) +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L91) ___ @@ -123,7 +123,7 @@ ___ #### Defined in -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L93) +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L93) ___ @@ -133,7 +133,7 @@ ___ #### Defined in -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L105) +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L105) ___ @@ -143,7 +143,7 @@ ___ #### Defined in -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L104) +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L104) ___ @@ -153,7 +153,7 @@ ___ #### Defined in -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L97) +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L97) ___ @@ -163,7 +163,7 @@ ___ #### Defined in -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L95) +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L95) ___ @@ -173,7 +173,7 @@ ___ #### Defined in -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L94) +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L94) ___ @@ -183,4 +183,4 @@ ___ #### Defined in -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L96) +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.KillEventMatch.md b/package/doc/interfaces/types_v3_matches.KillEventMatch.md index d4a3a64..a73bfec 100644 --- a/package/doc/interfaces/types_v3_matches.KillEventMatch.md +++ b/package/doc/interfaces/types_v3_matches.KillEventMatch.md @@ -41,7 +41,7 @@ #### Defined in -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L106) +[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L106) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L100) +[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L100) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L98) +[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L98) ___ @@ -90,7 +90,7 @@ ___ #### Defined in -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L99) +[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L99) ___ @@ -104,7 +104,7 @@ ___ #### Defined in -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L90) +[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L90) ___ @@ -118,7 +118,7 @@ ___ #### Defined in -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L89) +[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L89) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L92) +[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L92) ___ @@ -146,7 +146,7 @@ ___ #### Defined in -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L91) +[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L91) ___ @@ -160,7 +160,7 @@ ___ #### Defined in -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L93) +[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L93) ___ @@ -174,7 +174,7 @@ ___ #### Defined in -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L105) +[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L105) ___ @@ -184,7 +184,7 @@ ___ #### Defined in -[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L192) +[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L192) ___ @@ -198,7 +198,7 @@ ___ #### Defined in -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L104) +[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L104) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L97) +[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L97) ___ @@ -226,7 +226,7 @@ ___ #### Defined in -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L95) +[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L95) ___ @@ -240,7 +240,7 @@ ___ #### Defined in -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L94) +[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L94) ___ @@ -254,4 +254,4 @@ ___ #### Defined in -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L96) +[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.Match.md b/package/doc/interfaces/types_v3_matches.Match.md index 7d3357f..4cc9573 100644 --- a/package/doc/interfaces/types_v3_matches.Match.md +++ b/package/doc/interfaces/types_v3_matches.Match.md @@ -20,7 +20,7 @@ #### Defined in -[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L229) +[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L229) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L196) +[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L196) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L211) +[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L211) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L228) +[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L228) ___ @@ -99,4 +99,4 @@ ___ #### Defined in -[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L216) +[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L216) diff --git a/package/doc/interfaces/types_v3_matches.Player.md b/package/doc/interfaces/types_v3_matches.Player.md index 3554142..577fa25 100644 --- a/package/doc/interfaces/types_v3_matches.Player.md +++ b/package/doc/interfaces/types_v3_matches.Player.md @@ -44,7 +44,7 @@ #### Defined in -[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L35) +[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L35) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L41) +[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L41) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L20) +[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L20) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L9) +[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L9) ___ @@ -108,7 +108,7 @@ ___ #### Defined in -[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L10) +[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L10) ___ @@ -118,7 +118,7 @@ ___ #### Defined in -[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L11) +[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L11) ___ @@ -128,7 +128,7 @@ ___ #### Defined in -[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L74) +[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L74) ___ @@ -138,7 +138,7 @@ ___ #### Defined in -[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L75) +[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L75) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L64) +[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L64) ___ @@ -169,7 +169,7 @@ ___ #### Defined in -[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L8) +[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L8) ___ @@ -179,7 +179,7 @@ ___ #### Defined in -[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L5) +[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L5) ___ @@ -189,7 +189,7 @@ ___ #### Defined in -[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L14) +[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L14) ___ @@ -208,7 +208,7 @@ ___ #### Defined in -[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L28) +[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L28) ___ @@ -218,7 +218,7 @@ ___ #### Defined in -[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L12) +[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L12) ___ @@ -228,7 +228,7 @@ ___ #### Defined in -[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L13) +[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L13) ___ @@ -238,7 +238,7 @@ ___ #### Defined in -[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L4) +[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L4) ___ @@ -256,7 +256,7 @@ ___ #### Defined in -[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L15) +[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L15) ___ @@ -278,7 +278,7 @@ ___ #### Defined in -[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L55) +[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L55) ___ @@ -288,7 +288,7 @@ ___ #### Defined in -[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L6) +[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L6) ___ @@ -298,4 +298,4 @@ ___ #### Defined in -[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L7) +[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L7) diff --git a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md index 1916a52..03d3f23 100644 --- a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md +++ b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md @@ -20,7 +20,7 @@ #### Defined in -[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L84) +[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L84) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L82) +[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L82) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L81) +[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L81) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L83) +[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L83) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L85) +[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L85) diff --git a/package/doc/interfaces/types_v3_matches.Round.md b/package/doc/interfaces/types_v3_matches.Round.md index 5b9f32a..374a0ba 100644 --- a/package/doc/interfaces/types_v3_matches.Round.md +++ b/package/doc/interfaces/types_v3_matches.Round.md @@ -22,7 +22,7 @@ #### Defined in -[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L117) +[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L117) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L116) +[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L116) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L129) +[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L129) ___ @@ -64,7 +64,7 @@ ___ #### Defined in -[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L115) +[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L115) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L118) +[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L118) ___ @@ -136,7 +136,7 @@ ___ #### Defined in -[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L139) +[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L139) ___ @@ -146,4 +146,4 @@ ___ #### Defined in -[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L114) +[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L114) diff --git a/package/doc/modules/types_general.md b/package/doc/modules/types_general.md index 174ca93..e56a295 100644 --- a/package/doc/modules/types_general.md +++ b/package/doc/modules/types_general.md @@ -21,7 +21,7 @@ #### Defined in -[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L12) +[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L12) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L16) +[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L16) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L9) +[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L9) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L3) +[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L3) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L11) +[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L11) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L7) +[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L7) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L10) +[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L10) ___ @@ -91,4 +91,4 @@ ___ #### Defined in -[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/general.ts#L14) +[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L14) diff --git a/package/doc/modules/types_v1_content.md b/package/doc/modules/types_v1_content.md index 81afb3c..05f1e07 100644 --- a/package/doc/modules/types_v1_content.md +++ b/package/doc/modules/types_v1_content.md @@ -21,4 +21,4 @@ #### Defined in -[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-content.ts#L3) +[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L3) diff --git a/package/doc/modules/types_v1_crosshair.md b/package/doc/modules/types_v1_crosshair.md index 8795f87..b2ed516 100644 --- a/package/doc/modules/types_v1_crosshair.md +++ b/package/doc/modules/types_v1_crosshair.md @@ -14,4 +14,4 @@ #### Defined in -[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v1-crosshair.ts#L1) +[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-crosshair.ts#L1) diff --git a/package/doc/modules/types_v1_featured_items.md b/package/doc/modules/types_v1_featured_items.md index 7a1ad2f..91e7fbe 100644 --- a/package/doc/modules/types_v1_featured_items.md +++ b/package/doc/modules/types_v1_featured_items.md @@ -4,8 +4,19 @@ ### Interfaces -- [BaseItem](../interfaces/types_v1_featured_items.BaseItem.md) -- [Bundle](../interfaces/types_v1_featured_items.Bundle.md) -- [FeaturedBundle](../interfaces/types_v1_featured_items.FeaturedBundle.md) -- [FeaturedItemsResponse](../interfaces/types_v1_featured_items.FeaturedItemsResponse.md) +- [FeaturedItems](../interfaces/types_v1_featured_items.FeaturedItems.md) - [Item](../interfaces/types_v1_featured_items.Item.md) + +### Type Aliases + +- [FeaturedItemsResponse](types_v1_featured_items.md#featureditemsresponse) + +## Type Aliases + +### FeaturedItemsResponse + +Ƭ **FeaturedItemsResponse**: [`FeaturedItems`](../interfaces/types_v1_featured_items.FeaturedItems.md)[] + +#### Defined in + +[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L19) diff --git a/package/doc/modules/types_v2_match.md b/package/doc/modules/types_v2_match.md index e2bde99..50b18b6 100644 --- a/package/doc/modules/types_v2_match.md +++ b/package/doc/modules/types_v2_match.md @@ -14,4 +14,4 @@ #### Defined in -[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-match.ts#L3) +[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-match.ts#L3) diff --git a/package/doc/modules/types_v2_mmr_history.md b/package/doc/modules/types_v2_mmr_history.md index 5e747f0..c013f0f 100644 --- a/package/doc/modules/types_v2_mmr_history.md +++ b/package/doc/modules/types_v2_mmr_history.md @@ -19,4 +19,4 @@ #### Defined in -[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v2-mmr-history.ts#L21) +[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L21) diff --git a/package/doc/modules/types_v3_matches.md b/package/doc/modules/types_v3_matches.md index b005f43..d14fda3 100644 --- a/package/doc/modules/types_v3_matches.md +++ b/package/doc/modules/types_v3_matches.md @@ -23,4 +23,4 @@ #### Defined in -[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/c148ced/package/src/types/v3-matches.ts#L232) +[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L232) diff --git a/package/examples/discord_bot.js b/package/examples/discord_bot.js index 0f84766..9c8c09d 100644 --- a/package/examples/discord_bot.js +++ b/package/examples/discord_bot.js @@ -14,7 +14,7 @@ client.on("interactionCreate", async interaction => { switch (interaction.commandName) { case "mmr": { await interaction.deferReply({ ephemeral: true }) - const mmr_data = await VAPI.getMMR(interaction.options.getString("name"), interaction.options.getString("tag"), "na") + const mmr_data = await VAPI.getMMR(interaction.options.getString("name"), interaction.options.getString("tag"), "eu") if (mmr_data.error) { return interaction.editReply({ diff --git a/package/package.json b/package/package.json index 7b2c4ee..689a95b 100644 --- a/package/package.json +++ b/package/package.json @@ -2,8 +2,8 @@ "name": "unofficial-valorant-api", "version": "3.0.0-stable.0", "description": "Library for the Unofficial VALORANT API by api.henrikdev.xyz", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", "dependencies": { "axios": "^0.27.2" }, @@ -33,8 +33,10 @@ "typescript": "^4.7.4" }, "scripts": { - "docGen": "typedoc --plugin typedoc-plugin-markdown && node ./test/editDocs.js", - "tsc": "tsc", - "testTsc": "cd test && tsc" + "build:tsc": "tsc --watch false", + "build:docs": "typedoc --plugin typedoc-plugin-markdown && node ./test/editDocs.js", + "build": "npm run build:tsc && npm run build:docs", + "develop:tsc": "tsc", + "develop:testTsc": "cd test && tsc" } } diff --git a/package/src/index.ts b/package/src/index.ts index a92fa9f..e78471c 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,22 +1,23 @@ -import axios, { type AxiosRequestConfig } from "axios" -import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general" -import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates" -import type { RawMatchDetailsResponse } from "./types/raw/match-details" -import type { RawMatchHistoryResponse } from "./types/raw/match-history" -import type { RawMMRResponse } from "./types/raw/mmr" -import type { ContentResponse } from "./types/v1-content" -import type { CrosshairResponse } from "./types/v1-crosshair" -import type { FeaturedItemsResponse } from "./types/v1-featured-items" -import type { ProfileResponse } from "./types/v1-profile" -import type { StatusResponse } from "./types/v1-status" -import type { StoreOffersResponse } from "./types/v1-store-offers" -import type { VersionResponse } from "./types/v1-version" -import type { WebsiteResponse } from "./types/v1-website" -import type { LeaderboardResponse } from "./types/v2-leaderboard" -import type { MatchResponse } from "./types/v2-match" -import type { MMRResponse } from "./types/v2-mmr" -import type { MMRHistoryResponse } from "./types/v2-mmr-history" -import type { MatchesResponse } from "./types/v3-matches" +import axios, { type AxiosRequestConfig } from "axios"; +import packageJson from "../package.json" assert { type: "json" }; +import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; +import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; +import type { RawMatchDetailsResponse } from "./types/raw/match-details"; +import type { RawMatchHistoryResponse } from "./types/raw/match-history"; +import type { RawMMRResponse } from "./types/raw/mmr"; +import type { ContentResponse } from "./types/v1-content"; +import type { CrosshairResponse } from "./types/v1-crosshair"; +import type { FeaturedItemsResponse } from "./types/v1-featured-items"; +import type { ProfileResponse } from "./types/v1-profile"; +import type { StatusResponse } from "./types/v1-status"; +import type { StoreOffersResponse } from "./types/v1-store-offers"; +import type { VersionResponse } from "./types/v1-version"; +import type { WebsiteResponse } from "./types/v1-website"; +import type { LeaderboardResponse } from "./types/v2-leaderboard"; +import type { MatchResponse } from "./types/v2-match"; +import type { MMRResponse } from "./types/v2-mmr"; +import type { MMRHistoryResponse } from "./types/v2-mmr-history"; +import type { MatchesResponse } from "./types/v3-matches"; interface APIResponse { /** @@ -26,31 +27,31 @@ interface APIResponse { * - `400-499` Client error response * - `500-599` Server error response */ - status: number - /** + status: number; + /** * Response from API */ - data?: dataType - /** + data?: dataType; + /** * Information about current rate limits */ - rateLimits: RateLimit - /** + rateLimits: RateLimit; + /** * Error object (if there is) */ - error?: ErrorObject - /** + error?: ErrorObject; + /** * Original request URL */ - url: string + url: string; } interface ErrorObject { - /** + /** * Error message */ - message: string - /** + message: string; + /** * The response status of the API. See remarks for info about specific error codes * @remarks * Can be any of the following: @@ -73,51 +74,51 @@ interface ErrorObject { * - `114` Invalid country code * - `115` Invalid season */ - code: number - /** + code: number; + /** * Error details to help fix the problem */ - details: string + details: string; } interface RateLimit { - /** + /** * Number of used API requests per 60s. * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ - used: number - /** + used: number; + /** * Remaining number of API requests per 60s. * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ - remaining: number - /** + remaining: number; + /** * In how many seconds (every 60s) your rate limit is going to reset. * @remarks * `30 req/min` on free accounts, and `60 req/min` on regular token */ - reset: number + reset: number; } /** * Base API endpoint */ -const baseUrl = "https://api.henrikdev.xyz/valorant" +const baseUrl = "https://api.henrikdev.xyz/valorant"; export default class { /** * Images for every {@link Rank} * @remarks * You must call {@link initUtils} before using this! */ - rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } } + rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } }; /** * Images for every {@link ValorantMap} * @remarks * You must call {@link initUtils} before using this! */ - mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } } + mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } }; /** * Create a new instance of the main API. All API calls are in this class @@ -127,7 +128,7 @@ export default class { * import _VAPI from "unofficial-valorant-api" * const VAPI = new _VAPI("my super secret token") * ``` - * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) + * @param args.token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) */ constructor(private token?: string) {} @@ -137,26 +138,26 @@ export default class { * Must be called before using {@link default.rankImages} and {@link default.mapImages} */ async initUtils(): Promise { - const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data + const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; if (mapsReq) { - this.mapImages = {} as any + this.mapImages = {} as any; mapsReq.forEach((map: any) => (this.mapImages[map.displayName] = { splash: map.splash, minimap: map.displayIcon, landscape: map.listViewIcon - })) + })); } - const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data + const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; if (tiersReq) { - const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1) - this.rankImages = {} as any + const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1); + this.rankImages = {} as any; tiersReq[tiersReq.length - 1].tiers.forEach((rank: any) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { large: rank.largeIcon, small: rank.smallIcon, triangleUp: rank.rankTriangleUpIcon, triangleDown: rank.rankTriangleDownIcon - })) + })); } } @@ -164,9 +165,9 @@ export default class { * @internal * Parses the body of an axios response */ - private _parseBody(body: any): any { - if (body.errors) return body.errors - return body.status ? body.data : body + private parseBody(body: { errors: string, status: number, data: any }) { + if (body.errors) return body.errors; + return body.status ? body.data : body; } /** @@ -178,38 +179,38 @@ export default class { * @param config - Override the default axios config with custom params * @returns Formatted response */ - private async _fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { + private async fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { // Format search params into `?something=like&this` const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { - const value = searchParams[cur] - if (value === null || value === undefined) return acc + const value = searchParams[cur]; + if (value === null || value === undefined) return acc; return acc === "" ? `?${cur}=${value}` - : acc + `&${cur}=${value}` - }, "") : "" + : acc + `&${cur}=${value}`; + }, "") : ""; // Main request const req = await axios({ url: encodeURI(`${baseUrl}/${url}${queryParams}`), responseType: "json", headers: this.token - ? { Authorization: this.token, "User-Agent": "unofficial-valorant-api/node.js/2.3.0", } - : { "User-Agent": "unofficial-valorant-api/node.js/2.3.0", }, + ? { Authorization: this.token, "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, } + : { "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, }, ...config - }).catch(error => error) + }).catch(error => error); // Formatting response return { status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers["Content-Type"] ? this._parseBody(req.data) : req.data, + data: req.response ? null : !req.config.headers["Content-Type"] ? this.parseBody(req.data) : req.data, rateLimits: { used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), }, - error: req.response ? this._parseBody(req.response.data) : null, + error: req.response ? this.parseBody(req.response.data) : null, url: req.config.url - } + }; } /** @@ -218,10 +219,10 @@ export default class { * @param input - Object to check for non empty values * @throws {@link TypeError} - Only if there is a empty value to a key */ - private async _validateArgs(input: { [key: string]: any }) { + private async validateArgs(input: { [key: string]: any }) { Object.keys(input).forEach(key => { - if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`) - }) + if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`); + }); } /** @@ -234,35 +235,35 @@ export default class { * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") * writeFileSync("crosshair.png", crosshair.data) * ``` - * @param code - Valorant crosshair code - * @param size - (optional) Image size (default: `1024`) + * @param args.code - Valorant crosshair code + * @param args.size - (optional) Image size (default: `1024`) * @returns The image of the crosshair as a {@link Buffer} */ - async getCrosshair(code: string, size?: number): Promise> { - this._validateArgs({ code }) - return this._fetch("v1/crosshair/generate", { id: code, size }, { + async getCrosshair({ code, size }: { code: string, size?: number }): Promise> { + this.validateArgs({ code }); + return this.fetch("v1/crosshair/generate", { id: code, size }, { responseType: "arraybuffer" - }) + }); } /** * Get all announcements from the valorant website of a country - * @param countryCode - Country code of website + * @param args.countryCode - Country code of website * @returns List of announcements from the valorant website */ - async getAnnouncements(countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn"): Promise> { - this._validateArgs({ countryCode }) - return this._fetch(`v1/website/${countryCode}`) + async getWebsite({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { + this.validateArgs({ countryCode }); + return this.fetch(`v1/website/${countryCode}`); } /** * Get information about valorant in a region, such as the client version, branch, and server version - * @param region - Region of valorant to get info about + * @param args.region - Region of valorant to get info about * @returns Information about a regions valorant */ - async getVersion(region: Region): Promise> { - this._validateArgs({ region }) - return this._fetch(`v1/version/${region}`) + async getVersion({ region }: { region: Region }): Promise> { + this.validateArgs({ region }); + return this.fetch(`v1/version/${region}`); } /** @@ -271,153 +272,154 @@ export default class { */ async getFeaturedItems(): Promise> { // ! v2 is bugged for some reason - return this._fetch("v1/store-featured") + return this.fetch("v2/store-featured"); } /** - * Get a list of all in-app-purchases for valorant, such as Radianite and VP - * @returns List of IAPs in valorant + * Get a list of all the prices of every skin in the game + * @returns List of skin prices */ - async getIAPs(): Promise> { + async getOffers(): Promise> { // ! find out wtf this actually does - return this._fetch("v1/store-offers") + return this.fetch("v1/store-offers"); } /** * Will get information about the current maintenances and incidents about a region - * @param region - Region to get info about + * @param args.region - Region to get info about * @returns Info about undergoing maintenances and incidents in a region of valorant */ - async getStatus(region: Region): Promise> { - this._validateArgs({ region }) - return this._fetch(`v1/status/${region}`) + async getStatus({ region }: { region: Region }): Promise> { + this.validateArgs({ region }); + return this.fetch(`v1/status/${region}`); } /** * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) * @see {@link default.getMatch} for an easier response to use - * @param matchID - The match ID to get details about - * @param region - Region of the match - * @param queries - Extra queries + * @param args.matchID - The match ID to get details about + * @param args.region - Region of the match + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchDetails_FetchMatchDetails.md documentation} * @returns Information about the match */ - async getRawMatchDetails(matchID: string, region: Region, queries?: any): Promise> { - this._validateArgs({ matchID, region }) - return await this._fetch("v1/raw", null, { - data: { type: "matchdetails", value: matchID, region, queries }, + async getRawMatchDetails({ matchID, region, queries }: { matchID: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ matchID, region }); + return await this.fetch("v1/raw", null, { + data: { type: "matchdetails", value: matchID, region, ...queries }, method: "POST" - }) + }); } /** * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) * @see {@link default.getMatches} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchHistory_FetchMatchHistory.md documentation} * @returns Information about the players match history */ - async getRawMatchHistory(puuid: string, region: Region, queries?: any): Promise> { - this._validateArgs({ puuid, region }) - return await this._fetch("v1/raw", null, { - data: { type: "matchhistory", value: puuid, region, queries }, + async getRawMatchHistory({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "matchhistory", value: puuid, region, ...queries }, method: "POST" - }) + }); } /** * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** * @see {@link default.getMMRHistory} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchCompetitiveUpdates.md documentation} * @returns Information about the players rr history */ - async getRawCompetitiveUpdates(puuid: string, region: Region, queries?: any): Promise> { - this._validateArgs({ puuid, region }) - return await this._fetch("v1/raw", null, { - data: { type: "mmr", value: puuid, region, queries }, + async getRawCompetitiveUpdates({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "mmr", value: puuid, region, ...queries }, method: "POST" - }) + }); } /** * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** * @see {@link default.getMMR} for an easier response to use - * @param puuid - The match ID to get details about - * @param region - Region of the player - * @param queries - Extra queries + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchPlayer.md documentation} * @returns Information about the players mmr */ - async getRawMMR(puuid: string, region: Region, queries?: any): Promise> { - this._validateArgs({ puuid, region }) - return await this._fetch("v1/raw", null, { - data: { type: "competitiveupdates", value: puuid, region, queries }, + async getRawMMR({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "competitiveupdates", value: puuid, region, ...queries }, method: "POST" - }) + }); } /** * Get a list of rr changes of a player by their Riot ID - * @param name - The Riot ID username of the player - * @param tag - The Riot tag username of the player - * @param region - The players region + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot tag username of the player + * @param args.region - The players region * @return List of rr changes (recent competitive games) */ - async getMMRHistory(name: string, tag: string, region: Region): Promise> { - this._validateArgs({ name, tag, region }) - return this._fetch(`v1/mmr-history/${region}/${name}/${tag}`) + async getMMRHistory({ name, tag, region }: { name: string, tag: string, region: Region }): Promise> { + this.validateArgs({ name, tag, region }); + return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); } /** * Get a list of rr changes of a player by their PUUID - * @param puuid - The PUUID of the player - * @param region - The players region + * @param args.puuid - The PUUID of the player + * @param args.region - The players region * @return List of rr changes (recent competitive games) */ - async getMMRHistoryByPUUID(puuid: string, region: Region): Promise> { - this._validateArgs({ puuid, region }) - return this._fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`) + async getMMRHistoryByPUUID({ puuid, region }: { puuid: string, region: Region }): Promise> { + this.validateArgs({ puuid, region }); + return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); } /** * Get information about a match - * @param matchID - The matchs ID + * @param args.matchID - The matchs ID * @returns Information about the match */ - async getMatch(matchID: string): Promise> { - this._validateArgs({ matchID }) - return this._fetch(`v2/match/${matchID}`) + async getMatch({ matchID }: { matchID: string }): Promise> { + this.validateArgs({ matchID }); + return this.fetch(`v2/match/${matchID}`); } /** * Get the leaderboard of a region * @remarks * In order for player filtering to work, they must be Immortal or higher - * @param region - Region to get leaderboard from - * @param start - (optional) Get 1000 leaderboard players starting from the given start value - * @param end - (optional) Limit the amount of leaderboard players returned - * @param riotID - (optional) Search for a specific player by their Riot ID - * @param riotID.name - The Riot IDs username - * @param riotID.tag - The Riot IDs tag - * @param puuid - (optional) Search for a specific player by their PUUID - * @param season - (optional) Get leaderboard from a specific season + * @param args.region - Region to get leaderboard from + * @param args.start - (optional) Get 1000 leaderboard players starting from the given start value + * @param args.end - (optional) Limit the amount of leaderboard players returned + * @param args.riotID - (optional) Search for a specific player by their Riot ID + * @param args.riotID.name - The Riot IDs username + * @param args.riotID.tag - The Riot IDs tag + * @param args.puuid - (optional) Search for a specific player by their PUUID + * @param args.season - (optional) Get leaderboard from a specific season * @returns Descending order of the highest ranked players. (Immortal and up) * @throws {@link TypeError} - If both a riotID and puuid are supplied */ - async getLeaderboard(region: Region, start?: number, end?: number, riotID?: { name: string, tag: string }, puuid?: string, season?: Season): Promise> { - if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid") + async getLeaderboard({ region, start, end, riotID, puuid, season, version }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season, version?: "v1" | "v2" }): Promise> { + if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); + if (!version) version = "v2"; - this._validateArgs({ region }) - return this._fetch(`v2/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }) + this.validateArgs({ region }); + return this.fetch(`${version}/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); } /** * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param locale - If this is set, instead of all translations, it will return just translations for this language + * @param args.locale - If this is set, instead of all translations, it will return just translations for this language */ - async getTranslations(locale?: Locale): Promise> { - return this._fetch("v1/content", { locale }) + async getTranslations({ locale }: { locale?: Locale } = {}): Promise> { + return this.fetch("v1/content", { locale }); } /** @@ -428,15 +430,15 @@ export default class { * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.seasonFilter - Filter results based on episode and act * @returns Information about a players mmr/rank */ - async getMMR(name: string, tag: string, region: Region, seasonFilter?: Season): Promise> { - this._validateArgs({ name, tag, region }) - return this._fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }) + async getMMR({ name, tag, region, seasonFilter }: { name: string, tag: string, region: Region, seasonFilter?: Season }): Promise> { + this.validateArgs({ name, tag, region }); + return this.fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }); } /** @@ -447,14 +449,14 @@ export default class { * - RR change on their last game * - Their PUUID * - Their peak rank from every season - * @param puuid - The PUUID of the player - * @param region - The region of the player - * @param seasonFilter - Filter results based on episode and act + * @param args.puuid - The PUUID of the player + * @param args.region - The region of the player + * @param args.seasonFilter - Filter results based on episode and act * @returns Information about a players mmr/rank */ - async getMMRByPUUID(puuid: string, region: Region, seasonFilter?: Season): Promise> { - this._validateArgs({ puuid, region }) - return this._fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }) + async getMMRByPUUID({ puuid, region, seasonFilter }: { puuid: string, region: Region, seasonFilter?: Season }): Promise> { + this.validateArgs({ puuid, region }); + return this.fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }); } /** @@ -466,17 +468,19 @@ export default class { * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) * @returns Info about a players last 5 matches + * @throws {@link TypeError} - Only if the size parameter is set and not between 1-10 */ - async getMatches(name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { - this._validateArgs({ name, tag, region }) - return this._fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }) + async getMatches({ name, tag, region, gamemodeFilter, mapFilter, size }: { name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { + this.validateArgs({ name, tag, region }); + if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); + return this.fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); } /** @@ -488,16 +492,18 @@ export default class { * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc * - Information about every round in the match such as plant/defuse info, etc * - Information about every kill in the game including killer, victim, assist, etc - * @param puuid - The PUUID username of the player - * @param region - The region of the player - * @param gamemodeFilter - Filter results based on gamemode - * @param mapFilter - Filter results based on map - * @param size - Filter results based on ?? **{needs testing)** + * @param args.puuid - The PUUID username of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) * @returns Info about a players last 5 matches + * @throws {@link TypeError} - Only if the size parameter is set and not between 1-10 */ - async getMatchesByPUUID(puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: any): Promise> { - this._validateArgs({ name: puuid, region }) - return this._fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }) + async getMatchesByPUUID({ puuid, region, gamemodeFilter, mapFilter, size }: { puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { + this.validateArgs({ name: puuid, region }); + if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); + return this.fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); } /** @@ -508,14 +514,14 @@ export default class { * - Their region * - Their account level * - Their current card - * @param name - The Riot ID username of the player - * @param tag - The Riot ID tag of the player - * @param force - Force data update? + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.force - Force data update? * @return General information on a players profile */ - async getProfile(name: string, tag: string, force?: boolean): Promise> { - this._validateArgs({ name, tag }) - return this._fetch(`v1/account/${name}/${tag}`, { force }) + async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { + this.validateArgs({ name, tag }); + return this.fetch(`v1/account/${name}/${tag}`, { force }); } /** @@ -526,12 +532,12 @@ export default class { * - Their region * - Their account level * - Their current card - * @param puuid The PUUID of the player - * @param force Force data update? + * @param args.puuid The PUUID of the player + * @param args.force Force data update? * @return General information on a players profile */ - async getProfileByPUUID(puuid: string, force?: boolean): Promise> { - this._validateArgs({ name: puuid }) - return this._fetch(`v1/by-puuid/account/${puuid}`, { force }) + async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { + this.validateArgs({ name: puuid }); + return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); } } diff --git a/package/src/types/general.ts b/package/src/types/general.ts index ed81bcd..d489248 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -1,16 +1,16 @@ -type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal" -type SubRank = "1" | "2" | "3" -export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated" +type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; +type SubRank = "1" | "2" | "3"; +export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; -type Episodes = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" -type Acts = "1" | "2" | "3" -export type Season = `e${Episodes}a${Acts}` +type Episodes = number; +type Acts = "1" | "2" | "3"; +export type Season = `e${Episodes}a${Acts}`; -export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball" -export type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl" -export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br" -export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru" +export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; +export type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl"; +export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br"; +export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru"; // TODO Check "Golden Gun" and "Tactical Knife" -export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee" +export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee"; -export type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW" +export type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW"; diff --git a/package/src/types/raw/competitive-updates.ts b/package/src/types/raw/competitive-updates.ts index aad409a..b19a348 100644 --- a/package/src/types/raw/competitive-updates.ts +++ b/package/src/types/raw/competitive-updates.ts @@ -1,23 +1,23 @@ -import { Region } from "../general" +import { Region } from "../general"; interface Match { - MatchID: string - MapID: string - SeasonID: string - MatchStartTime: any - TierAfterUpdate: number - TierBeforeUpdate: number - RankedRatingAfterUpdate: number - RankedRatingBeforeUpdate: number - RankedRatingEarned: number - RankedRatingPerformanceBonus: number - CompetitiveMovement: string - AFKPenalty: number + MatchID: string; + MapID: string; + SeasonID: string; + MatchStartTime: any; + TierAfterUpdate: number; + TierBeforeUpdate: number; + RankedRatingAfterUpdate: number; + RankedRatingBeforeUpdate: number; + RankedRatingEarned: number; + RankedRatingPerformanceBonus: number; + CompetitiveMovement: string; + AFKPenalty: number; } export interface RawCompetitiveUpdatesResponse { - Version: number - Subject: string - Matches: Match[] - region: Region + Version: number; + Subject: string; + Matches: Match[]; + region: Region; } diff --git a/package/src/types/raw/match-details.ts b/package/src/types/raw/match-details.ts index 3bd553a..abfe835 100644 --- a/package/src/types/raw/match-details.ts +++ b/package/src/types/raw/match-details.ts @@ -1,257 +1,257 @@ -import { Region } from "../general" +import { Region } from "../general"; interface PartyRRPenalties { - [key: string]: number + [key: string]: number; } interface MatchInfo { - matchId: string - mapId: string - gamePodId: string - gameLoopZone: string - gameServerAddress: string - gameVersion: string - gameLengthMillis: number - gameStartMillis: number - provisioningFlowID: string - isCompleted: boolean - customGameName: string - forcePostProcessing: boolean - queueID: string - gameMode: string - isRanked: boolean - isMatchSampled: boolean - seasonId: string - completionState: string - platformType: string - partyRRPenalties: PartyRRPenalties - shouldMatchDisablePenalties: boolean + matchId: string; + mapId: string; + gamePodId: string; + gameLoopZone: string; + gameServerAddress: string; + gameVersion: string; + gameLengthMillis: number; + gameStartMillis: number; + provisioningFlowID: string; + isCompleted: boolean; + customGameName: string; + forcePostProcessing: boolean; + queueID: string; + gameMode: string; + isRanked: boolean; + isMatchSampled: boolean; + seasonId: string; + completionState: string; + platformType: string; + partyRRPenalties: PartyRRPenalties; + shouldMatchDisablePenalties: boolean; } interface PlatformInfo { - platformType: string - platformOS: string - platformOSVersion: string - platformChipset: string + platformType: string; + platformOS: string; + platformOSVersion: string; + platformChipset: string; } interface AbilityCasts { - grenadeCasts: number - ability1Casts: number - ability2Casts: number - ultimateCasts: number + grenadeCasts: number; + ability1Casts: number; + ability2Casts: number; + ultimateCasts: number; } interface Stats { - score: number - roundsPlayed: number - kills: number - deaths: number - assists: number - playtimeMillis: number - abilityCasts: AbilityCasts + score: number; + roundsPlayed: number; + kills: number; + deaths: number; + assists: number; + playtimeMillis: number; + abilityCasts: AbilityCasts; } interface RoundDamage { - round: number - receiver: string - damage: number + round: number; + receiver: string; + damage: number; } interface XpModification { - Value: number - ID: string + Value: number; + ID: string; } interface BehaviorFactors { - afkRounds: number - collisions: number - damageParticipationOutgoing: number - friendlyFireIncoming: number - friendlyFireOutgoing: number - mouseMovement: number - stayedInSpawnRounds: number + afkRounds: number; + collisions: number; + damageParticipationOutgoing: number; + friendlyFireIncoming: number; + friendlyFireOutgoing: number; + mouseMovement: number; + stayedInSpawnRounds: number; } interface BaseAction { - idleTimeMillis: number - objectiveCompleteTimeMillis: number + idleTimeMillis: number; + objectiveCompleteTimeMillis: number; } interface AdaptiveBots extends BaseAction { - adaptiveBotAverageDurationMillisAllAttempts: number - adaptiveBotAverageDurationMillisFirstAttempt: number - killDetailsFirstAttempt?: any + adaptiveBotAverageDurationMillisAllAttempts: number; + adaptiveBotAverageDurationMillisFirstAttempt: number; + killDetailsFirstAttempt?: any; } interface DefendBombSite extends BaseAction { - success: boolean + success: boolean; } interface SettingStatus { - isMouseSensitivityDefault: boolean - isCrosshairDefault: boolean + isMouseSensitivityDefault: boolean; + isCrosshairDefault: boolean; } interface NewPlayerExperienceDetails { - basicMovement: BaseAction - basicGunSkill: BaseAction - adaptiveBots: AdaptiveBots - ability: BaseAction - bombPlant: BaseAction - defendBombSite: DefendBombSite - settingStatus: SettingStatus + basicMovement: BaseAction; + basicGunSkill: BaseAction; + adaptiveBots: AdaptiveBots; + ability: BaseAction; + bombPlant: BaseAction; + defendBombSite: DefendBombSite; + settingStatus: SettingStatus; } interface Player { - subject: string - gameName: string - tagLine: string - platformInfo: PlatformInfo - teamId: string - partyId: string - characterId: string - stats: Stats - roundDamage: RoundDamage[] - competitiveTier: number - playerCard: string - playerTitle: string - preferredLevelBorder: string - accountLevel: number - sessionPlaytimeMinutes: number - xpModifications: XpModification[] - behaviorFactors: BehaviorFactors - newPlayerExperienceDetails: NewPlayerExperienceDetails + subject: string; + gameName: string; + tagLine: string; + platformInfo: PlatformInfo; + teamId: string; + partyId: string; + characterId: string; + stats: Stats; + roundDamage: RoundDamage[]; + competitiveTier: number; + playerCard: string; + playerTitle: string; + preferredLevelBorder: string; + accountLevel: number; + sessionPlaytimeMinutes: number; + xpModifications: XpModification[]; + behaviorFactors: BehaviorFactors; + newPlayerExperienceDetails: NewPlayerExperienceDetails; } interface Team { - teamId: string - won: boolean - roundsPlayed: number - roundsWon: number - numPoints: number + teamId: string; + won: boolean; + roundsPlayed: number; + roundsWon: number; + numPoints: number; } interface Location { - x: number - y: number + x: number; + y: number; } interface PlantPlayerLocation { - subject: string - viewRadians: number - location: Location + subject: string; + viewRadians: number; + location: Location; } interface DefusePlayerLocation { - subject: string - viewRadians: number - location: Location + subject: string; + viewRadians: number; + location: Location; } interface PlayerLocation { - subject: string - viewRadians: number - location: Location + subject: string; + viewRadians: number; + location: Location; } interface FinishingDamage { - damageType: string - damageItem: string - isSecondaryFireMode: boolean + damageType: string; + damageItem: string; + isSecondaryFireMode: boolean; } interface Kill { - gameTime: number - roundTime: number - killer: string - victim: string - victimLocation: Location - assistants: string[] - playerLocations: PlayerLocation[] - finishingDamage: FinishingDamage + gameTime: number; + roundTime: number; + killer: string; + victim: string; + victimLocation: Location; + assistants: string[]; + playerLocations: PlayerLocation[]; + finishingDamage: FinishingDamage; } interface MatchKill extends Kill { - round: number + round: number; } interface Damage { - receiver: string - damage: number - legshots: number - bodyshots: number - headshots: number + receiver: string; + damage: number; + legshots: number; + bodyshots: number; + headshots: number; } interface Economy { - loadoutValue: number - weapon: string - armor: string - remaining: number - spent: number + loadoutValue: number; + weapon: string; + armor: string; + remaining: number; + spent: number; } interface AbilityEffects { - grenadeEffects?: any - ability1Effects?: any - ability2Effects?: any - ultimateEffects?: any + grenadeEffects?: any; + ability1Effects?: any; + ability2Effects?: any; + ultimateEffects?: any; } interface PlayerStat { - subject: string - kills: Kill[] - damage: Damage[] - score: number - economy: Economy - ability: AbilityEffects - wasAfk: boolean - wasPenalized: boolean - stayedInSpawn: boolean + subject: string; + kills: Kill[]; + damage: Damage[]; + score: number; + economy: Economy; + ability: AbilityEffects; + wasAfk: boolean; + wasPenalized: boolean; + stayedInSpawn: boolean; } interface PlayerEconomy { - subject: string - loadoutValue: number - weapon: string - armor: string - remaining: number - spent: number + subject: string; + loadoutValue: number; + weapon: string; + armor: string; + remaining: number; + spent: number; } interface PlayerScore { - subject: string - score: number + subject: string; + score: number; } interface RoundResult { - roundNum: number - roundResult: string - roundCeremony: string - winningTeam: string - plantRoundTime: number - plantPlayerLocations: PlantPlayerLocation[] - plantLocation: Location - plantSite: string - defuseRoundTime: number - defusePlayerLocations: DefusePlayerLocation[] - defuseLocation: Location - playerStats: PlayerStat[] - roundResultCode: string - playerEconomies: PlayerEconomy[] - playerScores: PlayerScore[] - bombPlanter: string - bombDefuser: string + roundNum: number; + roundResult: string; + roundCeremony: string; + winningTeam: string; + plantRoundTime: number; + plantPlayerLocations: PlantPlayerLocation[]; + plantLocation: Location; + plantSite: string; + defuseRoundTime: number; + defusePlayerLocations: DefusePlayerLocation[]; + defuseLocation: Location; + playerStats: PlayerStat[]; + roundResultCode: string; + playerEconomies: PlayerEconomy[]; + playerScores: PlayerScore[]; + bombPlanter: string; + bombDefuser: string; } export interface RawMatchDetailsResponse { - matchInfo: MatchInfo - players: Player[] - bots: any[] - coaches: any[] - teams: Team[] - roundResults: RoundResult[] - kills: MatchKill[] - region: Region + matchInfo: MatchInfo; + players: Player[]; + bots: any[]; + coaches: any[]; + teams: Team[]; + roundResults: RoundResult[]; + kills: MatchKill[]; + region: Region; } diff --git a/package/src/types/raw/match-history.ts b/package/src/types/raw/match-history.ts index 5f8f6c1..ea17bd4 100644 --- a/package/src/types/raw/match-history.ts +++ b/package/src/types/raw/match-history.ts @@ -1,16 +1,16 @@ -import { Region } from "../general" +import { Region } from "../general"; interface History { - MatchID: string - GameStartTime: any - QueueID: string + MatchID: string; + GameStartTime: any; + QueueID: string; } export interface RawMatchHistoryResponse { - Subject: string - BeginIndex: number - EndIndex: number - Total: number - History: History[] - region: Region + Subject: string; + BeginIndex: number; + EndIndex: number; + Total: number; + History: History[]; + region: Region; } diff --git a/package/src/types/raw/mmr.ts b/package/src/types/raw/mmr.ts index b0701d9..66c238a 100644 --- a/package/src/types/raw/mmr.ts +++ b/package/src/types/raw/mmr.ts @@ -1,65 +1,65 @@ -import { Region } from "../general" +import { Region } from "../general"; interface WinsByTier { - [tier: number]: number + [tier: number]: number; } interface SeasonalInfoBySeasonID { - SeasonID: string - NumberOfWins: number - NumberOfWinsWithPlacements: number - NumberOfGames: number - Rank: number - CapstoneWins: number - LeaderboardRank: number - CompetitiveTier: number - RankedRating: number - WinsByTier: WinsByTier - GamesNeededForRating: number - TotalWinsNeededForRank: number + SeasonID: string; + NumberOfWins: number; + NumberOfWinsWithPlacements: number; + NumberOfGames: number; + Rank: number; + CapstoneWins: number; + LeaderboardRank: number; + CompetitiveTier: number; + RankedRating: number; + WinsByTier: WinsByTier; + GamesNeededForRating: number; + TotalWinsNeededForRank: number; } interface Queue { - TotalGamesNeededForRating: number - TotalGamesNeededForLeaderboard: number - CurrentSeasonGamesNeededForRating: number - SeasonalInfoBySeasonID: SeasonalInfoBySeasonID + TotalGamesNeededForRating: number; + TotalGamesNeededForLeaderboard: number; + CurrentSeasonGamesNeededForRating: number; + SeasonalInfoBySeasonID: SeasonalInfoBySeasonID; } interface QueueSkills { - competitive: Queue - custom: Queue - deathmatch: Queue - ggteam: Queue - onefa: Queue - seeding: Queue - snowball: Queue - spikerush: Queue - unrated: Queue + competitive: Queue; + custom: Queue; + deathmatch: Queue; + ggteam: Queue; + onefa: Queue; + seeding: Queue; + snowball: Queue; + spikerush: Queue; + unrated: Queue; } interface LatestCompetitiveUpdate { - MatchID: string - MapID: string - SeasonID: string - MatchStartTime: number - TierAfterUpdate: number - TierBeforeUpdate: number - RankedRatingAfterUpdate: number - RankedRatingBeforeUpdate: number - RankedRatingEarned: number - RankedRatingPerformanceBonus: number - CompetitiveMovement: string - AFKPenalty: number + MatchID: string; + MapID: string; + SeasonID: string; + MatchStartTime: number; + TierAfterUpdate: number; + TierBeforeUpdate: number; + RankedRatingAfterUpdate: number; + RankedRatingBeforeUpdate: number; + RankedRatingEarned: number; + RankedRatingPerformanceBonus: number; + CompetitiveMovement: string; + AFKPenalty: number; } export interface RawMMRResponse { - Version: number - Subject: string - NewPlayerExperienceFinished: boolean - QueueSkills: QueueSkills - LatestCompetitiveUpdate: LatestCompetitiveUpdate - IsLeaderboardAnonymized: boolean - IsActRankBadgeHidden: boolean - region: Region + Version: number; + Subject: string; + NewPlayerExperienceFinished: boolean; + QueueSkills: QueueSkills; + LatestCompetitiveUpdate: LatestCompetitiveUpdate; + IsLeaderboardAnonymized: boolean; + IsActRankBadgeHidden: boolean; + region: Region; } diff --git a/package/src/types/v1-content.ts b/package/src/types/v1-content.ts index 1bdfde9..2106dd6 100644 --- a/package/src/types/v1-content.ts +++ b/package/src/types/v1-content.ts @@ -1,44 +1,44 @@ -import { Locale } from "./general" +import { Locale } from "./general"; export type LocalizedNames = { - [language in Locale]: string -} + [language in Locale]: string +}; export interface Asset { - name: string - localizedNames?: LocalizedNames - id: string - assetName: string + name: string; + localizedNames?: LocalizedNames; + id: string; + assetName: string; } export interface AssetWithPath extends Asset { - assetPath: string + assetPath: string; } export interface Act { - id: string - parentId: string - type: string - name: string - localizedNames?: LocalizedNames - isActive: boolean + id: string; + parentId: string; + type: string; + name: string; + localizedNames?: LocalizedNames; + isActive: boolean; } export interface ContentResponse { - version: string - characters: Asset[] - maps: AssetWithPath[] - chromas: Asset[] - skins: Asset[] - skinLevels: Asset[] - equips: Asset[] - gameModes: AssetWithPath[] - sprays: Asset[] - sprayLevels: Asset[] - charms: Asset[] - charmLevels: Asset[] - playerCards: Asset[] - playerTitles: Asset[] - acts: Act[] - ceremonies: Asset[] + version: string; + characters: Asset[]; + maps: AssetWithPath[]; + chromas: Asset[]; + skins: Asset[]; + skinLevels: Asset[]; + equips: Asset[]; + gameModes: AssetWithPath[]; + sprays: Asset[]; + sprayLevels: Asset[]; + charms: Asset[]; + charmLevels: Asset[]; + playerCards: Asset[]; + playerTitles: Asset[]; + acts: Act[]; + ceremonies: Asset[]; } diff --git a/package/src/types/v1-crosshair.ts b/package/src/types/v1-crosshair.ts index a826ba0..fecdf2a 100644 --- a/package/src/types/v1-crosshair.ts +++ b/package/src/types/v1-crosshair.ts @@ -1 +1 @@ -export type CrosshairResponse = Buffer +export type CrosshairResponse = Buffer; diff --git a/package/src/types/v1-featured-items.ts b/package/src/types/v1-featured-items.ts index 7e90ee8..36e411b 100644 --- a/package/src/types/v1-featured-items.ts +++ b/package/src/types/v1-featured-items.ts @@ -1,33 +1,20 @@ -export interface BaseItem { - ItemTypeID: string - ItemID: string - Amount: number -} - export interface Item { - Item: BaseItem - BasePrice: number - CurrencyID: string - DiscountPercent: number - DiscountedPrice: number - IsPromoItem: boolean + uuid: string; + name: string; + image: string; + type: string; + amount: number; + discount_percent: number; + base_price: number; + discounted_price: number; + promo_item: boolean; } -export interface Bundle { - ID: string - DataAssetID: string - CurrencyID: string - Items: Item[] - DurationRemainingInSeconds: number - WholesaleOnly: boolean +export interface FeaturedItems { + bundle_uuid: string; + items: Item[]; + seconds_remaining: number; } -export interface FeaturedBundle { - Bundle: Bundle - Bundles: Bundle[] - BundleRemainingDurationInSeconds: number -} +export type FeaturedItemsResponse = FeaturedItems[]; -export interface FeaturedItemsResponse { - FeaturedBundle: FeaturedBundle -} diff --git a/package/src/types/v1-profile.ts b/package/src/types/v1-profile.ts index 5f86910..57189e8 100644 --- a/package/src/types/v1-profile.ts +++ b/package/src/types/v1-profile.ts @@ -1,19 +1,19 @@ -import { Region } from "./general" +import { Region } from "./general"; export interface Card { - small: string - large: string - wide: string - id: string + small: string; + large: string; + wide: string; + id: string; } export interface ProfileResponse { - puuid: string - region: Region - account_level: number - name: string - tag: string - card: Card - last_update: string - last_update_raw: number + puuid: string; + region: Region; + account_level: number; + name: string; + tag: string; + card: Card; + last_update: string; + last_update_raw: number; } diff --git a/package/src/types/v1-status.ts b/package/src/types/v1-status.ts index 419c186..b937193 100644 --- a/package/src/types/v1-status.ts +++ b/package/src/types/v1-status.ts @@ -1,33 +1,33 @@ -import { Locale } from "./general" +import { Locale } from "./general"; export interface Title { - content: string - locale: Locale + content: string; + locale: Locale; } export interface Update { - created_at: Date - updated_at: Date - publish: boolean - id: number - translations: Title[] - publish_locations: string[] - author: string + created_at: Date; + updated_at: Date; + publish: boolean; + id: number; + translations: Title[]; + publish_locations: string[]; + author: string; } export interface Incident { - created_at: Date - archive_at: Date - updates: Update[] - platforms: string[] - updated_at: Date - id: number - titles: Title[] - maintenance_status: string - incident_severity: string + created_at: Date; + archive_at: Date; + updates: Update[]; + platforms: string[]; + updated_at: Date; + id: number; + titles: Title[]; + maintenance_status: string; + incident_severity: string; } export interface StatusResponse { - maintenances: Incident[] - incidents: Incident[] + maintenances: Incident[]; + incidents: Incident[]; } diff --git a/package/src/types/v1-store-offers.ts b/package/src/types/v1-store-offers.ts index 8408ace..2dd5e8f 100644 --- a/package/src/types/v1-store-offers.ts +++ b/package/src/types/v1-store-offers.ts @@ -1,27 +1,27 @@ export interface Cost { - "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": number + "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": number; } export interface Reward { - ItemTypeID: string - ItemID: string - Quantity: number + ItemTypeID: string; + ItemID: string; + Quantity: number; } export interface Offer { - OfferID: string - IsDirectPurchase: boolean - StartDate: Date - Cost: Cost - Rewards: Reward[] + OfferID: string; + IsDirectPurchase: boolean; + StartDate: Date; + Cost: Cost; + Rewards: Reward[]; } export interface UpgradeCurrencyOffer { - OfferID: string - StorefrontItemID: string + OfferID: string; + StorefrontItemID: string; } export interface StoreOffersResponse { - Offers: Offer[] - UpgradeCurrencyOffers: UpgradeCurrencyOffer[] + Offers: Offer[]; + UpgradeCurrencyOffers: UpgradeCurrencyOffer[]; } diff --git a/package/src/types/v1-version.ts b/package/src/types/v1-version.ts index b7bce41..1890966 100644 --- a/package/src/types/v1-version.ts +++ b/package/src/types/v1-version.ts @@ -1,6 +1,6 @@ export interface VersionResponse { - version: string - clientVersion: string - branch: string - region: string + version: string; + clientVersion: string; + branch: string; + region: string; } diff --git a/package/src/types/v1-website.ts b/package/src/types/v1-website.ts index 19761c1..ac4c99a 100644 --- a/package/src/types/v1-website.ts +++ b/package/src/types/v1-website.ts @@ -1,17 +1,17 @@ export interface Post { - banner_url: string - category: string - date: Date - external_link: string - title: string - url: string + banner_url: string; + category: string; + date: Date; + external_link: string; + title: string; + url: string; } export interface WebsiteResponse { - banner_url: string - category: string - date: Date - external_link: string - title: string - url: string + banner_url: string; + category: string; + date: Date; + external_link: string; + title: string; + url: string; } diff --git a/package/src/types/v2-leaderboard.ts b/package/src/types/v2-leaderboard.ts index 2b3f115..2bbabdf 100644 --- a/package/src/types/v2-leaderboard.ts +++ b/package/src/types/v2-leaderboard.ts @@ -1,24 +1,24 @@ export interface Player { - PlayerCardID: string - TitleID: string - IsBanned: boolean - IsAnonymized: boolean - puuid: string - gameName: string - tagLine: string - leaderboardRank: number - rankedRating: number - numberOfWins: number - competitiveTier: number + PlayerCardID: string; + TitleID: string; + IsBanned: boolean; + IsAnonymized: boolean; + puuid: string; + gameName: string; + tagLine: string; + leaderboardRank: number; + rankedRating: number; + numberOfWins: number; + competitiveTier: number; } export interface LeaderboardResponse { - last_update: number - next_update: number - total_players: number - radiant_threshold: number - immortal_3_threshold: number - immortal_2_threshold: number - immortal_1_threshold: number - players: Player[] + last_update: number; + next_update: number; + total_players: number; + radiant_threshold: number; + immortal_3_threshold: number; + immortal_2_threshold: number; + immortal_1_threshold: number; + players: Player[]; } diff --git a/package/src/types/v2-match.ts b/package/src/types/v2-match.ts index 57ada53..c2afba7 100644 --- a/package/src/types/v2-match.ts +++ b/package/src/types/v2-match.ts @@ -1,3 +1,3 @@ -import { Match } from "./v3-matches" +import { Match } from "./v3-matches"; -export type MatchResponse = Match +export type MatchResponse = Match; diff --git a/package/src/types/v2-mmr-history.ts b/package/src/types/v2-mmr-history.ts index 64fbfde..f33d3c0 100644 --- a/package/src/types/v2-mmr-history.ts +++ b/package/src/types/v2-mmr-history.ts @@ -1,21 +1,21 @@ -import { Rank } from "./general" +import { Rank } from "./general"; export interface Images { - small: string - large: string - triangle_down: string - triangle_up: string + small: string; + large: string; + triangle_down: string; + triangle_up: string; } export interface MMRHistoryGame { - currenttier: number - currenttierpatched: Rank - images: Images - ranking_in_tier: number - mmr_change_to_last_game: number - elo: number - date: string - date_raw: number + currenttier: number; + currenttierpatched: Rank; + images: Images; + ranking_in_tier: number; + mmr_change_to_last_game: number; + elo: number; + date: string; + date_raw: number; } -export type MMRHistoryResponse = MMRHistoryGame[] +export type MMRHistoryResponse = MMRHistoryGame[]; diff --git a/package/src/types/v2-mmr.ts b/package/src/types/v2-mmr.ts index 33a602d..4281df7 100644 --- a/package/src/types/v2-mmr.ts +++ b/package/src/types/v2-mmr.ts @@ -1,38 +1,38 @@ -import { Rank, Season } from "./general" +import { Rank, Season } from "./general"; export interface SeasonMMR { - error?: "No data available" - wins: number - number_of_games: number - final_rank: number - final_rank_patched: Rank - act_rank_wins: { - patched_tier: Rank - tier: number - }[] + error?: "No data available"; + wins: number; + number_of_games: number; + final_rank: number; + final_rank_patched: Rank; + act_rank_wins: { + patched_tier: Rank; + tier: number; + }[]; } export interface MMRResponse { - name: string - tag: string - puuid: string - current_data: { - currenttier: number - currenttierpatched: Rank - images: { - small: string - large: string - triangle_up: string - triangle_down: string - } - ranking_in_tier: number - mmr_change_to_last_game: number - elo: number - games_needed_for_rating: number - old: boolean - } + name: string; + tag: string; + puuid: string; + current_data: { + currenttier: number; + currenttierpatched: Rank; + images: { + small: string; + large: string; + triangle_up: string; + triangle_down: string; + }; + ranking_in_tier: number; + mmr_change_to_last_game: number; + elo: number; + games_needed_for_rating: number; + old: boolean; + }; - by_season: { - [key in Season]: SeasonMMR - } + by_season: { + [key in Season]: SeasonMMR + }; } diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index a6f22d8..8687268 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -1,232 +1,232 @@ -import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general" +import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general"; export interface Player { - puuid: string - name: string - tag: string - team: "Red" | "Blue" - level: number - character: Characters - currenttier: number - currenttier_patched: Rank - player_card: string - player_title: string - party_id: string - session_playtime: { - minutes: number - seconds: number - milliseconds: number - } - behavior: { - afk_rounds: number - friendly_fire: { - incoming: number - outgoing: number - } - rounds_in_spawn: number - } - platform: { - type: string - os: { - name: string - version: string - } - } - ability_casts: { - c_cast: number - q_cast: number - e_cast: number - x_cast: number - } - assets: { - card: { - small: string - large: string - wide: string - } + puuid: string; + name: string; + tag: string; + team: "Red" | "Blue"; + level: number; + character: Characters; + currenttier: number; + currenttier_patched: Rank; + player_card: string; + player_title: string; + party_id: string; + session_playtime: { + minutes: number; + seconds: number; + milliseconds: number; + }; + behavior: { + afk_rounds: number; + friendly_fire: { + incoming: number; + outgoing: number; + }; + rounds_in_spawn: number; + }; + platform: { + type: string; + os: { + name: string; + version: string; + }; + }; + ability_casts: { + c_cast: number; + q_cast: number; + e_cast: number; + x_cast: number; + }; + assets: { + card: { + small: string; + large: string; + wide: string; + }; - agent: { - small: string - bust: string - full: string - killfeed: string - } - } - stats: { - score: number - kills: number - deaths: number - assists: number - bodyshots: number - headshots: number - legshots: number - } - economy: { - spent: { - overall: number - average: number - } - loadout_value: { - overall: number - average: number - } - } - damage_made: number - damage_received: number + agent: { + small: string; + bust: string; + full: string; + killfeed: string; + }; + }; + stats: { + score: number; + kills: number; + deaths: number; + assists: number; + bodyshots: number; + headshots: number; + legshots: number; + }; + economy: { + spent: { + overall: number; + average: number; + }; + loadout_value: { + overall: number; + average: number; + }; + }; + damage_made: number; + damage_received: number; } -type PlayerLocation = { x: number, y: number } +type PlayerLocation = { x: number, y: number }; export interface PlayerLocationOnEvent { - player_puuid: string - player_display_name: string - player_team: "Red" | "Blue" - location: PlayerLocation - view_radians: number + player_puuid: string; + player_display_name: string; + player_team: "Red" | "Blue"; + location: PlayerLocation; + view_radians: number; } export interface KillEvent { - kill_time_in_round: number - kill_time_in_match: number - killer_puuid: string - killer_display_name: string - killer_team: "Red" | "Blue" - victim_puuid: string - victim_display_name: string - victim_team: "Red" | "Blue" - victim_death_location: PlayerLocation - damage_weapon_id: string - damage_weapon_name: Weapon - damage_weapon_assets: { - display_icon: string - killfeed_icon: string - } - secondary_fire_mode: boolean - player_locations_on_kill: PlayerLocationOnEvent[] - assistants: { - assistant_puuid: string - assistant_display_name: string - assistant_team: "Red" | "Blue" - }[] + kill_time_in_round: number; + kill_time_in_match: number; + killer_puuid: string; + killer_display_name: string; + killer_team: "Red" | "Blue"; + victim_puuid: string; + victim_display_name: string; + victim_team: "Red" | "Blue"; + victim_death_location: PlayerLocation; + damage_weapon_id: string; + damage_weapon_name: Weapon; + damage_weapon_assets: { + display_icon: string; + killfeed_icon: string; + }; + secondary_fire_mode: boolean; + player_locations_on_kill: PlayerLocationOnEvent[]; + assistants: { + assistant_puuid: string; + assistant_display_name: string; + assistant_team: "Red" | "Blue"; + }[]; } export interface Round { - winning_team: "Red" | "Blue" - end_type: "Eliminated" | "Bomb defused" | "Bomb detonated" - bomb_planted: boolean - bomb_defused: boolean - plant_events: { - plant_location?: PlayerLocation - planted_by?: { - puuid: string - display_name: string - team: "Red" | "Blue" - } - plant_site?: "A" | "B" | "C" - plant_time_in_round?: number - player_locations_on_plant?: PlayerLocationOnEvent[] - } - defuse_events: { - defuse_location?: PlayerLocation - defused_by?: { - puuid: string - display_name: string - team: "Red" | "Blue" - } - defuse_time_in_round?: number - player_locations_on_defuse?: PlayerLocationOnEvent[] - } - player_stats: { - ability_casts: { - c_cast?: number - q_cast?: number - e_cast?: number - x_cast?: number - } - player_puuid: string - player_display_name: string - player_team: "Red" | "Blue" - damage_events: { - receiver_puuid: string - receiver_display_name: string - receiver_team: "Red" | "Blue" - bodyshots: number - damage: number - headshots: number - legshots: number - }[] - damage: number - headshots: number - bodyshots: number - legshots: number - kill_events: KillEvent[] - kills: number - score: number - economy: { - loadout_value: number - weapon: { - id: string - name: Weapon - assets: { - display_icon: string - killfeed_icon: string - } - } - armor: { - id: string - name: "Heavy Shields" | "Light Shields" - assets: { - display_icon: string - } - } - remaining: number - spent: number - } - was_afk: boolean - was_penalized: boolean - stayed_in_spawn: boolean - } + winning_team: "Red" | "Blue"; + end_type: "Eliminated" | "Bomb defused" | "Bomb detonated"; + bomb_planted: boolean; + bomb_defused: boolean; + plant_events: { + plant_location?: PlayerLocation; + planted_by?: { + puuid: string; + display_name: string; + team: "Red" | "Blue"; + }; + plant_site?: "A" | "B" | "C"; + plant_time_in_round?: number; + player_locations_on_plant?: PlayerLocationOnEvent[]; + }; + defuse_events: { + defuse_location?: PlayerLocation; + defused_by?: { + puuid: string; + display_name: string; + team: "Red" | "Blue"; + }; + defuse_time_in_round?: number; + player_locations_on_defuse?: PlayerLocationOnEvent[]; + }; + player_stats: { + ability_casts: { + c_cast?: number; + q_cast?: number; + e_cast?: number; + x_cast?: number; + }; + player_puuid: string; + player_display_name: string; + player_team: "Red" | "Blue"; + damage_events: { + receiver_puuid: string; + receiver_display_name: string; + receiver_team: "Red" | "Blue"; + bodyshots: number; + damage: number; + headshots: number; + legshots: number; + }[]; + damage: number; + headshots: number; + bodyshots: number; + legshots: number; + kill_events: KillEvent[]; + kills: number; + score: number; + economy: { + loadout_value: number; + weapon: { + id: string; + name: Weapon; + assets: { + display_icon: string; + killfeed_icon: string; + }; + }; + armor: { + id: string; + name: "Heavy Shields" | "Light Shields"; + assets: { + display_icon: string; + }; + }; + remaining: number; + spent: number; + }; + was_afk: boolean; + was_penalized: boolean; + stayed_in_spawn: boolean; + }; } export interface KillEventMatch extends KillEvent { - round: number + round: number; } export interface Match { - metadata: { - map: ValorantMap - game_version: string - game_length: number - game_start: number - game_start_patched: string - rounds_played: number - mode: Mode - queue: string - season_id: "string" - platform: "PC" - matchid: string - region: Region - cluster: string - } - players: { - all_players: Player[] - red: Player[] - blue: Player[] - } - teams: { - red: { - has_won: false - rounds_won: number - rounds_lost: number - } - blue: { - has_won: false - rounds_won: number - rounds_lost: number - } - } - rounds: Round[] - kills: KillEventMatch[] + metadata: { + map: ValorantMap; + game_version: string; + game_length: number; + game_start: number; + game_start_patched: string; + rounds_played: number; + mode: Mode; + queue: string; + season_id: "string"; + platform: "PC"; + matchid: string; + region: Region; + cluster: string; + }; + players: { + all_players: Player[]; + red: Player[]; + blue: Player[]; + }; + teams: { + red: { + has_won: false; + rounds_won: number; + rounds_lost: number; + }; + blue: { + has_won: false; + rounds_won: number; + rounds_lost: number; + }; + }; + rounds: Round[]; + kills: KillEventMatch[]; } -export type MatchesResponse = Match[] +export type MatchesResponse = Match[]; diff --git a/package/test/editDocs.js.map b/package/test/editDocs.js.map deleted file mode 100644 index 7be617a..0000000 --- a/package/test/editDocs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"editDocs.js","sourceRoot":"","sources":["editDocs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,IAAI,GAAG,gCAAgC,CAAA;AAE7C,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC9B,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AAE3B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACjC,IAAI,MAAM,KAAK,GAAG,EAAE;QAChB,QAAQ,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAA;QAC1C,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,uKAAuK,CAAA;KAC5L;IACD,IAAI,MAAM,KAAK,KAAK;QAAE,OAAM;IAE5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/B,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY;QAAE,OAAM;IAEzD,IAAI,SAAS,GAAG,CAAC,GAAG,CAAC,CAAA;IACrB,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM;QAAE,SAAS,EAAE,CAAA;IAC7D,SAAS,EAAE,CAAA;IAEX,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE;QAC9C,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAChE,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAEjE,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE;YACf,SAAS,EAAE,CAAA;YACX,SAAQ;SACX;QAED,IAAI,IAAI,KAAK,QAAQ,EAAE;YACnB,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;SAC7B;QAED,SAAS,EAAE,CAAA;KACd;AACL,CAAC,CAAC,CAAA;AAEF,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index fd8bb95..5a245d4 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -1,41 +1,41 @@ -import fs from "fs" +import fs from "fs"; -const path = "./doc/classes/index.default.md" +const path = "./doc/classes/index.default.md"; -const file = fs.readFileSync(path, "utf-8") -const lines = file.split("\n") -const newLines = [...lines] +const file = fs.readFileSync(path, "utf-8"); +const lines = file.split("\n"); +const newLines = [...lines]; lines.forEach((line, i) => { - const header = line.split(" ")[0] + const header = line.split(" ")[0]; if (header === "#") { - newLines[i] = "# Welcome to the VAPI docs" - newLines[i + 2] = "Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD)" + newLines[i] = "# Welcome to the VAPI docs"; + newLines[i + 2] = "Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD)"; } - if (header !== "###") return + if (header !== "###") return; - const name = line.split(" ")[1] - if (name !== "mapImages" && name !== "rankImages") return + const name = line.split(" ")[1]; + if (name !== "mapImages" && name !== "rankImages") return; - let typeIndex = i + 1 - while (lines[typeIndex].split(" ")[0] !== "####") typeIndex++ - typeIndex++ + let typeIndex = i + 1; + while (lines[typeIndex].split(" ")[0] !== "####") typeIndex++; + typeIndex++; while (lines[typeIndex].split(" ")[0] !== "####") { - const key = lines[typeIndex].split("|")[1]?.trim()?.slice(1, -1) - const type = lines[typeIndex].split("|")[2]?.trim()?.slice(1, -1) + const key = lines[typeIndex].split("|")[1]?.trim()?.slice(1, -1); + const type = lines[typeIndex].split("|")[2]?.trim()?.slice(1, -1); if (!key || !type) { - typeIndex++ - continue + typeIndex++; + continue; } if (type === "string") { - newLines[typeIndex] = null + newLines[typeIndex] = null; } - typeIndex++ + typeIndex++; } -}) +}); -fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")) +fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")); diff --git a/package/test/test.js b/package/test/test.js deleted file mode 100644 index c73c974..0000000 --- a/package/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -import { spawn } from "child_process"; -import _VAPI from "../dist/index.js"; -const VAPI = new _VAPI(); -const clipboard = (data) => { - const proc = spawn("pbcopy"); - proc.stdin.write(data); - proc.stdin.end(); -}; -const res = await VAPI.initUtils(); -// const object = Object.keys(res.data).reduce((acc, cur) => { -// if (Array.isArray(res.data[cur])) { -// acc[cur] = res.data[cur].slice(0, 2) -// } else { -// acc[cur] = res.data[cur] -// } -// return acc -// }, {}) -// console.log(object) -// clipboard(JSON.stringify(object)) -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.js.map b/package/test/test.js.map deleted file mode 100644 index 15fb598..0000000 --- a/package/test/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,MAAM,IAAI,GAAG,IAAI,KAAK,EAAE,CAAA;AAExB,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,EAAE;IACvB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC5B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAA;AAElC,8DAA8D;AAC9D,0CAA0C;AAC1C,+CAA+C;AAC/C,eAAe;AACf,mCAAmC;AACnC,QAAQ;AACR,iBAAiB;AACjB,SAAS;AACT,sBAAsB;AACtB,oCAAoC"} \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts deleted file mode 100644 index 32f09a9..0000000 --- a/package/test/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { spawn } from "child_process" -import _VAPI from "../dist/index.js" -const VAPI = new _VAPI() - -const clipboard = (data) => { - const proc = spawn("pbcopy") - proc.stdin.write(data) - proc.stdin.end() -} - -const res = await VAPI.initUtils() - -// const object = Object.keys(res.data).reduce((acc, cur) => { -// if (Array.isArray(res.data[cur])) { -// acc[cur] = res.data[cur].slice(0, 2) -// } else { -// acc[cur] = res.data[cur] -// } -// return acc -// }, {}) -// console.log(object) -// clipboard(JSON.stringify(object)) diff --git a/package/test/tsconfig.json b/package/test/tsconfig.json index f27dd88..3bcd11f 100644 --- a/package/test/tsconfig.json +++ b/package/test/tsconfig.json @@ -11,10 +11,5 @@ "sourceMap": true, "skipLibCheck": true, "allowSyntheticDefaultImports": true - }, - "exclude": [ - "node_modules", - "./node_modules", - "./node_modules/*" - ] + } } diff --git a/package/tsconfig.json b/package/tsconfig.json index 1732e5a..1d28c93 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -12,7 +12,8 @@ "skipLibCheck": true, "allowSyntheticDefaultImports": true, "declaration": true, - "outDir": "./dist" + "outDir": "./dist", + "resolveJsonModule": true }, "exclude": [ "node_modules", From 8c726f560f2a8bca87cea19b7ac85314c6feb787 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 19:19:45 -0500 Subject: [PATCH 12/50] FIxed leaderboard + still working on tests --- package/package.json | 3 +- package/src/index.ts | 29 +++- .../types/{v1-profile.ts => v1-account.ts} | 2 +- package/src/types/v1-leaderboard.ts | 15 ++ package/test/test.js | 28 +++ package/test/test.ts | 29 ++++ package/test/testOptions.js | 159 +++++++++++++++++ package/test/testOptions.ts | 164 ++++++++++++++++++ 8 files changed, 419 insertions(+), 10 deletions(-) rename package/src/types/{v1-profile.ts => v1-account.ts} (89%) create mode 100644 package/src/types/v1-leaderboard.ts create mode 100644 package/test/test.js create mode 100644 package/test/test.ts create mode 100644 package/test/testOptions.js create mode 100644 package/test/testOptions.ts diff --git a/package/package.json b/package/package.json index 689a95b..da11cb7 100644 --- a/package/package.json +++ b/package/package.json @@ -5,7 +5,8 @@ "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", "dependencies": { - "axios": "^0.27.2" + "axios": "^0.27.2", + "typescript-json-schema": "^0.54.0" }, "keywords": [ "Valorant", diff --git a/package/src/index.ts b/package/src/index.ts index e78471c..f6ca12a 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -5,10 +5,11 @@ import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-upda import type { RawMatchDetailsResponse } from "./types/raw/match-details"; import type { RawMatchHistoryResponse } from "./types/raw/match-history"; import type { RawMMRResponse } from "./types/raw/mmr"; +import type { AccountResponse } from "./types/v1-account"; import type { ContentResponse } from "./types/v1-content"; import type { CrosshairResponse } from "./types/v1-crosshair"; import type { FeaturedItemsResponse } from "./types/v1-featured-items"; -import type { ProfileResponse } from "./types/v1-profile"; +import { V1LeaderboardResponse } from "./types/v1-leaderboard"; import type { StatusResponse } from "./types/v1-status"; import type { StoreOffersResponse } from "./types/v1-store-offers"; import type { VersionResponse } from "./types/v1-version"; @@ -391,6 +392,19 @@ export default class { return this.fetch(`v2/match/${matchID}`); } + /** + * Get the leaderboard of a region + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * @param args.region - Region to get leaderboard from + * @returns Descending order of the highest ranked players. (Immortal and up) + * @throws {@link TypeError} - If both a riotID and puuid are supplied + */ + async getLeaderboard({ region }: { region: Region }): Promise> { + this.validateArgs({ region }); + return this.fetch(`v2/leaderboard/${region}`); + } + /** * Get the leaderboard of a region * @remarks @@ -406,12 +420,11 @@ export default class { * @returns Descending order of the highest ranked players. (Immortal and up) * @throws {@link TypeError} - If both a riotID and puuid are supplied */ - async getLeaderboard({ region, start, end, riotID, puuid, season, version }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season, version?: "v1" | "v2" }): Promise> { + async getLeaderboardV1({ region, start, end, riotID, puuid, season }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise> { if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); - if (!version) version = "v2"; this.validateArgs({ region }); - return this.fetch(`${version}/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); + return this.fetch(`v1/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); } /** @@ -519,9 +532,9 @@ export default class { * @param args.force - Force data update? * @return General information on a players profile */ - async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { + async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { this.validateArgs({ name, tag }); - return this.fetch(`v1/account/${name}/${tag}`, { force }); + return this.fetch(`v1/account/${name}/${tag}`, { force }); } /** @@ -536,8 +549,8 @@ export default class { * @param args.force Force data update? * @return General information on a players profile */ - async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { + async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { this.validateArgs({ name: puuid }); - return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); + return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); } } diff --git a/package/src/types/v1-profile.ts b/package/src/types/v1-account.ts similarity index 89% rename from package/src/types/v1-profile.ts rename to package/src/types/v1-account.ts index 57189e8..4454469 100644 --- a/package/src/types/v1-profile.ts +++ b/package/src/types/v1-account.ts @@ -7,7 +7,7 @@ export interface Card { id: string; } -export interface ProfileResponse { +export interface AccountResponse { puuid: string; region: Region; account_level: number; diff --git a/package/src/types/v1-leaderboard.ts b/package/src/types/v1-leaderboard.ts new file mode 100644 index 0000000..91ad73d --- /dev/null +++ b/package/src/types/v1-leaderboard.ts @@ -0,0 +1,15 @@ +export interface Player { + PlayerCardID: string; + TitleID: string; + IsBanned: boolean; + IsAnonymized: boolean; + puuid: string; + gameName: string; + tagLine: string; + leaderboardRank: number; + rankedRating: number; + numberOfWins: number; + competitiveTier: number; +} + +export type V1LeaderboardResponse = Player[]; diff --git a/package/test/test.js b/package/test/test.js new file mode 100644 index 0000000..693ed13 --- /dev/null +++ b/package/test/test.js @@ -0,0 +1,28 @@ +import { lstatSync, readdirSync } from "fs"; +import { resolve } from "path"; +import { buildGenerator, getProgramFromFiles } from "typescript-json-schema"; +import _VAPI from "../dist/src/index.js"; +import { argParams } from "./testOptions.js"; +const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; +const methods = Object.getOwnPropertyNames(_VAPI.prototype).filter(m => !methodBlacklist.includes(m)); +methods.forEach(method => { + if (!argParams[method]) + throw new Error(`Method "${method}" is missing in argParams!`); +}); +const readDir = (dir) => { + const files = []; + readdirSync(dir).forEach(file => { + const filePath = `${dir}/${file}`; + if (lstatSync(filePath).isDirectory()) { + files.push(...readDir(filePath)); + } + if (!filePath.endsWith(".ts")) + return; + files.push(resolve(filePath)); + }); + return files; +}; +const program = getProgramFromFiles(readDir("./src/types")); +const generator = buildGenerator(program); +console.log(generator.getSchemaForSymbol("RawCompetitiveUpdatesResponse").properties); +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts new file mode 100644 index 0000000..8c0134e --- /dev/null +++ b/package/test/test.ts @@ -0,0 +1,29 @@ +import { lstatSync, readdirSync } from "fs"; +import { resolve } from "path"; +import { buildGenerator, getProgramFromFiles } from "typescript-json-schema"; +import _VAPI from "../dist/src/index.js"; +import { argParams } from "./testOptions.js"; + +const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; +const methods = Object.getOwnPropertyNames(_VAPI.prototype).filter(m => !methodBlacklist.includes(m)); +methods.forEach(method => { + if (!argParams[method]) throw new Error(`Method "${method}" is missing in argParams!`); +}); + +const readDir = (dir: string) => { + const files = []; + readdirSync(dir).forEach(file => { + const filePath = `${dir}/${file}`; + if (lstatSync(filePath).isDirectory()) { + files.push(...readDir(filePath)); + } + if (!filePath.endsWith(".ts")) return; + files.push(resolve(filePath)); + }); + return files; +}; + +const program = getProgramFromFiles(readDir("./src/types")); +const generator = buildGenerator(program); + +console.log(generator.getSchemaForSymbol("RawCompetitiveUpdatesResponse").properties); diff --git a/package/test/testOptions.js b/package/test/testOptions.js new file mode 100644 index 0000000..fdb1056 --- /dev/null +++ b/package/test/testOptions.js @@ -0,0 +1,159 @@ +const examplePUUID = "d55c3688-5a9b-5a5d-b49e-80d7e5ff6b2a"; +const exampleMatchID = "50ec10e0-2752-4a6a-a7ef-b63dacd5a6a9"; +const exampleRegion = "na"; +const exampleName = "jameslinimk"; +const exampleTag = "8868"; +export const argParams = { + getCrosshair: { + args: { + code: "0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0", + size: 256 + }, + type: "CrosshairResponse" + }, + getWebsite: { + args: { + countryCode: "en-us" + }, + type: "WebsiteResponse" + }, + getVersion: { + args: { + region: "na" + }, + type: "VersionResponse" + }, + getFeaturedItems: { + type: "FeaturedItemsResponse" + }, + getOffers: { + type: "StoreOffersResponse" + }, + getStatus: { + args: { + region: "na" + }, + type: "StatusResponse" + }, + getRawMatchDetails: { + args: { + matchID: exampleMatchID, + region: "na", + queries: null + }, + type: "RawMatchDetailsResponse" + }, + getRawMatchHistory: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawMatchHistoryResponse" + }, + getRawCompetitiveUpdates: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawCompetitiveUpdatesResponse" + }, + getRawMMR: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawMMRResponse" + }, + getMMRHistory: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MMRHistoryResponse" + }, + getMMRHistoryByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MMRHistoryResponse" + }, + getMatch: { + args: { + matchID: exampleMatchID + }, + type: "MatchResponse" + }, + getLeaderboard: { + args: { + region: exampleRegion + }, + type: "LeaderboardResponse" + }, + getLeaderboardV1: { + args: { + region: exampleRegion, + start: null, + end: null, + riotID: null, + puuid: examplePUUID, + season: null, + version: null + }, + type: "V1LeaderboardResponse" + }, + getTranslations: { + args: { + locale: null + }, + type: "ContentResponse" + }, + getMMR: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MMRResponse" + }, + getMMRByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MMRResponse" + }, + getMatches: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MatchesResponse" + }, + getMatchesByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MatchesResponse" + }, + getAccount: { + args: { + name: exampleName, + tag: exampleTag + }, + type: "AccountResponse" + }, + getAccountByPUUID: { + args: { + puuid: examplePUUID + }, + type: "AccountResponse" + } +}; +//# sourceMappingURL=testOptions.js.map \ No newline at end of file diff --git a/package/test/testOptions.ts b/package/test/testOptions.ts new file mode 100644 index 0000000..9c0c0ed --- /dev/null +++ b/package/test/testOptions.ts @@ -0,0 +1,164 @@ +const examplePUUID = "d55c3688-5a9b-5a5d-b49e-80d7e5ff6b2a"; +const exampleMatchID = "50ec10e0-2752-4a6a-a7ef-b63dacd5a6a9"; +const exampleRegion = "na"; +const exampleName = "jameslinimk"; +const exampleTag = "8868"; + +export const argParams: { + [method: string]: { + args?: { [name: string]: any }; + type: string; + }; +} = { + getCrosshair: { + args: { + code: "0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0", + size: 256 + }, + type: "CrosshairResponse" + }, + getWebsite: { + args: { + countryCode: "en-us" + }, + type: "WebsiteResponse" + }, + getVersion: { + args: { + region: "na" + }, + type: "VersionResponse" + }, + getFeaturedItems: { + type: "FeaturedItemsResponse" + }, + getOffers: { + type: "StoreOffersResponse" + }, + getStatus: { + args: { + region: "na" + }, + type: "StatusResponse" + }, + getRawMatchDetails: { + args: { + matchID: exampleMatchID, + region: "na", + queries: null + }, + type: "RawMatchDetailsResponse" + }, + getRawMatchHistory: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawMatchHistoryResponse" + }, + getRawCompetitiveUpdates: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawCompetitiveUpdatesResponse" + }, + getRawMMR: { + args: { + puuid: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawMMRResponse" + }, + getMMRHistory: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MMRHistoryResponse" + }, + getMMRHistoryByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MMRHistoryResponse" + }, + getMatch: { + args: { + matchID: exampleMatchID + }, + type: "MatchResponse" + }, + getLeaderboard: { + args: { + region: exampleRegion + }, + type: "LeaderboardResponse" + }, + getLeaderboardV1: { + args: { + region: exampleRegion, + start: null, + end: null, + riotID: null, + puuid: examplePUUID, + season: null, + version: null + }, + type: "V1LeaderboardResponse" + }, + getTranslations: { + args: { + locale: null + }, + type: "ContentResponse" + }, + getMMR: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MMRResponse" + }, + getMMRByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MMRResponse" + }, + getMatches: { + args: { + name: exampleName, + tag: exampleTag, + region: exampleRegion + }, + type: "MatchesResponse" + }, + getMatchesByPUUID: { + args: { + puuid: examplePUUID, + region: exampleRegion + }, + type: "MatchesResponse" + }, + getAccount: { + args: { + name: exampleName, + tag: exampleTag + }, + type: "AccountResponse" + }, + getAccountByPUUID: { + args: { + puuid: examplePUUID + }, + type: "AccountResponse" + } +}; From 31d6d87715eec5a57e997328dad1f09bc7e4186a Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 19:29:24 -0500 Subject: [PATCH 13/50] Testing doc build action --- .../github-actions-generate-docs.yml | 29 + package/doc/.nojekyll | 1 - package/doc/README.md | 42 - package/doc/classes/index.default.md | 800 ------------------ ...e_updates.RawCompetitiveUpdatesResponse.md | 52 -- ...w_match_details.RawMatchDetailsResponse.md | 96 --- ...w_match_history.RawMatchHistoryResponse.md | 74 -- .../types_raw_mmr.RawMMRResponse.md | 96 --- .../doc/interfaces/types_v1_content.Act.md | 74 -- .../doc/interfaces/types_v1_content.Asset.md | 58 -- .../types_v1_content.AssetWithPath.md | 85 -- .../types_v1_content.ContentResponse.md | 184 ---- .../types_v1_featured_items.FeaturedItems.md | 41 - .../types_v1_featured_items.Item.md | 107 --- .../doc/interfaces/types_v1_profile.Card.md | 52 -- .../types_v1_profile.ProfileResponse.md | 96 --- .../interfaces/types_v1_status.Incident.md | 107 --- .../types_v1_status.StatusResponse.md | 30 - .../doc/interfaces/types_v1_status.Title.md | 30 - .../doc/interfaces/types_v1_status.Update.md | 85 -- .../interfaces/types_v1_store_offers.Cost.md | 19 - .../interfaces/types_v1_store_offers.Offer.md | 63 -- .../types_v1_store_offers.Reward.md | 41 - ...pes_v1_store_offers.StoreOffersResponse.md | 30 - ...es_v1_store_offers.UpgradeCurrencyOffer.md | 30 - .../types_v1_version.VersionResponse.md | 52 -- .../doc/interfaces/types_v1_website.Post.md | 74 -- .../types_v1_website.WebsiteResponse.md | 74 -- ...ypes_v2_leaderboard.LeaderboardResponse.md | 96 --- .../interfaces/types_v2_leaderboard.Player.md | 129 --- .../interfaces/types_v2_mmr.MMRResponse.md | 80 -- .../doc/interfaces/types_v2_mmr.SeasonMMR.md | 74 -- .../interfaces/types_v2_mmr_history.Images.md | 52 -- .../types_v2_mmr_history.MMRHistoryGame.md | 96 --- .../interfaces/types_v3_matches.KillEvent.md | 186 ---- .../types_v3_matches.KillEventMatch.md | 257 ------ .../doc/interfaces/types_v3_matches.Match.md | 102 --- .../doc/interfaces/types_v3_matches.Player.md | 301 ------- .../types_v3_matches.PlayerLocationOnEvent.md | 63 -- .../doc/interfaces/types_v3_matches.Round.md | 149 ---- package/doc/modules.md | 25 - package/doc/modules/index.md | 7 - package/doc/modules/types_general.md | 94 -- .../modules/types_raw_competitive_updates.md | 7 - .../doc/modules/types_raw_match_details.md | 7 - .../doc/modules/types_raw_match_history.md | 7 - package/doc/modules/types_raw_mmr.md | 7 - package/doc/modules/types_v1_content.md | 24 - package/doc/modules/types_v1_crosshair.md | 17 - .../doc/modules/types_v1_featured_items.md | 22 - package/doc/modules/types_v1_profile.md | 8 - package/doc/modules/types_v1_status.md | 10 - package/doc/modules/types_v1_store_offers.md | 11 - package/doc/modules/types_v1_version.md | 7 - package/doc/modules/types_v1_website.md | 8 - package/doc/modules/types_v2_leaderboard.md | 8 - package/doc/modules/types_v2_match.md | 17 - package/doc/modules/types_v2_mmr.md | 8 - package/doc/modules/types_v2_mmr_history.md | 22 - package/doc/modules/types_v3_matches.md | 26 - package/src/index.ts | 4 +- 61 files changed, 31 insertions(+), 4422 deletions(-) create mode 100644 .github/workflows/github-actions-generate-docs.yml delete mode 100644 package/doc/.nojekyll delete mode 100644 package/doc/README.md delete mode 100644 package/doc/classes/index.default.md delete mode 100644 package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md delete mode 100644 package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md delete mode 100644 package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md delete mode 100644 package/doc/interfaces/types_raw_mmr.RawMMRResponse.md delete mode 100644 package/doc/interfaces/types_v1_content.Act.md delete mode 100644 package/doc/interfaces/types_v1_content.Asset.md delete mode 100644 package/doc/interfaces/types_v1_content.AssetWithPath.md delete mode 100644 package/doc/interfaces/types_v1_content.ContentResponse.md delete mode 100644 package/doc/interfaces/types_v1_featured_items.FeaturedItems.md delete mode 100644 package/doc/interfaces/types_v1_featured_items.Item.md delete mode 100644 package/doc/interfaces/types_v1_profile.Card.md delete mode 100644 package/doc/interfaces/types_v1_profile.ProfileResponse.md delete mode 100644 package/doc/interfaces/types_v1_status.Incident.md delete mode 100644 package/doc/interfaces/types_v1_status.StatusResponse.md delete mode 100644 package/doc/interfaces/types_v1_status.Title.md delete mode 100644 package/doc/interfaces/types_v1_status.Update.md delete mode 100644 package/doc/interfaces/types_v1_store_offers.Cost.md delete mode 100644 package/doc/interfaces/types_v1_store_offers.Offer.md delete mode 100644 package/doc/interfaces/types_v1_store_offers.Reward.md delete mode 100644 package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md delete mode 100644 package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md delete mode 100644 package/doc/interfaces/types_v1_version.VersionResponse.md delete mode 100644 package/doc/interfaces/types_v1_website.Post.md delete mode 100644 package/doc/interfaces/types_v1_website.WebsiteResponse.md delete mode 100644 package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md delete mode 100644 package/doc/interfaces/types_v2_leaderboard.Player.md delete mode 100644 package/doc/interfaces/types_v2_mmr.MMRResponse.md delete mode 100644 package/doc/interfaces/types_v2_mmr.SeasonMMR.md delete mode 100644 package/doc/interfaces/types_v2_mmr_history.Images.md delete mode 100644 package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md delete mode 100644 package/doc/interfaces/types_v3_matches.KillEvent.md delete mode 100644 package/doc/interfaces/types_v3_matches.KillEventMatch.md delete mode 100644 package/doc/interfaces/types_v3_matches.Match.md delete mode 100644 package/doc/interfaces/types_v3_matches.Player.md delete mode 100644 package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md delete mode 100644 package/doc/interfaces/types_v3_matches.Round.md delete mode 100644 package/doc/modules.md delete mode 100644 package/doc/modules/index.md delete mode 100644 package/doc/modules/types_general.md delete mode 100644 package/doc/modules/types_raw_competitive_updates.md delete mode 100644 package/doc/modules/types_raw_match_details.md delete mode 100644 package/doc/modules/types_raw_match_history.md delete mode 100644 package/doc/modules/types_raw_mmr.md delete mode 100644 package/doc/modules/types_v1_content.md delete mode 100644 package/doc/modules/types_v1_crosshair.md delete mode 100644 package/doc/modules/types_v1_featured_items.md delete mode 100644 package/doc/modules/types_v1_profile.md delete mode 100644 package/doc/modules/types_v1_status.md delete mode 100644 package/doc/modules/types_v1_store_offers.md delete mode 100644 package/doc/modules/types_v1_version.md delete mode 100644 package/doc/modules/types_v1_website.md delete mode 100644 package/doc/modules/types_v2_leaderboard.md delete mode 100644 package/doc/modules/types_v2_match.md delete mode 100644 package/doc/modules/types_v2_mmr.md delete mode 100644 package/doc/modules/types_v2_mmr_history.md delete mode 100644 package/doc/modules/types_v3_matches.md diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml new file mode 100644 index 0000000..c9c1d1e --- /dev/null +++ b/.github/workflows/github-actions-generate-docs.yml @@ -0,0 +1,29 @@ +name: Build docs +on: [ push, workflow_dispatch ] + +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Change dir to package + run: | + cd package + - name: Install dependencies + run: | + npm i + - name: Build docs + run: | + npm run build + - name: Log into github + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Push docs to docs branch + run: | + git checkout -B docs + git add ./package/doc + git commit -m "Upload docs" diff --git a/package/doc/.nojekyll b/package/doc/.nojekyll deleted file mode 100644 index e2ac661..0000000 --- a/package/doc/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/package/doc/README.md b/package/doc/README.md deleted file mode 100644 index be8ee02..0000000 --- a/package/doc/README.md +++ /dev/null @@ -1,42 +0,0 @@ -

- unofficial-valorant-api -

- -

- Wrapper for the Unofficial VALORANT API -

-

- - - - - npm - -

- -# API - -Find all inforamtion about the API itself [here](https://github.com/Henrik-3/unofficial-valorant-api) - -# Installation - -``` js -// npm -npm i unofficial-valorant-api - -// pnpm -pnpm add unofficial-valorant-api - -// yarn -yarn add unofficial-valorant-api -``` - -# Docs - -You can find the documentation [here](./doc/classes/index.default.md) - -Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) - -# Code Examples - -You find some examples [here](./examples) diff --git a/package/doc/classes/index.default.md b/package/doc/classes/index.default.md deleted file mode 100644 index cfa63f3..0000000 --- a/package/doc/classes/index.default.md +++ /dev/null @@ -1,800 +0,0 @@ -# Welcome to the VAPI docs - -Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD) - -## Table of contents - -### Constructors - -- [constructor](index.default.md#constructor) - -### Properties - -- [mapImages](index.default.md#mapimages) -- [rankImages](index.default.md#rankimages) - -### Methods - -- [getAccount](index.default.md#getaccount) -- [getAccountByPUUID](index.default.md#getaccountbypuuid) -- [getCrosshair](index.default.md#getcrosshair) -- [getFeaturedItems](index.default.md#getfeatureditems) -- [getLeaderboard](index.default.md#getleaderboard) -- [getMMR](index.default.md#getmmr) -- [getMMRByPUUID](index.default.md#getmmrbypuuid) -- [getMMRHistory](index.default.md#getmmrhistory) -- [getMMRHistoryByPUUID](index.default.md#getmmrhistorybypuuid) -- [getMatch](index.default.md#getmatch) -- [getMatches](index.default.md#getmatches) -- [getMatchesByPUUID](index.default.md#getmatchesbypuuid) -- [getOffers](index.default.md#getoffers) -- [getRawCompetitiveUpdates](index.default.md#getrawcompetitiveupdates) -- [getRawMMR](index.default.md#getrawmmr) -- [getRawMatchDetails](index.default.md#getrawmatchdetails) -- [getRawMatchHistory](index.default.md#getrawmatchhistory) -- [getStatus](index.default.md#getstatus) -- [getTranslations](index.default.md#gettranslations) -- [getVersion](index.default.md#getversion) -- [getWebsite](index.default.md#getwebsite) -- [initUtils](index.default.md#initutils) - -## Constructors - -### constructor - -• **new default**(`token?`) - -Create a new instance of the main API. All API calls are in this class - -**`Example`** - -Create a new instance -```js -import _VAPI from "unofficial-valorant-api" -const VAPI = new _VAPI("my super secret token") -``` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `token?` | `string` | - -#### Defined in - -[index.ts:133](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L133) - -## Properties - -### mapImages - -• `Optional` **mapImages**: `Object` - -Images for every ValorantMap - -**`Remarks`** - -You must call [initUtils](index.default.md#initutils) before using this! - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `Ascent` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Bind` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Breeze` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Fracture` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Haven` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Icebox` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Pearl` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `Split` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | -| `The Range` | { `landscape`: `string` ; `minimap`: `string` ; `splash`: `string` } | - -#### Defined in - -[index.ts:121](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L121) - -___ - -### rankImages - -• `Optional` **rankImages**: `Object` - -Images for every Rank - -**`Remarks`** - -You must call [initUtils](index.default.md#initutils) before using this! - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `Ascendant 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Ascendant 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Ascendant 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Bronze 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Bronze 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Bronze 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Diamond 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Diamond 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Diamond 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Gold 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Gold 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Gold 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Immortal 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Immortal 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Immortal 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Iron 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Iron 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Iron 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Platinum 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Platinum 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Platinum 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Radiant` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Silver 1` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Silver 2` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Silver 3` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | -| `Unrated` | { `large`: `string` ; `small`: `string` ; `triangleDown`: `string` ; `triangleUp`: `string` } | - -#### Defined in - -[index.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L115) - -## Methods - -### getAccount - -▸ **getAccount**(`__namedParameters`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> - -Get general information about a player from their Riot ID - -**`Remarks`** - -**Returns:** -- Their PUUID -- Their region -- Their account level -- Their current card - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.force?` | `boolean` | -| `__namedParameters.name` | `string` | -| `__namedParameters.tag` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> - -General information on a players profile - -#### Defined in - -[index.ts:522](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L522) - -___ - -### getAccountByPUUID - -▸ **getAccountByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> - -Get general information about a player from their PUUID - -**`Remarks`** - -**Returns:** -- Their PUUID -- Their region -- Their account level -- Their current card - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.force?` | `boolean` | -| `__namedParameters.puuid` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`ProfileResponse`](../interfaces/types_v1_profile.ProfileResponse.md)\>\> - -General information on a players profile - -#### Defined in - -[index.ts:539](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L539) - -___ - -### getCrosshair - -▸ **getCrosshair**(`__namedParameters`): `Promise`<`APIResponse`<`Buffer`\>\> - -Get an image of a valorant crosshair by its code - -**`Example`** - -Load and write a crosshair to crosshair.png -```js -import { writeFileSync } from "fs" - -const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") -writeFileSync("crosshair.png", crosshair.data) -``` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.code` | `string` | -| `__namedParameters.size?` | `number` | - -#### Returns - -`Promise`<`APIResponse`<`Buffer`\>\> - -The image of the crosshair as a Buffer - -#### Defined in - -[index.ts:242](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L242) - -___ - -### getFeaturedItems - -▸ **getFeaturedItems**(): `Promise`<`APIResponse`<[`FeaturedItemsResponse`](../modules/types_v1_featured_items.md#featureditemsresponse)\>\> - -Get all of the featured items in the current valorant store - -#### Returns - -`Promise`<`APIResponse`<[`FeaturedItemsResponse`](../modules/types_v1_featured_items.md#featureditemsresponse)\>\> - -Featured items in the current valorant store - -#### Defined in - -[index.ts:273](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L273) - -___ - -### getLeaderboard - -▸ **getLeaderboard**(`__namedParameters`): `Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> - -Get the leaderboard of a region - -**`Remarks`** - -In order for player filtering to work, they must be Immortal or higher - -**`Throws`** - -TypeError - If both a riotID and puuid are supplied - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.end?` | `number` | -| `__namedParameters.puuid?` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.riotID?` | `Object` | -| `__namedParameters.riotID.name` | `string` | -| `__namedParameters.riotID.tag` | `string` | -| `__namedParameters.season?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | -| `__namedParameters.start?` | `number` | -| `__namedParameters.version?` | ``"v1"`` \| ``"v2"`` | - -#### Returns - -`Promise`<`APIResponse`<[`LeaderboardResponse`](../interfaces/types_v2_leaderboard.LeaderboardResponse.md)\>\> - -Descending order of the highest ranked players. (Immortal and up) - -#### Defined in - -[index.ts:409](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L409) - -___ - -### getMMR - -▸ **getMMR**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> - -Gets general info about a players rank by their Riot ID - -**`Remarks`** - -**Returns:** -- Current rank and info about their rank -- RR change on their last game -- Their PUUID -- Their peak rank from every season - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.name` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.seasonFilter?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | -| `__namedParameters.tag` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> - -Information about a players mmr/rank - -#### Defined in - -[index.ts:439](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L439) - -___ - -### getMMRByPUUID - -▸ **getMMRByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> - -Gets general info about a players rank by their PUUID - -**`Remarks`** - -**Returns:** -- Current rank and info about their rank -- RR change on their last game -- Their PUUID -- Their peak rank from every season - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.seasonFilter?` | \`e${number}a1\` \| \`e${number}a2\` \| \`e${number}a3\` | - -#### Returns - -`Promise`<`APIResponse`<[`MMRResponse`](../interfaces/types_v2_mmr.MMRResponse.md)\>\> - -Information about a players mmr/rank - -#### Defined in - -[index.ts:457](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L457) - -___ - -### getMMRHistory - -▸ **getMMRHistory**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> - -Get a list of rr changes of a player by their Riot ID - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.name` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.tag` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> - -List of rr changes (recent competitive games) - -#### Defined in - -[index.ts:368](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L368) - -___ - -### getMMRHistoryByPUUID - -▸ **getMMRHistoryByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> - -Get a list of rr changes of a player by their PUUID - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`MMRHistoryResponse`](../modules/types_v2_mmr_history.md#mmrhistoryresponse)\>\> - -List of rr changes (recent competitive games) - -#### Defined in - -[index.ts:379](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L379) - -___ - -### getMatch - -▸ **getMatch**(`__namedParameters`): `Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> - -Get information about a match - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.matchID` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`Match`](../interfaces/types_v3_matches.Match.md)\>\> - -Information about the match - -#### Defined in - -[index.ts:389](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L389) - -___ - -### getMatches - -▸ **getMatches**(`__namedParameters`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> - -Gets the most recent 5 matches by a players Riot ID - -**`Remarks`** - -**Returns:** -- Info about most recent 5 matches including: - - Metadata info about the match such as length, time, map, score, etc - - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - - Information about every round in the match such as plant/defuse info, etc - - Information about every kill in the game including killer, victim, assist, etc - -**`Throws`** - -TypeError - Only if the size parameter is set and not between 1-10 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | -| `__namedParameters.mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | -| `__namedParameters.name` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.size?` | `number` | -| `__namedParameters.tag` | `string` | - -#### Returns - -`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> - -Info about a players last 5 matches - -#### Defined in - -[index.ts:480](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L480) - -___ - -### getMatchesByPUUID - -▸ **getMatchesByPUUID**(`__namedParameters`): `Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> - -Gets the most recent 5 matches by a players PUUID - -**`Remarks`** - -**Returns:** -- Info about most recent 5 matches including: - - Metadata info about the match such as length, time, map, score, etc - - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - - Information about every round in the match such as plant/defuse info, etc - - Information about every kill in the game including killer, victim, assist, etc - -**`Throws`** - -TypeError - Only if the size parameter is set and not between 1-10 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.gamemodeFilter?` | [`Mode`](../modules/types_general.md#mode) | -| `__namedParameters.mapFilter?` | [`ValorantMap`](../modules/types_general.md#valorantmap) | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | -| `__namedParameters.size?` | `number` | - -#### Returns - -`Promise`<`APIResponse`<[`MatchesResponse`](../modules/types_v3_matches.md#matchesresponse)\>\> - -Info about a players last 5 matches - -#### Defined in - -[index.ts:503](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L503) - -___ - -### getOffers - -▸ **getOffers**(): `Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> - -Get a list of all the prices of every skin in the game - -#### Returns - -`Promise`<`APIResponse`<[`StoreOffersResponse`](../interfaces/types_v1_store_offers.StoreOffersResponse.md)\>\> - -List of skin prices - -#### Defined in - -[index.ts:282](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L282) - -___ - -### getRawCompetitiveUpdates - -▸ **getRawCompetitiveUpdates**(`__namedParameters`): `Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> - -Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - -**`See`** - -[getMMRHistory](index.default.md#getmmrhistory) for an easier response to use - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.queries?` | `any` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`RawCompetitiveUpdatesResponse`](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md)\>\> - -Information about the players rr history - -#### Defined in - -[index.ts:337](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L337) - -___ - -### getRawMMR - -▸ **getRawMMR**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> - -Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - -**`See`** - -[getMMR](index.default.md#getmmr) for an easier response to use - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.queries?` | `any` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`RawMMRResponse`](../interfaces/types_raw_mmr.RawMMRResponse.md)\>\> - -Information about the players mmr - -#### Defined in - -[index.ts:353](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L353) - -___ - -### getRawMatchDetails - -▸ **getRawMatchDetails**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> - -Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - -**`See`** - -[getMatch](index.default.md#getmatch) for an easier response to use - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.matchID` | `string` | -| `__namedParameters.queries?` | `any` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`RawMatchDetailsResponse`](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md)\>\> - -Information about the match - -#### Defined in - -[index.ts:305](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L305) - -___ - -### getRawMatchHistory - -▸ **getRawMatchHistory**(`__namedParameters`): `Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> - -Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - -**`See`** - -[getMatches](index.default.md#getmatches) for an easier response to use - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.puuid` | `string` | -| `__namedParameters.queries?` | `any` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`RawMatchHistoryResponse`](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md)\>\> - -Information about the players match history - -#### Defined in - -[index.ts:321](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L321) - -___ - -### getStatus - -▸ **getStatus**(`__namedParameters`): `Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> - -Will get information about the current maintenances and incidents about a region - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`StatusResponse`](../interfaces/types_v1_status.StatusResponse.md)\>\> - -Info about undergoing maintenances and incidents in a region of valorant - -#### Defined in - -[index.ts:292](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L292) - -___ - -### getTranslations - -▸ **getTranslations**(`__namedParameters?`): `Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> - -Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.locale?` | [`Locale`](../modules/types_general.md#locale) | - -#### Returns - -`Promise`<`APIResponse`<[`ContentResponse`](../interfaces/types_v1_content.ContentResponse.md)\>\> - -#### Defined in - -[index.ts:421](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L421) - -___ - -### getVersion - -▸ **getVersion**(`__namedParameters`): `Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> - -Get information about valorant in a region, such as the client version, branch, and server version - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.region` | [`Region`](../modules/types_general.md#region) | - -#### Returns - -`Promise`<`APIResponse`<[`VersionResponse`](../interfaces/types_v1_version.VersionResponse.md)\>\> - -Information about a regions valorant - -#### Defined in - -[index.ts:264](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L264) - -___ - -### getWebsite - -▸ **getWebsite**(`__namedParameters`): `Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> - -Get all announcements from the valorant website of a country - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `__namedParameters` | `Object` | -| `__namedParameters.countryCode` | ``"en-us"`` \| ``"en-gb"`` \| ``"de-de"`` \| ``"es-es"`` \| ``"es-mx"`` \| ``"fr-fr"`` \| ``"it-it"`` \| ``"ja-jp"`` \| ``"ko-kr"`` \| ``"pt-br"`` \| ``"ru-ru"`` \| ``"tr-tr"`` \| ``"vi-vn"`` | - -#### Returns - -`Promise`<`APIResponse`<[`WebsiteResponse`](../interfaces/types_v1_website.WebsiteResponse.md)\>\> - -List of announcements from the valorant website - -#### Defined in - -[index.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L254) - -___ - -### initUtils - -▸ **initUtils**(): `Promise`<`void`\> - -Creates [rankImages](index.default.md#rankimages) and [mapImages](index.default.md#mapimages) by pulling the images from [https://valorant-api.com](https://valorant-api.com) - -**`Remarks`** - -Must be called before using [rankImages](index.default.md#rankimages) and [mapImages](index.default.md#mapimages) - -#### Returns - -`Promise`<`void`\> - -#### Defined in - -[index.ts:140](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/index.ts#L140) diff --git a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md b/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md deleted file mode 100644 index c863b8a..0000000 --- a/package/doc/interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md +++ /dev/null @@ -1,52 +0,0 @@ -# Interface: RawCompetitiveUpdatesResponse - -[types/raw/competitive-updates](../modules/types_raw_competitive_updates.md).RawCompetitiveUpdatesResponse - -## Table of contents - -### Properties - -- [Matches](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#matches) -- [Subject](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#subject) -- [Version](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#version) -- [region](types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md#region) - -## Properties - -### Matches - -• **Matches**: `Match`[] - -#### Defined in - -[types/raw/competitive-updates.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L21) - -___ - -### Subject - -• **Subject**: `string` - -#### Defined in - -[types/raw/competitive-updates.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L20) - -___ - -### Version - -• **Version**: `number` - -#### Defined in - -[types/raw/competitive-updates.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L19) - -___ - -### region - -• **region**: [`Region`](../modules/types_general.md#region) - -#### Defined in - -[types/raw/competitive-updates.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/competitive-updates.ts#L22) diff --git a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md b/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md deleted file mode 100644 index 73b4cc2..0000000 --- a/package/doc/interfaces/types_raw_match_details.RawMatchDetailsResponse.md +++ /dev/null @@ -1,96 +0,0 @@ -# Interface: RawMatchDetailsResponse - -[types/raw/match-details](../modules/types_raw_match_details.md).RawMatchDetailsResponse - -## Table of contents - -### Properties - -- [bots](types_raw_match_details.RawMatchDetailsResponse.md#bots) -- [coaches](types_raw_match_details.RawMatchDetailsResponse.md#coaches) -- [kills](types_raw_match_details.RawMatchDetailsResponse.md#kills) -- [matchInfo](types_raw_match_details.RawMatchDetailsResponse.md#matchinfo) -- [players](types_raw_match_details.RawMatchDetailsResponse.md#players) -- [region](types_raw_match_details.RawMatchDetailsResponse.md#region) -- [roundResults](types_raw_match_details.RawMatchDetailsResponse.md#roundresults) -- [teams](types_raw_match_details.RawMatchDetailsResponse.md#teams) - -## Properties - -### bots - -• **bots**: `any`[] - -#### Defined in - -[types/raw/match-details.ts:251](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L251) - -___ - -### coaches - -• **coaches**: `any`[] - -#### Defined in - -[types/raw/match-details.ts:252](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L252) - -___ - -### kills - -• **kills**: `MatchKill`[] - -#### Defined in - -[types/raw/match-details.ts:255](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L255) - -___ - -### matchInfo - -• **matchInfo**: `MatchInfo` - -#### Defined in - -[types/raw/match-details.ts:249](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L249) - -___ - -### players - -• **players**: `Player`[] - -#### Defined in - -[types/raw/match-details.ts:250](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L250) - -___ - -### region - -• **region**: [`Region`](../modules/types_general.md#region) - -#### Defined in - -[types/raw/match-details.ts:256](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L256) - -___ - -### roundResults - -• **roundResults**: `RoundResult`[] - -#### Defined in - -[types/raw/match-details.ts:254](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L254) - -___ - -### teams - -• **teams**: `Team`[] - -#### Defined in - -[types/raw/match-details.ts:253](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-details.ts#L253) diff --git a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md b/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md deleted file mode 100644 index ae875cf..0000000 --- a/package/doc/interfaces/types_raw_match_history.RawMatchHistoryResponse.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: RawMatchHistoryResponse - -[types/raw/match-history](../modules/types_raw_match_history.md).RawMatchHistoryResponse - -## Table of contents - -### Properties - -- [BeginIndex](types_raw_match_history.RawMatchHistoryResponse.md#beginindex) -- [EndIndex](types_raw_match_history.RawMatchHistoryResponse.md#endindex) -- [History](types_raw_match_history.RawMatchHistoryResponse.md#history) -- [Subject](types_raw_match_history.RawMatchHistoryResponse.md#subject) -- [Total](types_raw_match_history.RawMatchHistoryResponse.md#total) -- [region](types_raw_match_history.RawMatchHistoryResponse.md#region) - -## Properties - -### BeginIndex - -• **BeginIndex**: `number` - -#### Defined in - -[types/raw/match-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L11) - -___ - -### EndIndex - -• **EndIndex**: `number` - -#### Defined in - -[types/raw/match-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L12) - -___ - -### History - -• **History**: `History`[] - -#### Defined in - -[types/raw/match-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L14) - -___ - -### Subject - -• **Subject**: `string` - -#### Defined in - -[types/raw/match-history.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L10) - -___ - -### Total - -• **Total**: `number` - -#### Defined in - -[types/raw/match-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L13) - -___ - -### region - -• **region**: [`Region`](../modules/types_general.md#region) - -#### Defined in - -[types/raw/match-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/match-history.ts#L15) diff --git a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md b/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md deleted file mode 100644 index 144415e..0000000 --- a/package/doc/interfaces/types_raw_mmr.RawMMRResponse.md +++ /dev/null @@ -1,96 +0,0 @@ -# Interface: RawMMRResponse - -[types/raw/mmr](../modules/types_raw_mmr.md).RawMMRResponse - -## Table of contents - -### Properties - -- [IsActRankBadgeHidden](types_raw_mmr.RawMMRResponse.md#isactrankbadgehidden) -- [IsLeaderboardAnonymized](types_raw_mmr.RawMMRResponse.md#isleaderboardanonymized) -- [LatestCompetitiveUpdate](types_raw_mmr.RawMMRResponse.md#latestcompetitiveupdate) -- [NewPlayerExperienceFinished](types_raw_mmr.RawMMRResponse.md#newplayerexperiencefinished) -- [QueueSkills](types_raw_mmr.RawMMRResponse.md#queueskills) -- [Subject](types_raw_mmr.RawMMRResponse.md#subject) -- [Version](types_raw_mmr.RawMMRResponse.md#version) -- [region](types_raw_mmr.RawMMRResponse.md#region) - -## Properties - -### IsActRankBadgeHidden - -• **IsActRankBadgeHidden**: `boolean` - -#### Defined in - -[types/raw/mmr.ts:63](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L63) - -___ - -### IsLeaderboardAnonymized - -• **IsLeaderboardAnonymized**: `boolean` - -#### Defined in - -[types/raw/mmr.ts:62](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L62) - -___ - -### LatestCompetitiveUpdate - -• **LatestCompetitiveUpdate**: `LatestCompetitiveUpdate` - -#### Defined in - -[types/raw/mmr.ts:61](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L61) - -___ - -### NewPlayerExperienceFinished - -• **NewPlayerExperienceFinished**: `boolean` - -#### Defined in - -[types/raw/mmr.ts:59](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L59) - -___ - -### QueueSkills - -• **QueueSkills**: `QueueSkills` - -#### Defined in - -[types/raw/mmr.ts:60](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L60) - -___ - -### Subject - -• **Subject**: `string` - -#### Defined in - -[types/raw/mmr.ts:58](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L58) - -___ - -### Version - -• **Version**: `number` - -#### Defined in - -[types/raw/mmr.ts:57](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L57) - -___ - -### region - -• **region**: [`Region`](../modules/types_general.md#region) - -#### Defined in - -[types/raw/mmr.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/raw/mmr.ts#L64) diff --git a/package/doc/interfaces/types_v1_content.Act.md b/package/doc/interfaces/types_v1_content.Act.md deleted file mode 100644 index 42bb227..0000000 --- a/package/doc/interfaces/types_v1_content.Act.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: Act - -[types/v1-content](../modules/types_v1_content.md).Act - -## Table of contents - -### Properties - -- [id](types_v1_content.Act.md#id) -- [isActive](types_v1_content.Act.md#isactive) -- [localizedNames](types_v1_content.Act.md#localizednames) -- [name](types_v1_content.Act.md#name) -- [parentId](types_v1_content.Act.md#parentid) -- [type](types_v1_content.Act.md#type) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[types/v1-content.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L19) - -___ - -### isActive - -• **isActive**: `boolean` - -#### Defined in - -[types/v1-content.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L24) - -___ - -### localizedNames - -• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) - -#### Defined in - -[types/v1-content.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L23) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v1-content.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L22) - -___ - -### parentId - -• **parentId**: `string` - -#### Defined in - -[types/v1-content.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L20) - -___ - -### type - -• **type**: `string` - -#### Defined in - -[types/v1-content.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L21) diff --git a/package/doc/interfaces/types_v1_content.Asset.md b/package/doc/interfaces/types_v1_content.Asset.md deleted file mode 100644 index 7222f65..0000000 --- a/package/doc/interfaces/types_v1_content.Asset.md +++ /dev/null @@ -1,58 +0,0 @@ -# Interface: Asset - -[types/v1-content](../modules/types_v1_content.md).Asset - -## Hierarchy - -- **`Asset`** - - ↳ [`AssetWithPath`](types_v1_content.AssetWithPath.md) - -## Table of contents - -### Properties - -- [assetName](types_v1_content.Asset.md#assetname) -- [id](types_v1_content.Asset.md#id) -- [localizedNames](types_v1_content.Asset.md#localizednames) -- [name](types_v1_content.Asset.md#name) - -## Properties - -### assetName - -• **assetName**: `string` - -#### Defined in - -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L11) - -___ - -### id - -• **id**: `string` - -#### Defined in - -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L10) - -___ - -### localizedNames - -• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) - -#### Defined in - -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L9) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.AssetWithPath.md b/package/doc/interfaces/types_v1_content.AssetWithPath.md deleted file mode 100644 index 3c242b5..0000000 --- a/package/doc/interfaces/types_v1_content.AssetWithPath.md +++ /dev/null @@ -1,85 +0,0 @@ -# Interface: AssetWithPath - -[types/v1-content](../modules/types_v1_content.md).AssetWithPath - -## Hierarchy - -- [`Asset`](types_v1_content.Asset.md) - - ↳ **`AssetWithPath`** - -## Table of contents - -### Properties - -- [assetName](types_v1_content.AssetWithPath.md#assetname) -- [assetPath](types_v1_content.AssetWithPath.md#assetpath) -- [id](types_v1_content.AssetWithPath.md#id) -- [localizedNames](types_v1_content.AssetWithPath.md#localizednames) -- [name](types_v1_content.AssetWithPath.md#name) - -## Properties - -### assetName - -• **assetName**: `string` - -#### Inherited from - -[Asset](types_v1_content.Asset.md).[assetName](types_v1_content.Asset.md#assetname) - -#### Defined in - -[types/v1-content.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L11) - -___ - -### assetPath - -• **assetPath**: `string` - -#### Defined in - -[types/v1-content.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L15) - -___ - -### id - -• **id**: `string` - -#### Inherited from - -[Asset](types_v1_content.Asset.md).[id](types_v1_content.Asset.md#id) - -#### Defined in - -[types/v1-content.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L10) - -___ - -### localizedNames - -• `Optional` **localizedNames**: [`LocalizedNames`](../modules/types_v1_content.md#localizednames) - -#### Inherited from - -[Asset](types_v1_content.Asset.md).[localizedNames](types_v1_content.Asset.md#localizednames) - -#### Defined in - -[types/v1-content.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L9) - -___ - -### name - -• **name**: `string` - -#### Inherited from - -[Asset](types_v1_content.Asset.md).[name](types_v1_content.Asset.md#name) - -#### Defined in - -[types/v1-content.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L8) diff --git a/package/doc/interfaces/types_v1_content.ContentResponse.md b/package/doc/interfaces/types_v1_content.ContentResponse.md deleted file mode 100644 index d24d981..0000000 --- a/package/doc/interfaces/types_v1_content.ContentResponse.md +++ /dev/null @@ -1,184 +0,0 @@ -# Interface: ContentResponse - -[types/v1-content](../modules/types_v1_content.md).ContentResponse - -## Table of contents - -### Properties - -- [acts](types_v1_content.ContentResponse.md#acts) -- [ceremonies](types_v1_content.ContentResponse.md#ceremonies) -- [characters](types_v1_content.ContentResponse.md#characters) -- [charmLevels](types_v1_content.ContentResponse.md#charmlevels) -- [charms](types_v1_content.ContentResponse.md#charms) -- [chromas](types_v1_content.ContentResponse.md#chromas) -- [equips](types_v1_content.ContentResponse.md#equips) -- [gameModes](types_v1_content.ContentResponse.md#gamemodes) -- [maps](types_v1_content.ContentResponse.md#maps) -- [playerCards](types_v1_content.ContentResponse.md#playercards) -- [playerTitles](types_v1_content.ContentResponse.md#playertitles) -- [skinLevels](types_v1_content.ContentResponse.md#skinlevels) -- [skins](types_v1_content.ContentResponse.md#skins) -- [sprayLevels](types_v1_content.ContentResponse.md#spraylevels) -- [sprays](types_v1_content.ContentResponse.md#sprays) -- [version](types_v1_content.ContentResponse.md#version) - -## Properties - -### acts - -• **acts**: [`Act`](types_v1_content.Act.md)[] - -#### Defined in - -[types/v1-content.ts:42](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L42) - -___ - -### ceremonies - -• **ceremonies**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:43](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L43) - -___ - -### characters - -• **characters**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:29](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L29) - -___ - -### charmLevels - -• **charmLevels**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:39](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L39) - -___ - -### charms - -• **charms**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:38](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L38) - -___ - -### chromas - -• **chromas**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L31) - -___ - -### equips - -• **equips**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:34](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L34) - -___ - -### gameModes - -• **gameModes**: [`AssetWithPath`](types_v1_content.AssetWithPath.md)[] - -#### Defined in - -[types/v1-content.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L35) - -___ - -### maps - -• **maps**: [`AssetWithPath`](types_v1_content.AssetWithPath.md)[] - -#### Defined in - -[types/v1-content.ts:30](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L30) - -___ - -### playerCards - -• **playerCards**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:40](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L40) - -___ - -### playerTitles - -• **playerTitles**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L41) - -___ - -### skinLevels - -• **skinLevels**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:33](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L33) - -___ - -### skins - -• **skins**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L32) - -___ - -### sprayLevels - -• **sprayLevels**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:37](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L37) - -___ - -### sprays - -• **sprays**: [`Asset`](types_v1_content.Asset.md)[] - -#### Defined in - -[types/v1-content.ts:36](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L36) - -___ - -### version - -• **version**: `string` - -#### Defined in - -[types/v1-content.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L28) diff --git a/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md b/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md deleted file mode 100644 index 236eabb..0000000 --- a/package/doc/interfaces/types_v1_featured_items.FeaturedItems.md +++ /dev/null @@ -1,41 +0,0 @@ -# Interface: FeaturedItems - -[types/v1-featured-items](../modules/types_v1_featured_items.md).FeaturedItems - -## Table of contents - -### Properties - -- [bundle\_uuid](types_v1_featured_items.FeaturedItems.md#bundle_uuid) -- [items](types_v1_featured_items.FeaturedItems.md#items) -- [seconds\_remaining](types_v1_featured_items.FeaturedItems.md#seconds_remaining) - -## Properties - -### bundle\_uuid - -• **bundle\_uuid**: `string` - -#### Defined in - -[types/v1-featured-items.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L14) - -___ - -### items - -• **items**: [`Item`](types_v1_featured_items.Item.md)[] - -#### Defined in - -[types/v1-featured-items.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L15) - -___ - -### seconds\_remaining - -• **seconds\_remaining**: `number` - -#### Defined in - -[types/v1-featured-items.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L16) diff --git a/package/doc/interfaces/types_v1_featured_items.Item.md b/package/doc/interfaces/types_v1_featured_items.Item.md deleted file mode 100644 index 91d7a63..0000000 --- a/package/doc/interfaces/types_v1_featured_items.Item.md +++ /dev/null @@ -1,107 +0,0 @@ -# Interface: Item - -[types/v1-featured-items](../modules/types_v1_featured_items.md).Item - -## Table of contents - -### Properties - -- [amount](types_v1_featured_items.Item.md#amount) -- [base\_price](types_v1_featured_items.Item.md#base_price) -- [discount\_percent](types_v1_featured_items.Item.md#discount_percent) -- [discounted\_price](types_v1_featured_items.Item.md#discounted_price) -- [image](types_v1_featured_items.Item.md#image) -- [name](types_v1_featured_items.Item.md#name) -- [promo\_item](types_v1_featured_items.Item.md#promo_item) -- [type](types_v1_featured_items.Item.md#type) -- [uuid](types_v1_featured_items.Item.md#uuid) - -## Properties - -### amount - -• **amount**: `number` - -#### Defined in - -[types/v1-featured-items.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L6) - -___ - -### base\_price - -• **base\_price**: `number` - -#### Defined in - -[types/v1-featured-items.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L8) - -___ - -### discount\_percent - -• **discount\_percent**: `number` - -#### Defined in - -[types/v1-featured-items.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L7) - -___ - -### discounted\_price - -• **discounted\_price**: `number` - -#### Defined in - -[types/v1-featured-items.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L9) - -___ - -### image - -• **image**: `string` - -#### Defined in - -[types/v1-featured-items.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L4) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v1-featured-items.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L3) - -___ - -### promo\_item - -• **promo\_item**: `boolean` - -#### Defined in - -[types/v1-featured-items.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L10) - -___ - -### type - -• **type**: `string` - -#### Defined in - -[types/v1-featured-items.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L5) - -___ - -### uuid - -• **uuid**: `string` - -#### Defined in - -[types/v1-featured-items.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L2) diff --git a/package/doc/interfaces/types_v1_profile.Card.md b/package/doc/interfaces/types_v1_profile.Card.md deleted file mode 100644 index cde6132..0000000 --- a/package/doc/interfaces/types_v1_profile.Card.md +++ /dev/null @@ -1,52 +0,0 @@ -# Interface: Card - -[types/v1-profile](../modules/types_v1_profile.md).Card - -## Table of contents - -### Properties - -- [id](types_v1_profile.Card.md#id) -- [large](types_v1_profile.Card.md#large) -- [small](types_v1_profile.Card.md#small) -- [wide](types_v1_profile.Card.md#wide) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[types/v1-profile.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L7) - -___ - -### large - -• **large**: `string` - -#### Defined in - -[types/v1-profile.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L5) - -___ - -### small - -• **small**: `string` - -#### Defined in - -[types/v1-profile.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L4) - -___ - -### wide - -• **wide**: `string` - -#### Defined in - -[types/v1-profile.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L6) diff --git a/package/doc/interfaces/types_v1_profile.ProfileResponse.md b/package/doc/interfaces/types_v1_profile.ProfileResponse.md deleted file mode 100644 index 602f9a7..0000000 --- a/package/doc/interfaces/types_v1_profile.ProfileResponse.md +++ /dev/null @@ -1,96 +0,0 @@ -# Interface: ProfileResponse - -[types/v1-profile](../modules/types_v1_profile.md).ProfileResponse - -## Table of contents - -### Properties - -- [account\_level](types_v1_profile.ProfileResponse.md#account_level) -- [card](types_v1_profile.ProfileResponse.md#card) -- [last\_update](types_v1_profile.ProfileResponse.md#last_update) -- [last\_update\_raw](types_v1_profile.ProfileResponse.md#last_update_raw) -- [name](types_v1_profile.ProfileResponse.md#name) -- [puuid](types_v1_profile.ProfileResponse.md#puuid) -- [region](types_v1_profile.ProfileResponse.md#region) -- [tag](types_v1_profile.ProfileResponse.md#tag) - -## Properties - -### account\_level - -• **account\_level**: `number` - -#### Defined in - -[types/v1-profile.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L13) - -___ - -### card - -• **card**: [`Card`](types_v1_profile.Card.md) - -#### Defined in - -[types/v1-profile.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L16) - -___ - -### last\_update - -• **last\_update**: `string` - -#### Defined in - -[types/v1-profile.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L17) - -___ - -### last\_update\_raw - -• **last\_update\_raw**: `number` - -#### Defined in - -[types/v1-profile.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L18) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v1-profile.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L14) - -___ - -### puuid - -• **puuid**: `string` - -#### Defined in - -[types/v1-profile.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L11) - -___ - -### region - -• **region**: [`Region`](../modules/types_general.md#region) - -#### Defined in - -[types/v1-profile.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L12) - -___ - -### tag - -• **tag**: `string` - -#### Defined in - -[types/v1-profile.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-profile.ts#L15) diff --git a/package/doc/interfaces/types_v1_status.Incident.md b/package/doc/interfaces/types_v1_status.Incident.md deleted file mode 100644 index e264bb7..0000000 --- a/package/doc/interfaces/types_v1_status.Incident.md +++ /dev/null @@ -1,107 +0,0 @@ -# Interface: Incident - -[types/v1-status](../modules/types_v1_status.md).Incident - -## Table of contents - -### Properties - -- [archive\_at](types_v1_status.Incident.md#archive_at) -- [created\_at](types_v1_status.Incident.md#created_at) -- [id](types_v1_status.Incident.md#id) -- [incident\_severity](types_v1_status.Incident.md#incident_severity) -- [maintenance\_status](types_v1_status.Incident.md#maintenance_status) -- [platforms](types_v1_status.Incident.md#platforms) -- [titles](types_v1_status.Incident.md#titles) -- [updated\_at](types_v1_status.Incident.md#updated_at) -- [updates](types_v1_status.Incident.md#updates) - -## Properties - -### archive\_at - -• **archive\_at**: `Date` - -#### Defined in - -[types/v1-status.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L20) - -___ - -### created\_at - -• **created\_at**: `Date` - -#### Defined in - -[types/v1-status.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L19) - -___ - -### id - -• **id**: `number` - -#### Defined in - -[types/v1-status.ts:24](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L24) - -___ - -### incident\_severity - -• **incident\_severity**: `string` - -#### Defined in - -[types/v1-status.ts:27](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L27) - -___ - -### maintenance\_status - -• **maintenance\_status**: `string` - -#### Defined in - -[types/v1-status.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L26) - -___ - -### platforms - -• **platforms**: `string`[] - -#### Defined in - -[types/v1-status.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L22) - -___ - -### titles - -• **titles**: [`Title`](types_v1_status.Title.md)[] - -#### Defined in - -[types/v1-status.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L25) - -___ - -### updated\_at - -• **updated\_at**: `Date` - -#### Defined in - -[types/v1-status.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L23) - -___ - -### updates - -• **updates**: [`Update`](types_v1_status.Update.md)[] - -#### Defined in - -[types/v1-status.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L21) diff --git a/package/doc/interfaces/types_v1_status.StatusResponse.md b/package/doc/interfaces/types_v1_status.StatusResponse.md deleted file mode 100644 index 52ddaeb..0000000 --- a/package/doc/interfaces/types_v1_status.StatusResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# Interface: StatusResponse - -[types/v1-status](../modules/types_v1_status.md).StatusResponse - -## Table of contents - -### Properties - -- [incidents](types_v1_status.StatusResponse.md#incidents) -- [maintenances](types_v1_status.StatusResponse.md#maintenances) - -## Properties - -### incidents - -• **incidents**: [`Incident`](types_v1_status.Incident.md)[] - -#### Defined in - -[types/v1-status.ts:32](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L32) - -___ - -### maintenances - -• **maintenances**: [`Incident`](types_v1_status.Incident.md)[] - -#### Defined in - -[types/v1-status.ts:31](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L31) diff --git a/package/doc/interfaces/types_v1_status.Title.md b/package/doc/interfaces/types_v1_status.Title.md deleted file mode 100644 index 5a01cf3..0000000 --- a/package/doc/interfaces/types_v1_status.Title.md +++ /dev/null @@ -1,30 +0,0 @@ -# Interface: Title - -[types/v1-status](../modules/types_v1_status.md).Title - -## Table of contents - -### Properties - -- [content](types_v1_status.Title.md#content) -- [locale](types_v1_status.Title.md#locale) - -## Properties - -### content - -• **content**: `string` - -#### Defined in - -[types/v1-status.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L4) - -___ - -### locale - -• **locale**: [`Locale`](../modules/types_general.md#locale) - -#### Defined in - -[types/v1-status.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L5) diff --git a/package/doc/interfaces/types_v1_status.Update.md b/package/doc/interfaces/types_v1_status.Update.md deleted file mode 100644 index efca417..0000000 --- a/package/doc/interfaces/types_v1_status.Update.md +++ /dev/null @@ -1,85 +0,0 @@ -# Interface: Update - -[types/v1-status](../modules/types_v1_status.md).Update - -## Table of contents - -### Properties - -- [author](types_v1_status.Update.md#author) -- [created\_at](types_v1_status.Update.md#created_at) -- [id](types_v1_status.Update.md#id) -- [publish](types_v1_status.Update.md#publish) -- [publish\_locations](types_v1_status.Update.md#publish_locations) -- [translations](types_v1_status.Update.md#translations) -- [updated\_at](types_v1_status.Update.md#updated_at) - -## Properties - -### author - -• **author**: `string` - -#### Defined in - -[types/v1-status.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L15) - -___ - -### created\_at - -• **created\_at**: `Date` - -#### Defined in - -[types/v1-status.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L9) - -___ - -### id - -• **id**: `number` - -#### Defined in - -[types/v1-status.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L12) - -___ - -### publish - -• **publish**: `boolean` - -#### Defined in - -[types/v1-status.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L11) - -___ - -### publish\_locations - -• **publish\_locations**: `string`[] - -#### Defined in - -[types/v1-status.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L14) - -___ - -### translations - -• **translations**: [`Title`](types_v1_status.Title.md)[] - -#### Defined in - -[types/v1-status.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L13) - -___ - -### updated\_at - -• **updated\_at**: `Date` - -#### Defined in - -[types/v1-status.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-status.ts#L10) diff --git a/package/doc/interfaces/types_v1_store_offers.Cost.md b/package/doc/interfaces/types_v1_store_offers.Cost.md deleted file mode 100644 index 961e924..0000000 --- a/package/doc/interfaces/types_v1_store_offers.Cost.md +++ /dev/null @@ -1,19 +0,0 @@ -# Interface: Cost - -[types/v1-store-offers](../modules/types_v1_store_offers.md).Cost - -## Table of contents - -### Properties - -- [85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741](types_v1_store_offers.Cost.md#85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741) - -## Properties - -### 85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741 - -• **85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741**: `number` - -#### Defined in - -[types/v1-store-offers.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L2) diff --git a/package/doc/interfaces/types_v1_store_offers.Offer.md b/package/doc/interfaces/types_v1_store_offers.Offer.md deleted file mode 100644 index 65daf53..0000000 --- a/package/doc/interfaces/types_v1_store_offers.Offer.md +++ /dev/null @@ -1,63 +0,0 @@ -# Interface: Offer - -[types/v1-store-offers](../modules/types_v1_store_offers.md).Offer - -## Table of contents - -### Properties - -- [Cost](types_v1_store_offers.Offer.md#cost) -- [IsDirectPurchase](types_v1_store_offers.Offer.md#isdirectpurchase) -- [OfferID](types_v1_store_offers.Offer.md#offerid) -- [Rewards](types_v1_store_offers.Offer.md#rewards) -- [StartDate](types_v1_store_offers.Offer.md#startdate) - -## Properties - -### Cost - -• **Cost**: [`Cost`](types_v1_store_offers.Cost.md) - -#### Defined in - -[types/v1-store-offers.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L15) - -___ - -### IsDirectPurchase - -• **IsDirectPurchase**: `boolean` - -#### Defined in - -[types/v1-store-offers.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L13) - -___ - -### OfferID - -• **OfferID**: `string` - -#### Defined in - -[types/v1-store-offers.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L12) - -___ - -### Rewards - -• **Rewards**: [`Reward`](types_v1_store_offers.Reward.md)[] - -#### Defined in - -[types/v1-store-offers.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L16) - -___ - -### StartDate - -• **StartDate**: `Date` - -#### Defined in - -[types/v1-store-offers.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L14) diff --git a/package/doc/interfaces/types_v1_store_offers.Reward.md b/package/doc/interfaces/types_v1_store_offers.Reward.md deleted file mode 100644 index d552364..0000000 --- a/package/doc/interfaces/types_v1_store_offers.Reward.md +++ /dev/null @@ -1,41 +0,0 @@ -# Interface: Reward - -[types/v1-store-offers](../modules/types_v1_store_offers.md).Reward - -## Table of contents - -### Properties - -- [ItemID](types_v1_store_offers.Reward.md#itemid) -- [ItemTypeID](types_v1_store_offers.Reward.md#itemtypeid) -- [Quantity](types_v1_store_offers.Reward.md#quantity) - -## Properties - -### ItemID - -• **ItemID**: `string` - -#### Defined in - -[types/v1-store-offers.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L7) - -___ - -### ItemTypeID - -• **ItemTypeID**: `string` - -#### Defined in - -[types/v1-store-offers.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L6) - -___ - -### Quantity - -• **Quantity**: `number` - -#### Defined in - -[types/v1-store-offers.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L8) diff --git a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md b/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md deleted file mode 100644 index 3a4f84c..0000000 --- a/package/doc/interfaces/types_v1_store_offers.StoreOffersResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# Interface: StoreOffersResponse - -[types/v1-store-offers](../modules/types_v1_store_offers.md).StoreOffersResponse - -## Table of contents - -### Properties - -- [Offers](types_v1_store_offers.StoreOffersResponse.md#offers) -- [UpgradeCurrencyOffers](types_v1_store_offers.StoreOffersResponse.md#upgradecurrencyoffers) - -## Properties - -### Offers - -• **Offers**: [`Offer`](types_v1_store_offers.Offer.md)[] - -#### Defined in - -[types/v1-store-offers.ts:25](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L25) - -___ - -### UpgradeCurrencyOffers - -• **UpgradeCurrencyOffers**: [`UpgradeCurrencyOffer`](types_v1_store_offers.UpgradeCurrencyOffer.md)[] - -#### Defined in - -[types/v1-store-offers.ts:26](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L26) diff --git a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md b/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md deleted file mode 100644 index 25f5451..0000000 --- a/package/doc/interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md +++ /dev/null @@ -1,30 +0,0 @@ -# Interface: UpgradeCurrencyOffer - -[types/v1-store-offers](../modules/types_v1_store_offers.md).UpgradeCurrencyOffer - -## Table of contents - -### Properties - -- [OfferID](types_v1_store_offers.UpgradeCurrencyOffer.md#offerid) -- [StorefrontItemID](types_v1_store_offers.UpgradeCurrencyOffer.md#storefrontitemid) - -## Properties - -### OfferID - -• **OfferID**: `string` - -#### Defined in - -[types/v1-store-offers.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L20) - -___ - -### StorefrontItemID - -• **StorefrontItemID**: `string` - -#### Defined in - -[types/v1-store-offers.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-store-offers.ts#L21) diff --git a/package/doc/interfaces/types_v1_version.VersionResponse.md b/package/doc/interfaces/types_v1_version.VersionResponse.md deleted file mode 100644 index da0adf0..0000000 --- a/package/doc/interfaces/types_v1_version.VersionResponse.md +++ /dev/null @@ -1,52 +0,0 @@ -# Interface: VersionResponse - -[types/v1-version](../modules/types_v1_version.md).VersionResponse - -## Table of contents - -### Properties - -- [branch](types_v1_version.VersionResponse.md#branch) -- [clientVersion](types_v1_version.VersionResponse.md#clientversion) -- [region](types_v1_version.VersionResponse.md#region) -- [version](types_v1_version.VersionResponse.md#version) - -## Properties - -### branch - -• **branch**: `string` - -#### Defined in - -[types/v1-version.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L4) - -___ - -### clientVersion - -• **clientVersion**: `string` - -#### Defined in - -[types/v1-version.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L3) - -___ - -### region - -• **region**: `string` - -#### Defined in - -[types/v1-version.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L5) - -___ - -### version - -• **version**: `string` - -#### Defined in - -[types/v1-version.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-version.ts#L2) diff --git a/package/doc/interfaces/types_v1_website.Post.md b/package/doc/interfaces/types_v1_website.Post.md deleted file mode 100644 index 34b4ad6..0000000 --- a/package/doc/interfaces/types_v1_website.Post.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: Post - -[types/v1-website](../modules/types_v1_website.md).Post - -## Table of contents - -### Properties - -- [banner\_url](types_v1_website.Post.md#banner_url) -- [category](types_v1_website.Post.md#category) -- [date](types_v1_website.Post.md#date) -- [external\_link](types_v1_website.Post.md#external_link) -- [title](types_v1_website.Post.md#title) -- [url](types_v1_website.Post.md#url) - -## Properties - -### banner\_url - -• **banner\_url**: `string` - -#### Defined in - -[types/v1-website.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L2) - -___ - -### category - -• **category**: `string` - -#### Defined in - -[types/v1-website.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L3) - -___ - -### date - -• **date**: `Date` - -#### Defined in - -[types/v1-website.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L4) - -___ - -### external\_link - -• **external\_link**: `string` - -#### Defined in - -[types/v1-website.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L5) - -___ - -### title - -• **title**: `string` - -#### Defined in - -[types/v1-website.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L6) - -___ - -### url - -• **url**: `string` - -#### Defined in - -[types/v1-website.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L7) diff --git a/package/doc/interfaces/types_v1_website.WebsiteResponse.md b/package/doc/interfaces/types_v1_website.WebsiteResponse.md deleted file mode 100644 index 4f2cf45..0000000 --- a/package/doc/interfaces/types_v1_website.WebsiteResponse.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: WebsiteResponse - -[types/v1-website](../modules/types_v1_website.md).WebsiteResponse - -## Table of contents - -### Properties - -- [banner\_url](types_v1_website.WebsiteResponse.md#banner_url) -- [category](types_v1_website.WebsiteResponse.md#category) -- [date](types_v1_website.WebsiteResponse.md#date) -- [external\_link](types_v1_website.WebsiteResponse.md#external_link) -- [title](types_v1_website.WebsiteResponse.md#title) -- [url](types_v1_website.WebsiteResponse.md#url) - -## Properties - -### banner\_url - -• **banner\_url**: `string` - -#### Defined in - -[types/v1-website.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L11) - -___ - -### category - -• **category**: `string` - -#### Defined in - -[types/v1-website.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L12) - -___ - -### date - -• **date**: `Date` - -#### Defined in - -[types/v1-website.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L13) - -___ - -### external\_link - -• **external\_link**: `string` - -#### Defined in - -[types/v1-website.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L14) - -___ - -### title - -• **title**: `string` - -#### Defined in - -[types/v1-website.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L15) - -___ - -### url - -• **url**: `string` - -#### Defined in - -[types/v1-website.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-website.ts#L16) diff --git a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md b/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md deleted file mode 100644 index c1da65d..0000000 --- a/package/doc/interfaces/types_v2_leaderboard.LeaderboardResponse.md +++ /dev/null @@ -1,96 +0,0 @@ -# Interface: LeaderboardResponse - -[types/v2-leaderboard](../modules/types_v2_leaderboard.md).LeaderboardResponse - -## Table of contents - -### Properties - -- [immortal\_1\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_1_threshold) -- [immortal\_2\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_2_threshold) -- [immortal\_3\_threshold](types_v2_leaderboard.LeaderboardResponse.md#immortal_3_threshold) -- [last\_update](types_v2_leaderboard.LeaderboardResponse.md#last_update) -- [next\_update](types_v2_leaderboard.LeaderboardResponse.md#next_update) -- [players](types_v2_leaderboard.LeaderboardResponse.md#players) -- [radiant\_threshold](types_v2_leaderboard.LeaderboardResponse.md#radiant_threshold) -- [total\_players](types_v2_leaderboard.LeaderboardResponse.md#total_players) - -## Properties - -### immortal\_1\_threshold - -• **immortal\_1\_threshold**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:22](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L22) - -___ - -### immortal\_2\_threshold - -• **immortal\_2\_threshold**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L21) - -___ - -### immortal\_3\_threshold - -• **immortal\_3\_threshold**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L20) - -___ - -### last\_update - -• **last\_update**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L16) - -___ - -### next\_update - -• **next\_update**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L17) - -___ - -### players - -• **players**: [`Player`](types_v2_leaderboard.Player.md)[] - -#### Defined in - -[types/v2-leaderboard.ts:23](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L23) - -___ - -### radiant\_threshold - -• **radiant\_threshold**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L19) - -___ - -### total\_players - -• **total\_players**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L18) diff --git a/package/doc/interfaces/types_v2_leaderboard.Player.md b/package/doc/interfaces/types_v2_leaderboard.Player.md deleted file mode 100644 index b6ed6bd..0000000 --- a/package/doc/interfaces/types_v2_leaderboard.Player.md +++ /dev/null @@ -1,129 +0,0 @@ -# Interface: Player - -[types/v2-leaderboard](../modules/types_v2_leaderboard.md).Player - -## Table of contents - -### Properties - -- [IsAnonymized](types_v2_leaderboard.Player.md#isanonymized) -- [IsBanned](types_v2_leaderboard.Player.md#isbanned) -- [PlayerCardID](types_v2_leaderboard.Player.md#playercardid) -- [TitleID](types_v2_leaderboard.Player.md#titleid) -- [competitiveTier](types_v2_leaderboard.Player.md#competitivetier) -- [gameName](types_v2_leaderboard.Player.md#gamename) -- [leaderboardRank](types_v2_leaderboard.Player.md#leaderboardrank) -- [numberOfWins](types_v2_leaderboard.Player.md#numberofwins) -- [puuid](types_v2_leaderboard.Player.md#puuid) -- [rankedRating](types_v2_leaderboard.Player.md#rankedrating) -- [tagLine](types_v2_leaderboard.Player.md#tagline) - -## Properties - -### IsAnonymized - -• **IsAnonymized**: `boolean` - -#### Defined in - -[types/v2-leaderboard.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L5) - -___ - -### IsBanned - -• **IsBanned**: `boolean` - -#### Defined in - -[types/v2-leaderboard.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L4) - -___ - -### PlayerCardID - -• **PlayerCardID**: `string` - -#### Defined in - -[types/v2-leaderboard.ts:2](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L2) - -___ - -### TitleID - -• **TitleID**: `string` - -#### Defined in - -[types/v2-leaderboard.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L3) - -___ - -### competitiveTier - -• **competitiveTier**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L12) - -___ - -### gameName - -• **gameName**: `string` - -#### Defined in - -[types/v2-leaderboard.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L7) - -___ - -### leaderboardRank - -• **leaderboardRank**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L9) - -___ - -### numberOfWins - -• **numberOfWins**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L11) - -___ - -### puuid - -• **puuid**: `string` - -#### Defined in - -[types/v2-leaderboard.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L6) - -___ - -### rankedRating - -• **rankedRating**: `number` - -#### Defined in - -[types/v2-leaderboard.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L10) - -___ - -### tagLine - -• **tagLine**: `string` - -#### Defined in - -[types/v2-leaderboard.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-leaderboard.ts#L8) diff --git a/package/doc/interfaces/types_v2_mmr.MMRResponse.md b/package/doc/interfaces/types_v2_mmr.MMRResponse.md deleted file mode 100644 index 0511305..0000000 --- a/package/doc/interfaces/types_v2_mmr.MMRResponse.md +++ /dev/null @@ -1,80 +0,0 @@ -# Interface: MMRResponse - -[types/v2-mmr](../modules/types_v2_mmr.md).MMRResponse - -## Table of contents - -### Properties - -- [by\_season](types_v2_mmr.MMRResponse.md#by_season) -- [current\_data](types_v2_mmr.MMRResponse.md#current_data) -- [name](types_v2_mmr.MMRResponse.md#name) -- [puuid](types_v2_mmr.MMRResponse.md#puuid) -- [tag](types_v2_mmr.MMRResponse.md#tag) - -## Properties - -### by\_season - -• **by\_season**: `Object` - -#### Defined in - -[types/v2-mmr.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L35) - -___ - -### current\_data - -• **current\_data**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `currenttier` | `number` | -| `currenttierpatched` | [`Rank`](../modules/types_general.md#rank) | -| `elo` | `number` | -| `games_needed_for_rating` | `number` | -| `images` | { `large`: `string` ; `small`: `string` ; `triangle_down`: `string` ; `triangle_up`: `string` } | -| `images.large` | `string` | -| `images.small` | `string` | -| `images.triangle_down` | `string` | -| `images.triangle_up` | `string` | -| `mmr_change_to_last_game` | `number` | -| `old` | `boolean` | -| `ranking_in_tier` | `number` | - -#### Defined in - -[types/v2-mmr.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L19) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v2-mmr.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L16) - -___ - -### puuid - -• **puuid**: `string` - -#### Defined in - -[types/v2-mmr.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L18) - -___ - -### tag - -• **tag**: `string` - -#### Defined in - -[types/v2-mmr.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L17) diff --git a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md b/package/doc/interfaces/types_v2_mmr.SeasonMMR.md deleted file mode 100644 index b2c19c4..0000000 --- a/package/doc/interfaces/types_v2_mmr.SeasonMMR.md +++ /dev/null @@ -1,74 +0,0 @@ -# Interface: SeasonMMR - -[types/v2-mmr](../modules/types_v2_mmr.md).SeasonMMR - -## Table of contents - -### Properties - -- [act\_rank\_wins](types_v2_mmr.SeasonMMR.md#act_rank_wins) -- [error](types_v2_mmr.SeasonMMR.md#error) -- [final\_rank](types_v2_mmr.SeasonMMR.md#final_rank) -- [final\_rank\_patched](types_v2_mmr.SeasonMMR.md#final_rank_patched) -- [number\_of\_games](types_v2_mmr.SeasonMMR.md#number_of_games) -- [wins](types_v2_mmr.SeasonMMR.md#wins) - -## Properties - -### act\_rank\_wins - -• **act\_rank\_wins**: { `patched_tier`: [`Rank`](../modules/types_general.md#rank) ; `tier`: `number` }[] - -#### Defined in - -[types/v2-mmr.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L9) - -___ - -### error - -• `Optional` **error**: ``"No data available"`` - -#### Defined in - -[types/v2-mmr.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L4) - -___ - -### final\_rank - -• **final\_rank**: `number` - -#### Defined in - -[types/v2-mmr.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L7) - -___ - -### final\_rank\_patched - -• **final\_rank\_patched**: [`Rank`](../modules/types_general.md#rank) - -#### Defined in - -[types/v2-mmr.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L8) - -___ - -### number\_of\_games - -• **number\_of\_games**: `number` - -#### Defined in - -[types/v2-mmr.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L6) - -___ - -### wins - -• **wins**: `number` - -#### Defined in - -[types/v2-mmr.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr.ts#L5) diff --git a/package/doc/interfaces/types_v2_mmr_history.Images.md b/package/doc/interfaces/types_v2_mmr_history.Images.md deleted file mode 100644 index f682568..0000000 --- a/package/doc/interfaces/types_v2_mmr_history.Images.md +++ /dev/null @@ -1,52 +0,0 @@ -# Interface: Images - -[types/v2-mmr-history](../modules/types_v2_mmr_history.md).Images - -## Table of contents - -### Properties - -- [large](types_v2_mmr_history.Images.md#large) -- [small](types_v2_mmr_history.Images.md#small) -- [triangle\_down](types_v2_mmr_history.Images.md#triangle_down) -- [triangle\_up](types_v2_mmr_history.Images.md#triangle_up) - -## Properties - -### large - -• **large**: `string` - -#### Defined in - -[types/v2-mmr-history.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L5) - -___ - -### small - -• **small**: `string` - -#### Defined in - -[types/v2-mmr-history.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L4) - -___ - -### triangle\_down - -• **triangle\_down**: `string` - -#### Defined in - -[types/v2-mmr-history.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L6) - -___ - -### triangle\_up - -• **triangle\_up**: `string` - -#### Defined in - -[types/v2-mmr-history.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L7) diff --git a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md b/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md deleted file mode 100644 index ebff520..0000000 --- a/package/doc/interfaces/types_v2_mmr_history.MMRHistoryGame.md +++ /dev/null @@ -1,96 +0,0 @@ -# Interface: MMRHistoryGame - -[types/v2-mmr-history](../modules/types_v2_mmr_history.md).MMRHistoryGame - -## Table of contents - -### Properties - -- [currenttier](types_v2_mmr_history.MMRHistoryGame.md#currenttier) -- [currenttierpatched](types_v2_mmr_history.MMRHistoryGame.md#currenttierpatched) -- [date](types_v2_mmr_history.MMRHistoryGame.md#date) -- [date\_raw](types_v2_mmr_history.MMRHistoryGame.md#date_raw) -- [elo](types_v2_mmr_history.MMRHistoryGame.md#elo) -- [images](types_v2_mmr_history.MMRHistoryGame.md#images) -- [mmr\_change\_to\_last\_game](types_v2_mmr_history.MMRHistoryGame.md#mmr_change_to_last_game) -- [ranking\_in\_tier](types_v2_mmr_history.MMRHistoryGame.md#ranking_in_tier) - -## Properties - -### currenttier - -• **currenttier**: `number` - -#### Defined in - -[types/v2-mmr-history.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L11) - -___ - -### currenttierpatched - -• **currenttierpatched**: [`Rank`](../modules/types_general.md#rank) - -#### Defined in - -[types/v2-mmr-history.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L12) - -___ - -### date - -• **date**: `string` - -#### Defined in - -[types/v2-mmr-history.ts:17](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L17) - -___ - -### date\_raw - -• **date\_raw**: `number` - -#### Defined in - -[types/v2-mmr-history.ts:18](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L18) - -___ - -### elo - -• **elo**: `number` - -#### Defined in - -[types/v2-mmr-history.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L16) - -___ - -### images - -• **images**: [`Images`](types_v2_mmr_history.Images.md) - -#### Defined in - -[types/v2-mmr-history.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L13) - -___ - -### mmr\_change\_to\_last\_game - -• **mmr\_change\_to\_last\_game**: `number` - -#### Defined in - -[types/v2-mmr-history.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L15) - -___ - -### ranking\_in\_tier - -• **ranking\_in\_tier**: `number` - -#### Defined in - -[types/v2-mmr-history.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L14) diff --git a/package/doc/interfaces/types_v3_matches.KillEvent.md b/package/doc/interfaces/types_v3_matches.KillEvent.md deleted file mode 100644 index e55e638..0000000 --- a/package/doc/interfaces/types_v3_matches.KillEvent.md +++ /dev/null @@ -1,186 +0,0 @@ -# Interface: KillEvent - -[types/v3-matches](../modules/types_v3_matches.md).KillEvent - -## Hierarchy - -- **`KillEvent`** - - ↳ [`KillEventMatch`](types_v3_matches.KillEventMatch.md) - -## Table of contents - -### Properties - -- [assistants](types_v3_matches.KillEvent.md#assistants) -- [damage\_weapon\_assets](types_v3_matches.KillEvent.md#damage_weapon_assets) -- [damage\_weapon\_id](types_v3_matches.KillEvent.md#damage_weapon_id) -- [damage\_weapon\_name](types_v3_matches.KillEvent.md#damage_weapon_name) -- [kill\_time\_in\_match](types_v3_matches.KillEvent.md#kill_time_in_match) -- [kill\_time\_in\_round](types_v3_matches.KillEvent.md#kill_time_in_round) -- [killer\_display\_name](types_v3_matches.KillEvent.md#killer_display_name) -- [killer\_puuid](types_v3_matches.KillEvent.md#killer_puuid) -- [killer\_team](types_v3_matches.KillEvent.md#killer_team) -- [player\_locations\_on\_kill](types_v3_matches.KillEvent.md#player_locations_on_kill) -- [secondary\_fire\_mode](types_v3_matches.KillEvent.md#secondary_fire_mode) -- [victim\_death\_location](types_v3_matches.KillEvent.md#victim_death_location) -- [victim\_display\_name](types_v3_matches.KillEvent.md#victim_display_name) -- [victim\_puuid](types_v3_matches.KillEvent.md#victim_puuid) -- [victim\_team](types_v3_matches.KillEvent.md#victim_team) - -## Properties - -### assistants - -• **assistants**: { `assistant_display_name`: `string` ; `assistant_puuid`: `string` ; `assistant_team`: ``"Red"`` \| ``"Blue"`` }[] - -#### Defined in - -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L106) - -___ - -### damage\_weapon\_assets - -• **damage\_weapon\_assets**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `display_icon` | `string` | -| `killfeed_icon` | `string` | - -#### Defined in - -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L100) - -___ - -### damage\_weapon\_id - -• **damage\_weapon\_id**: `string` - -#### Defined in - -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L98) - -___ - -### damage\_weapon\_name - -• **damage\_weapon\_name**: [`Weapon`](../modules/types_general.md#weapon) - -#### Defined in - -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L99) - -___ - -### kill\_time\_in\_match - -• **kill\_time\_in\_match**: `number` - -#### Defined in - -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L90) - -___ - -### kill\_time\_in\_round - -• **kill\_time\_in\_round**: `number` - -#### Defined in - -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L89) - -___ - -### killer\_display\_name - -• **killer\_display\_name**: `string` - -#### Defined in - -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L92) - -___ - -### killer\_puuid - -• **killer\_puuid**: `string` - -#### Defined in - -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L91) - -___ - -### killer\_team - -• **killer\_team**: ``"Red"`` \| ``"Blue"`` - -#### Defined in - -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L93) - -___ - -### player\_locations\_on\_kill - -• **player\_locations\_on\_kill**: [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] - -#### Defined in - -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L105) - -___ - -### secondary\_fire\_mode - -• **secondary\_fire\_mode**: `boolean` - -#### Defined in - -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L104) - -___ - -### victim\_death\_location - -• **victim\_death\_location**: `PlayerLocation` - -#### Defined in - -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L97) - -___ - -### victim\_display\_name - -• **victim\_display\_name**: `string` - -#### Defined in - -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L95) - -___ - -### victim\_puuid - -• **victim\_puuid**: `string` - -#### Defined in - -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L94) - -___ - -### victim\_team - -• **victim\_team**: ``"Red"`` \| ``"Blue"`` - -#### Defined in - -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.KillEventMatch.md b/package/doc/interfaces/types_v3_matches.KillEventMatch.md deleted file mode 100644 index a73bfec..0000000 --- a/package/doc/interfaces/types_v3_matches.KillEventMatch.md +++ /dev/null @@ -1,257 +0,0 @@ -# Interface: KillEventMatch - -[types/v3-matches](../modules/types_v3_matches.md).KillEventMatch - -## Hierarchy - -- [`KillEvent`](types_v3_matches.KillEvent.md) - - ↳ **`KillEventMatch`** - -## Table of contents - -### Properties - -- [assistants](types_v3_matches.KillEventMatch.md#assistants) -- [damage\_weapon\_assets](types_v3_matches.KillEventMatch.md#damage_weapon_assets) -- [damage\_weapon\_id](types_v3_matches.KillEventMatch.md#damage_weapon_id) -- [damage\_weapon\_name](types_v3_matches.KillEventMatch.md#damage_weapon_name) -- [kill\_time\_in\_match](types_v3_matches.KillEventMatch.md#kill_time_in_match) -- [kill\_time\_in\_round](types_v3_matches.KillEventMatch.md#kill_time_in_round) -- [killer\_display\_name](types_v3_matches.KillEventMatch.md#killer_display_name) -- [killer\_puuid](types_v3_matches.KillEventMatch.md#killer_puuid) -- [killer\_team](types_v3_matches.KillEventMatch.md#killer_team) -- [player\_locations\_on\_kill](types_v3_matches.KillEventMatch.md#player_locations_on_kill) -- [round](types_v3_matches.KillEventMatch.md#round) -- [secondary\_fire\_mode](types_v3_matches.KillEventMatch.md#secondary_fire_mode) -- [victim\_death\_location](types_v3_matches.KillEventMatch.md#victim_death_location) -- [victim\_display\_name](types_v3_matches.KillEventMatch.md#victim_display_name) -- [victim\_puuid](types_v3_matches.KillEventMatch.md#victim_puuid) -- [victim\_team](types_v3_matches.KillEventMatch.md#victim_team) - -## Properties - -### assistants - -• **assistants**: { `assistant_display_name`: `string` ; `assistant_puuid`: `string` ; `assistant_team`: ``"Red"`` \| ``"Blue"`` }[] - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[assistants](types_v3_matches.KillEvent.md#assistants) - -#### Defined in - -[types/v3-matches.ts:106](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L106) - -___ - -### damage\_weapon\_assets - -• **damage\_weapon\_assets**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `display_icon` | `string` | -| `killfeed_icon` | `string` | - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_assets](types_v3_matches.KillEvent.md#damage_weapon_assets) - -#### Defined in - -[types/v3-matches.ts:100](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L100) - -___ - -### damage\_weapon\_id - -• **damage\_weapon\_id**: `string` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_id](types_v3_matches.KillEvent.md#damage_weapon_id) - -#### Defined in - -[types/v3-matches.ts:98](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L98) - -___ - -### damage\_weapon\_name - -• **damage\_weapon\_name**: [`Weapon`](../modules/types_general.md#weapon) - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[damage_weapon_name](types_v3_matches.KillEvent.md#damage_weapon_name) - -#### Defined in - -[types/v3-matches.ts:99](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L99) - -___ - -### kill\_time\_in\_match - -• **kill\_time\_in\_match**: `number` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[kill_time_in_match](types_v3_matches.KillEvent.md#kill_time_in_match) - -#### Defined in - -[types/v3-matches.ts:90](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L90) - -___ - -### kill\_time\_in\_round - -• **kill\_time\_in\_round**: `number` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[kill_time_in_round](types_v3_matches.KillEvent.md#kill_time_in_round) - -#### Defined in - -[types/v3-matches.ts:89](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L89) - -___ - -### killer\_display\_name - -• **killer\_display\_name**: `string` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[killer_display_name](types_v3_matches.KillEvent.md#killer_display_name) - -#### Defined in - -[types/v3-matches.ts:92](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L92) - -___ - -### killer\_puuid - -• **killer\_puuid**: `string` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[killer_puuid](types_v3_matches.KillEvent.md#killer_puuid) - -#### Defined in - -[types/v3-matches.ts:91](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L91) - -___ - -### killer\_team - -• **killer\_team**: ``"Red"`` \| ``"Blue"`` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[killer_team](types_v3_matches.KillEvent.md#killer_team) - -#### Defined in - -[types/v3-matches.ts:93](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L93) - -___ - -### player\_locations\_on\_kill - -• **player\_locations\_on\_kill**: [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[player_locations_on_kill](types_v3_matches.KillEvent.md#player_locations_on_kill) - -#### Defined in - -[types/v3-matches.ts:105](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L105) - -___ - -### round - -• **round**: `number` - -#### Defined in - -[types/v3-matches.ts:192](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L192) - -___ - -### secondary\_fire\_mode - -• **secondary\_fire\_mode**: `boolean` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[secondary_fire_mode](types_v3_matches.KillEvent.md#secondary_fire_mode) - -#### Defined in - -[types/v3-matches.ts:104](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L104) - -___ - -### victim\_death\_location - -• **victim\_death\_location**: `PlayerLocation` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[victim_death_location](types_v3_matches.KillEvent.md#victim_death_location) - -#### Defined in - -[types/v3-matches.ts:97](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L97) - -___ - -### victim\_display\_name - -• **victim\_display\_name**: `string` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[victim_display_name](types_v3_matches.KillEvent.md#victim_display_name) - -#### Defined in - -[types/v3-matches.ts:95](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L95) - -___ - -### victim\_puuid - -• **victim\_puuid**: `string` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[victim_puuid](types_v3_matches.KillEvent.md#victim_puuid) - -#### Defined in - -[types/v3-matches.ts:94](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L94) - -___ - -### victim\_team - -• **victim\_team**: ``"Red"`` \| ``"Blue"`` - -#### Inherited from - -[KillEvent](types_v3_matches.KillEvent.md).[victim_team](types_v3_matches.KillEvent.md#victim_team) - -#### Defined in - -[types/v3-matches.ts:96](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L96) diff --git a/package/doc/interfaces/types_v3_matches.Match.md b/package/doc/interfaces/types_v3_matches.Match.md deleted file mode 100644 index 4cc9573..0000000 --- a/package/doc/interfaces/types_v3_matches.Match.md +++ /dev/null @@ -1,102 +0,0 @@ -# Interface: Match - -[types/v3-matches](../modules/types_v3_matches.md).Match - -## Table of contents - -### Properties - -- [kills](types_v3_matches.Match.md#kills) -- [metadata](types_v3_matches.Match.md#metadata) -- [players](types_v3_matches.Match.md#players) -- [rounds](types_v3_matches.Match.md#rounds) -- [teams](types_v3_matches.Match.md#teams) - -## Properties - -### kills - -• **kills**: [`KillEventMatch`](types_v3_matches.KillEventMatch.md)[] - -#### Defined in - -[types/v3-matches.ts:229](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L229) - -___ - -### metadata - -• **metadata**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `cluster` | `string` | -| `game_length` | `number` | -| `game_start` | `number` | -| `game_start_patched` | `string` | -| `game_version` | `string` | -| `map` | [`ValorantMap`](../modules/types_general.md#valorantmap) | -| `matchid` | `string` | -| `mode` | [`Mode`](../modules/types_general.md#mode) | -| `platform` | ``"PC"`` | -| `queue` | `string` | -| `region` | [`Region`](../modules/types_general.md#region) | -| `rounds_played` | `number` | -| `season_id` | ``"string"`` | - -#### Defined in - -[types/v3-matches.ts:196](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L196) - -___ - -### players - -• **players**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `all_players` | [`Player`](types_v3_matches.Player.md)[] | -| `blue` | [`Player`](types_v3_matches.Player.md)[] | -| `red` | [`Player`](types_v3_matches.Player.md)[] | - -#### Defined in - -[types/v3-matches.ts:211](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L211) - -___ - -### rounds - -• **rounds**: [`Round`](types_v3_matches.Round.md)[] - -#### Defined in - -[types/v3-matches.ts:228](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L228) - -___ - -### teams - -• **teams**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `blue` | { `has_won`: ``false`` ; `rounds_lost`: `number` ; `rounds_won`: `number` } | -| `blue.has_won` | ``false`` | -| `blue.rounds_lost` | `number` | -| `blue.rounds_won` | `number` | -| `red` | { `has_won`: ``false`` ; `rounds_lost`: `number` ; `rounds_won`: `number` } | -| `red.has_won` | ``false`` | -| `red.rounds_lost` | `number` | -| `red.rounds_won` | `number` | - -#### Defined in - -[types/v3-matches.ts:216](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L216) diff --git a/package/doc/interfaces/types_v3_matches.Player.md b/package/doc/interfaces/types_v3_matches.Player.md deleted file mode 100644 index 577fa25..0000000 --- a/package/doc/interfaces/types_v3_matches.Player.md +++ /dev/null @@ -1,301 +0,0 @@ -# Interface: Player - -[types/v3-matches](../modules/types_v3_matches.md).Player - -## Table of contents - -### Properties - -- [ability\_casts](types_v3_matches.Player.md#ability_casts) -- [assets](types_v3_matches.Player.md#assets) -- [behavior](types_v3_matches.Player.md#behavior) -- [character](types_v3_matches.Player.md#character) -- [currenttier](types_v3_matches.Player.md#currenttier) -- [currenttier\_patched](types_v3_matches.Player.md#currenttier_patched) -- [damage\_made](types_v3_matches.Player.md#damage_made) -- [damage\_received](types_v3_matches.Player.md#damage_received) -- [economy](types_v3_matches.Player.md#economy) -- [level](types_v3_matches.Player.md#level) -- [name](types_v3_matches.Player.md#name) -- [party\_id](types_v3_matches.Player.md#party_id) -- [platform](types_v3_matches.Player.md#platform) -- [player\_card](types_v3_matches.Player.md#player_card) -- [player\_title](types_v3_matches.Player.md#player_title) -- [puuid](types_v3_matches.Player.md#puuid) -- [session\_playtime](types_v3_matches.Player.md#session_playtime) -- [stats](types_v3_matches.Player.md#stats) -- [tag](types_v3_matches.Player.md#tag) -- [team](types_v3_matches.Player.md#team) - -## Properties - -### ability\_casts - -• **ability\_casts**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `c_cast` | `number` | -| `e_cast` | `number` | -| `q_cast` | `number` | -| `x_cast` | `number` | - -#### Defined in - -[types/v3-matches.ts:35](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L35) - -___ - -### assets - -• **assets**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `agent` | { `bust`: `string` ; `full`: `string` ; `killfeed`: `string` ; `small`: `string` } | -| `agent.bust` | `string` | -| `agent.full` | `string` | -| `agent.killfeed` | `string` | -| `agent.small` | `string` | -| `card` | { `large`: `string` ; `small`: `string` ; `wide`: `string` } | -| `card.large` | `string` | -| `card.small` | `string` | -| `card.wide` | `string` | - -#### Defined in - -[types/v3-matches.ts:41](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L41) - -___ - -### behavior - -• **behavior**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `afk_rounds` | `number` | -| `friendly_fire` | { `incoming`: `number` ; `outgoing`: `number` } | -| `friendly_fire.incoming` | `number` | -| `friendly_fire.outgoing` | `number` | -| `rounds_in_spawn` | `number` | - -#### Defined in - -[types/v3-matches.ts:20](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L20) - -___ - -### character - -• **character**: [`Characters`](../modules/types_general.md#characters) - -#### Defined in - -[types/v3-matches.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L9) - -___ - -### currenttier - -• **currenttier**: `number` - -#### Defined in - -[types/v3-matches.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L10) - -___ - -### currenttier\_patched - -• **currenttier\_patched**: [`Rank`](../modules/types_general.md#rank) - -#### Defined in - -[types/v3-matches.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L11) - -___ - -### damage\_made - -• **damage\_made**: `number` - -#### Defined in - -[types/v3-matches.ts:74](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L74) - -___ - -### damage\_received - -• **damage\_received**: `number` - -#### Defined in - -[types/v3-matches.ts:75](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L75) - -___ - -### economy - -• **economy**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `loadout_value` | { `average`: `number` ; `overall`: `number` } | -| `loadout_value.average` | `number` | -| `loadout_value.overall` | `number` | -| `spent` | { `average`: `number` ; `overall`: `number` } | -| `spent.average` | `number` | -| `spent.overall` | `number` | - -#### Defined in - -[types/v3-matches.ts:64](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L64) - -___ - -### level - -• **level**: `number` - -#### Defined in - -[types/v3-matches.ts:8](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L8) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[types/v3-matches.ts:5](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L5) - -___ - -### party\_id - -• **party\_id**: `string` - -#### Defined in - -[types/v3-matches.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L14) - -___ - -### platform - -• **platform**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `os` | { `name`: `string` ; `version`: `string` } | -| `os.name` | `string` | -| `os.version` | `string` | -| `type` | `string` | - -#### Defined in - -[types/v3-matches.ts:28](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L28) - -___ - -### player\_card - -• **player\_card**: `string` - -#### Defined in - -[types/v3-matches.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L12) - -___ - -### player\_title - -• **player\_title**: `string` - -#### Defined in - -[types/v3-matches.ts:13](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L13) - -___ - -### puuid - -• **puuid**: `string` - -#### Defined in - -[types/v3-matches.ts:4](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L4) - -___ - -### session\_playtime - -• **session\_playtime**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `milliseconds` | `number` | -| `minutes` | `number` | -| `seconds` | `number` | - -#### Defined in - -[types/v3-matches.ts:15](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L15) - -___ - -### stats - -• **stats**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `assists` | `number` | -| `bodyshots` | `number` | -| `deaths` | `number` | -| `headshots` | `number` | -| `kills` | `number` | -| `legshots` | `number` | -| `score` | `number` | - -#### Defined in - -[types/v3-matches.ts:55](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L55) - -___ - -### tag - -• **tag**: `string` - -#### Defined in - -[types/v3-matches.ts:6](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L6) - -___ - -### team - -• **team**: ``"Red"`` \| ``"Blue"`` - -#### Defined in - -[types/v3-matches.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L7) diff --git a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md b/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md deleted file mode 100644 index 03d3f23..0000000 --- a/package/doc/interfaces/types_v3_matches.PlayerLocationOnEvent.md +++ /dev/null @@ -1,63 +0,0 @@ -# Interface: PlayerLocationOnEvent - -[types/v3-matches](../modules/types_v3_matches.md).PlayerLocationOnEvent - -## Table of contents - -### Properties - -- [location](types_v3_matches.PlayerLocationOnEvent.md#location) -- [player\_display\_name](types_v3_matches.PlayerLocationOnEvent.md#player_display_name) -- [player\_puuid](types_v3_matches.PlayerLocationOnEvent.md#player_puuid) -- [player\_team](types_v3_matches.PlayerLocationOnEvent.md#player_team) -- [view\_radians](types_v3_matches.PlayerLocationOnEvent.md#view_radians) - -## Properties - -### location - -• **location**: `PlayerLocation` - -#### Defined in - -[types/v3-matches.ts:84](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L84) - -___ - -### player\_display\_name - -• **player\_display\_name**: `string` - -#### Defined in - -[types/v3-matches.ts:82](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L82) - -___ - -### player\_puuid - -• **player\_puuid**: `string` - -#### Defined in - -[types/v3-matches.ts:81](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L81) - -___ - -### player\_team - -• **player\_team**: ``"Red"`` \| ``"Blue"`` - -#### Defined in - -[types/v3-matches.ts:83](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L83) - -___ - -### view\_radians - -• **view\_radians**: `number` - -#### Defined in - -[types/v3-matches.ts:85](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L85) diff --git a/package/doc/interfaces/types_v3_matches.Round.md b/package/doc/interfaces/types_v3_matches.Round.md deleted file mode 100644 index 374a0ba..0000000 --- a/package/doc/interfaces/types_v3_matches.Round.md +++ /dev/null @@ -1,149 +0,0 @@ -# Interface: Round - -[types/v3-matches](../modules/types_v3_matches.md).Round - -## Table of contents - -### Properties - -- [bomb\_defused](types_v3_matches.Round.md#bomb_defused) -- [bomb\_planted](types_v3_matches.Round.md#bomb_planted) -- [defuse\_events](types_v3_matches.Round.md#defuse_events) -- [end\_type](types_v3_matches.Round.md#end_type) -- [plant\_events](types_v3_matches.Round.md#plant_events) -- [player\_stats](types_v3_matches.Round.md#player_stats) -- [winning\_team](types_v3_matches.Round.md#winning_team) - -## Properties - -### bomb\_defused - -• **bomb\_defused**: `boolean` - -#### Defined in - -[types/v3-matches.ts:117](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L117) - -___ - -### bomb\_planted - -• **bomb\_planted**: `boolean` - -#### Defined in - -[types/v3-matches.ts:116](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L116) - -___ - -### defuse\_events - -• **defuse\_events**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `defuse_location?` | `PlayerLocation` | -| `defuse_time_in_round?` | `number` | -| `defused_by?` | { `display_name`: `string` ; `puuid`: `string` ; `team`: ``"Red"`` \| ``"Blue"`` } | -| `defused_by.display_name` | `string` | -| `defused_by.puuid` | `string` | -| `defused_by.team` | ``"Red"`` \| ``"Blue"`` | -| `player_locations_on_defuse?` | [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] | - -#### Defined in - -[types/v3-matches.ts:129](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L129) - -___ - -### end\_type - -• **end\_type**: ``"Eliminated"`` \| ``"Bomb defused"`` \| ``"Bomb detonated"`` - -#### Defined in - -[types/v3-matches.ts:115](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L115) - -___ - -### plant\_events - -• **plant\_events**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `plant_location?` | `PlayerLocation` | -| `plant_site?` | ``"A"`` \| ``"B"`` \| ``"C"`` | -| `plant_time_in_round?` | `number` | -| `planted_by?` | { `display_name`: `string` ; `puuid`: `string` ; `team`: ``"Red"`` \| ``"Blue"`` } | -| `planted_by.display_name` | `string` | -| `planted_by.puuid` | `string` | -| `planted_by.team` | ``"Red"`` \| ``"Blue"`` | -| `player_locations_on_plant?` | [`PlayerLocationOnEvent`](types_v3_matches.PlayerLocationOnEvent.md)[] | - -#### Defined in - -[types/v3-matches.ts:118](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L118) - -___ - -### player\_stats - -• **player\_stats**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `ability_casts` | { `c_cast?`: `number` ; `e_cast?`: `number` ; `q_cast?`: `number` ; `x_cast?`: `number` } | -| `ability_casts.c_cast?` | `number` | -| `ability_casts.e_cast?` | `number` | -| `ability_casts.q_cast?` | `number` | -| `ability_casts.x_cast?` | `number` | -| `bodyshots` | `number` | -| `damage` | `number` | -| `damage_events` | { `bodyshots`: `number` ; `damage`: `number` ; `headshots`: `number` ; `legshots`: `number` ; `receiver_display_name`: `string` ; `receiver_puuid`: `string` ; `receiver_team`: ``"Red"`` \| ``"Blue"`` }[] | -| `economy` | { `armor`: { `assets`: { `display_icon`: `string` } ; `id`: `string` ; `name`: ``"Heavy Shields"`` \| ``"Light Shields"`` } ; `loadout_value`: `number` ; `remaining`: `number` ; `spent`: `number` ; `weapon`: { `assets`: { `display_icon`: `string` ; `killfeed_icon`: `string` } ; `id`: `string` ; `name`: [`Weapon`](../modules/types_general.md#weapon) } } | -| `economy.armor` | { `assets`: { `display_icon`: `string` } ; `id`: `string` ; `name`: ``"Heavy Shields"`` \| ``"Light Shields"`` } | -| `economy.armor.assets` | { `display_icon`: `string` } | -| `economy.armor.assets.display_icon` | `string` | -| `economy.armor.id` | `string` | -| `economy.armor.name` | ``"Heavy Shields"`` \| ``"Light Shields"`` | -| `economy.loadout_value` | `number` | -| `economy.remaining` | `number` | -| `economy.spent` | `number` | -| `economy.weapon` | { `assets`: { `display_icon`: `string` ; `killfeed_icon`: `string` } ; `id`: `string` ; `name`: [`Weapon`](../modules/types_general.md#weapon) } | -| `economy.weapon.assets` | { `display_icon`: `string` ; `killfeed_icon`: `string` } | -| `economy.weapon.assets.display_icon` | `string` | -| `economy.weapon.assets.killfeed_icon` | `string` | -| `economy.weapon.id` | `string` | -| `economy.weapon.name` | [`Weapon`](../modules/types_general.md#weapon) | -| `headshots` | `number` | -| `kill_events` | [`KillEvent`](types_v3_matches.KillEvent.md)[] | -| `kills` | `number` | -| `legshots` | `number` | -| `player_display_name` | `string` | -| `player_puuid` | `string` | -| `player_team` | ``"Red"`` \| ``"Blue"`` | -| `score` | `number` | -| `stayed_in_spawn` | `boolean` | -| `was_afk` | `boolean` | -| `was_penalized` | `boolean` | - -#### Defined in - -[types/v3-matches.ts:139](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L139) - -___ - -### winning\_team - -• **winning\_team**: ``"Red"`` \| ``"Blue"`` - -#### Defined in - -[types/v3-matches.ts:114](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L114) diff --git a/package/doc/modules.md b/package/doc/modules.md deleted file mode 100644 index 812e3cd..0000000 --- a/package/doc/modules.md +++ /dev/null @@ -1,25 +0,0 @@ -# unofficial-valorant-api - -## Table of contents - -### Modules - -- [index](modules/index.md) -- [types/general](modules/types_general.md) -- [types/raw/competitive-updates](modules/types_raw_competitive_updates.md) -- [types/raw/match-details](modules/types_raw_match_details.md) -- [types/raw/match-history](modules/types_raw_match_history.md) -- [types/raw/mmr](modules/types_raw_mmr.md) -- [types/v1-content](modules/types_v1_content.md) -- [types/v1-crosshair](modules/types_v1_crosshair.md) -- [types/v1-featured-items](modules/types_v1_featured_items.md) -- [types/v1-profile](modules/types_v1_profile.md) -- [types/v1-status](modules/types_v1_status.md) -- [types/v1-store-offers](modules/types_v1_store_offers.md) -- [types/v1-version](modules/types_v1_version.md) -- [types/v1-website](modules/types_v1_website.md) -- [types/v2-leaderboard](modules/types_v2_leaderboard.md) -- [types/v2-match](modules/types_v2_match.md) -- [types/v2-mmr](modules/types_v2_mmr.md) -- [types/v2-mmr-history](modules/types_v2_mmr_history.md) -- [types/v3-matches](modules/types_v3_matches.md) diff --git a/package/doc/modules/index.md b/package/doc/modules/index.md deleted file mode 100644 index de9dae6..0000000 --- a/package/doc/modules/index.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: index - -## Table of contents - -### Classes - -- [default](../classes/index.default.md) diff --git a/package/doc/modules/types_general.md b/package/doc/modules/types_general.md deleted file mode 100644 index e56a295..0000000 --- a/package/doc/modules/types_general.md +++ /dev/null @@ -1,94 +0,0 @@ -# Module: types/general - -## Table of contents - -### Type Aliases - -- [Characters](types_general.md#characters) -- [Locale](types_general.md#locale) -- [Mode](types_general.md#mode) -- [Rank](types_general.md#rank) -- [Region](types_general.md#region) -- [Season](types_general.md#season) -- [ValorantMap](types_general.md#valorantmap) -- [Weapon](types_general.md#weapon) - -## Type Aliases - -### Characters - -Ƭ **Characters**: ``"Astra"`` \| ``"Breach"`` \| ``"Brimstone"`` \| ``"Chamber"`` \| ``"Cypher"`` \| ``"Fade"`` \| ``"Jett"`` \| ``"KAY/O"`` \| ``"Killjoy"`` \| ``"Neon"`` \| ``"Omen"`` \| ``"Phoenix"`` \| ``"Raze"`` \| ``"Reyna"`` \| ``"Sage"`` \| ``"Skye"`` \| ``"Sova"`` \| ``"Viper"`` \| ``"Yoru"`` - -#### Defined in - -[types/general.ts:12](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L12) - -___ - -### Locale - -Ƭ **Locale**: ``"ar-AE"`` \| ``"de-DE"`` \| ``"en-GB"`` \| ``"en-US"`` \| ``"es-ES"`` \| ``"es-MX"`` \| ``"fr-FR"`` \| ``"id-ID"`` \| ``"it-IT"`` \| ``"ja-JP"`` \| ``"ko-KR"`` \| ``"pl-PL"`` \| ``"pt-BR"`` \| ``"ru-RU"`` \| ``"th-TH"`` \| ``"tr-TR"`` \| ``"vi-VN"`` \| ``"zn-CN"`` \| ``"zn-TW"`` - -#### Defined in - -[types/general.ts:16](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L16) - -___ - -### Mode - -Ƭ **Mode**: ``"Escalation"`` \| ``"Spikerush"`` \| ``"Deathmatch"`` \| ``"Competitive"`` \| ``"Unrated"`` \| ``"Replication"`` \| ``"Custom"`` \| ``"Newmap"`` \| ``"Snowball"`` - -#### Defined in - -[types/general.ts:9](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L9) - -___ - -### Rank - -Ƭ **Rank**: \`${BaseRank} ${SubRank}\` \| ``"Radiant"`` \| ``"Unrated"`` - -#### Defined in - -[types/general.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L3) - -___ - -### Region - -Ƭ **Region**: ``"eu"`` \| ``"na"`` \| ``"kr"`` \| ``"ap"`` \| ``"latam"`` \| ``"br"`` - -#### Defined in - -[types/general.ts:11](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L11) - -___ - -### Season - -Ƭ **Season**: \`e${Episodes}a${Acts}\` - -#### Defined in - -[types/general.ts:7](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L7) - -___ - -### ValorantMap - -Ƭ **ValorantMap**: ``"Ascent"`` \| ``"Split"`` \| ``"Fracture"`` \| ``"Bind"`` \| ``"Breeze"`` \| ``"Icebox"`` \| ``"Haven"`` \| ``"Pearl"`` - -#### Defined in - -[types/general.ts:10](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L10) - -___ - -### Weapon - -Ƭ **Weapon**: ``"Classic"`` \| ``"Shorty"`` \| ``"Frenzy"`` \| ``"Ghost"`` \| ``"Sheriff"`` \| ``"Golden Gun"`` \| ``"Stinger"`` \| ``"Spectre"`` \| ``"Bucky"`` \| ``"Judge"`` \| ``"Bulldog"`` \| ``"Guardian"`` \| ``"Phantom"`` \| ``"Vandal"`` \| ``"Marshal"`` \| ``"Operator"`` \| ``"Ares"`` \| ``"Odin"`` \| ``"Melee"`` - -#### Defined in - -[types/general.ts:14](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/general.ts#L14) diff --git a/package/doc/modules/types_raw_competitive_updates.md b/package/doc/modules/types_raw_competitive_updates.md deleted file mode 100644 index 5946374..0000000 --- a/package/doc/modules/types_raw_competitive_updates.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: types/raw/competitive-updates - -## Table of contents - -### Interfaces - -- [RawCompetitiveUpdatesResponse](../interfaces/types_raw_competitive_updates.RawCompetitiveUpdatesResponse.md) diff --git a/package/doc/modules/types_raw_match_details.md b/package/doc/modules/types_raw_match_details.md deleted file mode 100644 index 7ef4ebb..0000000 --- a/package/doc/modules/types_raw_match_details.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: types/raw/match-details - -## Table of contents - -### Interfaces - -- [RawMatchDetailsResponse](../interfaces/types_raw_match_details.RawMatchDetailsResponse.md) diff --git a/package/doc/modules/types_raw_match_history.md b/package/doc/modules/types_raw_match_history.md deleted file mode 100644 index b8b1520..0000000 --- a/package/doc/modules/types_raw_match_history.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: types/raw/match-history - -## Table of contents - -### Interfaces - -- [RawMatchHistoryResponse](../interfaces/types_raw_match_history.RawMatchHistoryResponse.md) diff --git a/package/doc/modules/types_raw_mmr.md b/package/doc/modules/types_raw_mmr.md deleted file mode 100644 index 369190c..0000000 --- a/package/doc/modules/types_raw_mmr.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: types/raw/mmr - -## Table of contents - -### Interfaces - -- [RawMMRResponse](../interfaces/types_raw_mmr.RawMMRResponse.md) diff --git a/package/doc/modules/types_v1_content.md b/package/doc/modules/types_v1_content.md deleted file mode 100644 index 05f1e07..0000000 --- a/package/doc/modules/types_v1_content.md +++ /dev/null @@ -1,24 +0,0 @@ -# Module: types/v1-content - -## Table of contents - -### Interfaces - -- [Act](../interfaces/types_v1_content.Act.md) -- [Asset](../interfaces/types_v1_content.Asset.md) -- [AssetWithPath](../interfaces/types_v1_content.AssetWithPath.md) -- [ContentResponse](../interfaces/types_v1_content.ContentResponse.md) - -### Type Aliases - -- [LocalizedNames](types_v1_content.md#localizednames) - -## Type Aliases - -### LocalizedNames - -Ƭ **LocalizedNames**: { [language in Locale]: string } - -#### Defined in - -[types/v1-content.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-content.ts#L3) diff --git a/package/doc/modules/types_v1_crosshair.md b/package/doc/modules/types_v1_crosshair.md deleted file mode 100644 index b2ed516..0000000 --- a/package/doc/modules/types_v1_crosshair.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: types/v1-crosshair - -## Table of contents - -### Type Aliases - -- [CrosshairResponse](types_v1_crosshair.md#crosshairresponse) - -## Type Aliases - -### CrosshairResponse - -Ƭ **CrosshairResponse**: `Buffer` - -#### Defined in - -[types/v1-crosshair.ts:1](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-crosshair.ts#L1) diff --git a/package/doc/modules/types_v1_featured_items.md b/package/doc/modules/types_v1_featured_items.md deleted file mode 100644 index 91e7fbe..0000000 --- a/package/doc/modules/types_v1_featured_items.md +++ /dev/null @@ -1,22 +0,0 @@ -# Module: types/v1-featured-items - -## Table of contents - -### Interfaces - -- [FeaturedItems](../interfaces/types_v1_featured_items.FeaturedItems.md) -- [Item](../interfaces/types_v1_featured_items.Item.md) - -### Type Aliases - -- [FeaturedItemsResponse](types_v1_featured_items.md#featureditemsresponse) - -## Type Aliases - -### FeaturedItemsResponse - -Ƭ **FeaturedItemsResponse**: [`FeaturedItems`](../interfaces/types_v1_featured_items.FeaturedItems.md)[] - -#### Defined in - -[types/v1-featured-items.ts:19](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v1-featured-items.ts#L19) diff --git a/package/doc/modules/types_v1_profile.md b/package/doc/modules/types_v1_profile.md deleted file mode 100644 index 0b65db7..0000000 --- a/package/doc/modules/types_v1_profile.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: types/v1-profile - -## Table of contents - -### Interfaces - -- [Card](../interfaces/types_v1_profile.Card.md) -- [ProfileResponse](../interfaces/types_v1_profile.ProfileResponse.md) diff --git a/package/doc/modules/types_v1_status.md b/package/doc/modules/types_v1_status.md deleted file mode 100644 index c4f21b3..0000000 --- a/package/doc/modules/types_v1_status.md +++ /dev/null @@ -1,10 +0,0 @@ -# Module: types/v1-status - -## Table of contents - -### Interfaces - -- [Incident](../interfaces/types_v1_status.Incident.md) -- [StatusResponse](../interfaces/types_v1_status.StatusResponse.md) -- [Title](../interfaces/types_v1_status.Title.md) -- [Update](../interfaces/types_v1_status.Update.md) diff --git a/package/doc/modules/types_v1_store_offers.md b/package/doc/modules/types_v1_store_offers.md deleted file mode 100644 index acd65bc..0000000 --- a/package/doc/modules/types_v1_store_offers.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: types/v1-store-offers - -## Table of contents - -### Interfaces - -- [Cost](../interfaces/types_v1_store_offers.Cost.md) -- [Offer](../interfaces/types_v1_store_offers.Offer.md) -- [Reward](../interfaces/types_v1_store_offers.Reward.md) -- [StoreOffersResponse](../interfaces/types_v1_store_offers.StoreOffersResponse.md) -- [UpgradeCurrencyOffer](../interfaces/types_v1_store_offers.UpgradeCurrencyOffer.md) diff --git a/package/doc/modules/types_v1_version.md b/package/doc/modules/types_v1_version.md deleted file mode 100644 index c1a4915..0000000 --- a/package/doc/modules/types_v1_version.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: types/v1-version - -## Table of contents - -### Interfaces - -- [VersionResponse](../interfaces/types_v1_version.VersionResponse.md) diff --git a/package/doc/modules/types_v1_website.md b/package/doc/modules/types_v1_website.md deleted file mode 100644 index ef010c4..0000000 --- a/package/doc/modules/types_v1_website.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: types/v1-website - -## Table of contents - -### Interfaces - -- [Post](../interfaces/types_v1_website.Post.md) -- [WebsiteResponse](../interfaces/types_v1_website.WebsiteResponse.md) diff --git a/package/doc/modules/types_v2_leaderboard.md b/package/doc/modules/types_v2_leaderboard.md deleted file mode 100644 index 7e6dab0..0000000 --- a/package/doc/modules/types_v2_leaderboard.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: types/v2-leaderboard - -## Table of contents - -### Interfaces - -- [LeaderboardResponse](../interfaces/types_v2_leaderboard.LeaderboardResponse.md) -- [Player](../interfaces/types_v2_leaderboard.Player.md) diff --git a/package/doc/modules/types_v2_match.md b/package/doc/modules/types_v2_match.md deleted file mode 100644 index 50b18b6..0000000 --- a/package/doc/modules/types_v2_match.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: types/v2-match - -## Table of contents - -### Type Aliases - -- [MatchResponse](types_v2_match.md#matchresponse) - -## Type Aliases - -### MatchResponse - -Ƭ **MatchResponse**: [`Match`](../interfaces/types_v3_matches.Match.md) - -#### Defined in - -[types/v2-match.ts:3](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-match.ts#L3) diff --git a/package/doc/modules/types_v2_mmr.md b/package/doc/modules/types_v2_mmr.md deleted file mode 100644 index 84918fa..0000000 --- a/package/doc/modules/types_v2_mmr.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: types/v2-mmr - -## Table of contents - -### Interfaces - -- [MMRResponse](../interfaces/types_v2_mmr.MMRResponse.md) -- [SeasonMMR](../interfaces/types_v2_mmr.SeasonMMR.md) diff --git a/package/doc/modules/types_v2_mmr_history.md b/package/doc/modules/types_v2_mmr_history.md deleted file mode 100644 index c013f0f..0000000 --- a/package/doc/modules/types_v2_mmr_history.md +++ /dev/null @@ -1,22 +0,0 @@ -# Module: types/v2-mmr-history - -## Table of contents - -### Interfaces - -- [Images](../interfaces/types_v2_mmr_history.Images.md) -- [MMRHistoryGame](../interfaces/types_v2_mmr_history.MMRHistoryGame.md) - -### Type Aliases - -- [MMRHistoryResponse](types_v2_mmr_history.md#mmrhistoryresponse) - -## Type Aliases - -### MMRHistoryResponse - -Ƭ **MMRHistoryResponse**: [`MMRHistoryGame`](../interfaces/types_v2_mmr_history.MMRHistoryGame.md)[] - -#### Defined in - -[types/v2-mmr-history.ts:21](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v2-mmr-history.ts#L21) diff --git a/package/doc/modules/types_v3_matches.md b/package/doc/modules/types_v3_matches.md deleted file mode 100644 index d14fda3..0000000 --- a/package/doc/modules/types_v3_matches.md +++ /dev/null @@ -1,26 +0,0 @@ -# Module: types/v3-matches - -## Table of contents - -### Interfaces - -- [KillEvent](../interfaces/types_v3_matches.KillEvent.md) -- [KillEventMatch](../interfaces/types_v3_matches.KillEventMatch.md) -- [Match](../interfaces/types_v3_matches.Match.md) -- [Player](../interfaces/types_v3_matches.Player.md) -- [PlayerLocationOnEvent](../interfaces/types_v3_matches.PlayerLocationOnEvent.md) -- [Round](../interfaces/types_v3_matches.Round.md) - -### Type Aliases - -- [MatchesResponse](types_v3_matches.md#matchesresponse) - -## Type Aliases - -### MatchesResponse - -Ƭ **MatchesResponse**: [`Match`](../interfaces/types_v3_matches.Match.md)[] - -#### Defined in - -[types/v3-matches.ts:232](https://github.com/jameslinimk/unofficial-valorant-api/blob/2dbdb4a/package/src/types/v3-matches.ts#L232) diff --git a/package/src/index.ts b/package/src/index.ts index f6ca12a..33069da 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -400,7 +400,7 @@ export default class { * @returns Descending order of the highest ranked players. (Immortal and up) * @throws {@link TypeError} - If both a riotID and puuid are supplied */ - async getLeaderboard({ region }: { region: Region }): Promise> { + async getLeaderboard({ region }: { region: Region }): Promise> { this.validateArgs({ region }); return this.fetch(`v2/leaderboard/${region}`); } @@ -420,7 +420,7 @@ export default class { * @returns Descending order of the highest ranked players. (Immortal and up) * @throws {@link TypeError} - If both a riotID and puuid are supplied */ - async getLeaderboardV1({ region, start, end, riotID, puuid, season }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise> { + async getLeaderboardV1({ region, start, end, riotID, puuid, season }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise> { if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); this.validateArgs({ region }); From 73b99d171da3dabefe37fe7c040ea20f3eb6d776 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:00:50 -0500 Subject: [PATCH 14/50] Finished tests!! yay (also testing github action) --- .../github-actions-generate-docs.yml | 7 +- .gitignore | 3 + package/package.json | 3 + package/src/index.ts | 3 +- package/src/types/raw/match-details.ts | 4 +- package/src/types/v1-website.ts | 6 +- package/src/types/v2-leaderboard.ts | 2 +- package/src/types/v3-matches.ts | 64 ++++++------- package/test/test.js | 77 +++++++++++++++- package/test/test.ts | 91 ++++++++++++++++++- package/test/testOptions.js | 2 +- package/test/testOptions.ts | 2 +- 12 files changed, 214 insertions(+), 50 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index c9c1d1e..c96975a 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -9,21 +9,22 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - - name: Change dir to package - run: | - cd package - name: Install dependencies run: | + cd package npm i - name: Build docs run: | + cd package npm run build - name: Log into github run: | + cd package git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Push docs to docs branch run: | + cd package git checkout -B docs git add ./package/doc git commit -m "Upload docs" diff --git a/.gitignore b/.gitignore index 63e7fa0..838c197 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ node_modules/ pnpm-lock.yaml dist/ *.js.map +out.txt +checked.txt +doc/ diff --git a/package/package.json b/package/package.json index da11cb7..71078e0 100644 --- a/package/package.json +++ b/package/package.json @@ -28,6 +28,9 @@ "@types/node": "^18.7.5", "@typescript-eslint/eslint-plugin": "^5.33.1", "@typescript-eslint/parser": "^5.33.1", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "chalk": "^5.0.1", "eslint": "^8.22.0", "typedoc": "^0.23.10", "typedoc-plugin-markdown": "^3.13.4", diff --git a/package/src/index.ts b/package/src/index.ts index 33069da..a6d067a 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -56,6 +56,7 @@ interface ErrorObject { * The response status of the API. See remarks for info about specific error codes * @remarks * Can be any of the following: + * - `0` Riot Origin Server down for maintenance * - `1` Invalid API Key * - `2` Forbidden endpoint * - `3` Restricted endpoint @@ -516,7 +517,7 @@ export default class { async getMatchesByPUUID({ puuid, region, gamemodeFilter, mapFilter, size }: { puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { this.validateArgs({ name: puuid, region }); if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); - return this.fetch(`by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); + return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); } /** diff --git a/package/src/types/raw/match-details.ts b/package/src/types/raw/match-details.ts index abfe835..7799794 100644 --- a/package/src/types/raw/match-details.ts +++ b/package/src/types/raw/match-details.ts @@ -231,11 +231,11 @@ interface RoundResult { roundCeremony: string; winningTeam: string; plantRoundTime: number; - plantPlayerLocations: PlantPlayerLocation[]; + plantPlayerLocations?: PlantPlayerLocation[] | null; plantLocation: Location; plantSite: string; defuseRoundTime: number; - defusePlayerLocations: DefusePlayerLocation[]; + defusePlayerLocations?: DefusePlayerLocation[] | null; defuseLocation: Location; playerStats: PlayerStat[]; roundResultCode: string; diff --git a/package/src/types/v1-website.ts b/package/src/types/v1-website.ts index ac4c99a..38f8e5c 100644 --- a/package/src/types/v1-website.ts +++ b/package/src/types/v1-website.ts @@ -7,11 +7,13 @@ export interface Post { url: string; } -export interface WebsiteResponse { +export interface Announcement { banner_url: string; category: string; date: Date; - external_link: string; + external_link?: string | null; title: string; url: string; } + +export type WebsiteResponse = Announcement[]; diff --git a/package/src/types/v2-leaderboard.ts b/package/src/types/v2-leaderboard.ts index 2bbabdf..c9ab2d7 100644 --- a/package/src/types/v2-leaderboard.ts +++ b/package/src/types/v2-leaderboard.ts @@ -20,5 +20,5 @@ export interface LeaderboardResponse { immortal_3_threshold: number; immortal_2_threshold: number; immortal_1_threshold: number; - players: Player[]; + players: (Player | null)[]; } diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index 8687268..0b0a92d 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -13,9 +13,9 @@ export interface Player { player_title: string; party_id: string; session_playtime: { - minutes: number; - seconds: number; - milliseconds: number; + minutes?: number | null; + seconds?: number | null; + milliseconds?: number | null; }; behavior: { afk_rounds: number; @@ -96,10 +96,10 @@ export interface KillEvent { victim_team: "Red" | "Blue"; victim_death_location: PlayerLocation; damage_weapon_id: string; - damage_weapon_name: Weapon; + damage_weapon_name?: Weapon | null; damage_weapon_assets: { - display_icon: string; - killfeed_icon: string; + display_icon?: string | null; + killfeed_icon?: string | null; }; secondary_fire_mode: boolean; player_locations_on_kill: PlayerLocationOnEvent[]; @@ -112,36 +112,36 @@ export interface KillEvent { export interface Round { winning_team: "Red" | "Blue"; - end_type: "Eliminated" | "Bomb defused" | "Bomb detonated"; + end_type: "Eliminated" | "Bomb defused" | "Bomb detonated" | "Round timer expired" | "Surrendered"; bomb_planted: boolean; bomb_defused: boolean; plant_events: { - plant_location?: PlayerLocation; + plant_location?: PlayerLocation | null; planted_by?: { puuid: string; display_name: string; team: "Red" | "Blue"; - }; - plant_site?: "A" | "B" | "C"; - plant_time_in_round?: number; - player_locations_on_plant?: PlayerLocationOnEvent[]; + } | null; + plant_site?: "A" | "B" | "C" | null; + plant_time_in_round?: number | null; + player_locations_on_plant?: PlayerLocationOnEvent[] | null; }; defuse_events: { - defuse_location?: PlayerLocation; + defuse_location?: PlayerLocation | null; defused_by?: { puuid: string; display_name: string; team: "Red" | "Blue"; - }; - defuse_time_in_round?: number; - player_locations_on_defuse?: PlayerLocationOnEvent[]; + } | null; + defuse_time_in_round?: number | null; + player_locations_on_defuse?: PlayerLocationOnEvent[] | null; }; player_stats: { ability_casts: { - c_cast?: number; - q_cast?: number; - e_cast?: number; - x_cast?: number; + c_cast?: number | null; + q_cast?: number | null; + e_cast?: number | null; + x_cast?: number | null; }; player_puuid: string; player_display_name: string; @@ -165,18 +165,18 @@ export interface Round { economy: { loadout_value: number; weapon: { - id: string; - name: Weapon; + id?: string | null; + name?: Weapon | null; assets: { - display_icon: string; - killfeed_icon: string; + display_icon?: string | null; + killfeed_icon?: string | null; }; }; armor: { - id: string; - name: "Heavy Shields" | "Light Shields"; + id?: string | null; + name?: "Heavy Shields" | "Light Shields" | null; assets: { - display_icon: string; + display_icon?: string | null; }; }; remaining: number; @@ -185,7 +185,7 @@ export interface Round { was_afk: boolean; was_penalized: boolean; stayed_in_spawn: boolean; - }; + }[]; } export interface KillEventMatch extends KillEvent { @@ -202,8 +202,8 @@ export interface Match { rounds_played: number; mode: Mode; queue: string; - season_id: "string"; - platform: "PC"; + season_id: string; + platform: string; matchid: string; region: Region; cluster: string; @@ -215,12 +215,12 @@ export interface Match { }; teams: { red: { - has_won: false; + has_won: boolean; rounds_won: number; rounds_lost: number; }; blue: { - has_won: false; + has_won: boolean; rounds_won: number; rounds_lost: number; }; diff --git a/package/test/test.js b/package/test/test.js index 693ed13..a2d1f71 100644 --- a/package/test/test.js +++ b/package/test/test.js @@ -1,8 +1,14 @@ -import { lstatSync, readdirSync } from "fs"; +import Ajv from "ajv"; +import addFormats from "ajv-formats"; +import chalk from "chalk"; +import { lstatSync, readdirSync, readFileSync, writeFileSync } from "fs"; import { resolve } from "path"; import { buildGenerator, getProgramFromFiles } from "typescript-json-schema"; import _VAPI from "../dist/src/index.js"; import { argParams } from "./testOptions.js"; +const ajv = new Ajv(); +addFormats(ajv); +const VAPI = new _VAPI(); const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; const methods = Object.getOwnPropertyNames(_VAPI.prototype).filter(m => !methodBlacklist.includes(m)); methods.forEach(method => { @@ -22,7 +28,72 @@ const readDir = (dir) => { }); return files; }; -const program = getProgramFromFiles(readDir("./src/types")); +console.log(chalk.green("Getting already checked methods") + chalk.green("...")); +let checked = []; +try { + checked = JSON.parse(readFileSync("./test/checked.txt", "utf-8")) || []; + // eslint-disable-next-line no-empty +} +catch { } +if (checked.length === methods.length) { + console.log(); + console.log(chalk.red("Exiting due to all methods being checked! Delete"), chalk.redBright("./checked.txt"), chalk.red("to re-do tests")); + process.exit(); +} +console.log(chalk.green("Setting up"), chalk.gray("typescript-json-schema") + chalk.green("...")); +const compilerOptions = { + strict: true +}; +const program = getProgramFromFiles(readDir("./src/types"), compilerOptions); const generator = buildGenerator(program); -console.log(generator.getSchemaForSymbol("RawCompetitiveUpdatesResponse").properties); +const checkDefinition = (data, type) => { + const definition = generator.getSchemaForSymbol(type); + const validate = ajv.compile(definition); + return [validate(data), validate, definition]; +}; +for (const method of methods) { + if (checked.includes(method)) { + console.log(); + console.log(chalk.blue("Already checked"), chalk.blue.bold(method), chalk.blue(", skipping to next method.")); + continue; + } + const args = argParams[method].args; + const type = argParams[method].type; + console.log(); + console.log(chalk.blue.bold(`Testing method "${method}"`)); + console.log(chalk.gray("-"), chalk.blue.bold("Args:"), args); + console.log(chalk.gray("-"), chalk.blue.bold("Expected type:"), chalk.green(type)); + let response; + try { + response = await (VAPI[method](args)); + } + catch { + console.log(chalk.red.bold("Args are incorrect! Please check your test options!")); + break; + } + console.log(chalk.green("Checking definition...")); + // eslint-disable-next-line prefer-const + let [valid, res, rawSchema] = checkDefinition(response.data, type); + // ? Fix issue with Buffer type + if (!valid && res.errors?.[0]?.params?.additionalProperty === "readBigUInt64LE") + valid = true; + if (valid) { + console.log(chalk.greenBright.bold("Passed!")); + checked.push(method); + } + else { + console.log(chalk.red.bold("Errors with the returned data!")); + res.errors.forEach((error, i) => { + console.log(chalk.gray("-"), chalk.red(`Error #${i}`)); + console.log(error); + }); + writeFileSync("./test/out.txt", JSON.stringify(response, null, 4) + "\n\nRAW SCHEMA:\n" + JSON.stringify(rawSchema, null, 4)); + console.log(chalk.red("Ending due to error... Wrote response and raw schema to"), chalk.redBright("./out.txt")); + break; + } + console.log(chalk.green("Done checking definition!")); +} +console.log(); +console.log(chalk.green("Writing checked methods to"), chalk.greenBright("./checked.txt") + chalk.green("...")); +writeFileSync("./test/checked.txt", JSON.stringify(checked)); //# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/test.ts b/package/test/test.ts index 8c0134e..41c87b5 100644 --- a/package/test/test.ts +++ b/package/test/test.ts @@ -1,9 +1,17 @@ -import { lstatSync, readdirSync } from "fs"; +import Ajv, { type ValidateFunction } from "ajv"; +import addFormats from "ajv-formats"; +import chalk from "chalk"; +import { lstatSync, readdirSync, readFileSync, writeFileSync } from "fs"; import { resolve } from "path"; -import { buildGenerator, getProgramFromFiles } from "typescript-json-schema"; +import { buildGenerator, getProgramFromFiles, type CompilerOptions, type Definition } from "typescript-json-schema"; import _VAPI from "../dist/src/index.js"; import { argParams } from "./testOptions.js"; +const ajv = new Ajv(); +addFormats(ajv); + +const VAPI = new _VAPI(); + const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; const methods = Object.getOwnPropertyNames(_VAPI.prototype).filter(m => !methodBlacklist.includes(m)); methods.forEach(method => { @@ -23,7 +31,82 @@ const readDir = (dir: string) => { return files; }; -const program = getProgramFromFiles(readDir("./src/types")); +console.log(chalk.green("Getting already checked methods") + chalk.green("...")); + +let checked: string[] = []; +try { + checked = JSON.parse(readFileSync("./test/checked.txt", "utf-8")) || []; +// eslint-disable-next-line no-empty +} catch {} + +if (checked.length === methods.length) { + console.log(); + console.log(chalk.red("Exiting due to all methods being checked! Delete"), chalk.redBright("./checked.txt"), chalk.red("to re-do tests")); + process.exit(); +} + +console.log(chalk.green("Setting up"), chalk.gray("typescript-json-schema") + chalk.green("...")); + +const compilerOptions: CompilerOptions = { + strict: true +}; + +const program = getProgramFromFiles(readDir("./src/types"), compilerOptions); const generator = buildGenerator(program); -console.log(generator.getSchemaForSymbol("RawCompetitiveUpdatesResponse").properties); +const checkDefinition = (data: any, type: string): [valid: boolean, res: ValidateFunction, rawSchema: Definition] => { + const definition = generator.getSchemaForSymbol(type); + const validate = ajv.compile(definition); + return [validate(data), validate, definition]; +}; + +for (const method of methods) { + if (checked.includes(method)) { + console.log(); + console.log(chalk.blue("Already checked"), chalk.blue.bold(method), chalk.blue(", skipping to next method.")); + continue; + } + + const args = argParams[method].args; + const type = argParams[method].type; + + console.log(); + console.log(chalk.blue.bold(`Testing method "${method}"`)); + console.log(chalk.gray("-"), chalk.blue.bold("Args:"), args); + console.log(chalk.gray("-"), chalk.blue.bold("Expected type:"), chalk.green(type)); + + let response: any; + try { + response = await (VAPI[method](args)); + } catch { + console.log(chalk.red.bold("Args are incorrect! Please check your test options!")); + break; + } + console.log(chalk.green("Checking definition...")); + + // eslint-disable-next-line prefer-const + let [valid, res, rawSchema] = checkDefinition(response.data, type); + + // ? Fix issue with Buffer type + if (!valid && res.errors?.[0]?.params?.additionalProperty === "readBigUInt64LE") valid = true; + + if (valid) { + console.log(chalk.greenBright.bold("Passed!")); + checked.push(method); + } else { + console.log(chalk.red.bold("Errors with the returned data!")); + res.errors.forEach((error, i) => { + console.log(chalk.gray("-"), chalk.red(`Error #${i}`)); + console.log(error); + }); + writeFileSync("./test/out.txt", JSON.stringify(response, null, 4) + "\n\nRAW SCHEMA:\n" + JSON.stringify(rawSchema, null, 4)); + console.log(chalk.red("Ending due to error... Wrote response and raw schema to"), chalk.redBright("./out.txt")); + break; + } + + console.log(chalk.green("Done checking definition!")); +} + +console.log(); +console.log(chalk.green("Writing checked methods to"), chalk.greenBright("./checked.txt") + chalk.green("...")); +writeFileSync("./test/checked.txt", JSON.stringify(checked)); diff --git a/package/test/testOptions.js b/package/test/testOptions.js index fdb1056..401ac5c 100644 --- a/package/test/testOptions.js +++ b/package/test/testOptions.js @@ -100,7 +100,7 @@ export const argParams = { start: null, end: null, riotID: null, - puuid: examplePUUID, + puuid: null, season: null, version: null }, diff --git a/package/test/testOptions.ts b/package/test/testOptions.ts index 9c0c0ed..b55f0fb 100644 --- a/package/test/testOptions.ts +++ b/package/test/testOptions.ts @@ -106,7 +106,7 @@ export const argParams: { start: null, end: null, riotID: null, - puuid: examplePUUID, + puuid: null, season: null, version: null }, From 5e19c56af610797ba986b96bd8f5c75b42f9882a Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:01:57 -0500 Subject: [PATCH 15/50] Testing github action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index c96975a..f8a2dbe 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -26,5 +26,5 @@ jobs: run: | cd package git checkout -B docs - git add ./package/doc + git add ./doc git commit -m "Upload docs" From b48d2d7176703cebd35a5f40f4d81b15a4269a24 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:02:54 -0500 Subject: [PATCH 16/50] Force git to add ignored file (testing action) --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index f8a2dbe..29cbb55 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -26,5 +26,5 @@ jobs: run: | cd package git checkout -B docs - git add ./doc + git add -f ./doc git commit -m "Upload docs" From 8edc40f0b666941fbdb674db47b7c11af40b8e6a Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:12:07 -0500 Subject: [PATCH 17/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 29cbb55..2b02b9d 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -24,7 +24,6 @@ jobs: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Push docs to docs branch run: | - cd package git checkout -B docs - git add -f ./doc + git add -f ./package/doc git commit -m "Upload docs" From 9c679920d7c0c9db9b2e898a804970d2fb9af113 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:13:38 -0500 Subject: [PATCH 18/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 2b02b9d..16fd9b4 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -19,7 +19,6 @@ jobs: npm run build - name: Log into github run: | - cd package git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Push docs to docs branch From dd04ad148f46d733cc833733d59de9d6a4045609 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:29:17 -0500 Subject: [PATCH 19/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 16fd9b4..a34a22f 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -19,10 +19,13 @@ jobs: npm run build - name: Log into github run: | + cd package git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Push docs to docs branch run: | + cd package git checkout -B docs - git add -f ./package/doc + git add -f ./doc git commit -m "Upload docs" + git push -u origin docs From a06c3335446d33a896f46ad53e9e0cf391e00fe6 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:32:44 -0500 Subject: [PATCH 20/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index a34a22f..530e98b 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -26,6 +26,7 @@ jobs: run: | cd package git checkout -B docs + git reset git add -f ./doc git commit -m "Upload docs" git push -u origin docs From ee85e806f712028d1dc38e210f99f69f4e29bd4a Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:34:05 -0500 Subject: [PATCH 21/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 530e98b..c23ff9a 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -26,6 +26,7 @@ jobs: run: | cd package git checkout -B docs + git pull origin master git reset git add -f ./doc git commit -m "Upload docs" From 5082733bae9542b50bad8314aeb6527767342e21 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:35:55 -0500 Subject: [PATCH 22/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index c23ff9a..48646b4 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -26,7 +26,7 @@ jobs: run: | cd package git checkout -B docs - git pull origin master + git pull origin docs git reset git add -f ./doc git commit -m "Upload docs" From 13f826b2ce97d6131a2f34338c09fd452aa79c74 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:43:33 -0500 Subject: [PATCH 23/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 48646b4..85bd113 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -25,9 +25,10 @@ jobs: - name: Push docs to docs branch run: | cd package + git config pull.rebase false git checkout -B docs - git pull origin docs git reset git add -f ./doc git commit -m "Upload docs" + git pull origin docs git push -u origin docs From a94f614802d225ec01e92435cef41f5d08b95241 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:44:36 -0500 Subject: [PATCH 24/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 85bd113..11062dd 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -30,5 +30,5 @@ jobs: git reset git add -f ./doc git commit -m "Upload docs" - git pull origin docs + git pull origin docs --allow-unrelated-histories git push -u origin docs From edf2f9d5dfd662caa80ccd21e49d2024508559c6 Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:54:02 -0500 Subject: [PATCH 25/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 11062dd..9ad0ad9 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -31,4 +31,4 @@ jobs: git add -f ./doc git commit -m "Upload docs" git pull origin docs --allow-unrelated-histories - git push -u origin docs + git push -f origin docs From b39cd689596f95885574b62a1b35ebadfec003ea Mon Sep 17 00:00:00 2001 From: Linimik Date: Wed, 17 Aug 2022 23:59:08 -0500 Subject: [PATCH 26/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 9ad0ad9..d172843 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -25,10 +25,8 @@ jobs: - name: Push docs to docs branch run: | cd package - git config pull.rebase false - git checkout -B docs - git reset + git checkout docs git add -f ./doc git commit -m "Upload docs" - git pull origin docs --allow-unrelated-histories + git pull origin docs git push -f origin docs From 22064a612477b486b5ead976df9b422c7d33bda0 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 00:00:14 -0500 Subject: [PATCH 27/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index d172843..5f0bd81 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -25,7 +25,7 @@ jobs: - name: Push docs to docs branch run: | cd package - git checkout docs + git checkout -b docs git add -f ./doc git commit -m "Upload docs" git pull origin docs From 08caa2d9abf1c28db9692899d5b90b7d25de920f Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 00:25:53 -0500 Subject: [PATCH 28/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 5f0bd81..fa88d01 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -25,8 +25,9 @@ jobs: - name: Push docs to docs branch run: | cd package - git checkout -b docs + git push origin --delete remoteBranchName + + git checkout -B docs git add -f ./doc git commit -m "Upload docs" - git pull origin docs - git push -f origin docs + git push -u origin docs From c5d564758e45ce2d4aecf69d24293d18e42ebbd0 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 00:26:44 -0500 Subject: [PATCH 29/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index fa88d01..9a57bc0 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -25,7 +25,7 @@ jobs: - name: Push docs to docs branch run: | cd package - git push origin --delete remoteBranchName + git push origin --delete docs git checkout -B docs git add -f ./doc From 6e46c582104804f42d4de9ad452213f729e9be70 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 00:35:10 -0500 Subject: [PATCH 30/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 9a57bc0..834f998 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -19,15 +19,16 @@ jobs: npm run build - name: Log into github run: | - cd package git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Push docs to docs branch run: | - cd package git push origin --delete docs + mv ./package/doc ./ + git checkout -B docs + git rm -rf . git add -f ./doc git commit -m "Upload docs" git push -u origin docs From 2149f7947c5ddf980dfb16924ff137024228f1ec Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 00:46:33 -0500 Subject: [PATCH 31/50] Fixed README & docs --- package/README.md | 2 +- package/test/editDocs.js | 8 +++++--- package/test/editDocs.ts | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package/README.md b/package/README.md index be8ee02..d83b538 100644 --- a/package/README.md +++ b/package/README.md @@ -33,7 +33,7 @@ yarn add unofficial-valorant-api # Docs -You can find the documentation [here](./doc/classes/index.default.md) +You can find the documentation [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/docs/doc) Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) diff --git a/package/test/editDocs.js b/package/test/editDocs.js index 1d0c4a1..20652e2 100644 --- a/package/test/editDocs.js +++ b/package/test/editDocs.js @@ -1,6 +1,7 @@ -import fs from "fs"; +import { readFileSync, renameSync, writeFileSync } from "fs"; const path = "./doc/classes/index.default.md"; -const file = fs.readFileSync(path, "utf-8"); +const newPath = "./doc/README.md"; +const file = readFileSync(path, "utf-8"); const lines = file.split("\n"); const newLines = [...lines]; lines.forEach((line, i) => { @@ -31,5 +32,6 @@ lines.forEach((line, i) => { typeIndex++; } }); -fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")); +writeFileSync(path, newLines.filter(line => line !== null).map(line => line?.replaceAll("../", "./")).join("\n")); +renameSync(path, newPath); //# sourceMappingURL=editDocs.js.map \ No newline at end of file diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index 5a245d4..5c8c545 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -1,8 +1,9 @@ -import fs from "fs"; +import { readFileSync, renameSync, writeFileSync } from "fs"; const path = "./doc/classes/index.default.md"; +const newPath = "./doc/README.md"; -const file = fs.readFileSync(path, "utf-8"); +const file = readFileSync(path, "utf-8"); const lines = file.split("\n"); const newLines = [...lines]; @@ -38,4 +39,5 @@ lines.forEach((line, i) => { } }); -fs.writeFileSync(path, newLines.filter(line => line !== null).join("\n")); +writeFileSync(path, newLines.filter(line => line !== null).map(line => line?.replaceAll("../", "./")).join("\n")); +renameSync(path, newPath); From 4e21e5cb18c80ed4597b6989ed5363a53ed76784 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 02:04:14 -0500 Subject: [PATCH 32/50] Fixed hyperlink bug --- package/test/editDocs.js | 4 +++- package/test/editDocs.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package/test/editDocs.js b/package/test/editDocs.js index 20652e2..db3d9e5 100644 --- a/package/test/editDocs.js +++ b/package/test/editDocs.js @@ -32,6 +32,8 @@ lines.forEach((line, i) => { typeIndex++; } }); -writeFileSync(path, newLines.filter(line => line !== null).map(line => line?.replaceAll("../", "./")).join("\n")); +writeFileSync(path, newLines.filter(line => line !== null).map(line => (line + ?.replaceAll("../", "./") + ?.replaceAll("index.default.md", "README"))).join("\n")); renameSync(path, newPath); //# sourceMappingURL=editDocs.js.map \ No newline at end of file diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index 5c8c545..6813155 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -39,5 +39,9 @@ lines.forEach((line, i) => { } }); -writeFileSync(path, newLines.filter(line => line !== null).map(line => line?.replaceAll("../", "./")).join("\n")); +writeFileSync(path, newLines.filter(line => line !== null).map(line => ( + line + ?.replaceAll("../", "./") + ?.replaceAll("index.default.md", "README") +)).join("\n")); renameSync(path, newPath); From 3dc5a5ad09f485a8b466f96a21163a09675f4865 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 02:05:34 -0500 Subject: [PATCH 33/50] Fixed hyperlink bug --- package/test/editDocs.js | 2 +- package/test/editDocs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/test/editDocs.js b/package/test/editDocs.js index db3d9e5..6da3f95 100644 --- a/package/test/editDocs.js +++ b/package/test/editDocs.js @@ -34,6 +34,6 @@ lines.forEach((line, i) => { }); writeFileSync(path, newLines.filter(line => line !== null).map(line => (line ?.replaceAll("../", "./") - ?.replaceAll("index.default.md", "README"))).join("\n")); + ?.replaceAll("index.default.md", "README.md"))).join("\n")); renameSync(path, newPath); //# sourceMappingURL=editDocs.js.map \ No newline at end of file diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index 6813155..57ce22c 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -42,6 +42,6 @@ lines.forEach((line, i) => { writeFileSync(path, newLines.filter(line => line !== null).map(line => ( line ?.replaceAll("../", "./") - ?.replaceAll("index.default.md", "README") + ?.replaceAll("index.default.md", "README.md") )).join("\n")); renameSync(path, newPath); From 0b39bd96cc7ed5c474b95ae0ae97210509071e0b Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 02:08:14 -0500 Subject: [PATCH 34/50] Changed README doc link --- package/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/README.md b/package/README.md index d83b538..51c6c29 100644 --- a/package/README.md +++ b/package/README.md @@ -33,7 +33,7 @@ yarn add unofficial-valorant-api # Docs -You can find the documentation [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/docs/doc) +You can find the documentation [here](https://github.com/Henrik-3/unofficial-valorant-api/tree/docs/doc/README.md) Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) From 5e9c3be82fc26500d0cccdced02ed4d18ca13e96 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 12:30:12 -0500 Subject: [PATCH 35/50] Removed compiled JS files from tests folder --- .gitignore | 1 + package/package.json | 6 +- package/test/editDocs.js | 39 --------- package/test/test.js | 99 ---------------------- package/test/testOptions.js | 159 ------------------------------------ 5 files changed, 5 insertions(+), 299 deletions(-) delete mode 100644 package/test/editDocs.js delete mode 100644 package/test/test.js delete mode 100644 package/test/testOptions.js diff --git a/.gitignore b/.gitignore index 838c197..b3e67d9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules/ pnpm-lock.yaml dist/ *.js.map +*.js out.txt checked.txt doc/ diff --git a/package/package.json b/package/package.json index 71078e0..33472f7 100644 --- a/package/package.json +++ b/package/package.json @@ -39,8 +39,10 @@ "scripts": { "build:tsc": "tsc --watch false", "build:docs": "typedoc --plugin typedoc-plugin-markdown && node ./test/editDocs.js", - "build": "npm run build:tsc && npm run build:docs", + "build:tests": "cd test && tsc --watch false", + "build": "npm run build:tests && npm run build:tsc && npm run build:docs", "develop:tsc": "tsc", - "develop:testTsc": "cd test && tsc" + "develop:testTsc": "cd test && tsc", + "test": "npm run build:tests && node ./test/test.js" } } diff --git a/package/test/editDocs.js b/package/test/editDocs.js deleted file mode 100644 index 6da3f95..0000000 --- a/package/test/editDocs.js +++ /dev/null @@ -1,39 +0,0 @@ -import { readFileSync, renameSync, writeFileSync } from "fs"; -const path = "./doc/classes/index.default.md"; -const newPath = "./doc/README.md"; -const file = readFileSync(path, "utf-8"); -const lines = file.split("\n"); -const newLines = [...lines]; -lines.forEach((line, i) => { - const header = line.split(" ")[0]; - if (header === "#") { - newLines[i] = "# Welcome to the VAPI docs"; - newLines[i + 2] = "Below is a list of all the properties of the API including all properties and methods. If you need any help, join the [Discord server](https://discord.gg/wXNMnqzvAD)"; - } - if (header !== "###") - return; - const name = line.split(" ")[1]; - if (name !== "mapImages" && name !== "rankImages") - return; - let typeIndex = i + 1; - while (lines[typeIndex].split(" ")[0] !== "####") - typeIndex++; - typeIndex++; - while (lines[typeIndex].split(" ")[0] !== "####") { - const key = lines[typeIndex].split("|")[1]?.trim()?.slice(1, -1); - const type = lines[typeIndex].split("|")[2]?.trim()?.slice(1, -1); - if (!key || !type) { - typeIndex++; - continue; - } - if (type === "string") { - newLines[typeIndex] = null; - } - typeIndex++; - } -}); -writeFileSync(path, newLines.filter(line => line !== null).map(line => (line - ?.replaceAll("../", "./") - ?.replaceAll("index.default.md", "README.md"))).join("\n")); -renameSync(path, newPath); -//# sourceMappingURL=editDocs.js.map \ No newline at end of file diff --git a/package/test/test.js b/package/test/test.js deleted file mode 100644 index a2d1f71..0000000 --- a/package/test/test.js +++ /dev/null @@ -1,99 +0,0 @@ -import Ajv from "ajv"; -import addFormats from "ajv-formats"; -import chalk from "chalk"; -import { lstatSync, readdirSync, readFileSync, writeFileSync } from "fs"; -import { resolve } from "path"; -import { buildGenerator, getProgramFromFiles } from "typescript-json-schema"; -import _VAPI from "../dist/src/index.js"; -import { argParams } from "./testOptions.js"; -const ajv = new Ajv(); -addFormats(ajv); -const VAPI = new _VAPI(); -const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; -const methods = Object.getOwnPropertyNames(_VAPI.prototype).filter(m => !methodBlacklist.includes(m)); -methods.forEach(method => { - if (!argParams[method]) - throw new Error(`Method "${method}" is missing in argParams!`); -}); -const readDir = (dir) => { - const files = []; - readdirSync(dir).forEach(file => { - const filePath = `${dir}/${file}`; - if (lstatSync(filePath).isDirectory()) { - files.push(...readDir(filePath)); - } - if (!filePath.endsWith(".ts")) - return; - files.push(resolve(filePath)); - }); - return files; -}; -console.log(chalk.green("Getting already checked methods") + chalk.green("...")); -let checked = []; -try { - checked = JSON.parse(readFileSync("./test/checked.txt", "utf-8")) || []; - // eslint-disable-next-line no-empty -} -catch { } -if (checked.length === methods.length) { - console.log(); - console.log(chalk.red("Exiting due to all methods being checked! Delete"), chalk.redBright("./checked.txt"), chalk.red("to re-do tests")); - process.exit(); -} -console.log(chalk.green("Setting up"), chalk.gray("typescript-json-schema") + chalk.green("...")); -const compilerOptions = { - strict: true -}; -const program = getProgramFromFiles(readDir("./src/types"), compilerOptions); -const generator = buildGenerator(program); -const checkDefinition = (data, type) => { - const definition = generator.getSchemaForSymbol(type); - const validate = ajv.compile(definition); - return [validate(data), validate, definition]; -}; -for (const method of methods) { - if (checked.includes(method)) { - console.log(); - console.log(chalk.blue("Already checked"), chalk.blue.bold(method), chalk.blue(", skipping to next method.")); - continue; - } - const args = argParams[method].args; - const type = argParams[method].type; - console.log(); - console.log(chalk.blue.bold(`Testing method "${method}"`)); - console.log(chalk.gray("-"), chalk.blue.bold("Args:"), args); - console.log(chalk.gray("-"), chalk.blue.bold("Expected type:"), chalk.green(type)); - let response; - try { - response = await (VAPI[method](args)); - } - catch { - console.log(chalk.red.bold("Args are incorrect! Please check your test options!")); - break; - } - console.log(chalk.green("Checking definition...")); - // eslint-disable-next-line prefer-const - let [valid, res, rawSchema] = checkDefinition(response.data, type); - // ? Fix issue with Buffer type - if (!valid && res.errors?.[0]?.params?.additionalProperty === "readBigUInt64LE") - valid = true; - if (valid) { - console.log(chalk.greenBright.bold("Passed!")); - checked.push(method); - } - else { - console.log(chalk.red.bold("Errors with the returned data!")); - res.errors.forEach((error, i) => { - console.log(chalk.gray("-"), chalk.red(`Error #${i}`)); - console.log(error); - }); - writeFileSync("./test/out.txt", JSON.stringify(response, null, 4) + "\n\nRAW SCHEMA:\n" + JSON.stringify(rawSchema, null, 4)); - console.log(chalk.red("Ending due to error... Wrote response and raw schema to"), chalk.redBright("./out.txt")); - break; - } - console.log(chalk.green("Done checking definition!")); -} -console.log(); -console.log(chalk.green("Writing checked methods to"), chalk.greenBright("./checked.txt") + chalk.green("...")); -writeFileSync("./test/checked.txt", JSON.stringify(checked)); -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/package/test/testOptions.js b/package/test/testOptions.js deleted file mode 100644 index 401ac5c..0000000 --- a/package/test/testOptions.js +++ /dev/null @@ -1,159 +0,0 @@ -const examplePUUID = "d55c3688-5a9b-5a5d-b49e-80d7e5ff6b2a"; -const exampleMatchID = "50ec10e0-2752-4a6a-a7ef-b63dacd5a6a9"; -const exampleRegion = "na"; -const exampleName = "jameslinimk"; -const exampleTag = "8868"; -export const argParams = { - getCrosshair: { - args: { - code: "0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0", - size: 256 - }, - type: "CrosshairResponse" - }, - getWebsite: { - args: { - countryCode: "en-us" - }, - type: "WebsiteResponse" - }, - getVersion: { - args: { - region: "na" - }, - type: "VersionResponse" - }, - getFeaturedItems: { - type: "FeaturedItemsResponse" - }, - getOffers: { - type: "StoreOffersResponse" - }, - getStatus: { - args: { - region: "na" - }, - type: "StatusResponse" - }, - getRawMatchDetails: { - args: { - matchID: exampleMatchID, - region: "na", - queries: null - }, - type: "RawMatchDetailsResponse" - }, - getRawMatchHistory: { - args: { - puuid: examplePUUID, - region: exampleRegion, - queries: null - }, - type: "RawMatchHistoryResponse" - }, - getRawCompetitiveUpdates: { - args: { - puuid: examplePUUID, - region: exampleRegion, - queries: null - }, - type: "RawCompetitiveUpdatesResponse" - }, - getRawMMR: { - args: { - puuid: examplePUUID, - region: exampleRegion, - queries: null - }, - type: "RawMMRResponse" - }, - getMMRHistory: { - args: { - name: exampleName, - tag: exampleTag, - region: exampleRegion - }, - type: "MMRHistoryResponse" - }, - getMMRHistoryByPUUID: { - args: { - puuid: examplePUUID, - region: exampleRegion - }, - type: "MMRHistoryResponse" - }, - getMatch: { - args: { - matchID: exampleMatchID - }, - type: "MatchResponse" - }, - getLeaderboard: { - args: { - region: exampleRegion - }, - type: "LeaderboardResponse" - }, - getLeaderboardV1: { - args: { - region: exampleRegion, - start: null, - end: null, - riotID: null, - puuid: null, - season: null, - version: null - }, - type: "V1LeaderboardResponse" - }, - getTranslations: { - args: { - locale: null - }, - type: "ContentResponse" - }, - getMMR: { - args: { - name: exampleName, - tag: exampleTag, - region: exampleRegion - }, - type: "MMRResponse" - }, - getMMRByPUUID: { - args: { - puuid: examplePUUID, - region: exampleRegion - }, - type: "MMRResponse" - }, - getMatches: { - args: { - name: exampleName, - tag: exampleTag, - region: exampleRegion - }, - type: "MatchesResponse" - }, - getMatchesByPUUID: { - args: { - puuid: examplePUUID, - region: exampleRegion - }, - type: "MatchesResponse" - }, - getAccount: { - args: { - name: exampleName, - tag: exampleTag - }, - type: "AccountResponse" - }, - getAccountByPUUID: { - args: { - puuid: examplePUUID - }, - type: "AccountResponse" - } -}; -//# sourceMappingURL=testOptions.js.map \ No newline at end of file From 298315ee0bea69966ff40f267c74cde87c9e0055 Mon Sep 17 00:00:00 2001 From: Linimik Date: Thu, 18 Aug 2022 12:32:34 -0500 Subject: [PATCH 36/50] Changed script so src is compiled before tests --- package/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/package.json b/package/package.json index 33472f7..b7906fa 100644 --- a/package/package.json +++ b/package/package.json @@ -40,9 +40,9 @@ "build:tsc": "tsc --watch false", "build:docs": "typedoc --plugin typedoc-plugin-markdown && node ./test/editDocs.js", "build:tests": "cd test && tsc --watch false", - "build": "npm run build:tests && npm run build:tsc && npm run build:docs", + "build": "npm run build:tsc && npm run build:tests && npm run build:docs", "develop:tsc": "tsc", "develop:testTsc": "cd test && tsc", - "test": "npm run build:tests && node ./test/test.js" + "test": "npm run build:tsc && npm run build:tests && node ./test/test.js" } } From b56882cc0cec4dda9bed73141fc932c84aa711fb Mon Sep 17 00:00:00 2001 From: Linimik Date: Fri, 19 Aug 2022 12:15:55 -0500 Subject: [PATCH 37/50] Moved ts-to-json as a dev dep, added testing action --- .github/workflows/github-actions-generate-docs.yml | 8 +++++++- package/package.json | 6 +++--- package/src/types/general.ts | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 834f998..173f593 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -1,5 +1,7 @@ name: Build docs on: [ push, workflow_dispatch ] +permissions: + contents: write jobs: Explore-GitHub-Actions: @@ -8,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 16 - name: Install dependencies run: | cd package @@ -32,3 +34,7 @@ jobs: git add -f ./doc git commit -m "Upload docs" git push -u origin docs + - name: Deploy to GH pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs diff --git a/package/package.json b/package/package.json index b7906fa..46acdf4 100644 --- a/package/package.json +++ b/package/package.json @@ -5,8 +5,7 @@ "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", "dependencies": { - "axios": "^0.27.2", - "typescript-json-schema": "^0.54.0" + "axios": "^0.27.2" }, "keywords": [ "Valorant", @@ -34,7 +33,8 @@ "eslint": "^8.22.0", "typedoc": "^0.23.10", "typedoc-plugin-markdown": "^3.13.4", - "typescript": "^4.7.4" + "typescript": "^4.7.4", + "typescript-json-schema": "^0.54.0" }, "scripts": { "build:tsc": "tsc --watch false", diff --git a/package/src/types/general.ts b/package/src/types/general.ts index d489248..328c4c8 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -3,7 +3,7 @@ type SubRank = "1" | "2" | "3"; export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; type Episodes = number; -type Acts = "1" | "2" | "3"; +type Acts = 1 | 2 | 3; export type Season = `e${Episodes}a${Acts}`; export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; From e668d51cc43d4e38df534d11008a2459fc0967b7 Mon Sep 17 00:00:00 2001 From: Linimik Date: Fri, 19 Aug 2022 12:21:27 -0500 Subject: [PATCH 38/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 173f593..5f45f99 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -37,4 +37,4 @@ jobs: - name: Deploy to GH pages uses: JamesIves/github-pages-deploy-action@v4 with: - folder: docs + folder: ./package/doc From 0ab3e910a20fb8e94eee7673e8fea6ec3d93f71a Mon Sep 17 00:00:00 2001 From: Linimik Date: Fri, 19 Aug 2022 12:22:35 -0500 Subject: [PATCH 39/50] Testing action --- .github/workflows/github-actions-generate-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 5f45f99..9a828c1 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -37,4 +37,4 @@ jobs: - name: Deploy to GH pages uses: JamesIves/github-pages-deploy-action@v4 with: - folder: ./package/doc + folder: ./doc From d5a8de3346db50c90b67c66088295508fa68631b Mon Sep 17 00:00:00 2001 From: Linimik Date: Fri, 19 Aug 2022 13:06:21 -0500 Subject: [PATCH 40/50] Added Jekyll theme --- .../workflows/github-actions-generate-docs.yml | 17 +---------------- package/test/editDocs.ts | 7 +++++-- package/tsconfig.json | 3 ++- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/github-actions-generate-docs.yml b/.github/workflows/github-actions-generate-docs.yml index 9a828c1..d55ecdc 100644 --- a/.github/workflows/github-actions-generate-docs.yml +++ b/.github/workflows/github-actions-generate-docs.yml @@ -19,22 +19,7 @@ jobs: run: | cd package npm run build - - name: Log into github - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - - name: Push docs to docs branch - run: | - git push origin --delete docs - - mv ./package/doc ./ - - git checkout -B docs - git rm -rf . - git add -f ./doc - git commit -m "Upload docs" - git push -u origin docs - name: Deploy to GH pages uses: JamesIves/github-pages-deploy-action@v4 with: - folder: ./doc + folder: ./package/doc diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index 57ce22c..99631c9 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -1,7 +1,8 @@ import { readFileSync, renameSync, writeFileSync } from "fs"; -const path = "./doc/classes/index.default.md"; -const newPath = "./doc/README.md"; +const basePath = "./doc"; +const path = basePath + "/classes/index.default.md"; +const newPath = basePath + "/README.md"; const file = readFileSync(path, "utf-8"); const lines = file.split("\n"); @@ -45,3 +46,5 @@ writeFileSync(path, newLines.filter(line => line !== null).map(line => ( ?.replaceAll("index.default.md", "README.md") )).join("\n")); renameSync(path, newPath); + +writeFileSync(basePath + "/_config.yml", "theme: jekyll-theme-cayman"); diff --git a/package/tsconfig.json b/package/tsconfig.json index 1d28c93..d6c462b 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -27,6 +27,7 @@ "entryPointStrategy": "expand", "out": "./doc", "excludeInternal": true, - "hideBreadcrumbs": true + "hideBreadcrumbs": true, + "githubPages": false } } From 1ba0fedcb4c054c8bde83010b09106e82de9c486 Mon Sep 17 00:00:00 2001 From: Linimik Date: Fri, 19 Aug 2022 13:07:03 -0500 Subject: [PATCH 41/50] Changed docs README link --- package/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/README.md b/package/README.md index 51c6c29..99c00ff 100644 --- a/package/README.md +++ b/package/README.md @@ -16,7 +16,7 @@ # API -Find all inforamtion about the API itself [here](https://github.com/Henrik-3/unofficial-valorant-api) +Find all inforamtion about the API itself [here](https://henrik-3.github.io/unofficial-valorant-api/) # Installation From 317491add3e9552a4a0758dafc47fbe6fb058cee Mon Sep 17 00:00:00 2001 From: Jameslinimk Date: Sun, 21 Aug 2022 02:28:55 -0400 Subject: [PATCH 42/50] Everything --- .gitignore | 2 + package/.eslintrc.cjs | 8 +- package/src/index.ts | 575 +----------------- package/src/types/general.ts | 92 ++- package/src/types/raw/competitive-updates.ts | 4 +- package/src/types/raw/match-details.ts | 60 +- package/src/types/raw/match-history.ts | 4 +- package/src/types/raw/mmr.ts | 12 +- package/src/types/v1-account.ts | 4 +- package/src/types/v1-content.ts | 4 +- package/src/types/v1-crosshair.ts | 2 +- package/src/types/v1-mmr.ts | 18 + package/src/types/v1-status.ts | 12 +- ...featured-items.ts => v1-store-featured.ts} | 2 +- package/src/types/v1-store-offers.ts | 2 +- package/src/types/v1-version.ts | 2 +- package/src/types/v1-website.ts | 2 +- package/src/types/v2-leaderboard.ts | 2 +- package/src/types/v2-match.ts | 4 +- package/src/types/v2-mmr-history.ts | 4 +- package/src/types/v2-mmr.ts | 4 +- package/src/types/v2-store-featured.ts | 7 + package/src/types/v3-matches.ts | 4 +- package/src/types/versions.ts | 33 + package/src/vapi.ts | 511 ++++++++++++++++ package/test/editDocs.ts | 4 +- package/test/test.ts | 22 +- package/test/testOptions.ts | 52 +- 28 files changed, 797 insertions(+), 655 deletions(-) create mode 100644 package/src/types/v1-mmr.ts rename package/src/types/{v1-featured-items.ts => v1-store-featured.ts} (86%) create mode 100644 package/src/types/v2-store-featured.ts create mode 100644 package/src/types/versions.ts create mode 100644 package/src/vapi.ts diff --git a/.gitignore b/.gitignore index b3e67d9..d836301 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ dist/ out.txt checked.txt doc/ + +_test.ts diff --git a/package/.eslintrc.cjs b/package/.eslintrc.cjs index 65c4071..10c4754 100644 --- a/package/.eslintrc.cjs +++ b/package/.eslintrc.cjs @@ -28,10 +28,6 @@ module.exports = { "error", 4 ], - "linebreak-style": [ - "error", - "unix" - ], quotes: [ "error", "double" @@ -57,6 +53,10 @@ module.exports = { ], "@typescript-eslint/no-explicit-any": [ "off" + ], + "eol-last": [ + "error", + "always" ] } }; diff --git a/package/src/index.ts b/package/src/index.ts index a6d067a..93c2203 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,557 +1,20 @@ -import axios, { type AxiosRequestConfig } from "axios"; -import packageJson from "../package.json" assert { type: "json" }; -import type { Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; -import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; -import type { RawMatchDetailsResponse } from "./types/raw/match-details"; -import type { RawMatchHistoryResponse } from "./types/raw/match-history"; -import type { RawMMRResponse } from "./types/raw/mmr"; -import type { AccountResponse } from "./types/v1-account"; -import type { ContentResponse } from "./types/v1-content"; -import type { CrosshairResponse } from "./types/v1-crosshair"; -import type { FeaturedItemsResponse } from "./types/v1-featured-items"; -import { V1LeaderboardResponse } from "./types/v1-leaderboard"; -import type { StatusResponse } from "./types/v1-status"; -import type { StoreOffersResponse } from "./types/v1-store-offers"; -import type { VersionResponse } from "./types/v1-version"; -import type { WebsiteResponse } from "./types/v1-website"; -import type { LeaderboardResponse } from "./types/v2-leaderboard"; -import type { MatchResponse } from "./types/v2-match"; -import type { MMRResponse } from "./types/v2-mmr"; -import type { MMRHistoryResponse } from "./types/v2-mmr-history"; -import type { MatchesResponse } from "./types/v3-matches"; +export * as General from "./types/general.js"; +export * as RawCompetitiveUpdates from "./types/raw/competitive-updates.js"; +export * as RawMatchDetails from "./types/raw/match-details.js"; +export * as RawMatchHistory from "./types/raw/match-history.js"; +export * as RawMmr from "./types/raw/mmr.js"; +export * as V1Account from "./types/v1-account.js"; +export * as V1Content from "./types/v1-content.js"; +export * as V1Crosshair from "./types/v1-crosshair.js"; +export * as V1Leaderboard from "./types/v1-leaderboard.js"; +export * as V1Status from "./types/v1-status.js"; +export * as V1FeaturedItems from "./types/v1-store-featured.js"; +export * as V1StoreOffers from "./types/v1-store-offers.js"; +export * as V1Version from "./types/v1-version.js"; +export * as V1Website from "./types/v1-website.js"; +export * as V2Match from "./types/v2-match.js"; +export * as V2MmrHistory from "./types/v2-mmr-history.js"; +export * as V2Mmr from "./types/v2-mmr.js"; +export * as V3Matches from "./types/v3-matches.js"; +export { default } from "./vapi.js"; -interface APIResponse { - /** - * Response status - * @remarks - * - `200-299` Successful response - * - `400-499` Client error response - * - `500-599` Server error response - */ - status: number; - /** - * Response from API - */ - data?: dataType; - /** - * Information about current rate limits - */ - rateLimits: RateLimit; - /** - * Error object (if there is) - */ - error?: ErrorObject; - /** - * Original request URL - */ - url: string; -} - -interface ErrorObject { - /** - * Error message - */ - message: string; - /** - * The response status of the API. See remarks for info about specific error codes - * @remarks - * Can be any of the following: - * - `0` Riot Origin Server down for maintenance - * - `1` Invalid API Key - * - `2` Forbidden endpoint - * - `3` Restricted endpoint - * - `101` No region found for this Player - * - `102` No matches found, can't get puuid - * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again - * - `104` Invalid region - * - `105` Invalid filter - * - `106` Invalid gamemode - * - `107` Invalid map - * - `108` Invalid locale - * - `109` Missing name - * - `110` Missing tag - * - `111` Player not found in leaderboard - * - `112` Invalid raw type - * - `113` Invalid match or player id - * - `114` Invalid country code - * - `115` Invalid season - */ - code: number; - /** - * Error details to help fix the problem - */ - details: string; -} - -interface RateLimit { - /** - * Number of used API requests per 60s. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - used: number; - /** - * Remaining number of API requests per 60s. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - remaining: number; - /** - * In how many seconds (every 60s) your rate limit is going to reset. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ - reset: number; -} - -/** - * Base API endpoint - */ -const baseUrl = "https://api.henrikdev.xyz/valorant"; -export default class { - /** - * Images for every {@link Rank} - * @remarks - * You must call {@link initUtils} before using this! - */ - rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } }; - /** - * Images for every {@link ValorantMap} - * @remarks - * You must call {@link initUtils} before using this! - */ - mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } }; - - /** - * Create a new instance of the main API. All API calls are in this class - * @example - * Create a new instance - * ```js - * import _VAPI from "unofficial-valorant-api" - * const VAPI = new _VAPI("my super secret token") - * ``` - * @param args.token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) - */ - constructor(private token?: string) {} - - /** - * Creates {@link default.rankImages} and {@link default.mapImages} by pulling the images from {@link https://valorant-api.com} - * @remarks - * Must be called before using {@link default.rankImages} and {@link default.mapImages} - */ - async initUtils(): Promise { - const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; - if (mapsReq) { - this.mapImages = {} as any; - mapsReq.forEach((map: any) => (this.mapImages[map.displayName] = { - splash: map.splash, - minimap: map.displayIcon, - landscape: map.listViewIcon - })); - } - - const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; - if (tiersReq) { - const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1); - this.rankImages = {} as any; - tiersReq[tiersReq.length - 1].tiers.forEach((rank: any) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { - large: rank.largeIcon, - small: rank.smallIcon, - triangleUp: rank.rankTriangleUpIcon, - triangleDown: rank.rankTriangleDownIcon - })); - } - } - - /** - * @internal - * Parses the body of an axios response - */ - private parseBody(body: { errors: string, status: number, data: any }) { - if (body.errors) return body.errors; - return body.status ? body.data : body; - } - - /** - * @internal - * Main function to fetch from the API - * @typeParam dataType - The type of the response - * @param url - URl to fetch. Appended to the base url and automatically encoded - * @param searchParams - Any extra search params. Empty values will be filtered out - * @param config - Override the default axios config with custom params - * @returns Formatted response - */ - private async fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { - // Format search params into `?something=like&this` - const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { - const value = searchParams[cur]; - if (value === null || value === undefined) return acc; - return acc === "" - ? `?${cur}=${value}` - : acc + `&${cur}=${value}`; - }, "") : ""; - - // Main request - const req = await axios({ - url: encodeURI(`${baseUrl}/${url}${queryParams}`), - responseType: "json", - headers: this.token - ? { Authorization: this.token, "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, } - : { "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, }, - ...config - }).catch(error => error); - - // Formatting response - return { - status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers["Content-Type"] ? this.parseBody(req.data) : req.data, - rateLimits: { - used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), - remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), - reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), - }, - error: req.response ? this.parseBody(req.response.data) : null, - url: req.config.url - }; - } - - /** - * @internal - * Make sure each key has a non empty value - * @param input - Object to check for non empty values - * @throws {@link TypeError} - Only if there is a empty value to a key - */ - private async validateArgs(input: { [key: string]: any }) { - Object.keys(input).forEach(key => { - if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`); - }); - } - - /** - * Get an image of a valorant crosshair by its code - * @example - * Load and write a crosshair to crosshair.png - * ```js - * import { writeFileSync } from "fs" - * - * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") - * writeFileSync("crosshair.png", crosshair.data) - * ``` - * @param args.code - Valorant crosshair code - * @param args.size - (optional) Image size (default: `1024`) - * @returns The image of the crosshair as a {@link Buffer} - */ - async getCrosshair({ code, size }: { code: string, size?: number }): Promise> { - this.validateArgs({ code }); - return this.fetch("v1/crosshair/generate", { id: code, size }, { - responseType: "arraybuffer" - }); - } - - /** - * Get all announcements from the valorant website of a country - * @param args.countryCode - Country code of website - * @returns List of announcements from the valorant website - */ - async getWebsite({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { - this.validateArgs({ countryCode }); - return this.fetch(`v1/website/${countryCode}`); - } - - /** - * Get information about valorant in a region, such as the client version, branch, and server version - * @param args.region - Region of valorant to get info about - * @returns Information about a regions valorant - */ - async getVersion({ region }: { region: Region }): Promise> { - this.validateArgs({ region }); - return this.fetch(`v1/version/${region}`); - } - - /** - * Get all of the featured items in the current valorant store - * @returns Featured items in the current valorant store - */ - async getFeaturedItems(): Promise> { - // ! v2 is bugged for some reason - return this.fetch("v2/store-featured"); - } - - /** - * Get a list of all the prices of every skin in the game - * @returns List of skin prices - */ - async getOffers(): Promise> { - // ! find out wtf this actually does - return this.fetch("v1/store-offers"); - } - - /** - * Will get information about the current maintenances and incidents about a region - * @param args.region - Region to get info about - * @returns Info about undergoing maintenances and incidents in a region of valorant - */ - async getStatus({ region }: { region: Region }): Promise> { - this.validateArgs({ region }); - return this.fetch(`v1/status/${region}`); - } - - /** - * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link default.getMatch} for an easier response to use - * @param args.matchID - The match ID to get details about - * @param args.region - Region of the match - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchDetails_FetchMatchDetails.md documentation} - * @returns Information about the match - */ - async getRawMatchDetails({ matchID, region, queries }: { matchID: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ matchID, region }); - return await this.fetch("v1/raw", null, { - data: { type: "matchdetails", value: matchID, region, ...queries }, - method: "POST" - }); - } - - /** - * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link default.getMatches} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchHistory_FetchMatchHistory.md documentation} - * @returns Information about the players match history - */ - async getRawMatchHistory({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "matchhistory", value: puuid, region, ...queries }, - method: "POST" - }); - } - - /** - * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link default.getMMRHistory} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchCompetitiveUpdates.md documentation} - * @returns Information about the players rr history - */ - async getRawCompetitiveUpdates({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "mmr", value: puuid, region, ...queries }, - method: "POST" - }); - } - - /** - * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link default.getMMR} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchPlayer.md documentation} - * @returns Information about the players mmr - */ - async getRawMMR({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "competitiveupdates", value: puuid, region, ...queries }, - method: "POST" - }); - } - - /** - * Get a list of rr changes of a player by their Riot ID - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot tag username of the player - * @param args.region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistory({ name, tag, region }: { name: string, tag: string, region: Region }): Promise> { - this.validateArgs({ name, tag, region }); - return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); - } - - /** - * Get a list of rr changes of a player by their PUUID - * @param args.puuid - The PUUID of the player - * @param args.region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistoryByPUUID({ puuid, region }: { puuid: string, region: Region }): Promise> { - this.validateArgs({ puuid, region }); - return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); - } - - /** - * Get information about a match - * @param args.matchID - The matchs ID - * @returns Information about the match - */ - async getMatch({ matchID }: { matchID: string }): Promise> { - this.validateArgs({ matchID }); - return this.fetch(`v2/match/${matchID}`); - } - - /** - * Get the leaderboard of a region - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * @param args.region - Region to get leaderboard from - * @returns Descending order of the highest ranked players. (Immortal and up) - * @throws {@link TypeError} - If both a riotID and puuid are supplied - */ - async getLeaderboard({ region }: { region: Region }): Promise> { - this.validateArgs({ region }); - return this.fetch(`v2/leaderboard/${region}`); - } - - /** - * Get the leaderboard of a region - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * @param args.region - Region to get leaderboard from - * @param args.start - (optional) Get 1000 leaderboard players starting from the given start value - * @param args.end - (optional) Limit the amount of leaderboard players returned - * @param args.riotID - (optional) Search for a specific player by their Riot ID - * @param args.riotID.name - The Riot IDs username - * @param args.riotID.tag - The Riot IDs tag - * @param args.puuid - (optional) Search for a specific player by their PUUID - * @param args.season - (optional) Get leaderboard from a specific season - * @returns Descending order of the highest ranked players. (Immortal and up) - * @throws {@link TypeError} - If both a riotID and puuid are supplied - */ - async getLeaderboardV1({ region, start, end, riotID, puuid, season }: { region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise> { - if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); - - this.validateArgs({ region }); - return this.fetch(`v1/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); - } - - /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param args.locale - If this is set, instead of all translations, it will return just translations for this language - */ - async getTranslations({ locale }: { locale?: Locale } = {}): Promise> { - return this.fetch("v1/content", { locale }); - } - - /** - * Gets general info about a players rank by their Riot ID - * @remarks - * **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.region - The region of the player - * @param args.seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - async getMMR({ name, tag, region, seasonFilter }: { name: string, tag: string, region: Region, seasonFilter?: Season }): Promise> { - this.validateArgs({ name, tag, region }); - return this.fetch(`v2/mmr/${region}/${name}/${tag}`, { filter: seasonFilter }); - } - - /** - * Gets general info about a players rank by their PUUID - * @remarks - * **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * @param args.puuid - The PUUID of the player - * @param args.region - The region of the player - * @param args.seasonFilter - Filter results based on episode and act - * @returns Information about a players mmr/rank - */ - async getMMRByPUUID({ puuid, region, seasonFilter }: { puuid: string, region: Region, seasonFilter?: Season }): Promise> { - this.validateArgs({ puuid, region }); - return this.fetch(`v2/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter }); - } - - /** - * Gets the most recent 5 matches by a players Riot ID - * @remarks - * **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.region - The region of the player - * @param args.gamemodeFilter - Filter results based on gamemode - * @param args.mapFilter - Filter results based on map - * @param args.size - Return a specific amount of matches (1-10) - * @returns Info about a players last 5 matches - * @throws {@link TypeError} - Only if the size parameter is set and not between 1-10 - */ - async getMatches({ name, tag, region, gamemodeFilter, mapFilter, size }: { name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { - this.validateArgs({ name, tag, region }); - if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); - return this.fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); - } - - /** - * Gets the most recent 5 matches by a players PUUID - * @remarks - * **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * @param args.puuid - The PUUID username of the player - * @param args.region - The region of the player - * @param args.gamemodeFilter - Filter results based on gamemode - * @param args.mapFilter - Filter results based on map - * @param args.size - Return a specific amount of matches (1-10) - * @returns Info about a players last 5 matches - * @throws {@link TypeError} - Only if the size parameter is set and not between 1-10 - */ - async getMatchesByPUUID({ puuid, region, gamemodeFilter, mapFilter, size }: { puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { - this.validateArgs({ name: puuid, region }); - if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); - return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); - } - - /** - * Get general information about a player from their Riot ID - * @remarks - * **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.force - Force data update? - * @return General information on a players profile - */ - async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { - this.validateArgs({ name, tag }); - return this.fetch(`v1/account/${name}/${tag}`, { force }); - } - - /** - * Get general information about a player from their PUUID - * @remarks - * **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * @param args.puuid The PUUID of the player - * @param args.force Force data update? - * @return General information on a players profile - */ - async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { - this.validateArgs({ name: puuid }); - return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); - } -} diff --git a/package/src/types/general.ts b/package/src/types/general.ts index 328c4c8..a5b4d5a 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -1,9 +1,9 @@ -type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; -type SubRank = "1" | "2" | "3"; +export type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; +export type SubRank = "1" | "2" | "3"; export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; -type Episodes = number; -type Acts = 1 | 2 | 3; +export type Episodes = number; +export type Acts = 1 | 2 | 3; export type Season = `e${Episodes}a${Acts}`; export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; @@ -14,3 +14,87 @@ export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee"; export type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW"; + +export interface APIResponse { + /** + * Response status + * @remarks + * - `200-299` Successful response + * - `400-499` Client error response + * - `500-599` Server error response + */ + status: number; + /** + * Response from API + */ + data?: dataType; + /** + * Information about current rate limits + */ + rateLimits: RateLimit; + /** + * Error object (if there is) + */ + error?: ErrorObject; + /** + * Original request URL + */ + url: string; +} + +export interface ErrorObject { + /** + * Error message + */ + message: string; + /** + * The response status of the API. See remarks for info about specific error codes + * @remarks + * Can be any of the following: + * - `0` Riot Origin Server down for maintenance + * - `1` Invalid API Key + * - `2` Forbidden endpoint + * - `3` Restricted endpoint + * - `101` No region found for this Player + * - `102` No matches found, can't get puuid + * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again + * - `104` Invalid region + * - `105` Invalid filter + * - `106` Invalid gamemode + * - `107` Invalid map + * - `108` Invalid locale + * - `109` Missing name + * - `110` Missing tag + * - `111` Player not found in leaderboard + * - `112` Invalid raw type + * - `113` Invalid match or player id + * - `114` Invalid country code + * - `115` Invalid season + */ + code: number; + /** + * Error details to help fix the problem + */ + details: string; +} + +export interface RateLimit { + /** + * Number of used API requests per 60s. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ + used: number; + /** + * Remaining number of API requests per 60s. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ + remaining: number; + /** + * In how many seconds (every 60s) your rate limit is going to reset. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ + reset: number; +} diff --git a/package/src/types/raw/competitive-updates.ts b/package/src/types/raw/competitive-updates.ts index b19a348..1b54586 100644 --- a/package/src/types/raw/competitive-updates.ts +++ b/package/src/types/raw/competitive-updates.ts @@ -1,6 +1,6 @@ -import { Region } from "../general"; +import type { Region } from "../general"; -interface Match { +export interface Match { MatchID: string; MapID: string; SeasonID: string; diff --git a/package/src/types/raw/match-details.ts b/package/src/types/raw/match-details.ts index 7799794..9cb0b9f 100644 --- a/package/src/types/raw/match-details.ts +++ b/package/src/types/raw/match-details.ts @@ -1,10 +1,10 @@ -import { Region } from "../general"; +import type { Region } from "../general"; -interface PartyRRPenalties { +export interface PartyRRPenalties { [key: string]: number; } -interface MatchInfo { +export interface MatchInfo { matchId: string; mapId: string; gamePodId: string; @@ -28,21 +28,21 @@ interface MatchInfo { shouldMatchDisablePenalties: boolean; } -interface PlatformInfo { +export interface PlatformInfo { platformType: string; platformOS: string; platformOSVersion: string; platformChipset: string; } -interface AbilityCasts { +export interface AbilityCasts { grenadeCasts: number; ability1Casts: number; ability2Casts: number; ultimateCasts: number; } -interface Stats { +export interface Stats { score: number; roundsPlayed: number; kills: number; @@ -52,18 +52,18 @@ interface Stats { abilityCasts: AbilityCasts; } -interface RoundDamage { +export interface RoundDamage { round: number; receiver: string; damage: number; } -interface XpModification { +export interface XpModification { Value: number; ID: string; } -interface BehaviorFactors { +export interface BehaviorFactors { afkRounds: number; collisions: number; damageParticipationOutgoing: number; @@ -73,27 +73,27 @@ interface BehaviorFactors { stayedInSpawnRounds: number; } -interface BaseAction { +export interface BaseAction { idleTimeMillis: number; objectiveCompleteTimeMillis: number; } -interface AdaptiveBots extends BaseAction { +export interface AdaptiveBots extends BaseAction { adaptiveBotAverageDurationMillisAllAttempts: number; adaptiveBotAverageDurationMillisFirstAttempt: number; killDetailsFirstAttempt?: any; } -interface DefendBombSite extends BaseAction { +export interface DefendBombSite extends BaseAction { success: boolean; } -interface SettingStatus { +export interface SettingStatus { isMouseSensitivityDefault: boolean; isCrosshairDefault: boolean; } -interface NewPlayerExperienceDetails { +export interface NewPlayerExperienceDetails { basicMovement: BaseAction; basicGunSkill: BaseAction; adaptiveBots: AdaptiveBots; @@ -103,7 +103,7 @@ interface NewPlayerExperienceDetails { settingStatus: SettingStatus; } -interface Player { +export interface Player { subject: string; gameName: string; tagLine: string; @@ -124,7 +124,7 @@ interface Player { newPlayerExperienceDetails: NewPlayerExperienceDetails; } -interface Team { +export interface Team { teamId: string; won: boolean; roundsPlayed: number; @@ -132,36 +132,36 @@ interface Team { numPoints: number; } -interface Location { +export interface Location { x: number; y: number; } -interface PlantPlayerLocation { +export interface PlantPlayerLocation { subject: string; viewRadians: number; location: Location; } -interface DefusePlayerLocation { +export interface DefusePlayerLocation { subject: string; viewRadians: number; location: Location; } -interface PlayerLocation { +export interface PlayerLocation { subject: string; viewRadians: number; location: Location; } -interface FinishingDamage { +export interface FinishingDamage { damageType: string; damageItem: string; isSecondaryFireMode: boolean; } -interface Kill { +export interface Kill { gameTime: number; roundTime: number; killer: string; @@ -172,11 +172,11 @@ interface Kill { finishingDamage: FinishingDamage; } -interface MatchKill extends Kill { +export interface MatchKill extends Kill { round: number; } -interface Damage { +export interface Damage { receiver: string; damage: number; legshots: number; @@ -184,7 +184,7 @@ interface Damage { headshots: number; } -interface Economy { +export interface Economy { loadoutValue: number; weapon: string; armor: string; @@ -192,14 +192,14 @@ interface Economy { spent: number; } -interface AbilityEffects { +export interface AbilityEffects { grenadeEffects?: any; ability1Effects?: any; ability2Effects?: any; ultimateEffects?: any; } -interface PlayerStat { +export interface PlayerStat { subject: string; kills: Kill[]; damage: Damage[]; @@ -211,7 +211,7 @@ interface PlayerStat { stayedInSpawn: boolean; } -interface PlayerEconomy { +export interface PlayerEconomy { subject: string; loadoutValue: number; weapon: string; @@ -220,12 +220,12 @@ interface PlayerEconomy { spent: number; } -interface PlayerScore { +export interface PlayerScore { subject: string; score: number; } -interface RoundResult { +export interface RoundResult { roundNum: number; roundResult: string; roundCeremony: string; diff --git a/package/src/types/raw/match-history.ts b/package/src/types/raw/match-history.ts index ea17bd4..58aa597 100644 --- a/package/src/types/raw/match-history.ts +++ b/package/src/types/raw/match-history.ts @@ -1,6 +1,6 @@ -import { Region } from "../general"; +import type { Region } from "../general"; -interface History { +export interface History { MatchID: string; GameStartTime: any; QueueID: string; diff --git a/package/src/types/raw/mmr.ts b/package/src/types/raw/mmr.ts index 66c238a..b2bbb05 100644 --- a/package/src/types/raw/mmr.ts +++ b/package/src/types/raw/mmr.ts @@ -1,10 +1,10 @@ -import { Region } from "../general"; +import type { Region } from "../general"; -interface WinsByTier { +export interface WinsByTier { [tier: number]: number; } -interface SeasonalInfoBySeasonID { +export interface SeasonalInfoBySeasonID { SeasonID: string; NumberOfWins: number; NumberOfWinsWithPlacements: number; @@ -19,14 +19,14 @@ interface SeasonalInfoBySeasonID { TotalWinsNeededForRank: number; } -interface Queue { +export interface Queue { TotalGamesNeededForRating: number; TotalGamesNeededForLeaderboard: number; CurrentSeasonGamesNeededForRating: number; SeasonalInfoBySeasonID: SeasonalInfoBySeasonID; } -interface QueueSkills { +export interface QueueSkills { competitive: Queue; custom: Queue; deathmatch: Queue; @@ -38,7 +38,7 @@ interface QueueSkills { unrated: Queue; } -interface LatestCompetitiveUpdate { +export interface LatestCompetitiveUpdate { MatchID: string; MapID: string; SeasonID: string; diff --git a/package/src/types/v1-account.ts b/package/src/types/v1-account.ts index 4454469..2f642ae 100644 --- a/package/src/types/v1-account.ts +++ b/package/src/types/v1-account.ts @@ -1,4 +1,4 @@ -import { Region } from "./general"; +import type { Region } from "./general"; export interface Card { small: string; @@ -7,7 +7,7 @@ export interface Card { id: string; } -export interface AccountResponse { +export interface V1AccountResponse { puuid: string; region: Region; account_level: number; diff --git a/package/src/types/v1-content.ts b/package/src/types/v1-content.ts index 2106dd6..86c4a04 100644 --- a/package/src/types/v1-content.ts +++ b/package/src/types/v1-content.ts @@ -1,4 +1,4 @@ -import { Locale } from "./general"; +import type { Locale } from "./general"; export type LocalizedNames = { [language in Locale]: string @@ -24,7 +24,7 @@ export interface Act { isActive: boolean; } -export interface ContentResponse { +export interface V1ContentResponse { version: string; characters: Asset[]; maps: AssetWithPath[]; diff --git a/package/src/types/v1-crosshair.ts b/package/src/types/v1-crosshair.ts index fecdf2a..425673d 100644 --- a/package/src/types/v1-crosshair.ts +++ b/package/src/types/v1-crosshair.ts @@ -1 +1 @@ -export type CrosshairResponse = Buffer; +export type V1CrosshairResponse = Buffer; diff --git a/package/src/types/v1-mmr.ts b/package/src/types/v1-mmr.ts new file mode 100644 index 0000000..906532e --- /dev/null +++ b/package/src/types/v1-mmr.ts @@ -0,0 +1,18 @@ +import type { Rank } from "./general"; + +export interface V1MMRResponse { + name: string; + tag: string; + currenttier: number; + currenttierpatched: Rank; + images: { + small: string; + large: string; + triangle_up: string; + triangle_down: string; + }; + ranking_in_tier: number; + mmr_change_to_last_game: number; + elo: number; + old: boolean; +} diff --git a/package/src/types/v1-status.ts b/package/src/types/v1-status.ts index b937193..c796c32 100644 --- a/package/src/types/v1-status.ts +++ b/package/src/types/v1-status.ts @@ -1,8 +1,6 @@ -import { Locale } from "./general"; - export interface Title { content: string; - locale: Locale; + locale: string; } export interface Update { @@ -17,17 +15,17 @@ export interface Update { export interface Incident { created_at: Date; - archive_at: Date; + archive_at?: Date | null; updates: Update[]; platforms: string[]; - updated_at: Date; + updated_at?: Date | null; id: number; titles: Title[]; - maintenance_status: string; + maintenance_status?: string | null; incident_severity: string; } -export interface StatusResponse { +export interface V1StatusResponse { maintenances: Incident[]; incidents: Incident[]; } diff --git a/package/src/types/v1-featured-items.ts b/package/src/types/v1-store-featured.ts similarity index 86% rename from package/src/types/v1-featured-items.ts rename to package/src/types/v1-store-featured.ts index 36e411b..7c2bd31 100644 --- a/package/src/types/v1-featured-items.ts +++ b/package/src/types/v1-store-featured.ts @@ -16,5 +16,5 @@ export interface FeaturedItems { seconds_remaining: number; } -export type FeaturedItemsResponse = FeaturedItems[]; +export type V1StoreFeaturedResponse = FeaturedItems[]; diff --git a/package/src/types/v1-store-offers.ts b/package/src/types/v1-store-offers.ts index 2dd5e8f..d6e6f5d 100644 --- a/package/src/types/v1-store-offers.ts +++ b/package/src/types/v1-store-offers.ts @@ -21,7 +21,7 @@ export interface UpgradeCurrencyOffer { StorefrontItemID: string; } -export interface StoreOffersResponse { +export interface V1StoreOffersResponse { Offers: Offer[]; UpgradeCurrencyOffers: UpgradeCurrencyOffer[]; } diff --git a/package/src/types/v1-version.ts b/package/src/types/v1-version.ts index 1890966..2274ab2 100644 --- a/package/src/types/v1-version.ts +++ b/package/src/types/v1-version.ts @@ -1,4 +1,4 @@ -export interface VersionResponse { +export interface V1VersionResponse { version: string; clientVersion: string; branch: string; diff --git a/package/src/types/v1-website.ts b/package/src/types/v1-website.ts index 38f8e5c..648bd2d 100644 --- a/package/src/types/v1-website.ts +++ b/package/src/types/v1-website.ts @@ -16,4 +16,4 @@ export interface Announcement { url: string; } -export type WebsiteResponse = Announcement[]; +export type V1WebsiteResponse = Announcement[]; diff --git a/package/src/types/v2-leaderboard.ts b/package/src/types/v2-leaderboard.ts index c9ab2d7..1821578 100644 --- a/package/src/types/v2-leaderboard.ts +++ b/package/src/types/v2-leaderboard.ts @@ -12,7 +12,7 @@ export interface Player { competitiveTier: number; } -export interface LeaderboardResponse { +export interface V2LeaderboardResponse { last_update: number; next_update: number; total_players: number; diff --git a/package/src/types/v2-match.ts b/package/src/types/v2-match.ts index c2afba7..1903b71 100644 --- a/package/src/types/v2-match.ts +++ b/package/src/types/v2-match.ts @@ -1,3 +1,3 @@ -import { Match } from "./v3-matches"; +import type { Match } from "./v3-matches"; -export type MatchResponse = Match; +export type V2MatchResponse = Match; diff --git a/package/src/types/v2-mmr-history.ts b/package/src/types/v2-mmr-history.ts index f33d3c0..7ff4bc1 100644 --- a/package/src/types/v2-mmr-history.ts +++ b/package/src/types/v2-mmr-history.ts @@ -1,4 +1,4 @@ -import { Rank } from "./general"; +import type { Rank } from "./general"; export interface Images { small: string; @@ -18,4 +18,4 @@ export interface MMRHistoryGame { date_raw: number; } -export type MMRHistoryResponse = MMRHistoryGame[]; +export type V2MMRHistoryResponse = MMRHistoryGame[]; diff --git a/package/src/types/v2-mmr.ts b/package/src/types/v2-mmr.ts index 4281df7..d6b5ed9 100644 --- a/package/src/types/v2-mmr.ts +++ b/package/src/types/v2-mmr.ts @@ -1,4 +1,4 @@ -import { Rank, Season } from "./general"; +import type { Rank, Season } from "./general"; export interface SeasonMMR { error?: "No data available"; @@ -12,7 +12,7 @@ export interface SeasonMMR { }[]; } -export interface MMRResponse { +export interface V2MMRResponse { name: string; tag: string; puuid: string; diff --git a/package/src/types/v2-store-featured.ts b/package/src/types/v2-store-featured.ts new file mode 100644 index 0000000..5579fe6 --- /dev/null +++ b/package/src/types/v2-store-featured.ts @@ -0,0 +1,7 @@ +import type { FeaturedItems as V1FeaturedItems } from "./v1-store-featured.js"; + +export interface FeaturedItems extends V1FeaturedItems { + whole_sale_only: boolean; +} + +export type V2StoreFeaturedResponse = FeaturedItems[]; diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index 0b0a92d..c38152f 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -75,7 +75,7 @@ export interface Player { damage_received: number; } -type PlayerLocation = { x: number, y: number }; +export type PlayerLocation = { x: number, y: number }; export interface PlayerLocationOnEvent { player_puuid: string; @@ -229,4 +229,4 @@ export interface Match { kills: KillEventMatch[]; } -export type MatchesResponse = Match[]; +export type V3MatchesResponse = Match[]; diff --git a/package/src/types/versions.ts b/package/src/types/versions.ts new file mode 100644 index 0000000..2f5213d --- /dev/null +++ b/package/src/types/versions.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/indent */ +import type { RawCompetitiveUpdatesResponse } from "./raw/competitive-updates.js"; +import type { RawMatchDetailsResponse } from "./raw/match-details.js"; +import type { RawMatchHistoryResponse } from "./raw/match-history.js"; +import type { RawMMRResponse } from "./raw/mmr.js"; +import type { V1LeaderboardResponse } from "./v1-leaderboard.js"; +import type { V1MMRResponse } from "./v1-mmr.js"; +import type { V1StoreFeaturedResponse } from "./v1-store-featured.js"; +import type { V2LeaderboardResponse } from "./v2-leaderboard.js"; +import type { V2MMRResponse } from "./v2-mmr.js"; +import type { V2StoreFeaturedResponse } from "./v2-store-featured.js"; + +export type LeaderboardResponse = + T extends "v1" ? V1LeaderboardResponse : + T extends "v2" ? V2LeaderboardResponse : + V2LeaderboardResponse; + +export type MMRResponse = + T extends "v1" ? V1MMRResponse : + T extends "v2" ? V2MMRResponse : + V2MMRResponse; + +export type StoreFeaturedResponse = + T extends "v1" ? V1StoreFeaturedResponse : + T extends "v2" ? V2StoreFeaturedResponse : + V2StoreFeaturedResponse; + +export type RawResponse = + T extends "matchdetails" ? RawMatchDetailsResponse : + T extends "matchhistory" ? RawMatchHistoryResponse : + T extends "mmr" ? RawMMRResponse : + T extends "competitiveupdates" ? RawCompetitiveUpdatesResponse : + never; diff --git a/package/src/vapi.ts b/package/src/vapi.ts new file mode 100644 index 0000000..14616f9 --- /dev/null +++ b/package/src/vapi.ts @@ -0,0 +1,511 @@ +import axios, { type AxiosRequestConfig } from "axios"; +import packageJson from "../package.json" assert { type: "json" }; +import type { APIResponse, Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; +import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; +import type { RawMatchDetailsResponse } from "./types/raw/match-details"; +import type { RawMatchHistoryResponse } from "./types/raw/match-history"; +import type { RawMMRResponse } from "./types/raw/mmr"; +import type { V1AccountResponse } from "./types/v1-account"; +import type { V1ContentResponse } from "./types/v1-content"; +import type { V1CrosshairResponse } from "./types/v1-crosshair"; +import type { V1StatusResponse } from "./types/v1-status"; +import type { V1StoreOffersResponse } from "./types/v1-store-offers"; +import type { V1VersionResponse } from "./types/v1-version"; +import type { V1WebsiteResponse } from "./types/v1-website"; +import type { V2MatchResponse } from "./types/v2-match"; +import type { V2MMRHistoryResponse } from "./types/v2-mmr-history"; +import type { V3MatchesResponse } from "./types/v3-matches"; +import { LeaderboardResponse, MMRResponse, RawResponse, StoreFeaturedResponse } from "./types/versions.js"; + +/** + * Base API endpoint + */ +const baseUrl = "https://api.henrikdev.xyz/valorant"; +export default class { + /** + * Images for every Rank + * @remarks + * You must call {@link initUtils} before using this! + */ + rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } }; + /** + * Images for every Valorant map + * @remarks + * You must call {@link initUtils} before using this! + */ + mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } }; + + /** + * Create a new instance of the main API. All API calls are in this class + * @example + * Create a new instance + * ```js + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) + */ + constructor(private token?: string) {} + + /** + * Creates {@link default.rankImages} and {@link default.mapImages} by pulling the images from {@link https://valorant-api.com} + * @remarks + * Must be called before using {@link default.rankImages} and {@link default.mapImages} + */ + async initUtils(): Promise { + const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; + if (mapsReq) { + this.mapImages = {} as any; + mapsReq.forEach((map: any) => (this.mapImages[map.displayName] = { + splash: map.splash, + minimap: map.displayIcon, + landscape: map.listViewIcon + })); + } + + const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; + if (tiersReq) { + const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1); + this.rankImages = {} as any; + tiersReq[tiersReq.length - 1].tiers.forEach((rank: any) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { + large: rank.largeIcon, + small: rank.smallIcon, + triangleUp: rank.rankTriangleUpIcon, + triangleDown: rank.rankTriangleDownIcon + })); + } + } + + /** + * @internal + * Parses the body of an axios response + */ + private parseBody(body: { errors: string, status: number, data: any }) { + if (body.errors) return body.errors; + return body.status ? body.data : body; + } + + /** + * @internal + * Main function to fetch from the API + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to the base url and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ + private async fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { + // Format search params into `?something=like&this` + const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { + const value = searchParams[cur]; + if (value === null || value === undefined) return acc; + return acc === "" + ? `?${cur}=${value}` + : acc + `&${cur}=${value}`; + }, "") : ""; + + // Main request + const req = await axios({ + url: encodeURI(`${baseUrl}/${url}${queryParams}`), + responseType: "json", + headers: this.token + ? { Authorization: this.token, "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, } + : { "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, }, + ...config + }).catch(error => error); + + // Formatting response + return { + status: req.response ? req.response.status : req.status, + data: req.response ? null : !req.config.headers["Content-Type"] ? this.parseBody(req.data) : req.data, + rateLimits: { + used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), + remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), + reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), + }, + error: req.response ? this.parseBody(req.response.data) : null, + url: req.config.url + }; + } + + /** + * @internal + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * @throws TypeError - Only if there is a empty value to a key + */ + private async validateArgs(input: { [key: string]: any }) { + Object.keys(input).forEach(key => { + if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`); + }); + } + + /** + * Get an image of a valorant crosshair by its code + * @example + * Load and write a crosshair to crosshair.png + * ```js + * import { writeFileSync } from "fs" + * + * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` + * @param args.code - Valorant crosshair code + * @param args.size - (optional) Image size (default: `1024`) + * @returns The image of the crosshair as a {@link https://nodejs.org/api/buffer.html Buffer} + */ + async getCrosshair({ code, size }: { code: string, size?: number }): Promise> { + this.validateArgs({ code }); + return this.fetch("v1/crosshair/generate", { id: code, size }, { + responseType: "arraybuffer" + }); + } + + /** + * Get all announcements from the valorant website of a country + * @param args.countryCode - Country code of website + * @returns List of announcements from the valorant website + */ + async getAnnouncements({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { + this.validateArgs({ countryCode }); + return this.fetch(`v1/website/${countryCode}`); + } + + /** + * Get all announcements from the valorant website of a country + * @param args.countryCode - Country code of website + * @returns List of announcements from the valorant website + * @depreciated Use {@link default.getAnnouncements} instead + */ + async getWebsite({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { + this.validateArgs({ countryCode }); + return this.fetch(`v1/website/${countryCode}`); + } + + /** + * Get information about valorant in a region, such as the client version, branch, and server version + * @param args.region - Region of valorant to get info about + * @returns Information about a regions valorant + */ + async getVersion({ region }: { region: Region }): Promise> { + this.validateArgs({ region }); + return this.fetch(`v1/version/${region}`); + } + + /** + * Get all of the featured items in the current valorant store + * @returns Featured items in the current valorant store + */ + async getFeaturedItems({ version }: { version?: T } = {}): Promise>> { + return this.fetch>(`${version || "v2"}/store-featured`); + } + + /** + * Get a list of all the prices of every skin in the game + * @returns List of skin prices + */ + async getOffers(): Promise> { + return this.fetch("v1/store-offers"); + } + + /** + * Will get information about the current maintenances and incidents about a region + * @param args.region - Region to get info about + * @returns Info about undergoing maintenances and incidents in a region of valorant + */ + async getStatus({ region }: { region: Region }): Promise> { + this.validateArgs({ region }); + return this.fetch(`v1/status/${region}`); + } + + /** + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatch} for an easier response to use + * @param args.matchID - The match ID to get details about + * @param args.region - Region of the match + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchDetails_FetchMatchDetails.md documentation} + * @returns Information about the match + */ + async getRawMatchDetails({ matchID, region, queries }: { matchID: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ matchID, region }); + return await this.fetch("v1/raw", null, { + data: { type: "matchdetails", value: matchID, region, ...queries }, + method: "POST" + }); + } + + /** + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatches} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchHistory_FetchMatchHistory.md documentation} + * @returns Information about the players match history + */ + async getRawMatchHistory({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "matchhistory", value: puuid, region, ...queries }, + method: "POST" + }); + } + + /** + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMRHistory} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchCompetitiveUpdates.md documentation} + * @returns Information about the players rr history + */ + async getRawCompetitiveUpdates({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "mmr", value: puuid, region, ...queries }, + method: "POST" + }); + } + + /** + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMR} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchPlayer.md documentation} + * @returns Information about the players mmr + */ + async getRawMMR({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { + this.validateArgs({ puuid, region }); + return await this.fetch("v1/raw", null, { + data: { type: "competitiveupdates", value: puuid, region, ...queries }, + method: "POST" + }); + } + + /** + * Gets raw data from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @param args.type - Type of data to return + * @param args.value - A players puuid if type is `mmr` or `competitiveupdates`, else a match id + * @param args.region - Region of the player or match + * @param args.queries + * @returns Either match details, a users patch history, a users mmr, or a users past rr changes + * @depreciated Use {@link default.getRawCompetitiveUpdates} {@link default.getRawMatchDetails} {@link default.getRawMatchHistory} {@link default.getRawMMR} instead + */ + async getRawData({ type, value, region, queries }: { type: T, value: string, region: Region, queries: any }): Promise>> { + this.validateArgs({ type, value, region }); + return await this.fetch>("v1/raw", null, { + data: { type, value, region, ...queries }, + method: "POST" + }); + } + + /** + * Get a list of rr changes of a player by their Riot ID + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot tag username of the player + * @param args.region - The players region + * @return List of rr changes (recent competitive games) + */ + async getMMRHistory({ name, tag, region }: { name: string, tag: string, region: Region }): Promise> { + this.validateArgs({ name, tag, region }); + return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); + } + + /** + * Get a list of rr changes of a player by their PUUID + * @param args.puuid - The PUUID of the player + * @param args.region - The players region + * @return List of rr changes (recent competitive games) + */ + async getMMRHistoryByPUUID({ puuid, region }: { puuid: string, region: Region }): Promise> { + this.validateArgs({ puuid, region }); + return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); + } + + /** + * Get information about a match + * @param args.matchID - The matchs ID + * @returns Information about the match + */ + async getMatch({ matchID }: { matchID: string }): Promise> { + this.validateArgs({ matchID }); + return this.fetch(`v2/match/${matchID}`); + } + + /** + * Get the leaderboard of a region + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * @param args.region - Region to get leaderboard from + * @param args.version - Can be `v1` or `v2`. Note: V2 does not support filters! + * @param args.start - (optional) Get 1000 leaderboard players starting from the given start value + * @param args.end - (optional) Limit the amount of leaderboard players returned + * @param args.riotID - (optional) Search for a specific player by their Riot ID + * @param args.riotID.name - The Riot IDs username + * @param args.riotID.tag - The Riot IDs tag + * @param args.puuid - (optional) Search for a specific player by their PUUID + * @param args.season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * @throws TypeError - If both a riotID and puuid are supplied + */ + async getLeaderboard({ version, region, start, end, riotID, puuid, season }: { version?: T, region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise>> { + if (version === "v1") { + if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); + } else { + if (start || end || riotID || puuid || season) throw new TypeError("Can't use filters when using V2!"); + } + + this.validateArgs({ region }); + return this.fetch>(`${version || "v2"}/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); + } + + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param args.locale - If this is set, instead of all translations, it will return just translations for this language + */ + async getTranslations({ locale }: { locale?: Locale } = {}): Promise> { + return this.fetch("v1/content", { locale }); + } + + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param args.locale - If this is set, instead of all translations, it will return just translations for this language + * @depreciated Use the new {@link default.getTranslations} instead + */ + async getContent({ locale }: { locale?: Locale } = {}): Promise> { + return this.fetch("v1/content", { locale }); + } + + /** + * Gets general info about a players rank by their Riot ID + * @remarks + * **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.seasonFilter - (optional) Filter results based on episode and act + * @param args.version - (optional) Change endpoint version + * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility + * @returns Information about a players mmr/rank + * @throws TypeError - If both filter and seasonFilter are set + */ + async getMMR({ name, tag, region, seasonFilter, version, filter }: { name: string, tag: string, region: Region, seasonFilter?: Season, version?: T, filter?: Season }): Promise>> { + if (version === "v1") console.warn("v1 is outdated, please migrate to v2!"); + if (filter) console.warn("filter is outdated! Please use seasonFilter instead"); + if (seasonFilter && filter) throw new TypeError("seasonFilter and filter cannot be both set!"); + + this.validateArgs({ name, tag, region }); + return this.fetch>(`${version || "v2"}/mmr/${region}/${name}/${tag}`, { filter: seasonFilter || filter }); + } + + /** + * Gets general info about a players rank by their PUUID + * @remarks + * **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param args.puuid - The PUUID of the player + * @param args.region - The region of the player + * @param args.seasonFilter - (optional) Filter results based on episode and act + * @param args.version - (optional) Change endpoint version + * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility + * @returns Information about a players mmr/rank + * @throws TypeError - If both filter and seasonFilter are set + */ + async getMMRByPUUID({ puuid, region, seasonFilter, version, filter }: { puuid: string, region: Region, seasonFilter?: Season, version?: T, filter?: Season }): Promise>> { + if (version === "v1") console.warn("v1 is outdated, please migrate to v2!"); + if (filter) console.warn("filter is outdated! Please use seasonFilter instead"); + if (seasonFilter && filter) throw new TypeError("seasonFilter and filter cannot be both set!"); + + this.validateArgs({ puuid, region }); + return this.fetch>(`${version || "v2"}/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter || filter }); + } + + /** + * Gets the most recent 5 matches by a players Riot ID + * @remarks + * **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) + * @returns Info about a players last 5 matches + * @throws TypeError - Only if the size parameter is set and not between 1-10 + */ + async getMatches({ name, tag, region, gamemodeFilter, mapFilter, size }: { name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { + this.validateArgs({ name, tag, region }); + if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); + return this.fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); + } + + /** + * Gets the most recent 5 matches by a players PUUID + * @remarks + * **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param args.puuid - The PUUID username of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) + * @returns Info about a players last 5 matches + * @throws TypeError - Only if the size parameter is set and not between 1-10 + */ + async getMatchesByPUUID({ puuid, region, gamemodeFilter, mapFilter, size }: { puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { + this.validateArgs({ name: puuid, region }); + if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); + return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); + } + + /** + * Get general information about a player from their Riot ID + * @remarks + * **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.force - Force data update? + * @return General information on a players profile + */ + async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { + this.validateArgs({ name, tag }); + return this.fetch(`v1/account/${name}/${tag}`, { force }); + } + + /** + * Get general information about a player from their PUUID + * @remarks + * **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param args.puuid The PUUID of the player + * @param args.force Force data update? + * @return General information on a players profile + */ + async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { + this.validateArgs({ name: puuid }); + return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); + } +} diff --git a/package/test/editDocs.ts b/package/test/editDocs.ts index 99631c9..2c0f9a5 100644 --- a/package/test/editDocs.ts +++ b/package/test/editDocs.ts @@ -1,7 +1,7 @@ import { readFileSync, renameSync, writeFileSync } from "fs"; const basePath = "./doc"; -const path = basePath + "/classes/index.default.md"; +const path = basePath + "/classes/vapi.default.md"; const newPath = basePath + "/README.md"; const file = readFileSync(path, "utf-8"); @@ -43,7 +43,7 @@ lines.forEach((line, i) => { writeFileSync(path, newLines.filter(line => line !== null).map(line => ( line ?.replaceAll("../", "./") - ?.replaceAll("index.default.md", "README.md") + ?.replaceAll("vapi.default.md", "README.md") )).join("\n")); renameSync(path, newPath); diff --git a/package/test/test.ts b/package/test/test.ts index 41c87b5..4dbcb40 100644 --- a/package/test/test.ts +++ b/package/test/test.ts @@ -5,11 +5,31 @@ import { lstatSync, readdirSync, readFileSync, writeFileSync } from "fs"; import { resolve } from "path"; import { buildGenerator, getProgramFromFiles, type CompilerOptions, type Definition } from "typescript-json-schema"; import _VAPI from "../dist/src/index.js"; -import { argParams } from "./testOptions.js"; +import { argParams as _argParams } from "./testOptions.js"; + +// Add aliases to argParams +const argParams: { + [method: string]: { + args?: { [name: string]: any }; + type: string; + aliases?: string[]; + }; +} = Object.keys(_argParams).reduce((acc, cur) => { + const aliases = _argParams[cur].aliases; + if (aliases) { + aliases.forEach(alias => { + acc[alias] = _argParams[cur]; + }); + } + acc[cur] = _argParams[cur]; + return acc; +}, {}); +// Init AJV const ajv = new Ajv(); addFormats(ajv); +// Init VAPI const VAPI = new _VAPI(); const methodBlacklist = ["initUtils", "constructor", "parseBody", "fetch", "validateArgs"]; diff --git a/package/test/testOptions.ts b/package/test/testOptions.ts index b55f0fb..92a4946 100644 --- a/package/test/testOptions.ts +++ b/package/test/testOptions.ts @@ -8,6 +8,7 @@ export const argParams: { [method: string]: { args?: { [name: string]: any }; type: string; + aliases?: string[]; }; } = { getCrosshair: { @@ -15,31 +16,32 @@ export const argParams: { code: "0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0", size: 256 }, - type: "CrosshairResponse" + type: "V1CrosshairResponse" }, getWebsite: { args: { countryCode: "en-us" }, - type: "WebsiteResponse" + type: "V1WebsiteResponse", + aliases: ["getAnnouncements"] }, getVersion: { args: { region: "na" }, - type: "VersionResponse" + type: "V1VersionResponse" }, getFeaturedItems: { - type: "FeaturedItemsResponse" + type: "V2StoreFeaturedResponse" }, getOffers: { - type: "StoreOffersResponse" + type: "V1StoreOffersResponse" }, getStatus: { args: { region: "na" }, - type: "StatusResponse" + type: "V1StatusResponse" }, getRawMatchDetails: { args: { @@ -73,34 +75,37 @@ export const argParams: { }, type: "RawMMRResponse" }, + getRawData: { + args: { + type: "mmr", + value: examplePUUID, + region: exampleRegion, + queries: null + }, + type: "RawMMRResponse" + }, getMMRHistory: { args: { name: exampleName, tag: exampleTag, region: exampleRegion }, - type: "MMRHistoryResponse" + type: "V2MMRHistoryResponse" }, getMMRHistoryByPUUID: { args: { puuid: examplePUUID, region: exampleRegion }, - type: "MMRHistoryResponse" + type: "V2MMRHistoryResponse" }, getMatch: { args: { matchID: exampleMatchID }, - type: "MatchResponse" + type: "V2MatchResponse" }, getLeaderboard: { - args: { - region: exampleRegion - }, - type: "LeaderboardResponse" - }, - getLeaderboardV1: { args: { region: exampleRegion, start: null, @@ -110,13 +115,14 @@ export const argParams: { season: null, version: null }, - type: "V1LeaderboardResponse" + type: "V2LeaderboardResponse" }, getTranslations: { args: { locale: null }, - type: "ContentResponse" + type: "V1ContentResponse", + aliases: ["getContent"] }, getMMR: { args: { @@ -124,14 +130,14 @@ export const argParams: { tag: exampleTag, region: exampleRegion }, - type: "MMRResponse" + type: "V2MMRResponse" }, getMMRByPUUID: { args: { puuid: examplePUUID, region: exampleRegion }, - type: "MMRResponse" + type: "V2MMRResponse" }, getMatches: { args: { @@ -139,26 +145,26 @@ export const argParams: { tag: exampleTag, region: exampleRegion }, - type: "MatchesResponse" + type: "V3MatchesResponse" }, getMatchesByPUUID: { args: { puuid: examplePUUID, region: exampleRegion }, - type: "MatchesResponse" + type: "V3MatchesResponse" }, getAccount: { args: { name: exampleName, tag: exampleTag }, - type: "AccountResponse" + type: "V1AccountResponse" }, getAccountByPUUID: { args: { puuid: examplePUUID }, - type: "AccountResponse" + type: "V1AccountResponse" } }; From 1def087fafb8d110b13664f42cf392c7367263cf Mon Sep 17 00:00:00 2001 From: Jameslinimk Date: Sun, 21 Aug 2022 02:30:20 -0400 Subject: [PATCH 43/50] Changed version to match current API ver --- package/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/package.json b/package/package.json index 46acdf4..d6f80df 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "unofficial-valorant-api", - "version": "3.0.0-stable.0", + "version": "2.3.0-stable.0", "description": "Library for the Unofficial VALORANT API by api.henrikdev.xyz", "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", From fe67431ef429f298b13b2c94b29edab5343f0163 Mon Sep 17 00:00:00 2001 From: Jameslinimk Date: Sun, 21 Aug 2022 02:38:57 -0400 Subject: [PATCH 44/50] Added lockfile and contributing section in README --- .gitignore | 7 +- package/README.md | 11 + package/pnpm-lock.yaml | 1353 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1368 insertions(+), 3 deletions(-) create mode 100644 package/pnpm-lock.yaml diff --git a/.gitignore b/.gitignore index d836301..97a0b8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,12 @@ .history/ node_modules/ -pnpm-lock.yaml + dist/ +doc/ + *.js.map *.js + out.txt checked.txt -doc/ - _test.ts diff --git a/package/README.md b/package/README.md index 99c00ff..e009cd0 100644 --- a/package/README.md +++ b/package/README.md @@ -40,3 +40,14 @@ Need help? Join the [Discord server](https://discord.gg/X3GaVkX2YN) # Code Examples You find some examples [here](./examples) + +# Contributing + +- The main package is located in [./package](./package) +- Please use [eslint](https://eslint.org) with the provided config in [./package/.eslintrc.cjs](./package/.eslintrc.cjs) + - 4 spaces, double quotes, etc (found in config) + - Use `import type` always (when you can), using `import { type thing, thing2 }` if you need to import both a type and a value from a module +- **Use [pnpm](https://pnpm.io)!** + - Install using `npm i -g pnpm` + - Use `pnpm i` to install the dependencies + - *A lot* faster & lock-file is a pnpm lock file diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml new file mode 100644 index 0000000..805c45d --- /dev/null +++ b/package/pnpm-lock.yaml @@ -0,0 +1,1353 @@ +lockfileVersion: 5.4 + +specifiers: + '@types/node': ^18.7.5 + '@typescript-eslint/eslint-plugin': ^5.33.1 + '@typescript-eslint/parser': ^5.33.1 + ajv: ^8.11.0 + ajv-formats: ^2.1.1 + axios: ^0.27.2 + chalk: ^5.0.1 + eslint: ^8.22.0 + typedoc: ^0.23.10 + typedoc-plugin-markdown: ^3.13.4 + typescript: ^4.7.4 + typescript-json-schema: ^0.54.0 + +dependencies: + axios: 0.27.2 + +devDependencies: + '@types/node': 18.7.8 + '@typescript-eslint/eslint-plugin': 5.33.1_vsoshirnpb7xw6mr7xomgfas2i + '@typescript-eslint/parser': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + ajv: 8.11.0 + ajv-formats: 2.1.1 + chalk: 5.0.1 + eslint: 8.22.0 + typedoc: 0.23.10_typescript@4.7.4 + typedoc-plugin-markdown: 3.13.4_typedoc@0.23.10 + typescript: 4.7.4 + typescript-json-schema: 0.54.0 + +packages: + + /@cspotcode/source-map-support/0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + + /@eslint/eslintrc/1.3.0: + resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.3.3 + globals: 13.17.0 + ignore: 5.2.0 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/config-array/0.10.4: + resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/gitignore-to-minimatch/1.0.2: + resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} + dev: true + + /@humanwhocodes/object-schema/1.2.1: + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + dev: true + + /@jridgewell/resolve-uri/3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec/1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + + /@jridgewell/trace-mapping/0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.13.0 + dev: true + + /@tsconfig/node10/1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12/1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14/1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16/1.0.3: + resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} + dev: true + + /@types/json-schema/7.0.11: + resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + dev: true + + /@types/node/16.11.51: + resolution: {integrity: sha512-h6p1A77pHBDdOcI9y6Wfh9iRGa8lMUZMk2ebHJTNTtRwgbQzgemZow6PW7+Xs7Z0r0IQFY1+iRlcNAkRrf53nA==} + dev: true + + /@types/node/18.7.8: + resolution: {integrity: sha512-/YP55EMK2341JkODUb8DM9O0x1SIz2aBvyF33Uf1c76St3VpsMXEIW0nxuKkq/5cxnbz0RD9cfwNZHEAZQD3ag==} + dev: true + + /@typescript-eslint/eslint-plugin/5.33.1_vsoshirnpb7xw6mr7xomgfas2i: + resolution: {integrity: sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/type-utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + debug: 4.3.4 + eslint: 8.22.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/typescript-estree': 5.33.1_typescript@4.7.4 + debug: 4.3.4 + eslint: 8.22.0 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager/5.33.1: + resolution: {integrity: sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/visitor-keys': 5.33.1 + dev: true + + /@typescript-eslint/type-utils/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/utils': 5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq + debug: 4.3.4 + eslint: 8.22.0 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types/5.33.1: + resolution: {integrity: sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/typescript-estree/5.33.1_typescript@4.7.4: + resolution: {integrity: sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/visitor-keys': 5.33.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.33.1_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@typescript-eslint/scope-manager': 5.33.1 + '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/typescript-estree': 5.33.1_typescript@4.7.4 + eslint: 8.22.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.22.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.33.1: + resolution: {integrity: sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.33.1 + eslint-visitor-keys: 3.3.0 + dev: true + + /acorn-jsx/5.3.2_acorn@8.8.0: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.8.0 + dev: true + + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + + /acorn/8.8.0: + resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv-formats/2.1.1: + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.11.0 + dev: true + + /ajv/6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ajv/8.11.0: + resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + + /ansi-regex/5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /arg/4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true + + /argparse/2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-union/2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /asynckit/0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: false + + /axios/0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + dependencies: + follow-redirects: 1.15.1 + form-data: 4.0.0 + transitivePeerDependencies: + - debug + dev: false + + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion/2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /callsites/3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /chalk/4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chalk/5.0.1: + resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: true + + /cliui/7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /combined-stream/1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: false + + /concat-map/0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: true + + /create-require/1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true + + /cross-spawn/7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is/0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /delayed-stream/1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: false + + /diff/4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + + /dir-glob/3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine/3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /emoji-regex/8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /escalade/3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp/4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-scope/5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope/7.1.1: + resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.22.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.22.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-visitor-keys/2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + dev: true + + /eslint-visitor-keys/3.3.0: + resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint/8.22.0: + resolution: {integrity: sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.3.0 + '@humanwhocodes/config-array': 0.10.4 + '@humanwhocodes/gitignore-to-minimatch': 1.0.2 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.22.0 + eslint-visitor-keys: 3.3.0 + espree: 9.3.3 + esquery: 1.4.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + functional-red-black-tree: 1.0.1 + glob-parent: 6.0.2 + globals: 13.17.0 + globby: 11.1.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.0 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree/9.3.3: + resolution: {integrity: sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.0 + acorn-jsx: 5.3.2_acorn@8.8.0 + eslint-visitor-keys: 3.3.0 + dev: true + + /esquery/1.4.0: + resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse/4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse/4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + + /estraverse/5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils/2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /fast-deep-equal/3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify/2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein/2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq/1.13.0: + resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache/6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.0.4 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up/5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache/3.0.4: + resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.7 + rimraf: 3.0.2 + dev: true + + /flatted/3.2.7: + resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + dev: true + + /follow-redirects/1.15.1: + resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: false + + /form-data/4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: false + + /fs.realpath/1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /functional-red-black-tree/1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + dev: true + + /get-caller-file/2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent/6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob/7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals/13.17.0: + resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globby/11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /grapheme-splitter/1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /handlebars/4.7.7: + resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} + engines: {node: '>=0.4.7'} + hasBin: true + dependencies: + minimist: 1.2.6 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.17.0 + dev: true + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /ignore/5.2.0: + resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} + engines: {node: '>= 4'} + dev: true + + /import-fresh/3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash/0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight/1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits/2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-extglob/2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-fullwidth-code-point/3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /isexe/2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /js-yaml/4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-schema-traverse/0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-schema-traverse/1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + + /json-stable-stringify-without-jsonify/1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /jsonc-parser/3.1.0: + resolution: {integrity: sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==} + dev: true + + /levn/0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /locate-path/6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge/4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /lru-cache/6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /lunr/2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + dev: true + + /make-error/1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + + /marked/4.0.18: + resolution: {integrity: sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==} + engines: {node: '>= 12'} + hasBin: true + dev: true + + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /mime-db/1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + dev: false + + /mime-types/2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + dev: false + + /minimatch/3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch/5.1.0: + resolution: {integrity: sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimist/1.2.6: + resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} + dev: true + + /ms/2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /natural-compare/1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /neo-async/2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + dev: true + + /once/1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator/0.9.1: + resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.3 + dev: true + + /p-limit/3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate/5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module/1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-equal/1.2.2: + resolution: {integrity: sha512-AUJvbcle1Zgb1TgtftHYknlrgrSYyI1ytrYgSbKUHSybwqUDnbD2cw9PIWivuMvsN+GTXmr/DRN4VBXpHG6aGg==} + dev: true + + /path-exists/4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute/1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key/3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-type/4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /prelude-ls/1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /punycode/2.1.1: + resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} + engines: {node: '>=6'} + dev: true + + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /regexpp/3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + dev: true + + /require-directory/2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + + /require-from-string/2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: true + + /resolve-from/4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf/3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /safe-stable-stringify/2.3.1: + resolution: {integrity: sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==} + engines: {node: '>=10'} + dev: true + + /semver/7.3.7: + resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command/2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex/3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /shiki/0.10.1: + resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + dependencies: + jsonc-parser: 3.1.0 + vscode-oniguruma: 1.6.2 + vscode-textmate: 5.2.0 + dev: true + + /slash/3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /string-width/4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /strip-ansi/6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-json-comments/3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /text-table/0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /ts-node/10.9.1_bfrxc7aptwsxeoxcoeog36qque: + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 16.11.51 + acorn: 8.8.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.6.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /tslib/1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tsutils/3.21.0_typescript@4.7.4: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.7.4 + dev: true + + /type-check/0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest/0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typedoc-plugin-markdown/3.13.4_typedoc@0.23.10: + resolution: {integrity: sha512-E/EBBmu6ARtnbswZGtBVBB/BfukZiGMOlqPc0RXCI/NFitONBahFqbCAF5fKQlijlcfipJj5pw5AMFH3NytrAw==} + peerDependencies: + typedoc: '>=0.23.0' + dependencies: + handlebars: 4.7.7 + typedoc: 0.23.10_typescript@4.7.4 + dev: true + + /typedoc/0.23.10_typescript@4.7.4: + resolution: {integrity: sha512-03EUiu/ZuScUBMnY6p0lY+HTH8SwhzvRE3gImoemdPDWXPXlks83UGTx++lyquWeB1MTwm9D9Ca8RIjkK3AFfQ==} + engines: {node: '>= 14.14'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x + dependencies: + lunr: 2.3.9 + marked: 4.0.18 + minimatch: 5.1.0 + shiki: 0.10.1 + typescript: 4.7.4 + dev: true + + /typescript-json-schema/0.54.0: + resolution: {integrity: sha512-/MNhm1pjdxXiVspjjyRCrQAA1B768cRzHU83aIqN5vQqQEW2NgyyKOfcguiRIMM64lseIZIelegnHOHEu7YDCg==} + hasBin: true + dependencies: + '@types/json-schema': 7.0.11 + '@types/node': 16.11.51 + glob: 7.2.3 + path-equal: 1.2.2 + safe-stable-stringify: 2.3.1 + ts-node: 10.9.1_bfrxc7aptwsxeoxcoeog36qque + typescript: 4.6.4 + yargs: 17.5.1 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + + /typescript/4.6.4: + resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /typescript/4.7.4: + resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /uglify-js/3.17.0: + resolution: {integrity: sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==} + engines: {node: '>=0.8.0'} + hasBin: true + requiresBuild: true + dev: true + optional: true + + /uri-js/4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.1.1 + dev: true + + /v8-compile-cache-lib/3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true + + /v8-compile-cache/2.3.0: + resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} + dev: true + + /vscode-oniguruma/1.6.2: + resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} + dev: true + + /vscode-textmate/5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + dev: true + + /which/2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /word-wrap/1.2.3: + resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} + engines: {node: '>=0.10.0'} + dev: true + + /wordwrap/1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + dev: true + + /wrap-ansi/7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrappy/1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /y18n/5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + + /yallist/4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yargs-parser/21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + + /yargs/17.5.1: + resolution: {integrity: sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==} + engines: {node: '>=12'} + dependencies: + cliui: 7.0.4 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + + /yn/3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + + /yocto-queue/0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true From e0f8f42f12897378bfb85a931c7525d732278797 Mon Sep 17 00:00:00 2001 From: Jameslinimk Date: Sun, 21 Aug 2022 02:40:43 -0400 Subject: [PATCH 45/50] Fixed hyperlinks --- package/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/README.md b/package/README.md index e009cd0..8381e54 100644 --- a/package/README.md +++ b/package/README.md @@ -43,8 +43,8 @@ You find some examples [here](./examples) # Contributing -- The main package is located in [./package](./package) -- Please use [eslint](https://eslint.org) with the provided config in [./package/.eslintrc.cjs](./package/.eslintrc.cjs) +- The main package is located in [./package](./) +- Please use [eslint](https://eslint.org) with the provided config in [./.eslintrc.cjs](./package/.eslintrc.cjs) - 4 spaces, double quotes, etc (found in config) - Use `import type` always (when you can), using `import { type thing, thing2 }` if you need to import both a type and a value from a module - **Use [pnpm](https://pnpm.io)!** From 312311782c12e75e9d7f14e92c24b36f31e60713 Mon Sep 17 00:00:00 2001 From: Jameslinimk Date: Sun, 21 Aug 2022 02:41:08 -0400 Subject: [PATCH 46/50] Fixed hyperlink --- package/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/README.md b/package/README.md index 8381e54..8032c53 100644 --- a/package/README.md +++ b/package/README.md @@ -44,7 +44,7 @@ You find some examples [here](./examples) # Contributing - The main package is located in [./package](./) -- Please use [eslint](https://eslint.org) with the provided config in [./.eslintrc.cjs](./package/.eslintrc.cjs) +- Please use [eslint](https://eslint.org) with the provided config in [./.eslintrc.cjs](./.eslintrc.cjs) - 4 spaces, double quotes, etc (found in config) - Use `import type` always (when you can), using `import { type thing, thing2 }` if you need to import both a type and a value from a module - **Use [pnpm](https://pnpm.io)!** From 56cf9f732506d319cd8f001bc98dbe1d029fe5af Mon Sep 17 00:00:00 2001 From: Henrik-3 Date: Sun, 7 May 2023 21:01:19 +0200 Subject: [PATCH 47/50] add lifetime matches types --- package/package.json | 2 +- package/src/types/general.ts | 182 +++-- package/src/types/v1-lifetime-matches.ts | 49 ++ package/src/vapi.ts | 914 ++++++++++++++--------- package/tsconfig.json | 3 +- 5 files changed, 711 insertions(+), 439 deletions(-) create mode 100644 package/src/types/v1-lifetime-matches.ts diff --git a/package/package.json b/package/package.json index d6f80df..46acdf4 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "unofficial-valorant-api", - "version": "2.3.0-stable.0", + "version": "3.0.0-stable.0", "description": "Library for the Unofficial VALORANT API by api.henrikdev.xyz", "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", diff --git a/package/src/types/general.ts b/package/src/types/general.ts index a5b4d5a..7ab723e 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -1,100 +1,154 @@ -export type BaseRank = "Iron" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond" | "Ascendant" | "Immortal"; -export type SubRank = "1" | "2" | "3"; -export type Rank = `${BaseRank} ${SubRank}` | "Radiant" | "Unrated"; +export type BaseRank = 'Iron' | 'Bronze' | 'Silver' | 'Gold' | 'Platinum' | 'Diamond' | 'Ascendant' | 'Immortal'; +export type SubRank = '1' | '2' | '3'; +export type Rank = `${BaseRank} ${SubRank}` | 'Radiant' | 'Unrated'; export type Episodes = number; export type Acts = 1 | 2 | 3; export type Season = `e${Episodes}a${Acts}`; -export type Mode = "Escalation" | "Spikerush" | "Deathmatch" | "Competitive" | "Unrated" | "Replication" | "Custom" | "Newmap" | "Snowball"; -export type ValorantMap = "Ascent" | "Split" | "Fracture" | "Bind" | "Breeze" | "Icebox" | "Haven" | "Pearl"; -export type Region = "eu" | "na" | "kr" | "ap" | "latam" | "br"; -export type Characters = "Astra" | "Breach" | "Brimstone" | "Chamber" | "Cypher" | "Fade" | "Jett" | "KAY/O" | "Killjoy" | "Neon" | "Omen" | "Phoenix" | "Raze" | "Reyna" | "Sage" | "Skye" | "Sova" | "Viper" | "Yoru"; +export type Mode = 'Escalation' | 'Spikerush' | 'Deathmatch' | 'Competitive' | 'Unrated' | 'Replication' | 'Custom' | 'Newmap' | 'Snowballfight' | 'Premier'; +export type ValorantMap = 'Ascent' | 'Split' | 'Fracture' | 'Bind' | 'Breeze' | 'Icebox' | 'Haven' | 'Pearl'; +export type Region = 'eu' | 'na' | 'kr' | 'ap' | 'latam' | 'br'; +export type Characters = + | 'Astra' + | 'Breach' + | 'Brimstone' + | 'Chamber' + | 'Cypher' + | 'Fade' + | 'Harbor' + | 'Jett' + | 'KAY/O' + | 'Killjoy' + | 'Neon' + | 'Omen' + | 'Phoenix' + | 'Raze' + | 'Reyna' + | 'Sage' + | 'Skye' + | 'Sova' + | 'Viper' + | 'Yoru'; // TODO Check "Golden Gun" and "Tactical Knife" -export type Weapon = "Classic" | "Shorty" | "Frenzy" | "Ghost" | "Sheriff" | "Golden Gun" | "Stinger" | "Spectre" | "Bucky" | "Judge" | "Bulldog" | "Guardian" | "Phantom" | "Vandal" | "Marshal" | "Operator" | "Ares" | "Odin" | "Melee"; +export type Weapon = + | 'Classic' + | 'Shorty' + | 'Frenzy' + | 'Ghost' + | 'Sheriff' + | 'Golden Gun' + | 'Stinger' + | 'Spectre' + | 'Bucky' + | 'Judge' + | 'Bulldog' + | 'Guardian' + | 'Phantom' + | 'Vandal' + | 'Marshal' + | 'Operator' + | 'Ares' + | 'Odin' + | 'Melee'; -export type Locale = "ar-AE" | "de-DE" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fr-FR" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "pl-PL" | "pt-BR" | "ru-RU" | "th-TH" | "tr-TR" | "vi-VN" | "zn-CN" | "zn-TW"; +export type Locale = + | 'ar-AE' + | 'de-DE' + | 'en-GB' + | 'en-US' + | 'es-ES' + | 'es-MX' + | 'fr-FR' + | 'id-ID' + | 'it-IT' + | 'ja-JP' + | 'ko-KR' + | 'pl-PL' + | 'pt-BR' + | 'ru-RU' + | 'th-TH' + | 'tr-TR' + | 'vi-VN' + | 'zn-CN' + | 'zn-TW'; export interface APIResponse { /** - * Response status - * @remarks - * - `200-299` Successful response - * - `400-499` Client error response - * - `500-599` Server error response - */ + * Response status + * @remarks + * - `200-299` Successful response + * - `400-499` Client error response + * - `500-599` Server error response + */ status: number; /** - * Response from API - */ + * Response from API + */ data?: dataType; /** - * Information about current rate limits - */ + * Information about current rate limits + */ rateLimits: RateLimit; /** - * Error object (if there is) - */ + * Error object (if there is) + */ error?: ErrorObject; - /** - * Original request URL - */ - url: string; } export interface ErrorObject { /** - * Error message - */ + * Error message + */ message: string; /** - * The response status of the API. See remarks for info about specific error codes - * @remarks - * Can be any of the following: - * - `0` Riot Origin Server down for maintenance - * - `1` Invalid API Key - * - `2` Forbidden endpoint - * - `3` Restricted endpoint - * - `101` No region found for this Player - * - `102` No matches found, can't get puuid - * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again - * - `104` Invalid region - * - `105` Invalid filter - * - `106` Invalid gamemode - * - `107` Invalid map - * - `108` Invalid locale - * - `109` Missing name - * - `110` Missing tag - * - `111` Player not found in leaderboard - * - `112` Invalid raw type - * - `113` Invalid match or player id - * - `114` Invalid country code - * - `115` Invalid season - */ + * The response status of the API. See remarks for info about specific error codes + * @remarks + * Can be any of the following: + * - `0` Riot Origin Server down for maintenance + * - `1` Invalid API Key + * - `2` Forbidden endpoint + * - `3` Restricted endpoint + * - `101` No region found for this Player + * - `102` No matches found, can't get puuid + * - `103` Possible name change detected, can't get puuid. Please play one match, wait 1-2 minutes and try it again + * - `104` Invalid region + * - `105` Invalid filter + * - `106` Invalid gamemode + * - `107` Invalid map + * - `108` Invalid locale + * - `109` Missing name + * - `110` Missing tag + * - `111` Player not found in leaderboard + * - `112` Invalid raw type + * - `113` Invalid match or player id + * - `114` Invalid country code + * - `115` Invalid season + */ code: number; /** - * Error details to help fix the problem - */ + * Error details to help fix the problem + */ details: string; } export interface RateLimit { /** - * Number of used API requests per 60s. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ + * Number of used API requests per 60s. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ used: number; /** - * Remaining number of API requests per 60s. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ + * Remaining number of API requests per 60s. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ remaining: number; /** - * In how many seconds (every 60s) your rate limit is going to reset. - * @remarks - * `30 req/min` on free accounts, and `60 req/min` on regular token - */ + * In how many seconds (every 60s) your rate limit is going to reset. + * @remarks + * `30 req/min` on free accounts, and `60 req/min` on regular token + */ reset: number; } diff --git a/package/src/types/v1-lifetime-matches.ts b/package/src/types/v1-lifetime-matches.ts new file mode 100644 index 0000000..5483127 --- /dev/null +++ b/package/src/types/v1-lifetime-matches.ts @@ -0,0 +1,49 @@ +import {Characters, Mode, Region, Season, ValorantMap} from './general'; + +export interface LifetimeMatch { + meta: { + id: string; + map: { + id: string; + name: ValorantMap; + }; + version: string; + mode: Mode; + started_at: string; + season: { + id: string; + short: Season; + }; + region: Region | null; + cluster: string | null; + }; + stats: { + puuid: string; + team: string; + level: number; + character: { + id: string; + name: Characters; + }; + tier: number; + score: number; + kills: number; + deaths: number; + assists: number; + shots: { + head: number; + body: number; + leg: number; + }; + damage: { + made: number; + received: number; + }; + }; + teams: { + red: number | null; + blue: number | null; + }; +} + +export type V1LifetimeMatchesResponse = LifetimeMatch[]; diff --git a/package/src/vapi.ts b/package/src/vapi.ts index 14616f9..cd2b476 100644 --- a/package/src/vapi.ts +++ b/package/src/vapi.ts @@ -1,511 +1,679 @@ -import axios, { type AxiosRequestConfig } from "axios"; -import packageJson from "../package.json" assert { type: "json" }; -import type { APIResponse, Locale, Mode, Rank, Region, Season, ValorantMap } from "./types/general"; -import type { RawCompetitiveUpdatesResponse } from "./types/raw/competitive-updates"; -import type { RawMatchDetailsResponse } from "./types/raw/match-details"; -import type { RawMatchHistoryResponse } from "./types/raw/match-history"; -import type { RawMMRResponse } from "./types/raw/mmr"; -import type { V1AccountResponse } from "./types/v1-account"; -import type { V1ContentResponse } from "./types/v1-content"; -import type { V1CrosshairResponse } from "./types/v1-crosshair"; -import type { V1StatusResponse } from "./types/v1-status"; -import type { V1StoreOffersResponse } from "./types/v1-store-offers"; -import type { V1VersionResponse } from "./types/v1-version"; -import type { V1WebsiteResponse } from "./types/v1-website"; -import type { V2MatchResponse } from "./types/v2-match"; -import type { V2MMRHistoryResponse } from "./types/v2-mmr-history"; -import type { V3MatchesResponse } from "./types/v3-matches"; -import { LeaderboardResponse, MMRResponse, RawResponse, StoreFeaturedResponse } from "./types/versions.js"; +import axios, {type AxiosRequestConfig} from 'axios'; +import packageJson from '../package.json' assert {type: 'json'}; +import type {APIResponse, Locale, Mode, Rank, Region, Season, ValorantMap} from './types/general'; +import type {RawCompetitiveUpdatesResponse} from './types/raw/competitive-updates'; +import type {RawMatchDetailsResponse} from './types/raw/match-details'; +import type {RawMatchHistoryResponse} from './types/raw/match-history'; +import type {RawMMRResponse} from './types/raw/mmr'; +import type {V1AccountResponse} from './types/v1-account'; +import type {V1ContentResponse} from './types/v1-content'; +import type {V1CrosshairResponse} from './types/v1-crosshair'; +import {V1LifetimeMatchesResponse} from './types/v1-lifetime-matches'; +import type {V1StatusResponse} from './types/v1-status'; +import type {V1StoreOffersResponse} from './types/v1-store-offers'; +import type {V1VersionResponse} from './types/v1-version'; +import type {V1WebsiteResponse} from './types/v1-website'; +import type {V2MatchResponse} from './types/v2-match'; +import type {V2MMRHistoryResponse} from './types/v2-mmr-history'; +import type {V3MatchesResponse} from './types/v3-matches'; +import {LeaderboardResponse, MMRResponse, RawResponse, StoreFeaturedResponse} from './types/versions.js'; /** * Base API endpoint */ -const baseUrl = "https://api.henrikdev.xyz/valorant"; +const baseUrl = 'https://api.henrikdev.xyz/valorant'; export default class { /** - * Images for every Rank - * @remarks - * You must call {@link initUtils} before using this! - */ - rankImages?: { [key in Rank]: { large: string, small: string, triangleUp: string, triangleDown: string } }; - /** - * Images for every Valorant map - * @remarks - * You must call {@link initUtils} before using this! - */ - mapImages?: { [key in ValorantMap | "The Range"]: { splash: string, minimap: string, landscape: string } }; - - /** - * Create a new instance of the main API. All API calls are in this class - * @example - * Create a new instance - * ```js - * import _VAPI from "unofficial-valorant-api" - * const VAPI = new _VAPI("my super secret token") - * ``` - * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) - */ + * Images for every Rank + * @remarks + * You must call {@link initUtils} before using this! + */ + rankImages?: {[key in Rank]: {large: string; small: string; triangleUp: string; triangleDown: string}}; + /** + * Images for every Valorant map + * @remarks + * You must call {@link initUtils} before using this! + */ + mapImages?: {[key in ValorantMap | 'The Range']: {splash: string; minimap: string; landscape: string}}; + + /** + * Create a new instance of the main API. All API calls are in this class + * @example + * Create a new instance + * ```js + * import _VAPI from "unofficial-valorant-api" + * const VAPI = new _VAPI("my super secret token") + * ``` + * @param token - (optional) The token, if you have one. Get one from the Discord server ({@link https://discord.gg/wXNMnqzvAD}) + */ constructor(private token?: string) {} /** - * Creates {@link default.rankImages} and {@link default.mapImages} by pulling the images from {@link https://valorant-api.com} - * @remarks - * Must be called before using {@link default.rankImages} and {@link default.mapImages} - */ + * Creates {@link default.rankImages} and {@link default.mapImages} by pulling the images from {@link https://valorant-api.com} + * @remarks + * Must be called before using {@link default.rankImages} and {@link default.mapImages} + */ async initUtils(): Promise { - const mapsReq = (await axios({ url: "https://valorant-api.com/v1/maps" }).catch(() => null))?.data?.data; + const mapsReq = (await axios({url: 'https://valorant-api.com/v1/maps'}).catch(() => null))?.data?.data; if (mapsReq) { this.mapImages = {} as any; - mapsReq.forEach((map: any) => (this.mapImages[map.displayName] = { - splash: map.splash, - minimap: map.displayIcon, - landscape: map.listViewIcon - })); + mapsReq.forEach( + (map: any) => + (this.mapImages[map.displayName] = { + splash: map.splash, + minimap: map.displayIcon, + landscape: map.listViewIcon, + }) + ); } - const tiersReq = (await axios({ url: "https://valorant-api.com/v1/competitivetiers" }).catch(() => null))?.data?.data; + const tiersReq = (await axios({url: 'https://valorant-api.com/v1/competitivetiers'}).catch(() => null))?.data?.data; if (tiersReq) { const capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1); this.rankImages = {} as any; - tiersReq[tiersReq.length - 1].tiers.forEach((rank: any) => (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { - large: rank.largeIcon, - small: rank.smallIcon, - triangleUp: rank.rankTriangleUpIcon, - triangleDown: rank.rankTriangleDownIcon - })); + tiersReq[tiersReq.length - 1].tiers.forEach( + (rank: any) => + (this.rankImages[capitalize(rank.tierName.toLowerCase())] = { + large: rank.largeIcon, + small: rank.smallIcon, + triangleUp: rank.rankTriangleUpIcon, + triangleDown: rank.rankTriangleDownIcon, + }) + ); } } /** - * @internal - * Parses the body of an axios response - */ - private parseBody(body: { errors: string, status: number, data: any }) { + * @internal + * Parses the body of an axios response + */ + private parseBody(body: {errors: string; status: number; data: any}) { if (body.errors) return body.errors; return body.status ? body.data : body; } /** - * @internal - * Main function to fetch from the API - * @typeParam dataType - The type of the response - * @param url - URl to fetch. Appended to the base url and automatically encoded - * @param searchParams - Any extra search params. Empty values will be filtered out - * @param config - Override the default axios config with custom params - * @returns Formatted response - */ - private async fetch(url: string, searchParams?: { [key: string]: any }, config: AxiosRequestConfig = {}): Promise> { + * @internal + * Main function to fetch from the API + * @typeParam dataType - The type of the response + * @param url - URl to fetch. Appended to the base url and automatically encoded + * @param searchParams - Any extra search params. Empty values will be filtered out + * @param config - Override the default axios config with custom params + * @returns Formatted response + */ + private async fetch(url: string, searchParams?: {[key: string]: any}, config: AxiosRequestConfig = {}): Promise> { // Format search params into `?something=like&this` - const queryParams = searchParams ? Object.keys(searchParams).reduce((acc, cur) => { - const value = searchParams[cur]; - if (value === null || value === undefined) return acc; - return acc === "" - ? `?${cur}=${value}` - : acc + `&${cur}=${value}`; - }, "") : ""; + const queryParams = searchParams + ? Object.keys(searchParams).reduce((acc, cur) => { + const value = searchParams[cur]; + if (value === null || value === undefined) return acc; + return acc === '' ? `?${cur}=${value}` : acc + `&${cur}=${value}`; + }, '') + : ''; // Main request const req = await axios({ url: encodeURI(`${baseUrl}/${url}${queryParams}`), - responseType: "json", + responseType: 'json', headers: this.token - ? { Authorization: this.token, "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, } - : { "User-Agent": `unofficial-valorant-api/node.js/${packageJson.version}`, }, - ...config + ? {Authorization: this.token, 'User-Agent': `unofficial-valorant-api/node.js/${packageJson.version}`} + : {'User-Agent': `unofficial-valorant-api/node.js/${packageJson.version}`}, + ...config, }).catch(error => error); // Formatting response return { status: req.response ? req.response.status : req.status, - data: req.response ? null : !req.config.headers["Content-Type"] ? this.parseBody(req.data) : req.data, + data: req.response ? null : !req.config.headers['Content-Type'] ? this.parseBody(req.data) : req.data, rateLimits: { - used: Number(req.response ? req.response.headers["x-ratelimit-limit"] : req.headers["x-ratelimit-limit"]), - remaining: Number(req.response ? req.response.headers["x-ratelimit-remaining"] : req.headers["x-ratelimit-remaining"]), - reset: Number(req.response ? req.response.headers["x-ratelimit-reset"] : req.headers["x-ratelimit-reset"]), + used: Number(req.response ? req.response.headers['x-ratelimit-limit'] : req.headers['x-ratelimit-limit']), + remaining: Number(req.response ? req.response.headers['x-ratelimit-remaining'] : req.headers['x-ratelimit-remaining']), + reset: Number(req.response ? req.response.headers['x-ratelimit-reset'] : req.headers['x-ratelimit-reset']), }, error: req.response ? this.parseBody(req.response.data) : null, - url: req.config.url }; } /** - * @internal - * Make sure each key has a non empty value - * @param input - Object to check for non empty values - * @throws TypeError - Only if there is a empty value to a key - */ - private async validateArgs(input: { [key: string]: any }) { + * @internal + * Make sure each key has a non empty value + * @param input - Object to check for non empty values + * @throws TypeError - Only if there is a empty value to a key + */ + private async validateArgs(input: {[key: string]: any}) { Object.keys(input).forEach(key => { if (input[key] === null || input[key] === undefined) throw new TypeError(`Missing parameter: "${key}"`); }); } /** - * Get an image of a valorant crosshair by its code - * @example - * Load and write a crosshair to crosshair.png - * ```js - * import { writeFileSync } from "fs" - * - * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") - * writeFileSync("crosshair.png", crosshair.data) - * ``` - * @param args.code - Valorant crosshair code - * @param args.size - (optional) Image size (default: `1024`) - * @returns The image of the crosshair as a {@link https://nodejs.org/api/buffer.html Buffer} - */ - async getCrosshair({ code, size }: { code: string, size?: number }): Promise> { - this.validateArgs({ code }); - return this.fetch("v1/crosshair/generate", { id: code, size }, { - responseType: "arraybuffer" - }); + * Get an image of a valorant crosshair by its code + * @example + * Load and write a crosshair to crosshair.png + * ```js + * import { writeFileSync } from "fs" + * + * const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1") + * writeFileSync("crosshair.png", crosshair.data) + * ``` + * @param args.code - Valorant crosshair code + * @param args.size - (optional) Image size (default: `1024`) + * @returns The image of the crosshair as a {@link https://nodejs.org/api/buffer.html Buffer} + */ + async getCrosshair({code, size}: {code: string; size?: number}): Promise> { + this.validateArgs({code}); + return this.fetch( + 'v1/crosshair/generate', + {id: code, size}, + { + responseType: 'arraybuffer', + } + ); } /** - * Get all announcements from the valorant website of a country - * @param args.countryCode - Country code of website - * @returns List of announcements from the valorant website - */ - async getAnnouncements({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { - this.validateArgs({ countryCode }); + * Get all announcements from the valorant website of a country + * @param args.countryCode - Country code of website + * @returns List of announcements from the valorant website + */ + async getAnnouncements({ + countryCode, + }: { + countryCode: 'en-us' | 'en-gb' | 'de-de' | 'es-es' | 'es-mx' | 'fr-fr' | 'it-it' | 'ja-jp' | 'ko-kr' | 'pt-br' | 'ru-ru' | 'tr-tr' | 'vi-vn'; + }): Promise> { + this.validateArgs({countryCode}); return this.fetch(`v1/website/${countryCode}`); } /** - * Get all announcements from the valorant website of a country - * @param args.countryCode - Country code of website - * @returns List of announcements from the valorant website - * @depreciated Use {@link default.getAnnouncements} instead - */ - async getWebsite({ countryCode }: { countryCode: "en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" }): Promise> { - this.validateArgs({ countryCode }); + * Get all announcements from the valorant website of a country + * @param args.countryCode - Country code of website + * @returns List of announcements from the valorant website + * @depreciated Use {@link default.getAnnouncements} instead + */ + async getWebsite({ + countryCode, + }: { + countryCode: 'en-us' | 'en-gb' | 'de-de' | 'es-es' | 'es-mx' | 'fr-fr' | 'it-it' | 'ja-jp' | 'ko-kr' | 'pt-br' | 'ru-ru' | 'tr-tr' | 'vi-vn'; + }): Promise> { + this.validateArgs({countryCode}); return this.fetch(`v1/website/${countryCode}`); } /** - * Get information about valorant in a region, such as the client version, branch, and server version - * @param args.region - Region of valorant to get info about - * @returns Information about a regions valorant - */ - async getVersion({ region }: { region: Region }): Promise> { - this.validateArgs({ region }); + * Get information about valorant in a region, such as the client version, branch, and server version + * @param args.region - Region of valorant to get info about + * @returns Information about a regions valorant + */ + async getVersion({region}: {region: Region}): Promise> { + this.validateArgs({region}); return this.fetch(`v1/version/${region}`); } /** - * Get all of the featured items in the current valorant store - * @returns Featured items in the current valorant store - */ - async getFeaturedItems({ version }: { version?: T } = {}): Promise>> { - return this.fetch>(`${version || "v2"}/store-featured`); + * Get all of the featured items in the current valorant store + * @returns Featured items in the current valorant store + */ + async getFeaturedItems({version}: {version?: T} = {}): Promise>> { + return this.fetch>(`${version || 'v2'}/store-featured`); } /** - * Get a list of all the prices of every skin in the game - * @returns List of skin prices - */ + * Get a list of all the prices of every skin in the game + * @returns List of skin prices + */ async getOffers(): Promise> { - return this.fetch("v1/store-offers"); + return this.fetch('v1/store-offers'); } /** - * Will get information about the current maintenances and incidents about a region - * @param args.region - Region to get info about - * @returns Info about undergoing maintenances and incidents in a region of valorant - */ - async getStatus({ region }: { region: Region }): Promise> { - this.validateArgs({ region }); + * Will get information about the current maintenances and incidents about a region + * @param args.region - Region to get info about + * @returns Info about undergoing maintenances and incidents in a region of valorant + */ + async getStatus({region}: {region: Region}): Promise> { + this.validateArgs({region}); return this.fetch(`v1/status/${region}`); } /** - * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link default.getMatch} for an easier response to use - * @param args.matchID - The match ID to get details about - * @param args.region - Region of the match - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchDetails_FetchMatchDetails.md documentation} - * @returns Information about the match - */ - async getRawMatchDetails({ matchID, region, queries }: { matchID: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ matchID, region }); - return await this.fetch("v1/raw", null, { - data: { type: "matchdetails", value: matchID, region, ...queries }, - method: "POST" + * Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatch} for an easier response to use + * @param args.matchID - The match ID to get details about + * @param args.region - Region of the match + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchDetails_FetchMatchDetails.md documentation} + * @returns Information about the match + */ + async getRawMatchDetails({matchID, region, queries}: {matchID: string; region: Region; queries?: any}): Promise> { + this.validateArgs({matchID, region}); + return await this.fetch('v1/raw', null, { + data: {type: 'matchdetails', value: matchID, region, ...queries}, + method: 'POST', }); } /** - * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) - * @see {@link default.getMatches} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchHistory_FetchMatchHistory.md documentation} - * @returns Information about the players match history - */ - async getRawMatchHistory({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "matchhistory", value: puuid, region, ...queries }, - method: "POST" + * Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing) + * @see {@link default.getMatches} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MatchHistory_FetchMatchHistory.md documentation} + * @returns Information about the players match history + */ + async getRawMatchHistory({puuid, region, queries}: {puuid: string; region: Region; queries?: any}): Promise> { + this.validateArgs({puuid, region}); + return await this.fetch('v1/raw', null, { + data: {type: 'matchhistory', value: puuid, region, ...queries}, + method: 'POST', }); } /** - * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link default.getMMRHistory} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchCompetitiveUpdates.md documentation} - * @returns Information about the players rr history - */ - async getRawCompetitiveUpdates({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "mmr", value: puuid, region, ...queries }, - method: "POST" + * Gets raw data for a players competitive updates (rr changes) from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMRHistory} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchCompetitiveUpdates.md documentation} + * @returns Information about the players rr history + */ + async getRawCompetitiveUpdates({puuid, region, queries}: {puuid: string; region: Region; queries?: any}): Promise> { + this.validateArgs({puuid, region}); + return await this.fetch('v1/raw', null, { + data: {type: 'mmr', value: puuid, region, ...queries}, + method: 'POST', }); } /** - * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @see {@link default.getMMR} for an easier response to use - * @param args.puuid - The match ID to get details about - * @param args.region - Region of the player - * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchPlayer.md documentation} - * @returns Information about the players mmr - */ - async getRawMMR({ puuid, region, queries }: { puuid: string, region: Region, queries?: any }): Promise> { - this.validateArgs({ puuid, region }); - return await this.fetch("v1/raw", null, { - data: { type: "competitiveupdates", value: puuid, region, ...queries }, - method: "POST" + * Gets raw data for a players mmr from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @see {@link default.getMMR} for an easier response to use + * @param args.puuid - The match ID to get details about + * @param args.region - Region of the player + * @param args.queries - Extra queries. See {@link https://github.com/techchrism/valorant-api-docs/blob/trunk/docs/PVP%20Endpoints/GET%20MMR_FetchPlayer.md documentation} + * @returns Information about the players mmr + */ + async getRawMMR({puuid, region, queries}: {puuid: string; region: Region; queries?: any}): Promise> { + this.validateArgs({puuid, region}); + return await this.fetch('v1/raw', null, { + data: {type: 'competitiveupdates', value: puuid, region, ...queries}, + method: 'POST', }); } /** - * Gets raw data from the valorant API. **(Not formatted, use only if you know what you are doing)** - * @param args.type - Type of data to return - * @param args.value - A players puuid if type is `mmr` or `competitiveupdates`, else a match id - * @param args.region - Region of the player or match - * @param args.queries - * @returns Either match details, a users patch history, a users mmr, or a users past rr changes - * @depreciated Use {@link default.getRawCompetitiveUpdates} {@link default.getRawMatchDetails} {@link default.getRawMatchHistory} {@link default.getRawMMR} instead - */ - async getRawData({ type, value, region, queries }: { type: T, value: string, region: Region, queries: any }): Promise>> { - this.validateArgs({ type, value, region }); - return await this.fetch>("v1/raw", null, { - data: { type, value, region, ...queries }, - method: "POST" + * Gets raw data from the valorant API. **(Not formatted, use only if you know what you are doing)** + * @param args.type - Type of data to return + * @param args.value - A players puuid if type is `mmr` or `competitiveupdates`, else a match id + * @param args.region - Region of the player or match + * @param args.queries + * @returns Either match details, a users patch history, a users mmr, or a users past rr changes + * @depreciated Use {@link default.getRawCompetitiveUpdates} {@link default.getRawMatchDetails} {@link default.getRawMatchHistory} {@link default.getRawMMR} instead + */ + async getRawData({ + type, + value, + region, + queries, + }: { + type: T; + value: string; + region: Region; + queries: any; + }): Promise>> { + this.validateArgs({type, value, region}); + return await this.fetch>('v1/raw', null, { + data: {type, value, region, ...queries}, + method: 'POST', }); } /** - * Get a list of rr changes of a player by their Riot ID - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot tag username of the player - * @param args.region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistory({ name, tag, region }: { name: string, tag: string, region: Region }): Promise> { - this.validateArgs({ name, tag, region }); + * Get a list of rr changes of a player by their Riot ID + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot tag username of the player + * @param args.region - The players region + * @return List of rr changes (recent competitive games) + */ + async getMMRHistory({name, tag, region}: {name: string; tag: string; region: Region}): Promise> { + this.validateArgs({name, tag, region}); return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); } /** - * Get a list of rr changes of a player by their PUUID - * @param args.puuid - The PUUID of the player - * @param args.region - The players region - * @return List of rr changes (recent competitive games) - */ - async getMMRHistoryByPUUID({ puuid, region }: { puuid: string, region: Region }): Promise> { - this.validateArgs({ puuid, region }); + * Get a list of rr changes of a player by their PUUID + * @param args.puuid - The PUUID of the player + * @param args.region - The players region + * @return List of rr changes (recent competitive games) + */ + async getMMRHistoryByPUUID({puuid, region}: {puuid: string; region: Region}): Promise> { + this.validateArgs({puuid, region}); return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); } /** - * Get information about a match - * @param args.matchID - The matchs ID - * @returns Information about the match - */ - async getMatch({ matchID }: { matchID: string }): Promise> { - this.validateArgs({ matchID }); + * Get information about a match + * @param args.matchID - The matchs ID + * @returns Information about the match + */ + async getMatch({matchID}: {matchID: string}): Promise> { + this.validateArgs({matchID}); return this.fetch(`v2/match/${matchID}`); } /** - * Get the leaderboard of a region - * @remarks - * In order for player filtering to work, they must be Immortal or higher - * @param args.region - Region to get leaderboard from - * @param args.version - Can be `v1` or `v2`. Note: V2 does not support filters! - * @param args.start - (optional) Get 1000 leaderboard players starting from the given start value - * @param args.end - (optional) Limit the amount of leaderboard players returned - * @param args.riotID - (optional) Search for a specific player by their Riot ID - * @param args.riotID.name - The Riot IDs username - * @param args.riotID.tag - The Riot IDs tag - * @param args.puuid - (optional) Search for a specific player by their PUUID - * @param args.season - (optional) Get leaderboard from a specific season - * @returns Descending order of the highest ranked players. (Immortal and up) - * @throws TypeError - If both a riotID and puuid are supplied - */ - async getLeaderboard({ version, region, start, end, riotID, puuid, season }: { version?: T, region: Region, start?: number, end?: number, riotID?: { name: string, tag: string} , puuid?: string, season?: Season }): Promise>> { - if (version === "v1") { - if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); + * Get the leaderboard of a region + * @remarks + * In order for player filtering to work, they must be Immortal or higher + * @param args.region - Region to get leaderboard from + * @param args.version - Can be `v1` or `v2`. Note: V2 does not support filters! + * @param args.start - (optional) Get 1000 leaderboard players starting from the given start value + * @param args.end - (optional) Limit the amount of leaderboard players returned + * @param args.riotID - (optional) Search for a specific player by their Riot ID + * @param args.riotID.name - The Riot IDs username + * @param args.riotID.tag - The Riot IDs tag + * @param args.puuid - (optional) Search for a specific player by their PUUID + * @param args.season - (optional) Get leaderboard from a specific season + * @returns Descending order of the highest ranked players. (Immortal and up) + * @throws TypeError - If both a riotID and puuid are supplied + */ + async getLeaderboard({ + version, + region, + start, + end, + riotID, + puuid, + season, + }: { + version?: T; + region: Region; + start?: number; + end?: number; + riotID?: {name: string; tag: string}; + puuid?: string; + season?: Season; + }): Promise>> { + if (version === 'v1') { + if (riotID && puuid) + throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); } else { if (start || end || riotID || puuid || season) throw new TypeError("Can't use filters when using V2!"); } - this.validateArgs({ region }); - return this.fetch>(`${version || "v2"}/leaderboard/${region}`, { start, end, name: riotID?.name, tag: riotID?.tag, puuid, season }); + this.validateArgs({region}); + return this.fetch>(`${version || 'v2'}/leaderboard/${region}`, {start, end, name: riotID?.name, tag: riotID?.tag, puuid, season}); + } + + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param args.locale - If this is set, instead of all translations, it will return just translations for this language + */ + async getTranslations({locale}: {locale?: Locale} = {}): Promise> { + return this.fetch('v1/content', {locale}); + } + + /** + * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game + * @param args.locale - If this is set, instead of all translations, it will return just translations for this language + * @depreciated Use the new {@link default.getTranslations} instead + */ + async getContent({locale}: {locale?: Locale} = {}): Promise> { + return this.fetch('v1/content', {locale}); } /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param args.locale - If this is set, instead of all translations, it will return just translations for this language - */ - async getTranslations({ locale }: { locale?: Locale } = {}): Promise> { - return this.fetch("v1/content", { locale }); + * Gets general info about a players rank by their Riot ID + * @remarks + * **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.seasonFilter - (optional) Filter results based on episode and act + * @param args.version - (optional) Change endpoint version + * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility + * @returns Information about a players mmr/rank + * @throws TypeError - If both filter and seasonFilter are set + */ + async getMMR({ + name, + tag, + region, + seasonFilter, + version, + filter, + }: { + name: string; + tag: string; + region: Region; + seasonFilter?: Season; + version?: T; + filter?: Season; + }): Promise>> { + if (version === 'v1') console.warn('v1 is outdated, please migrate to v2!'); + if (filter) console.warn('filter is outdated! Please use seasonFilter instead'); + if (seasonFilter && filter) throw new TypeError('seasonFilter and filter cannot be both set!'); + + this.validateArgs({name, tag, region}); + return this.fetch>(`${version || 'v2'}/mmr/${region}/${name}/${tag}`, {filter: seasonFilter || filter}); } /** - * Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game - * @param args.locale - If this is set, instead of all translations, it will return just translations for this language - * @depreciated Use the new {@link default.getTranslations} instead - */ - async getContent({ locale }: { locale?: Locale } = {}): Promise> { - return this.fetch("v1/content", { locale }); + * Gets general info about a players rank by their PUUID + * @remarks + * **Returns:** + * - Current rank and info about their rank + * - RR change on their last game + * - Their PUUID + * - Their peak rank from every season + * @param args.puuid - The PUUID of the player + * @param args.region - The region of the player + * @param args.seasonFilter - (optional) Filter results based on episode and act + * @param args.version - (optional) Change endpoint version + * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility + * @returns Information about a players mmr/rank + * @throws TypeError - If both filter and seasonFilter are set + */ + async getMMRByPUUID({ + puuid, + region, + seasonFilter, + version, + filter, + }: { + puuid: string; + region: Region; + seasonFilter?: Season; + version?: T; + filter?: Season; + }): Promise>> { + if (version === 'v1') console.warn('v1 is outdated, please migrate to v2!'); + if (filter) console.warn('filter is outdated! Please use seasonFilter instead'); + if (seasonFilter && filter) throw new TypeError('seasonFilter and filter cannot be both set!'); + + this.validateArgs({puuid, region}); + return this.fetch>(`${version || 'v2'}/by-puuid/mmr/${region}/${puuid}`, {filter: seasonFilter || filter}); } /** - * Gets general info about a players rank by their Riot ID - * @remarks - * **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.region - The region of the player - * @param args.seasonFilter - (optional) Filter results based on episode and act - * @param args.version - (optional) Change endpoint version - * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility - * @returns Information about a players mmr/rank - * @throws TypeError - If both filter and seasonFilter are set - */ - async getMMR({ name, tag, region, seasonFilter, version, filter }: { name: string, tag: string, region: Region, seasonFilter?: Season, version?: T, filter?: Season }): Promise>> { - if (version === "v1") console.warn("v1 is outdated, please migrate to v2!"); - if (filter) console.warn("filter is outdated! Please use seasonFilter instead"); - if (seasonFilter && filter) throw new TypeError("seasonFilter and filter cannot be both set!"); - - this.validateArgs({ name, tag, region }); - return this.fetch>(`${version || "v2"}/mmr/${region}/${name}/${tag}`, { filter: seasonFilter || filter }); + * Gets the most recent 5 matches by a players Riot ID + * @remarks + * **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) + * @returns Info about a players last 5 matches + * @throws TypeError - Only if the size parameter is set and not between 1-10 + */ + async getMatches({ + name, + tag, + region, + gamemodeFilter, + mapFilter, + size, + }: { + name: string; + tag: string; + region: Region; + gamemodeFilter?: Mode; + mapFilter?: ValorantMap; + size?: number; + }): Promise> { + this.validateArgs({name, tag, region}); + if (size && (size > 10 || size < 1)) throw new TypeError('Invalid size parameter. Size must be between 1-10!'); + return this.fetch(`v3/matches/${region}/${name}/${tag}`, {filter: gamemodeFilter, map: mapFilter, size}); } /** - * Gets general info about a players rank by their PUUID - * @remarks - * **Returns:** - * - Current rank and info about their rank - * - RR change on their last game - * - Their PUUID - * - Their peak rank from every season - * @param args.puuid - The PUUID of the player - * @param args.region - The region of the player - * @param args.seasonFilter - (optional) Filter results based on episode and act - * @param args.version - (optional) Change endpoint version - * @param args.filter - (optional) Same as seasonFilter. Only here for backwards compatibility - * @returns Information about a players mmr/rank - * @throws TypeError - If both filter and seasonFilter are set - */ - async getMMRByPUUID({ puuid, region, seasonFilter, version, filter }: { puuid: string, region: Region, seasonFilter?: Season, version?: T, filter?: Season }): Promise>> { - if (version === "v1") console.warn("v1 is outdated, please migrate to v2!"); - if (filter) console.warn("filter is outdated! Please use seasonFilter instead"); - if (seasonFilter && filter) throw new TypeError("seasonFilter and filter cannot be both set!"); - - this.validateArgs({ puuid, region }); - return this.fetch>(`${version || "v2"}/by-puuid/mmr/${region}/${puuid}`, { filter: seasonFilter || filter }); + * Gets the most recent 5 matches by a players PUUID + * @remarks + * **Returns:** + * - Info about most recent 5 matches including: + * - Metadata info about the match such as length, time, map, score, etc + * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc + * - Information about every round in the match such as plant/defuse info, etc + * - Information about every kill in the game including killer, victim, assist, etc + * @param args.puuid - The PUUID username of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.size - Return a specific amount of matches (1-10) + * @returns Info about a players last 5 matches + * @throws TypeError - Only if the size parameter is set and not between 1-10 + */ + async getMatchesByPUUID({ + puuid, + region, + gamemodeFilter, + mapFilter, + size, + }: { + puuid: string; + region: Region; + gamemodeFilter?: Mode; + mapFilter?: ValorantMap; + size?: number; + }): Promise> { + this.validateArgs({name: puuid, region}); + if (size && (size > 10 || size < 1)) throw new TypeError('Invalid size parameter. Size must be between 1-10!'); + return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, {filter: gamemodeFilter, map: mapFilter, size}); } /** - * Gets the most recent 5 matches by a players Riot ID - * @remarks - * **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.region - The region of the player - * @param args.gamemodeFilter - Filter results based on gamemode - * @param args.mapFilter - Filter results based on map - * @param args.size - Return a specific amount of matches (1-10) - * @returns Info about a players last 5 matches - * @throws TypeError - Only if the size parameter is set and not between 1-10 - */ - async getMatches({ name, tag, region, gamemodeFilter, mapFilter, size }: { name: string, tag: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { - this.validateArgs({ name, tag, region }); - if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); - return this.fetch(`v3/matches/${region}/${name}/${tag}`, { filter: gamemodeFilter, map: mapFilter, size }); + * Get general information about a player from their Riot ID + * @remarks + * **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.force - Force data update? + * @return General information on a players profile + */ + async getAccount({name, tag, force}: {name: string; tag: string; force?: boolean}): Promise> { + this.validateArgs({name, tag}); + return this.fetch(`v1/account/${name}/${tag}`, {force}); } /** - * Gets the most recent 5 matches by a players PUUID - * @remarks - * **Returns:** - * - Info about most recent 5 matches including: - * - Metadata info about the match such as length, time, map, score, etc - * - Information about every player including their PUUID, Riot ID, kills, ability usage, etc - * - Information about every round in the match such as plant/defuse info, etc - * - Information about every kill in the game including killer, victim, assist, etc - * @param args.puuid - The PUUID username of the player - * @param args.region - The region of the player - * @param args.gamemodeFilter - Filter results based on gamemode - * @param args.mapFilter - Filter results based on map - * @param args.size - Return a specific amount of matches (1-10) - * @returns Info about a players last 5 matches - * @throws TypeError - Only if the size parameter is set and not between 1-10 - */ - async getMatchesByPUUID({ puuid, region, gamemodeFilter, mapFilter, size }: { puuid: string, region: Region, gamemodeFilter?: Mode, mapFilter?: ValorantMap, size?: number }): Promise> { - this.validateArgs({ name: puuid, region }); - if (size && (size > 10 || size < 1)) throw new TypeError("Invalid size parameter. Size must be between 1-10!"); - return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, { filter: gamemodeFilter, map: mapFilter, size }); + * Get general information about a player from their Riot ID + * @remarks + * **Returns:** + * - Their PUUID + * - Their region + * - Their account level + * - Their current card + * @param args.puuid The PUUID of the player + * @param args.force Force data update? + * @return General information on a players profile + */ + async getAccountByPUUID({puuid, force}: {puuid: string; force?: boolean}): Promise> { + this.validateArgs({puuid}); + return this.fetch(`v1/by-puuid/account/${puuid}`, {force}); } /** - * Get general information about a player from their Riot ID - * @remarks - * **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * @param args.name - The Riot ID username of the player - * @param args.tag - The Riot ID tag of the player - * @param args.force - Force data update? - * @return General information on a players profile - */ - async getAccount({ name, tag, force }: { name: string, tag: string, force?: boolean }): Promise> { - this.validateArgs({ name, tag }); - return this.fetch(`v1/account/${name}/${tag}`, { force }); + * Get all matches fetched matches from a player + * @remarks + * **Returns:** + * - The most important metadata + * - The most important stats + * - The team results + * @param args.name - The Riot ID username of the player + * @param args.tag - The Riot ID tag of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.page - Return a specific page of all matches (can only be used with the "size" params) + * @param args.size - Return a specific amount of matches (can only be used with the "page" params) + * @return All fetched matches from a player + */ + async getLifetimeMatches({ + name, + tag, + region, + gamemodeFilter, + mapFilter, + page, + size, + }: { + name: string; + tag: string; + region: Region; + gamemodeFilter: Mode; + mapFilter?: ValorantMap; + page: number; + size: number; + }): Promise> { + this.validateArgs({name, tag}); + return this.fetch(`v1/lifetime/matches/${region}/${name}/${tag}:`, {gamemodeFilter, mapFilter, page, size}); } /** - * Get general information about a player from their PUUID - * @remarks - * **Returns:** - * - Their PUUID - * - Their region - * - Their account level - * - Their current card - * @param args.puuid The PUUID of the player - * @param args.force Force data update? - * @return General information on a players profile - */ - async getAccountByPUUID({ puuid, force }: { puuid: string, force?: boolean }): Promise> { - this.validateArgs({ name: puuid }); - return this.fetch(`v1/by-puuid/account/${puuid}`, { force }); + * Get all matches fetched matches from a player + * @remarks + * **Returns:** + * - The most important metadata + * - The most important stats + * - The team results + * @param args.puuid The PUUID of the player + * @param args.region - The region of the player + * @param args.gamemodeFilter - Filter results based on gamemode + * @param args.mapFilter - Filter results based on map + * @param args.page - Return a specific page of all matches (can only be used with the "size" params) + * @param args.size - Return a specific amount of matches (can only be used with the "page" params) + * @return All fetched matches from a player + */ + async getLifetimeMatchesByPUUID({ + puuid, + region, + gamemodeFilter, + mapFilter, + page, + size, + }: { + puuid: string; + region: Region; + gamemodeFilter: Mode; + mapFilter?: ValorantMap; + page: number; + size: number; + }): Promise> { + this.validateArgs({puuid}); + return this.fetch(`v1/by-puuid/lifetime/matches/${region}/${puuid}`, {gamemodeFilter, mapFilter, page, size}); } } diff --git a/package/tsconfig.json b/package/tsconfig.json index d6c462b..49c05da 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -13,7 +13,8 @@ "allowSyntheticDefaultImports": true, "declaration": true, "outDir": "./dist", - "resolveJsonModule": true + "resolveJsonModule": true, + }, "exclude": [ "node_modules", From 33a67e4b17cab96e053cb0fd18ebcef6e3d79bb7 Mon Sep 17 00:00:00 2001 From: Henrik-3 Date: Mon, 8 May 2023 16:34:23 +0200 Subject: [PATCH 48/50] update to v2.7.0 (untested) --- package/src/index.ts | 39 +++---- package/src/types/v1-esports-schedule.ts | 34 ++++++ .../{v2-mmr-history.ts => v1-mmr-history.ts} | 10 +- package/src/types/v1-store-featured.ts | 4 +- package/src/types/v2-mmr.ts | 31 ++--- package/src/types/v2-store-offers.ts | 15 +++ package/src/types/v3-matches.ts | 31 ++--- package/src/types/versions.ts | 54 +++++---- package/src/vapi.ts | 45 +++++--- package/test/testOptions.ts | 108 +++++++++--------- 10 files changed, 223 insertions(+), 148 deletions(-) create mode 100644 package/src/types/v1-esports-schedule.ts rename package/src/types/{v2-mmr-history.ts => v1-mmr-history.ts} (64%) create mode 100644 package/src/types/v2-store-offers.ts diff --git a/package/src/index.ts b/package/src/index.ts index 93c2203..9b604d4 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,20 +1,19 @@ -export * as General from "./types/general.js"; -export * as RawCompetitiveUpdates from "./types/raw/competitive-updates.js"; -export * as RawMatchDetails from "./types/raw/match-details.js"; -export * as RawMatchHistory from "./types/raw/match-history.js"; -export * as RawMmr from "./types/raw/mmr.js"; -export * as V1Account from "./types/v1-account.js"; -export * as V1Content from "./types/v1-content.js"; -export * as V1Crosshair from "./types/v1-crosshair.js"; -export * as V1Leaderboard from "./types/v1-leaderboard.js"; -export * as V1Status from "./types/v1-status.js"; -export * as V1FeaturedItems from "./types/v1-store-featured.js"; -export * as V1StoreOffers from "./types/v1-store-offers.js"; -export * as V1Version from "./types/v1-version.js"; -export * as V1Website from "./types/v1-website.js"; -export * as V2Match from "./types/v2-match.js"; -export * as V2MmrHistory from "./types/v2-mmr-history.js"; -export * as V2Mmr from "./types/v2-mmr.js"; -export * as V3Matches from "./types/v3-matches.js"; -export { default } from "./vapi.js"; - +export * as General from './types/general.js'; +export * as RawCompetitiveUpdates from './types/raw/competitive-updates.js'; +export * as RawMatchDetails from './types/raw/match-details.js'; +export * as RawMatchHistory from './types/raw/match-history.js'; +export * as RawMmr from './types/raw/mmr.js'; +export * as V1Account from './types/v1-account.js'; +export * as V1Content from './types/v1-content.js'; +export * as V1Crosshair from './types/v1-crosshair.js'; +export * as V1Leaderboard from './types/v1-leaderboard.js'; +export * as V1Status from './types/v1-status.js'; +export * as V1FeaturedItems from './types/v1-store-featured.js'; +export * as V1StoreOffers from './types/v1-store-offers.js'; +export * as V1Version from './types/v1-version.js'; +export * as V1Website from './types/v1-website.js'; +export * as V2Match from './types/v2-match.js'; +export * as V2MmrHistory from './types/v1-mmr-history.js'; +export * as V2Mmr from './types/v2-mmr.js'; +export * as V3Matches from './types/v3-matches.js'; +export {default} from './vapi.js'; diff --git a/package/src/types/v1-esports-schedule.ts b/package/src/types/v1-esports-schedule.ts new file mode 100644 index 0000000..b664936 --- /dev/null +++ b/package/src/types/v1-esports-schedule.ts @@ -0,0 +1,34 @@ +export type v1EsportsSchedule = { + date: string; + state: string; + type: string; + vod: string | null; + league: { + name: string; + identifier: string; + icon: string; + region: string; + }; + tournament: { + name: string; + season: string; + }; + match: { + id: string; + game_type: { + type: 'playAll' | 'bestOf' | null; + count: number | null; + }; + teams: { + name: string; + code: string; + icon: string; + has_won: boolean; + game_wins: number; + record: { + wins: number; + losses: number; + }; + }[]; + }; +}[]; diff --git a/package/src/types/v2-mmr-history.ts b/package/src/types/v1-mmr-history.ts similarity index 64% rename from package/src/types/v2-mmr-history.ts rename to package/src/types/v1-mmr-history.ts index 7ff4bc1..02c70f4 100644 --- a/package/src/types/v2-mmr-history.ts +++ b/package/src/types/v1-mmr-history.ts @@ -1,4 +1,4 @@ -import type { Rank } from "./general"; +import type {Rank} from './general'; export interface Images { small: string; @@ -11,6 +11,12 @@ export interface MMRHistoryGame { currenttier: number; currenttierpatched: Rank; images: Images; + match_id: string; + map: { + name: string; + id: string; + }; + season_id: string; ranking_in_tier: number; mmr_change_to_last_game: number; elo: number; @@ -18,4 +24,4 @@ export interface MMRHistoryGame { date_raw: number; } -export type V2MMRHistoryResponse = MMRHistoryGame[]; +export type V1MMRHistoryResponse = MMRHistoryGame[]; diff --git a/package/src/types/v1-store-featured.ts b/package/src/types/v1-store-featured.ts index 7c2bd31..de4f24b 100644 --- a/package/src/types/v1-store-featured.ts +++ b/package/src/types/v1-store-featured.ts @@ -14,7 +14,9 @@ export interface FeaturedItems { bundle_uuid: string; items: Item[]; seconds_remaining: number; + expires_at: string; + bundle_price: number; + whole_sale_only: boolean; } export type V1StoreFeaturedResponse = FeaturedItems[]; - diff --git a/package/src/types/v2-mmr.ts b/package/src/types/v2-mmr.ts index d6b5ed9..bd402da 100644 --- a/package/src/types/v2-mmr.ts +++ b/package/src/types/v2-mmr.ts @@ -1,7 +1,7 @@ -import type { Rank, Season } from "./general"; +import type {Rank, Season} from './general'; export interface SeasonMMR { - error?: "No data available"; + error?: 'No data available'; wins: number; number_of_games: number; final_rank: number; @@ -17,22 +17,27 @@ export interface V2MMRResponse { tag: string; puuid: string; current_data: { - currenttier: number; - currenttierpatched: Rank; + currenttier: number | null; + currenttierpatched: Rank | null; images: { - small: string; - large: string; - triangle_up: string; - triangle_down: string; + small: string | null; + large: string | null; + triangle_up: string | null; + triangle_down: string | null; }; - ranking_in_tier: number; - mmr_change_to_last_game: number; - elo: number; + ranking_in_tier: number | null; + mmr_change_to_last_game: number | null; + elo: number | null; games_needed_for_rating: number; old: boolean; }; - + highest_tier: { + old: boolean; + tier: number | null; + patched_tier: string | null; + season: string | null; + }; by_season: { - [key in Season]: SeasonMMR + [key in Season]: SeasonMMR; }; } diff --git a/package/src/types/v2-store-offers.ts b/package/src/types/v2-store-offers.ts new file mode 100644 index 0000000..b7abfc8 --- /dev/null +++ b/package/src/types/v2-store-offers.ts @@ -0,0 +1,15 @@ +export interface V2StoreOffersResponse { + offers: { + offer_id: string; + cost: number; + name: string; + icon: string; + type: string; + skin_id: string; + content_tier: { + name: string; + dev_name: string; + icon: string; + }; + }[]; +} diff --git a/package/src/types/v3-matches.ts b/package/src/types/v3-matches.ts index c38152f..af54372 100644 --- a/package/src/types/v3-matches.ts +++ b/package/src/types/v3-matches.ts @@ -1,10 +1,10 @@ -import type { Characters, Mode, Rank, Region, ValorantMap, Weapon } from "./general"; +import type {Characters, Mode, Rank, Region, ValorantMap, Weapon} from './general'; export interface Player { puuid: string; name: string; tag: string; - team: "Red" | "Blue"; + team: 'Red' | 'Blue'; level: number; character: Characters; currenttier: number; @@ -75,12 +75,12 @@ export interface Player { damage_received: number; } -export type PlayerLocation = { x: number, y: number }; +export type PlayerLocation = {x: number; y: number}; export interface PlayerLocationOnEvent { player_puuid: string; player_display_name: string; - player_team: "Red" | "Blue"; + player_team: 'Red' | 'Blue'; location: PlayerLocation; view_radians: number; } @@ -90,10 +90,10 @@ export interface KillEvent { kill_time_in_match: number; killer_puuid: string; killer_display_name: string; - killer_team: "Red" | "Blue"; + killer_team: 'Red' | 'Blue'; victim_puuid: string; victim_display_name: string; - victim_team: "Red" | "Blue"; + victim_team: 'Red' | 'Blue'; victim_death_location: PlayerLocation; damage_weapon_id: string; damage_weapon_name?: Weapon | null; @@ -106,13 +106,13 @@ export interface KillEvent { assistants: { assistant_puuid: string; assistant_display_name: string; - assistant_team: "Red" | "Blue"; + assistant_team: 'Red' | 'Blue'; }[]; } export interface Round { - winning_team: "Red" | "Blue"; - end_type: "Eliminated" | "Bomb defused" | "Bomb detonated" | "Round timer expired" | "Surrendered"; + winning_team: 'Red' | 'Blue'; + end_type: 'Eliminated' | 'Bomb defused' | 'Bomb detonated' | 'Round timer expired' | 'Surrendered'; bomb_planted: boolean; bomb_defused: boolean; plant_events: { @@ -120,9 +120,9 @@ export interface Round { planted_by?: { puuid: string; display_name: string; - team: "Red" | "Blue"; + team: 'Red' | 'Blue'; } | null; - plant_site?: "A" | "B" | "C" | null; + plant_site?: 'A' | 'B' | 'C' | null; plant_time_in_round?: number | null; player_locations_on_plant?: PlayerLocationOnEvent[] | null; }; @@ -131,7 +131,7 @@ export interface Round { defused_by?: { puuid: string; display_name: string; - team: "Red" | "Blue"; + team: 'Red' | 'Blue'; } | null; defuse_time_in_round?: number | null; player_locations_on_defuse?: PlayerLocationOnEvent[] | null; @@ -145,11 +145,11 @@ export interface Round { }; player_puuid: string; player_display_name: string; - player_team: "Red" | "Blue"; + player_team: 'Red' | 'Blue'; damage_events: { receiver_puuid: string; receiver_display_name: string; - receiver_team: "Red" | "Blue"; + receiver_team: 'Red' | 'Blue'; bodyshots: number; damage: number; headshots: number; @@ -174,7 +174,7 @@ export interface Round { }; armor: { id?: string | null; - name?: "Heavy Shields" | "Light Shields" | null; + name?: 'Heavy Shields' | 'Light Shields' | null; assets: { display_icon?: string | null; }; @@ -193,6 +193,7 @@ export interface KillEventMatch extends KillEvent { } export interface Match { + is_available: boolean; metadata: { map: ValorantMap; game_version: string; diff --git a/package/src/types/versions.ts b/package/src/types/versions.ts index 2f5213d..ee24cec 100644 --- a/package/src/types/versions.ts +++ b/package/src/types/versions.ts @@ -1,33 +1,31 @@ /* eslint-disable @typescript-eslint/indent */ -import type { RawCompetitiveUpdatesResponse } from "./raw/competitive-updates.js"; -import type { RawMatchDetailsResponse } from "./raw/match-details.js"; -import type { RawMatchHistoryResponse } from "./raw/match-history.js"; -import type { RawMMRResponse } from "./raw/mmr.js"; -import type { V1LeaderboardResponse } from "./v1-leaderboard.js"; -import type { V1MMRResponse } from "./v1-mmr.js"; -import type { V1StoreFeaturedResponse } from "./v1-store-featured.js"; -import type { V2LeaderboardResponse } from "./v2-leaderboard.js"; -import type { V2MMRResponse } from "./v2-mmr.js"; -import type { V2StoreFeaturedResponse } from "./v2-store-featured.js"; +import type {RawCompetitiveUpdatesResponse} from './raw/competitive-updates.js'; +import type {RawMatchDetailsResponse} from './raw/match-details.js'; +import type {RawMatchHistoryResponse} from './raw/match-history.js'; +import type {RawMMRResponse} from './raw/mmr.js'; +import type {V1LeaderboardResponse} from './v1-leaderboard.js'; +import type {V1MMRResponse} from './v1-mmr.js'; +import type {V1StoreFeaturedResponse} from './v1-store-featured.js'; +import {V1StoreOffersResponse} from './v1-store-offers.js'; +import type {V2LeaderboardResponse} from './v2-leaderboard.js'; +import type {V2MMRResponse} from './v2-mmr.js'; +import type {V2StoreFeaturedResponse} from './v2-store-featured.js'; +import {V2StoreOffersResponse} from './v2-store-offers.js'; -export type LeaderboardResponse = - T extends "v1" ? V1LeaderboardResponse : - T extends "v2" ? V2LeaderboardResponse : - V2LeaderboardResponse; +export type LeaderboardResponse = T extends 'v1' ? V1LeaderboardResponse : T extends 'v2' ? V2LeaderboardResponse : V2LeaderboardResponse; -export type MMRResponse = - T extends "v1" ? V1MMRResponse : - T extends "v2" ? V2MMRResponse : - V2MMRResponse; +export type MMRResponse = T extends 'v1' ? V1MMRResponse : T extends 'v2' ? V2MMRResponse : V2MMRResponse; -export type StoreFeaturedResponse = - T extends "v1" ? V1StoreFeaturedResponse : - T extends "v2" ? V2StoreFeaturedResponse : - V2StoreFeaturedResponse; +export type StoreFeaturedResponse = T extends 'v1' ? V1StoreFeaturedResponse : T extends 'v2' ? V2StoreFeaturedResponse : V2StoreFeaturedResponse; -export type RawResponse = - T extends "matchdetails" ? RawMatchDetailsResponse : - T extends "matchhistory" ? RawMatchHistoryResponse : - T extends "mmr" ? RawMMRResponse : - T extends "competitiveupdates" ? RawCompetitiveUpdatesResponse : - never; +export type StoreOffersResponse = T extends 'v1' ? V1StoreOffersResponse : T extends 'v2' ? V2StoreOffersResponse : V2StoreOffersResponse; + +export type RawResponse = T extends 'matchdetails' + ? RawMatchDetailsResponse + : T extends 'matchhistory' + ? RawMatchHistoryResponse + : T extends 'mmr' + ? RawMMRResponse + : T extends 'competitiveupdates' + ? RawCompetitiveUpdatesResponse + : never; diff --git a/package/src/vapi.ts b/package/src/vapi.ts index cd2b476..e8db112 100644 --- a/package/src/vapi.ts +++ b/package/src/vapi.ts @@ -8,20 +8,21 @@ import type {RawMMRResponse} from './types/raw/mmr'; import type {V1AccountResponse} from './types/v1-account'; import type {V1ContentResponse} from './types/v1-content'; import type {V1CrosshairResponse} from './types/v1-crosshair'; +import {v1EsportsSchedule} from './types/v1-esports-schedule'; import {V1LifetimeMatchesResponse} from './types/v1-lifetime-matches'; import type {V1StatusResponse} from './types/v1-status'; -import type {V1StoreOffersResponse} from './types/v1-store-offers'; import type {V1VersionResponse} from './types/v1-version'; import type {V1WebsiteResponse} from './types/v1-website'; import type {V2MatchResponse} from './types/v2-match'; -import type {V2MMRHistoryResponse} from './types/v2-mmr-history'; +import type {V1MMRHistoryResponse} from './types/v1-mmr-history'; import type {V3MatchesResponse} from './types/v3-matches'; -import {LeaderboardResponse, MMRResponse, RawResponse, StoreFeaturedResponse} from './types/versions.js'; +import {LeaderboardResponse, MMRResponse, RawResponse, StoreFeaturedResponse, StoreOffersResponse} from './types/versions.js'; /** * Base API endpoint */ const baseUrl = 'https://api.henrikdev.xyz/valorant'; +const baseCDNUrl = 'https://cdn.henrikdev.xyz/valorant'; export default class { /** * Images for every Rank @@ -222,8 +223,8 @@ export default class { * Get a list of all the prices of every skin in the game * @returns List of skin prices */ - async getOffers(): Promise> { - return this.fetch('v1/store-offers'); + async getOffers({version}: {version?: T} = {}): Promise>> { + return this.fetch>(`${version || 'v2'}/store-offers`); } /** @@ -334,9 +335,9 @@ export default class { * @param args.region - The players region * @return List of rr changes (recent competitive games) */ - async getMMRHistory({name, tag, region}: {name: string; tag: string; region: Region}): Promise> { + async getMMRHistory({name, tag, region}: {name: string; tag: string; region: Region}): Promise> { this.validateArgs({name, tag, region}); - return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); + return this.fetch(`v1/mmr-history/${region}/${name}/${tag}`); } /** @@ -345,9 +346,9 @@ export default class { * @param args.region - The players region * @return List of rr changes (recent competitive games) */ - async getMMRHistoryByPUUID({puuid, region}: {puuid: string; region: Region}): Promise> { + async getMMRHistoryByPUUID({puuid, region}: {puuid: string; region: Region}): Promise> { this.validateArgs({puuid, region}); - return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); + return this.fetch(`v1/by-puuid/mmr-history/${region}/${puuid}`); } /** @@ -397,7 +398,7 @@ export default class { if (riotID && puuid) throw new TypeError("Too many parameters: You can't search for a Riot ID and puuid at the same time, please decide between Riot ID and puuid"); } else { - if (start || end || riotID || puuid || season) throw new TypeError("Can't use filters when using V2!"); + if (start || end) throw new TypeError("Can't use start/end filters when using V2!"); } this.validateArgs({region}); @@ -639,7 +640,7 @@ export default class { page: number; size: number; }): Promise> { - this.validateArgs({name, tag}); + this.validateArgs({name, tag, region}); return this.fetch(`v1/lifetime/matches/${region}/${name}/${tag}:`, {gamemodeFilter, mapFilter, page, size}); } @@ -668,12 +669,26 @@ export default class { }: { puuid: string; region: Region; - gamemodeFilter: Mode; + gamemodeFilter?: Mode; mapFilter?: ValorantMap; - page: number; - size: number; + page?: number; + size?: number; }): Promise> { - this.validateArgs({puuid}); + this.validateArgs({puuid, region}); return this.fetch(`v1/by-puuid/lifetime/matches/${region}/${puuid}`, {gamemodeFilter, mapFilter, page, size}); } + + /** + * Get esports schedule data + * @remarks + * **Returns:** + * - All scheduled esport games + * - Games from: https://valorantesports.com/schedule + * @param args.region - Filter for schedules games in this region + * @param args.league - Filter for schedules games in this league + * @return All scheduled esport games + */ + async getEsportsSchedule({region, league}: {region: string; league: string}): Promise> { + return this.fetch(`v1/esports/schedule`, {region, league}); + } } diff --git a/package/test/testOptions.ts b/package/test/testOptions.ts index 92a4946..aa047e7 100644 --- a/package/test/testOptions.ts +++ b/package/test/testOptions.ts @@ -1,109 +1,109 @@ -const examplePUUID = "d55c3688-5a9b-5a5d-b49e-80d7e5ff6b2a"; -const exampleMatchID = "50ec10e0-2752-4a6a-a7ef-b63dacd5a6a9"; -const exampleRegion = "na"; -const exampleName = "jameslinimk"; -const exampleTag = "8868"; +const examplePUUID = 'd55c3688-5a9b-5a5d-b49e-80d7e5ff6b2a'; +const exampleMatchID = '50ec10e0-2752-4a6a-a7ef-b63dacd5a6a9'; +const exampleRegion = 'na'; +const exampleName = 'jameslinimk'; +const exampleTag = '8868'; export const argParams: { [method: string]: { - args?: { [name: string]: any }; + args?: {[name: string]: any}; type: string; aliases?: string[]; }; } = { getCrosshair: { args: { - code: "0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0", - size: 256 + code: '0;P;t;2;o;1;d;1;f;0;0t;10;0l;3;0a;1;0f;0;1b;0', + size: 256, }, - type: "V1CrosshairResponse" + type: 'V1CrosshairResponse', }, getWebsite: { args: { - countryCode: "en-us" + countryCode: 'en-us', }, - type: "V1WebsiteResponse", - aliases: ["getAnnouncements"] + type: 'V1WebsiteResponse', + aliases: ['getAnnouncements'], }, getVersion: { args: { - region: "na" + region: 'na', }, - type: "V1VersionResponse" + type: 'V1VersionResponse', }, getFeaturedItems: { - type: "V2StoreFeaturedResponse" + type: 'V2StoreFeaturedResponse', }, getOffers: { - type: "V1StoreOffersResponse" + type: 'V1StoreOffersResponse', }, getStatus: { args: { - region: "na" + region: 'na', }, - type: "V1StatusResponse" + type: 'V1StatusResponse', }, getRawMatchDetails: { args: { matchID: exampleMatchID, - region: "na", - queries: null + region: 'na', + queries: null, }, - type: "RawMatchDetailsResponse" + type: 'RawMatchDetailsResponse', }, getRawMatchHistory: { args: { puuid: examplePUUID, region: exampleRegion, - queries: null + queries: null, }, - type: "RawMatchHistoryResponse" + type: 'RawMatchHistoryResponse', }, getRawCompetitiveUpdates: { args: { puuid: examplePUUID, region: exampleRegion, - queries: null + queries: null, }, - type: "RawCompetitiveUpdatesResponse" + type: 'RawCompetitiveUpdatesResponse', }, getRawMMR: { args: { puuid: examplePUUID, region: exampleRegion, - queries: null + queries: null, }, - type: "RawMMRResponse" + type: 'RawMMRResponse', }, getRawData: { args: { - type: "mmr", + type: 'mmr', value: examplePUUID, region: exampleRegion, - queries: null + queries: null, }, - type: "RawMMRResponse" + type: 'RawMMRResponse', }, getMMRHistory: { args: { name: exampleName, tag: exampleTag, - region: exampleRegion + region: exampleRegion, }, - type: "V2MMRHistoryResponse" + type: 'V1MMRHistoryResponse', }, getMMRHistoryByPUUID: { args: { puuid: examplePUUID, - region: exampleRegion + region: exampleRegion, }, - type: "V2MMRHistoryResponse" + type: 'V1MMRHistoryResponse', }, getMatch: { args: { - matchID: exampleMatchID + matchID: exampleMatchID, }, - type: "V2MatchResponse" + type: 'V2MatchResponse', }, getLeaderboard: { args: { @@ -113,58 +113,58 @@ export const argParams: { riotID: null, puuid: null, season: null, - version: null + version: null, }, - type: "V2LeaderboardResponse" + type: 'V2LeaderboardResponse', }, getTranslations: { args: { - locale: null + locale: null, }, - type: "V1ContentResponse", - aliases: ["getContent"] + type: 'V1ContentResponse', + aliases: ['getContent'], }, getMMR: { args: { name: exampleName, tag: exampleTag, - region: exampleRegion + region: exampleRegion, }, - type: "V2MMRResponse" + type: 'V2MMRResponse', }, getMMRByPUUID: { args: { puuid: examplePUUID, - region: exampleRegion + region: exampleRegion, }, - type: "V2MMRResponse" + type: 'V2MMRResponse', }, getMatches: { args: { name: exampleName, tag: exampleTag, - region: exampleRegion + region: exampleRegion, }, - type: "V3MatchesResponse" + type: 'V3MatchesResponse', }, getMatchesByPUUID: { args: { puuid: examplePUUID, - region: exampleRegion + region: exampleRegion, }, - type: "V3MatchesResponse" + type: 'V3MatchesResponse', }, getAccount: { args: { name: exampleName, - tag: exampleTag + tag: exampleTag, }, - type: "V1AccountResponse" + type: 'V1AccountResponse', }, getAccountByPUUID: { args: { - puuid: examplePUUID + puuid: examplePUUID, }, - type: "V1AccountResponse" - } + type: 'V1AccountResponse', + }, }; From 5b98ce1816d448c95531e8e40cd2cc8fa5d493d3 Mon Sep 17 00:00:00 2001 From: Henrik-3 Date: Wed, 10 May 2023 22:26:50 +0200 Subject: [PATCH 49/50] conference, base, history, search premier typings --- package/src/types/general.ts | 16 +++++++++++ package/src/types/v1-premier-conferences.ts | 14 ++++++++++ package/src/types/v1-premier-history.ts | 16 +++++++++++ package/src/types/v1-premier-search.ts | 22 +++++++++++++++ package/src/types/v1-premier.ts | 31 +++++++++++++++++++++ package/src/vapi.ts | 23 ++++++--------- 6 files changed, 107 insertions(+), 15 deletions(-) create mode 100644 package/src/types/v1-premier-conferences.ts create mode 100644 package/src/types/v1-premier-history.ts create mode 100644 package/src/types/v1-premier-search.ts create mode 100644 package/src/types/v1-premier.ts diff --git a/package/src/types/general.ts b/package/src/types/general.ts index 7ab723e..24b08d2 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -73,6 +73,22 @@ export type Locale = | 'zn-CN' | 'zn-TW'; +export type PremierConferences = + | 'EU_CENTRAL_EAST' + | 'EU_WEST' + | 'EU_MIDDLE_EAST' + | 'EU_TURKEY' + | 'NA_US_EAST' + | 'NA_US_WEST' + | 'LATAM_NORTH' + | 'LATAM_SOUTH' + | 'BR_BRAZIL' + | 'KR_KOREA' + | 'AP_ASIA' + | 'AP_JAPAN' + | 'AP_OCEANIA' + | 'AP_SOUTH_ASIA'; + export interface APIResponse { /** * Response status diff --git a/package/src/types/v1-premier-conferences.ts b/package/src/types/v1-premier-conferences.ts new file mode 100644 index 0000000..409d13e --- /dev/null +++ b/package/src/types/v1-premier-conferences.ts @@ -0,0 +1,14 @@ +import {PremierConferences, Region} from './general'; + +export type V1PremierConferences = { + id: string; + affinity: Region; + pods: { + pod: string; + name: string; + }[]; + region: 'eu' | 'na' | 'ap' | 'kr'; + timezone: string; + name: PremierConferences; + icon: string; +}; diff --git a/package/src/types/v1-premier-history.ts b/package/src/types/v1-premier-history.ts new file mode 100644 index 0000000..01badbf --- /dev/null +++ b/package/src/types/v1-premier-history.ts @@ -0,0 +1,16 @@ +export type V1PremierHistory = { + league_matches: { + id: string; + points_before: number; + points_after: number; + started_at: string; + }[]; + tournament_matches: { + tournament_id: string; + placement: number; + placement_league_bonus: number; + points_before: number; + points_after: number; + matches: string[]; + }[]; +}; diff --git a/package/src/types/v1-premier-search.ts b/package/src/types/v1-premier-search.ts new file mode 100644 index 0000000..d036176 --- /dev/null +++ b/package/src/types/v1-premier-search.ts @@ -0,0 +1,22 @@ +import {PremierConferences, Region} from './general'; + +export type V1PremierSearch = { + id: string; + name: string; + tag: string; + conference: PremierConferences; + division: number; + region: 'eu' | 'na' | 'ap' | 'kr'; + affinity: Region; + losses: number; + wins: number; + score: number; + ranking: number; + customization: { + icon: string; + image: string; + primary: string; + secondary: string; + tertiary: string; + }; +}; diff --git a/package/src/types/v1-premier.ts b/package/src/types/v1-premier.ts new file mode 100644 index 0000000..1bafd3f --- /dev/null +++ b/package/src/types/v1-premier.ts @@ -0,0 +1,31 @@ +import {PremierConferences} from './general'; + +export type V1Premier = { + id: string; + name: string; + tag: string; + enrolled: boolean; + stats: { + wins: number; + matches: number; + losses: number; + }; + placement: { + points: number; + conference: PremierConferences; + division: number; + place: number; + }; + customization: { + icon: string; + image: string; + primary: string; + secondary: string; + tertiary: string; + }; + member: { + puuid: string; + name: string; + tag: string; + }[]; +}; diff --git a/package/src/vapi.ts b/package/src/vapi.ts index e8db112..c6e2761 100644 --- a/package/src/vapi.ts +++ b/package/src/vapi.ts @@ -194,11 +194,13 @@ export default class { */ async getWebsite({ countryCode, + category, }: { countryCode: 'en-us' | 'en-gb' | 'de-de' | 'es-es' | 'es-mx' | 'fr-fr' | 'it-it' | 'ja-jp' | 'ko-kr' | 'pt-br' | 'ru-ru' | 'tr-tr' | 'vi-vn'; + category?: 'game_updates' | 'dev' | 'esports' | 'announcements' | 'patch_notes'; }): Promise> { this.validateArgs({countryCode}); - return this.fetch(`v1/website/${countryCode}`); + return this.fetch(`v1/website/${countryCode}`, {category}); } /** @@ -445,21 +447,16 @@ export default class { region, seasonFilter, version, - filter, }: { name: string; tag: string; region: Region; seasonFilter?: Season; version?: T; - filter?: Season; }): Promise>> { if (version === 'v1') console.warn('v1 is outdated, please migrate to v2!'); - if (filter) console.warn('filter is outdated! Please use seasonFilter instead'); - if (seasonFilter && filter) throw new TypeError('seasonFilter and filter cannot be both set!'); - this.validateArgs({name, tag, region}); - return this.fetch>(`${version || 'v2'}/mmr/${region}/${name}/${tag}`, {filter: seasonFilter || filter}); + return this.fetch>(`${version || 'v2'}/mmr/${region}/${name}/${tag}`, {season: seasonFilter}); } /** @@ -483,20 +480,16 @@ export default class { region, seasonFilter, version, - filter, }: { puuid: string; region: Region; seasonFilter?: Season; version?: T; - filter?: Season; }): Promise>> { if (version === 'v1') console.warn('v1 is outdated, please migrate to v2!'); - if (filter) console.warn('filter is outdated! Please use seasonFilter instead'); - if (seasonFilter && filter) throw new TypeError('seasonFilter and filter cannot be both set!'); this.validateArgs({puuid, region}); - return this.fetch>(`${version || 'v2'}/by-puuid/mmr/${region}/${puuid}`, {filter: seasonFilter || filter}); + return this.fetch>(`${version || 'v2'}/by-puuid/mmr/${region}/${puuid}`, {season: seasonFilter}); } /** @@ -534,7 +527,7 @@ export default class { }): Promise> { this.validateArgs({name, tag, region}); if (size && (size > 10 || size < 1)) throw new TypeError('Invalid size parameter. Size must be between 1-10!'); - return this.fetch(`v3/matches/${region}/${name}/${tag}`, {filter: gamemodeFilter, map: mapFilter, size}); + return this.fetch(`v3/matches/${region}/${name}/${tag}`, {mode: gamemodeFilter, map: mapFilter, size}); } /** @@ -569,7 +562,7 @@ export default class { }): Promise> { this.validateArgs({name: puuid, region}); if (size && (size > 10 || size < 1)) throw new TypeError('Invalid size parameter. Size must be between 1-10!'); - return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, {filter: gamemodeFilter, map: mapFilter, size}); + return this.fetch(`v3/by-puuid/matches/${region}/${puuid}`, {mode: gamemodeFilter, map: mapFilter, size}); } /** @@ -641,7 +634,7 @@ export default class { size: number; }): Promise> { this.validateArgs({name, tag, region}); - return this.fetch(`v1/lifetime/matches/${region}/${name}/${tag}:`, {gamemodeFilter, mapFilter, page, size}); + return this.fetch(`v1/lifetime/matches/${region}/${name}/${tag}:`, {mode: gamemodeFilter, map: mapFilter, page, size}); } /** From c1fed7e61daeff4f5c275068515c7f01b685194a Mon Sep 17 00:00:00 2001 From: Henrik-3 Date: Tue, 16 May 2023 23:52:31 +0200 Subject: [PATCH 50/50] add premier seasons / leaderboard typings --- package/src/types/general.ts | 3 ++ package/src/types/v1-premier-leaderboard.ts | 22 ++++++++++++++ package/src/types/v1-premier-seasons.ts | 32 +++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 package/src/types/v1-premier-leaderboard.ts create mode 100644 package/src/types/v1-premier-seasons.ts diff --git a/package/src/types/general.ts b/package/src/types/general.ts index 24b08d2..8e40192 100644 --- a/package/src/types/general.ts +++ b/package/src/types/general.ts @@ -89,6 +89,9 @@ export type PremierConferences = | 'AP_OCEANIA' | 'AP_SOUTH_ASIA'; +export type PremierSeasonEventTypes = 'LEAGUE' | 'TOURNAMENT'; +export type PremierSeasonEventMapSelectionTypes = 'RANDOM' | 'PICKBAN'; + export interface APIResponse { /** * Response status diff --git a/package/src/types/v1-premier-leaderboard.ts b/package/src/types/v1-premier-leaderboard.ts new file mode 100644 index 0000000..e4122df --- /dev/null +++ b/package/src/types/v1-premier-leaderboard.ts @@ -0,0 +1,22 @@ +import {PremierConferences, PremierSeasonEventTypes, PremierSeasonEventMapSelectionTypes, ValorantMap, Region} from './general'; + +export type V1PremierLeaderboard = { + id: string; + name: string; + tag: string; + conference: PremierConferences; + division: number; + affinity: Region; + region: 'eu' | 'na' | 'kr' | 'ap'; + losses: number; + wins: number; + score: number; + ranking: number; + customization: { + icons: string; + image: string; + primary: string; + secondary: string; + tertiary: string; + }; +}[]; diff --git a/package/src/types/v1-premier-seasons.ts b/package/src/types/v1-premier-seasons.ts new file mode 100644 index 0000000..2261ac8 --- /dev/null +++ b/package/src/types/v1-premier-seasons.ts @@ -0,0 +1,32 @@ +import {PremierConferences, PremierSeasonEventTypes, PremierSeasonEventMapSelectionTypes, ValorantMap} from './general'; + +type PremierSeasonEvent = { + id: string; + type: PremierSeasonEventTypes; + start_at: string; + ends_at: string; + conference_schedules: { + conference: PremierConferences; + starts_at: string; + ends_at: string; + }[]; + map_selection: { + type: PremierSeasonEventMapSelectionTypes; + maps: { + name: ValorantMap; + id: string; + }[]; + }; + points_required_to_participate: number; +}; + +export type V1PremierSeasons = { + id: string; + championship_event_id: string; + championship_points_required: number; + starts_at: string; + ends_at: string; + enrollment_starts_at: string; + enrollment_ends_at: string; + events: PremierSeasonEvent[]; +}[];