/** * Converts a list of IDs into a list of filenames * @param ids - A list of IDs to be parsed * @returns An array of filenames */ declare function getFilenamesForIDs(ids: string[]): string[]; /** * Returns a list of IDs * @param options - An object containing filtering options * @param [options.ids] - Array of entity IDs to be returned * @param [options.patch] - Maximum patch version to return data for * @param options.type - Entity type to return * @returns An array of entity IDs */ declare function getIDs(options: { ids?: string[]; patch?: string; type: string; }): Promise; /** * Gets data for a subset of skills belonging to a specific list of Pokémon * @param [options = {}] - An object containing filtering options * @param [options.ids] - Array of item IDs to be returned * @param [options.patch] - Maximum patch version to return data for * @param [options.pokemonIDs] - Array of Pokémon IDs to whom the returned skills must belong * @returns An array containing data for each item requested */ declare function getSkillsByPokemonIDs(options?: { ids?: string[]; patch?: string; pokemonIDs?: string[]; }): Promise; /** * Loops through an array of skills and parses enumerable properties into their * representative strings */ declare function parseSkillEnums(skills: Skill[]): void; /** * Returns a limited list of patch versions. * @param patches - The list of patches to filter * @param [version = latest] - The maximum patch version to return * @returns List of patches, clamped to the maximum version */ declare function filterPatches(patches: string[], version?: string): Promise; declare type Reducer = (accumulator: any, currentPatch: string) => Promise | any; /** * Async reducer for building a dataset result for a patch. * @param patches - Array of patches to reduce * @param reducer - May be asynchronous * @returns The compiled accumulator */ declare function patchReduce(patches: string[], reducer: Reducer, accumulator: any): Promise; /** * Given a list of version strings, returns a sorted copy of the original list. * @param versions - A list of versions to be sorted * @returns A sorted copy of the original version list */ declare function sortVersions(versions: string[]): string[]; declare module "@pokebag/data-sdk" { /** * Returns the contents of a directory for a particular version in the dataset. * @param directory - Relative path to a directory inside of the dataset * @param [version = latest] - The version of the dataset to use * @returns An array containing a compiled version of the contents of the requested directory */ function getDirectory(directory: string, version?: string): Promise; /** * Returns data for entities * @param options - An object containing filtering options * @param [options.ids] - Array of entity IDs to be returned * @param [options.patch] - Maximum patch version to return data for * @param options.type - Entity type to return * @returns An array containing data for each item requested */ function getEntities(options: { ids?: string[]; patch?: string; type: string; }): Promise; /** * Returns a set of enums * @example * // returns enums for Pokémon Skill Slot at patch 1.1.1.6 * await getEnums({ * patch: '1.1.1.6', * type: 'pokemon-skill-slot', * }) * @param options - An object containing filtering options * @param [options.patch] - Maximum patch version to return data for * @param options.type - The enum to be retrieved * @returns An object containing the requested enums */ function getEnums(options: { patch?: string; type: string; }): Promise; /** * Returns the contents of a file for a particular version in the dataset. * @param file - Relative path to a file inside of the dataset * @param version - The version of the dataset to use * @returns An array containing a compiled version of the contents of the requested directory */ function getFile(file: string, version: string): Promise; /** * Returns a list of all patches currently available in the dataset. * @returns A list of all available patches */ function getPatches(): Promise; /** * Returns data for held items * @param [options] - An object containing filtering options * @param [options.ids] - Array of item IDs to be returned * @param [options.patch] - Maximum patch version to return data for * @returns An array containing data for each item requested */ function getHeldItems(options?: { ids?: string[]; patch?: string; }): Promise; /** * Returns data for Pokémon * @param [options] - An object containing filtering options * @param [options.ids] - Array of Pokémon IDs to be returned * @param [options.includeSkills] - Flag to include the Pokémon's skills in the response * @param [options.patch] - Maximum patch version to return data for * @returns An array containing data for each Pokémon requested */ function getPokemon(options?: { ids?: string[]; includeSkills?: boolean; patch?: string; }): Promise; /** * Returns data for RSBs * @example * // returns RSBs for Blissey's Egg Bomb and Heal Pulse at patch 1.1.1.6 * await getRSBs({ * ids: [ * 'blissey-egg-bomb-rsb', * 'blissey-heal-pulse-rsb', * ], * patch: '1.1.1.6', * }) * @example * // returns RSBs for Absol and Crustle * await getRSBs({ * pokemonIDs: [ * 'absol', * 'crustle', * ], * }) * @example * // returns RSBs for Garchomp's Dig * await getRSBs({ * skillIDs: ['garchomp-dig'], * }) * @example * // returns all RSBs for Crustle, as well as RSBs for Blissey's Egg Bomb and Heal Pulse * await getRSBs({ * pokemonIDs: ['crustle'], * skillIDs: [ * 'blissey-egg-bomb', * 'blissey-heal-pulse', * ], * }) * @param [options] - An object containing filtering options * @param [options.ids] - Array of RSB IDs to be returned * @param [options.pokemonIDs] - Array of Pokémon IDs to whom the returned RSBs must belong * @param [options.skillIDs] - Array of skill IDs to whom the returned RSBs must belong * @param [options.patch] - Maximum patch version to return data for * @returns An array containing data for each RSB requested */ function getRSBs(options?: { ids?: string[]; pokemonIDs?: string[]; skillIDs?: string[]; patch?: string; }): Promise; /** * Gets data for skills * @param [options = {}] - An object containing filtering options * @param [options.ids] - Array of skill IDs to be returned * @param [options.parseEnums = true] - Whether or not parse enumerable properties * @param [options.patch] - Maximum patch version to return data for * @param [options.pokemonIDs] - Array of Pokémon IDs to whom the returned skills must belong * @returns An array containing data for each skill requested */ function getSkills(options?: { ids?: string[]; parseEnums?: boolean; patch?: string; pokemonIDs?: string[]; }): Promise; } /** * Held item stat * @property [formula] - A formula that can be evaluated to determine the value of this item's stat, usually based on the item's level * @property [type] - Whether the result of the stat's formula should be interpreted as a flat value or a percentage */ declare type HeldItemStat = { formula?: string; type?: 'flat' | 'percentage'; }; /** * Held item stats * @property [attack] - Describes how this item modifies the Pokémon's attack damage. * @property [attackSpeed] - Describes how this item modifies the Pokémon's attack speed. * @property [cooldown] - Describes how this item modifies the Pokémon's attack cooldown. * @property [critDamage] - Describes how this item modifies the Pokémon's damage when it scores a critical hit. * @property [critRate] - Describes how this item modifies the Pokémon's likelihood of scoring a critical hit. * @property [defense] - Describes how this item modifies the Pokémon's defense. * @property [hp] - Describes how this item modifies the Pokémon's hit points. * @property [hpRecovery] - Describes how this item modifies the Pokémon's hit point recovery speed. * @property [movementSpeed] - Describes how this item modifies the Pokémon's movement speed. * @property [spAttack] - Describes how this item modifies the Pokémon's special attack damage. * @property [spDefense] - Describes how this item modifies the Pokémon's special defense. * @property [uniteMoveChargeRate] - Describes how this item modifies the Pokémon's Unite move charge rate. */ declare type HeldItemStats = { attack?: HeldItemStat; attackSpeed?: HeldItemStat; cooldown?: HeldItemStat; critDamage?: HeldItemStat; critRate?: HeldItemStat; defense?: HeldItemStat; hp?: HeldItemStat; hpRecovery?: HeldItemStat; movementSpeed?: HeldItemStat; spAttack?: HeldItemStat; spDefense?: HeldItemStat; uniteMoveChargeRate?: HeldItemStat; }; /** * A held item * @property displayName - The display name of the item * @property description - A description of the item * @property tags - An array of tags that apply to the * @property special - An object containing information about the passive bonus provided by the item * @property special.description - A template string for the description of the item's passive bonus * @property special.boons - An object representing the item's passive bonus and how it changes with the item's level * @property stats - An object containing information about how the item affects the holding Pokémon's stats */ declare type HeldItem = { displayName: string; description: string; id: string; tags: string[]; special: { description: string; boons: any; }; stats: HeldItemStats; }; /** * Ratings for a Pokémon */ declare type PokemonRatings = { assistance: number; combat: number; mobility: number; resistance: number; scoring: number; total: number; }; /** * A Pokémon's stat block */ declare type PokemonStat = { attack: number; defense: number; hp: number; spAttack: number; spDefense: number; }; /** * An object containing the various tags for a Pokémon */ declare type PokemonTags = { range: number; difficulty: number; role: number; }; /** * A Pokémon */ declare type Pokemon = { displayName: string; damageType: string; id: string; tags: PokemonTags; ratings: PokemonRatings; skills?: Skill[]; stats: PokemonStat[]; }; /** * An RSB hit */ declare type RSBHit = { base: number; damageType: string; label: string; ratio: number; slider: number; }; /** * An RSB */ declare type RSB = { id: string; skillID: string; pokemonID: string; hits: RSBHit[]; }; /** * A Pokémon's special ability * @property cooldown - The amount of time the ability requires to recharge after use * @property description - A description of the ability * @property displayName - The display name of the ability * @property id - The skill's ID, prefixed by the name of the Pokémon to whom the skill belongs * @property pokemonID - The ID of the Pokémon to whom the skill belongs * @property requires - A list of requirements that must be met for a Pokémon to be allowed to have the skill * @property slot - The slot in which this ability can be set * @property type - The attack category of this skill */ declare type Skill = { cooldown: number; description: string; displayName: string; id: string; pokemonID: string; requires: string[]; slot: number; type: number; };