UNPKG

@blizzard-api/wow

Version:

A series of helpers to interact with the World of Warcraft Blizzard API

128 lines (127 loc) 4.13 kB
import { KeyBase, MediaAsset, NameId, NameIdKey, NullishNameIdKey, Resource, ResponseBase } from "@blizzard-api/core"; //#region src/profession/types.d.ts /** * The response for a profession index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface ProfessionIndexResponse extends ResponseBase { professions: Array<NameIdKey>; } /** * The response for a profession media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface ProfessionMediaResponse extends ResponseBase { assets: Array<MediaAsset>; id: number; } /** * The response for a profession. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface ProfessionResponse extends NameId, ResponseBase { description: string; media: Media; skill_tiers: Array<NameIdKey>; type: Type; } /** * The response for a profession skill tier. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface ProfessionSkillTierResponse extends NameId, ResponseBase { categories: Array<Category>; maximum_skill_level: number; minimum_skill_level: number; } /** * The response for a recipe media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface RecipeMediaResponse extends ResponseBase { assets: Array<MediaAsset>; id: number; } /** * The response for a recipe. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ interface RecipeResponse extends NameId, ResponseBase { alliance_crafted_item?: NameIdKey; crafted_item?: NameIdKey; crafted_quantity?: CraftedQuantity; description?: null | string; horde_crafted_item?: NameIdKey; media: Media; modified_crafting_slots?: Array<ModifiedCraftSlot>; rank?: number; reagents?: Array<Reagent>; } interface Category { name: string; recipes: Array<NullishNameIdKey>; } interface CraftedQuantity { maximum?: number; minimum?: number; value?: number; } interface Media extends KeyBase { id: number; } interface ModifiedCraftSlot { display_order: number; slot_type: KeyBase & { id: number; name?: string; }; } interface Reagent { quantity: number; reagent: NameIdKey; } interface Type { name: string; type: string; } //#endregion //#region src/profession/index.d.ts /** * Get a profession by ID. * @param professionId The profession ID. * @returns The profession. See {@link ProfessionResponse}. */ declare function profession(professionId: number): Resource<ProfessionResponse>; /** * Get a profession index. * @returns The profession index. See {@link ProfessionIndexResponse}. */ declare function professionIndex(): Resource<ProfessionIndexResponse>; /** * Get profession media by ID. * @param professionId The profession ID. * @returns The profession media. See {@link ProfessionMediaResponse}. */ declare function professionMedia(professionId: number): Resource<ProfessionMediaResponse>; /** * Get a profession's skill tier by ID. * @param professionId The profession ID. * @param skillTierId The skill tier ID. * @returns The profession's skill tier. See {@link ProfessionSkillTierResponse}. */ declare function professionSkillTier(professionId: number, skillTierId: number): Resource<ProfessionSkillTierResponse>; /** * Get a recipe by ID. * @param recipeId The recipe ID. * @returns The recipe. See {@link RecipeResponse}. */ declare function recipe(recipeId: number): Resource<RecipeResponse>; /** * Get recipe media by ID. * @param recipeId The recipe ID. * @returns The recipe media. See {@link RecipeMediaResponse}. */ declare function recipeMedia(recipeId: number): Resource<RecipeMediaResponse>; //#endregion export { recipe as a, ProfessionMediaResponse as c, RecipeMediaResponse as d, RecipeResponse as f, professionSkillTier as i, ProfessionResponse as l, professionIndex as n, recipeMedia as o, professionMedia as r, ProfessionIndexResponse as s, profession as t, ProfessionSkillTierResponse as u }; //# sourceMappingURL=index-KLfmlscW2.d.ts.map