@pinta365/blizzard_api 0.3.9 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +145 -37
- package/esm/mod.d.ts +43 -6
- package/esm/mod.js +69 -6
- package/esm/src/client.d.ts +95 -0
- package/esm/src/client.js +52 -0
- package/esm/src/diablo3/community/act.d.ts +29 -0
- package/esm/src/diablo3/community/act.js +23 -0
- package/esm/src/diablo3/community/artisan.d.ts +50 -0
- package/esm/src/diablo3/community/artisan.js +25 -0
- package/esm/src/diablo3/community/follower.d.ts +25 -0
- package/esm/src/diablo3/community/follower.js +12 -0
- package/esm/src/diablo3/community/hero.d.ts +57 -0
- package/esm/src/diablo3/community/hero.js +25 -0
- package/esm/src/diablo3/community/item.d.ts +48 -0
- package/esm/src/diablo3/community/item.js +12 -0
- package/esm/src/diablo3/community/item_type.d.ts +26 -0
- package/esm/src/diablo3/community/item_type.js +23 -0
- package/esm/src/diablo3/community/profile.d.ts +352 -0
- package/esm/src/diablo3/community/profile.js +61 -0
- package/esm/src/diablo3/game_data/d3.d.ts +127 -0
- package/esm/src/diablo3/game_data/d3.js +72 -0
- package/esm/src/diablo3/index.d.ts +8 -0
- package/esm/src/diablo3/index.js +8 -0
- package/esm/src/diablo3/types.d.ts +8 -0
- package/esm/src/diablo3/types.js +1 -0
- package/esm/src/generated/diablo3_api.d.ts +156 -0
- package/esm/src/generated/diablo3_api.js +2 -0
- package/esm/src/generated/hearthstone_api.d.ts +51 -0
- package/esm/src/generated/hearthstone_api.js +2 -0
- package/esm/src/generated/sc2_api.d.ts +139 -0
- package/esm/src/generated/sc2_api.js +2 -0
- package/esm/src/generated/wow_api.d.ts +1482 -0
- package/esm/src/generated/wow_api.js +2 -0
- package/esm/src/generated/wow_classic_api.d.ts +555 -0
- package/esm/src/generated/wow_classic_api.js +2 -0
- package/esm/src/generated/wow_classic_era_api.d.ts +418 -0
- package/esm/src/generated/wow_classic_era_api.js +2 -0
- package/esm/src/hearthstone/game_data/card_backs.d.ts +31 -0
- package/esm/src/hearthstone/game_data/card_backs.js +22 -0
- package/esm/src/hearthstone/game_data/cards.d.ts +55 -0
- package/esm/src/hearthstone/game_data/cards.js +26 -0
- package/esm/src/hearthstone/game_data/decks.d.ts +29 -0
- package/esm/src/hearthstone/game_data/decks.js +13 -0
- package/esm/src/hearthstone/game_data/metadata.d.ts +82 -0
- package/esm/src/hearthstone/game_data/metadata.js +11 -0
- package/esm/src/hearthstone/index.d.ts +4 -0
- package/esm/src/hearthstone/index.js +4 -0
- package/esm/src/hearthstone/search.d.ts +21 -0
- package/esm/src/hearthstone/search.js +28 -0
- package/esm/src/hearthstone/types.d.ts +5 -0
- package/esm/src/hearthstone/types.js +1 -0
- package/esm/src/shared/bind.d.ts +14 -0
- package/esm/src/shared/bind.js +15 -0
- package/esm/src/shared/context.d.ts +163 -0
- package/esm/src/shared/context.js +304 -0
- package/esm/src/shared/errors.d.ts +53 -0
- package/esm/src/shared/errors.js +95 -0
- package/esm/src/shared/index.d.ts +4 -0
- package/esm/src/shared/index.js +2 -0
- package/esm/src/shared/types.d.ts +133 -0
- package/esm/src/shared/types.js +2 -0
- package/esm/src/starcraft2/community/account.d.ts +19 -0
- package/esm/src/starcraft2/community/account.js +15 -0
- package/esm/src/starcraft2/community/ladder.d.ts +29 -0
- package/esm/src/starcraft2/community/ladder.js +27 -0
- package/esm/src/starcraft2/community/legacy.d.ts +206 -0
- package/esm/src/starcraft2/community/legacy.js +83 -0
- package/esm/src/starcraft2/community/profile.d.ts +255 -0
- package/esm/src/starcraft2/community/profile.js +73 -0
- package/esm/src/starcraft2/game_data/league.d.ts +35 -0
- package/esm/src/starcraft2/game_data/league.js +20 -0
- package/esm/src/starcraft2/index.d.ts +5 -0
- package/esm/src/starcraft2/index.js +5 -0
- package/esm/src/starcraft2/types.d.ts +5 -0
- package/esm/src/starcraft2/types.js +1 -0
- package/esm/src/wow/game_data/achievement.d.ts +87 -0
- package/esm/src/wow/game_data/achievement.js +68 -0
- package/esm/src/wow/game_data/auction_house.d.ts +65 -0
- package/esm/src/wow/game_data/auction_house.js +33 -0
- package/esm/src/wow/game_data/azerite_essence.d.ts +50 -0
- package/esm/src/wow/game_data/azerite_essence.js +48 -0
- package/esm/src/wow/game_data/connected_realm.d.ts +62 -0
- package/esm/src/wow/game_data/connected_realm.js +35 -0
- package/esm/src/wow/game_data/covenant.d.ts +115 -0
- package/esm/src/wow/game_data/covenant.js +88 -0
- package/esm/src/wow/game_data/creature.d.ts +98 -0
- package/esm/src/wow/game_data/creature.js +99 -0
- package/esm/src/wow/game_data/guild_crest.d.ts +56 -0
- package/esm/src/wow/game_data/guild_crest.js +38 -0
- package/esm/src/wow/game_data/heirloom.d.ts +82 -0
- package/esm/src/wow/game_data/heirloom.js +25 -0
- package/esm/src/wow/game_data/housing.d.ts +111 -0
- package/esm/src/wow/game_data/housing.js +124 -0
- package/esm/src/wow/game_data/item.d.ts +183 -0
- package/esm/src/wow/game_data/item.js +100 -0
- package/esm/src/wow/game_data/item_appearance.d.ts +102 -0
- package/esm/src/wow/game_data/item_appearance.js +73 -0
- package/esm/src/wow/game_data/journal.d.ts +124 -0
- package/esm/src/wow/game_data/journal.js +98 -0
- package/esm/src/wow/game_data/keystone_affix.d.ts +39 -0
- package/esm/src/wow/game_data/keystone_affix.js +38 -0
- package/esm/src/wow/game_data/media_search.d.ts +9 -0
- package/esm/src/wow/game_data/media_search.js +10 -0
- package/esm/src/wow/game_data/modified_crafting.d.ts +65 -0
- package/esm/src/wow/game_data/modified_crafting.js +62 -0
- package/esm/src/wow/game_data/mount.d.ts +38 -0
- package/esm/src/wow/game_data/mount.js +35 -0
- package/esm/src/wow/game_data/mythic_keystone_dungeon.d.ts +92 -0
- package/esm/src/wow/game_data/mythic_keystone_dungeon.js +87 -0
- package/esm/src/wow/game_data/mythic_keystone_leaderboard.d.ts +70 -0
- package/esm/src/wow/game_data/mythic_keystone_leaderboard.js +28 -0
- package/esm/src/wow/game_data/mythic_raid_leaderboard.d.ts +36 -0
- package/esm/src/wow/game_data/mythic_raid_leaderboard.js +14 -0
- package/esm/src/wow/game_data/neighborhood.d.ts +36 -0
- package/esm/src/wow/game_data/neighborhood.js +38 -0
- package/esm/src/wow/game_data/pet.d.ts +93 -0
- package/esm/src/wow/game_data/pet.js +76 -0
- package/esm/src/wow/game_data/playable_class.d.ts +58 -0
- package/esm/src/wow/game_data/playable_class.js +51 -0
- package/esm/src/wow/game_data/playable_race.d.ts +31 -0
- package/esm/src/wow/game_data/playable_race.js +25 -0
- package/esm/src/wow/game_data/playable_specialization.d.ts +63 -0
- package/esm/src/wow/game_data/playable_specialization.js +38 -0
- package/esm/src/wow/game_data/power_type.d.ts +22 -0
- package/esm/src/wow/game_data/power_type.js +25 -0
- package/esm/src/wow/game_data/profession.d.ts +88 -0
- package/esm/src/wow/game_data/profession.js +78 -0
- package/esm/src/wow/game_data/pvp_season.d.ts +108 -0
- package/esm/src/wow/game_data/pvp_season.js +66 -0
- package/esm/src/wow/game_data/pvp_tier.d.ts +41 -0
- package/esm/src/wow/game_data/pvp_tier.js +38 -0
- package/esm/src/wow/game_data/quest.d.ts +116 -0
- package/esm/src/wow/game_data/quest.js +100 -0
- package/esm/src/wow/game_data/realm.d.ts +43 -0
- package/esm/src/wow/game_data/realm.js +35 -0
- package/esm/src/wow/game_data/region.d.ts +26 -0
- package/esm/src/wow/game_data/region.js +25 -0
- package/esm/src/wow/game_data/reputations.d.ts +57 -0
- package/esm/src/wow/game_data/reputations.js +50 -0
- package/esm/src/wow/game_data/spell.d.ts +34 -0
- package/esm/src/wow/game_data/spell.js +36 -0
- package/esm/src/wow/game_data/talent.d.ts +143 -0
- package/esm/src/wow/game_data/talent.js +89 -0
- package/esm/src/wow/game_data/tech_talent.d.ts +72 -0
- package/esm/src/wow/game_data/tech_talent.js +63 -0
- package/esm/src/wow/game_data/title.d.ts +33 -0
- package/esm/src/wow/game_data/title.js +25 -0
- package/esm/src/wow/game_data/token.d.ts +17 -0
- package/esm/src/wow/game_data/token.js +18 -0
- package/esm/src/wow/game_data/toy.d.ts +25 -0
- package/esm/src/wow/game_data/toy.js +25 -0
- package/esm/src/wow/index.d.ts +59 -0
- package/esm/src/wow/index.js +61 -0
- package/esm/src/wow/profile/account_profile.d.ts +185 -0
- package/esm/src/wow/profile/account_profile.js +132 -0
- package/esm/src/wow/profile/character_achievements.d.ts +88 -0
- package/esm/src/wow/profile/character_achievements.js +28 -0
- package/esm/src/wow/profile/character_appearance.d.ts +79 -0
- package/esm/src/wow/profile/character_appearance.js +14 -0
- package/esm/src/wow/profile/character_collections.d.ts +132 -0
- package/esm/src/wow/profile/character_collections.js +98 -0
- package/esm/src/wow/profile/character_encounters.d.ts +78 -0
- package/esm/src/wow/profile/character_encounters.js +42 -0
- package/esm/src/wow/profile/character_equipment.d.ts +177 -0
- package/esm/src/wow/profile/character_equipment.js +14 -0
- package/esm/src/wow/profile/character_house.d.ts +16 -0
- package/esm/src/wow/profile/character_house.js +17 -0
- package/esm/src/wow/profile/character_hunter_pets.d.ts +22 -0
- package/esm/src/wow/profile/character_hunter_pets.js +14 -0
- package/esm/src/wow/profile/character_media.d.ts +14 -0
- package/esm/src/wow/profile/character_media.js +14 -0
- package/esm/src/wow/profile/character_mythic_keystone_profile.d.ts +70 -0
- package/esm/src/wow/profile/character_mythic_keystone_profile.js +31 -0
- package/esm/src/wow/profile/character_professions.d.ts +29 -0
- package/esm/src/wow/profile/character_professions.js +14 -0
- package/esm/src/wow/profile/character_profile.d.ts +83 -0
- package/esm/src/wow/profile/character_profile.js +39 -0
- package/esm/src/wow/profile/character_pvp.d.ts +53 -0
- package/esm/src/wow/profile/character_pvp.js +29 -0
- package/esm/src/wow/profile/character_quests.d.ts +29 -0
- package/esm/src/wow/profile/character_quests.js +28 -0
- package/esm/src/wow/profile/character_reputations.d.ts +30 -0
- package/esm/src/wow/profile/character_reputations.js +14 -0
- package/esm/src/wow/profile/character_soulbinds.d.ts +31 -0
- package/esm/src/wow/profile/character_soulbinds.js +14 -0
- package/esm/src/wow/profile/character_specializations.d.ts +82 -0
- package/esm/src/wow/profile/character_specializations.js +14 -0
- package/esm/src/wow/profile/character_statistics.d.ts +104 -0
- package/esm/src/wow/profile/character_statistics.js +14 -0
- package/esm/src/wow/profile/character_titles.d.ts +14 -0
- package/esm/src/wow/profile/character_titles.js +14 -0
- package/esm/src/wow/profile/guild.d.ts +150 -0
- package/esm/src/wow/profile/guild.js +56 -0
- package/esm/src/wow/search.d.ts +23 -0
- package/esm/src/wow/search.js +29 -0
- package/esm/src/wow/types.d.ts +58 -0
- package/esm/src/wow/types.js +1 -0
- package/esm/src/wow_classic/auction_house.d.ts +41 -0
- package/esm/src/wow_classic/auction_house.js +31 -0
- package/esm/src/wow_classic/character_specializations.d.ts +45 -0
- package/esm/src/wow_classic/character_specializations.js +18 -0
- package/esm/src/wow_classic/era.d.ts +8 -0
- package/esm/src/wow_classic/era.js +10 -0
- package/esm/src/wow_classic/index.d.ts +15 -0
- package/esm/src/wow_classic/index.js +17 -0
- package/esm/src/wow_classic/profile_overrides.d.ts +125 -0
- package/esm/src/wow_classic/profile_overrides.js +111 -0
- package/esm/src/wow_classic/shared.d.ts +23 -0
- package/esm/src/wow_classic/shared.js +26 -0
- package/esm/src/wow_classic/types.d.ts +3 -0
- package/esm/src/wow_classic/types.js +1 -0
- package/package.json +23 -2
- package/script/mod.d.ts +43 -6
- package/script/mod.js +91 -21
- package/script/src/client.d.ts +95 -0
- package/script/src/client.js +89 -0
- package/script/src/diablo3/community/act.d.ts +29 -0
- package/script/src/diablo3/community/act.js +27 -0
- package/script/src/diablo3/community/artisan.d.ts +50 -0
- package/script/src/diablo3/community/artisan.js +29 -0
- package/script/src/diablo3/community/follower.d.ts +25 -0
- package/script/src/diablo3/community/follower.js +15 -0
- package/script/src/diablo3/community/hero.d.ts +57 -0
- package/script/src/diablo3/community/hero.js +29 -0
- package/script/src/diablo3/community/item.d.ts +48 -0
- package/script/src/diablo3/community/item.js +15 -0
- package/script/src/diablo3/community/item_type.d.ts +26 -0
- package/script/src/diablo3/community/item_type.js +27 -0
- package/script/src/diablo3/community/profile.d.ts +352 -0
- package/script/src/diablo3/community/profile.js +67 -0
- package/script/src/diablo3/game_data/d3.d.ts +127 -0
- package/script/src/diablo3/game_data/d3.js +80 -0
- package/script/src/diablo3/index.d.ts +8 -0
- package/script/src/diablo3/index.js +31 -0
- package/script/src/diablo3/types.d.ts +8 -0
- package/script/src/diablo3/types.js +2 -0
- package/script/src/generated/diablo3_api.d.ts +156 -0
- package/script/src/generated/diablo3_api.js +3 -0
- package/script/src/generated/hearthstone_api.d.ts +51 -0
- package/script/src/generated/hearthstone_api.js +3 -0
- package/script/src/generated/sc2_api.d.ts +139 -0
- package/script/src/generated/sc2_api.js +3 -0
- package/script/src/generated/wow_api.d.ts +1482 -0
- package/script/src/generated/wow_api.js +3 -0
- package/script/src/generated/wow_classic_api.d.ts +555 -0
- package/script/src/generated/wow_classic_api.js +3 -0
- package/script/src/generated/wow_classic_era_api.d.ts +418 -0
- package/script/src/generated/wow_classic_era_api.js +3 -0
- package/script/src/hearthstone/game_data/card_backs.d.ts +31 -0
- package/script/src/hearthstone/game_data/card_backs.js +26 -0
- package/script/src/hearthstone/game_data/cards.d.ts +55 -0
- package/script/src/hearthstone/game_data/cards.js +30 -0
- package/script/src/hearthstone/game_data/decks.d.ts +29 -0
- package/script/src/hearthstone/game_data/decks.js +16 -0
- package/script/src/hearthstone/game_data/metadata.d.ts +82 -0
- package/script/src/hearthstone/game_data/metadata.js +14 -0
- package/script/src/hearthstone/index.d.ts +4 -0
- package/script/src/hearthstone/index.js +13 -0
- package/script/src/hearthstone/search.d.ts +21 -0
- package/script/src/hearthstone/search.js +31 -0
- package/script/src/hearthstone/types.d.ts +5 -0
- package/script/src/hearthstone/types.js +2 -0
- package/script/src/shared/bind.d.ts +14 -0
- package/script/src/shared/bind.js +18 -0
- package/script/src/shared/context.d.ts +163 -0
- package/script/src/shared/context.js +312 -0
- package/script/src/shared/errors.d.ts +53 -0
- package/script/src/shared/errors.js +104 -0
- package/script/src/shared/index.d.ts +4 -0
- package/script/src/shared/index.js +10 -0
- package/script/src/shared/types.d.ts +133 -0
- package/script/src/shared/types.js +3 -0
- package/script/src/starcraft2/community/account.d.ts +19 -0
- package/script/src/starcraft2/community/account.js +18 -0
- package/script/src/starcraft2/community/ladder.d.ts +29 -0
- package/script/src/starcraft2/community/ladder.js +31 -0
- package/script/src/starcraft2/community/legacy.d.ts +206 -0
- package/script/src/starcraft2/community/legacy.js +91 -0
- package/script/src/starcraft2/community/profile.d.ts +255 -0
- package/script/src/starcraft2/community/profile.js +80 -0
- package/script/src/starcraft2/game_data/league.d.ts +35 -0
- package/script/src/starcraft2/game_data/league.js +23 -0
- package/script/src/starcraft2/index.d.ts +5 -0
- package/script/src/starcraft2/index.js +23 -0
- package/script/src/starcraft2/types.d.ts +5 -0
- package/script/src/starcraft2/types.js +2 -0
- package/script/src/wow/game_data/achievement.d.ts +87 -0
- package/script/src/wow/game_data/achievement.js +75 -0
- package/script/src/wow/game_data/auction_house.d.ts +65 -0
- package/script/src/wow/game_data/auction_house.js +37 -0
- package/script/src/wow/game_data/azerite_essence.d.ts +50 -0
- package/script/src/wow/game_data/azerite_essence.js +54 -0
- package/script/src/wow/game_data/connected_realm.d.ts +62 -0
- package/script/src/wow/game_data/connected_realm.js +40 -0
- package/script/src/wow/game_data/covenant.d.ts +115 -0
- package/script/src/wow/game_data/covenant.js +97 -0
- package/script/src/wow/game_data/creature.d.ts +98 -0
- package/script/src/wow/game_data/creature.js +109 -0
- package/script/src/wow/game_data/guild_crest.d.ts +56 -0
- package/script/src/wow/game_data/guild_crest.js +43 -0
- package/script/src/wow/game_data/heirloom.d.ts +82 -0
- package/script/src/wow/game_data/heirloom.js +29 -0
- package/script/src/wow/game_data/housing.d.ts +111 -0
- package/script/src/wow/game_data/housing.js +138 -0
- package/script/src/wow/game_data/item.d.ts +183 -0
- package/script/src/wow/game_data/item.js +110 -0
- package/script/src/wow/game_data/item_appearance.d.ts +102 -0
- package/script/src/wow/game_data/item_appearance.js +81 -0
- package/script/src/wow/game_data/journal.d.ts +124 -0
- package/script/src/wow/game_data/journal.js +108 -0
- package/script/src/wow/game_data/keystone_affix.d.ts +39 -0
- package/script/src/wow/game_data/keystone_affix.js +43 -0
- package/script/src/wow/game_data/media_search.d.ts +9 -0
- package/script/src/wow/game_data/media_search.js +13 -0
- package/script/src/wow/game_data/modified_crafting.d.ts +65 -0
- package/script/src/wow/game_data/modified_crafting.js +69 -0
- package/script/src/wow/game_data/mount.d.ts +38 -0
- package/script/src/wow/game_data/mount.js +40 -0
- package/script/src/wow/game_data/mythic_keystone_dungeon.d.ts +92 -0
- package/script/src/wow/game_data/mythic_keystone_dungeon.js +96 -0
- package/script/src/wow/game_data/mythic_keystone_leaderboard.d.ts +70 -0
- package/script/src/wow/game_data/mythic_keystone_leaderboard.js +32 -0
- package/script/src/wow/game_data/mythic_raid_leaderboard.d.ts +36 -0
- package/script/src/wow/game_data/mythic_raid_leaderboard.js +17 -0
- package/script/src/wow/game_data/neighborhood.d.ts +36 -0
- package/script/src/wow/game_data/neighborhood.js +43 -0
- package/script/src/wow/game_data/pet.d.ts +93 -0
- package/script/src/wow/game_data/pet.js +84 -0
- package/script/src/wow/game_data/playable_class.d.ts +58 -0
- package/script/src/wow/game_data/playable_class.js +57 -0
- package/script/src/wow/game_data/playable_race.d.ts +31 -0
- package/script/src/wow/game_data/playable_race.js +29 -0
- package/script/src/wow/game_data/playable_specialization.d.ts +63 -0
- package/script/src/wow/game_data/playable_specialization.js +43 -0
- package/script/src/wow/game_data/power_type.d.ts +22 -0
- package/script/src/wow/game_data/power_type.js +29 -0
- package/script/src/wow/game_data/profession.d.ts +88 -0
- package/script/src/wow/game_data/profession.js +86 -0
- package/script/src/wow/game_data/pvp_season.d.ts +108 -0
- package/script/src/wow/game_data/pvp_season.js +73 -0
- package/script/src/wow/game_data/pvp_tier.d.ts +41 -0
- package/script/src/wow/game_data/pvp_tier.js +43 -0
- package/script/src/wow/game_data/quest.d.ts +116 -0
- package/script/src/wow/game_data/quest.js +110 -0
- package/script/src/wow/game_data/realm.d.ts +43 -0
- package/script/src/wow/game_data/realm.js +40 -0
- package/script/src/wow/game_data/region.d.ts +26 -0
- package/script/src/wow/game_data/region.js +29 -0
- package/script/src/wow/game_data/reputations.d.ts +57 -0
- package/script/src/wow/game_data/reputations.js +56 -0
- package/script/src/wow/game_data/spell.d.ts +34 -0
- package/script/src/wow/game_data/spell.js +41 -0
- package/script/src/wow/game_data/talent.d.ts +143 -0
- package/script/src/wow/game_data/talent.js +98 -0
- package/script/src/wow/game_data/tech_talent.d.ts +72 -0
- package/script/src/wow/game_data/tech_talent.js +70 -0
- package/script/src/wow/game_data/title.d.ts +33 -0
- package/script/src/wow/game_data/title.js +29 -0
- package/script/src/wow/game_data/token.d.ts +17 -0
- package/script/src/wow/game_data/token.js +21 -0
- package/script/src/wow/game_data/toy.d.ts +25 -0
- package/script/src/wow/game_data/toy.js +29 -0
- package/script/src/wow/index.d.ts +59 -0
- package/script/src/wow/index.js +272 -0
- package/script/src/wow/profile/account_profile.d.ts +185 -0
- package/script/src/wow/profile/account_profile.js +143 -0
- package/script/src/wow/profile/character_achievements.d.ts +88 -0
- package/script/src/wow/profile/character_achievements.js +32 -0
- package/script/src/wow/profile/character_appearance.d.ts +79 -0
- package/script/src/wow/profile/character_appearance.js +17 -0
- package/script/src/wow/profile/character_collections.d.ts +132 -0
- package/script/src/wow/profile/character_collections.js +107 -0
- package/script/src/wow/profile/character_encounters.d.ts +78 -0
- package/script/src/wow/profile/character_encounters.js +47 -0
- package/script/src/wow/profile/character_equipment.d.ts +177 -0
- package/script/src/wow/profile/character_equipment.js +17 -0
- package/script/src/wow/profile/character_house.d.ts +16 -0
- package/script/src/wow/profile/character_house.js +20 -0
- package/script/src/wow/profile/character_hunter_pets.d.ts +22 -0
- package/script/src/wow/profile/character_hunter_pets.js +17 -0
- package/script/src/wow/profile/character_media.d.ts +14 -0
- package/script/src/wow/profile/character_media.js +17 -0
- package/script/src/wow/profile/character_mythic_keystone_profile.d.ts +70 -0
- package/script/src/wow/profile/character_mythic_keystone_profile.js +35 -0
- package/script/src/wow/profile/character_professions.d.ts +29 -0
- package/script/src/wow/profile/character_professions.js +17 -0
- package/script/src/wow/profile/character_profile.d.ts +83 -0
- package/script/src/wow/profile/character_profile.js +43 -0
- package/script/src/wow/profile/character_pvp.d.ts +53 -0
- package/script/src/wow/profile/character_pvp.js +33 -0
- package/script/src/wow/profile/character_quests.d.ts +29 -0
- package/script/src/wow/profile/character_quests.js +32 -0
- package/script/src/wow/profile/character_reputations.d.ts +30 -0
- package/script/src/wow/profile/character_reputations.js +17 -0
- package/script/src/wow/profile/character_soulbinds.d.ts +31 -0
- package/script/src/wow/profile/character_soulbinds.js +17 -0
- package/script/src/wow/profile/character_specializations.d.ts +82 -0
- package/script/src/wow/profile/character_specializations.js +17 -0
- package/script/src/wow/profile/character_statistics.d.ts +104 -0
- package/script/src/wow/profile/character_statistics.js +17 -0
- package/script/src/wow/profile/character_titles.d.ts +14 -0
- package/script/src/wow/profile/character_titles.js +17 -0
- package/script/src/wow/profile/guild.d.ts +150 -0
- package/script/src/wow/profile/guild.js +62 -0
- package/script/src/wow/search.d.ts +23 -0
- package/script/src/wow/search.js +32 -0
- package/script/src/wow/types.d.ts +58 -0
- package/script/src/wow/types.js +2 -0
- package/script/src/wow_classic/auction_house.d.ts +41 -0
- package/script/src/wow_classic/auction_house.js +35 -0
- package/script/src/wow_classic/character_specializations.d.ts +45 -0
- package/script/src/wow_classic/character_specializations.js +21 -0
- package/script/src/wow_classic/era.d.ts +8 -0
- package/script/src/wow_classic/era.js +30 -0
- package/script/src/wow_classic/index.d.ts +15 -0
- package/script/src/wow_classic/index.js +55 -0
- package/script/src/wow_classic/profile_overrides.d.ts +125 -0
- package/script/src/wow_classic/profile_overrides.js +123 -0
- package/script/src/wow_classic/shared.d.ts +23 -0
- package/script/src/wow_classic/shared.js +81 -0
- package/script/src/wow_classic/types.d.ts +3 -0
- package/script/src/wow_classic/types.js +2 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides interfaces and API function definitions for fetching World of Warcraft housing data (decor, fixtures, fixture hooks, rooms) using the Blizzard API.
|
|
3
|
+
*/
|
|
4
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
5
|
+
import type { Href, LinkSelfHref, NamedRef } from "../../shared/index.js";
|
|
6
|
+
import type { Search, SearchParameters } from "../search.js";
|
|
7
|
+
export interface Decors extends LinkSelfHref {
|
|
8
|
+
decor_items: NamedRef[];
|
|
9
|
+
}
|
|
10
|
+
export interface Decor extends LinkSelfHref {
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
/** Reference to the in-game item (a single item despite the plural name). */
|
|
14
|
+
items: NamedRef;
|
|
15
|
+
/** How many of this decor a new collection starts with. */
|
|
16
|
+
default_collection_count: number;
|
|
17
|
+
}
|
|
18
|
+
export interface Fixtures extends LinkSelfHref {
|
|
19
|
+
fixtures: {
|
|
20
|
+
key: Href;
|
|
21
|
+
name: string | null;
|
|
22
|
+
id: number;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
export interface Fixture extends LinkSelfHref {
|
|
26
|
+
id: number;
|
|
27
|
+
name: string;
|
|
28
|
+
/** Fixture hooks (e.g. Door, Window) on this fixture. Absent when the fixture has none. */
|
|
29
|
+
hooks?: NamedRef[];
|
|
30
|
+
}
|
|
31
|
+
export interface FixtureHooks extends LinkSelfHref {
|
|
32
|
+
fixture_hooks: NamedRef[];
|
|
33
|
+
}
|
|
34
|
+
export interface FixtureHook extends LinkSelfHref {
|
|
35
|
+
id: number;
|
|
36
|
+
/** Hook type (e.g. "Door", "Window"). */
|
|
37
|
+
type_name: string;
|
|
38
|
+
/** Parent fixture this hook belongs to. */
|
|
39
|
+
parent_fixture: NamedRef;
|
|
40
|
+
}
|
|
41
|
+
export interface Rooms extends LinkSelfHref {
|
|
42
|
+
rooms: NamedRef[];
|
|
43
|
+
}
|
|
44
|
+
export interface Room extends LinkSelfHref {
|
|
45
|
+
id: number;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns an index of decor.
|
|
50
|
+
*/
|
|
51
|
+
export declare function decors(ctx: ApiContext): Promise<Decors>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a decor by ID.
|
|
54
|
+
*
|
|
55
|
+
* @param decorId - The ID of the decor.
|
|
56
|
+
*/
|
|
57
|
+
export declare function decor(ctx: ApiContext, decorId: number): Promise<Decor>;
|
|
58
|
+
/**
|
|
59
|
+
* Performs a search of decor.
|
|
60
|
+
*
|
|
61
|
+
* @param searchParameters - Object containing search parameters.
|
|
62
|
+
*/
|
|
63
|
+
export declare function searchDecor(ctx: ApiContext, searchParameters: SearchParameters): Promise<Search>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns an index of fixtures.
|
|
66
|
+
*/
|
|
67
|
+
export declare function fixtures(ctx: ApiContext): Promise<Fixtures>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a fixture by ID.
|
|
70
|
+
*
|
|
71
|
+
* @param fixtureId - The ID of the fixture.
|
|
72
|
+
*/
|
|
73
|
+
export declare function fixture(ctx: ApiContext, fixtureId: number): Promise<Fixture>;
|
|
74
|
+
/**
|
|
75
|
+
* Performs a search of fixtures.
|
|
76
|
+
*
|
|
77
|
+
* @param searchParameters - Object containing search parameters.
|
|
78
|
+
*/
|
|
79
|
+
export declare function searchFixture(ctx: ApiContext, searchParameters: SearchParameters): Promise<Search>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns an index of fixture hooks.
|
|
82
|
+
*/
|
|
83
|
+
export declare function fixtureHooks(ctx: ApiContext): Promise<FixtureHooks>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns a fixture hook by ID.
|
|
86
|
+
*
|
|
87
|
+
* @param fixtureHookId - The ID of the fixture hook.
|
|
88
|
+
*/
|
|
89
|
+
export declare function fixtureHook(ctx: ApiContext, fixtureHookId: number): Promise<FixtureHook>;
|
|
90
|
+
/**
|
|
91
|
+
* Performs a search of fixture hooks.
|
|
92
|
+
*
|
|
93
|
+
* @param searchParameters - Object containing search parameters.
|
|
94
|
+
*/
|
|
95
|
+
export declare function searchFixtureHook(ctx: ApiContext, searchParameters: SearchParameters): Promise<Search>;
|
|
96
|
+
/**
|
|
97
|
+
* Returns an index of rooms.
|
|
98
|
+
*/
|
|
99
|
+
export declare function rooms(ctx: ApiContext): Promise<Rooms>;
|
|
100
|
+
/**
|
|
101
|
+
* Returns a room by ID.
|
|
102
|
+
*
|
|
103
|
+
* @param roomId - The ID of the room.
|
|
104
|
+
*/
|
|
105
|
+
export declare function room(ctx: ApiContext, roomId: number): Promise<Room>;
|
|
106
|
+
/**
|
|
107
|
+
* Performs a search of rooms.
|
|
108
|
+
*
|
|
109
|
+
* @param searchParameters - Object containing search parameters.
|
|
110
|
+
*/
|
|
111
|
+
export declare function searchRoom(ctx: ApiContext, searchParameters: SearchParameters): Promise<Search>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This module provides interfaces and API function definitions for fetching World of Warcraft housing data (decor, fixtures, fixture hooks, rooms) using the Blizzard API.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.decors = decors;
|
|
7
|
+
exports.decor = decor;
|
|
8
|
+
exports.searchDecor = searchDecor;
|
|
9
|
+
exports.fixtures = fixtures;
|
|
10
|
+
exports.fixture = fixture;
|
|
11
|
+
exports.searchFixture = searchFixture;
|
|
12
|
+
exports.fixtureHooks = fixtureHooks;
|
|
13
|
+
exports.fixtureHook = fixtureHook;
|
|
14
|
+
exports.searchFixtureHook = searchFixtureHook;
|
|
15
|
+
exports.rooms = rooms;
|
|
16
|
+
exports.room = room;
|
|
17
|
+
exports.searchRoom = searchRoom;
|
|
18
|
+
const search_js_1 = require("../search.js");
|
|
19
|
+
/**
|
|
20
|
+
* Returns an index of decor.
|
|
21
|
+
*/
|
|
22
|
+
async function decors(ctx) {
|
|
23
|
+
return await ctx.request({
|
|
24
|
+
method: "GET",
|
|
25
|
+
url: "/data/wow/decor/index",
|
|
26
|
+
namespace: "static",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns a decor by ID.
|
|
31
|
+
*
|
|
32
|
+
* @param decorId - The ID of the decor.
|
|
33
|
+
*/
|
|
34
|
+
async function decor(ctx, decorId) {
|
|
35
|
+
return await ctx.request({
|
|
36
|
+
method: "GET",
|
|
37
|
+
url: `/data/wow/decor/${decorId}`,
|
|
38
|
+
namespace: "static",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Performs a search of decor.
|
|
43
|
+
*
|
|
44
|
+
* @param searchParameters - Object containing search parameters.
|
|
45
|
+
*/
|
|
46
|
+
async function searchDecor(ctx, searchParameters) {
|
|
47
|
+
return await (0, search_js_1.search)(ctx, "/decor", "static", searchParameters);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns an index of fixtures.
|
|
51
|
+
*/
|
|
52
|
+
async function fixtures(ctx) {
|
|
53
|
+
return await ctx.request({
|
|
54
|
+
method: "GET",
|
|
55
|
+
url: "/data/wow/fixture/index",
|
|
56
|
+
namespace: "static",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns a fixture by ID.
|
|
61
|
+
*
|
|
62
|
+
* @param fixtureId - The ID of the fixture.
|
|
63
|
+
*/
|
|
64
|
+
async function fixture(ctx, fixtureId) {
|
|
65
|
+
return await ctx.request({
|
|
66
|
+
method: "GET",
|
|
67
|
+
url: `/data/wow/fixture/${fixtureId}`,
|
|
68
|
+
namespace: "static",
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Performs a search of fixtures.
|
|
73
|
+
*
|
|
74
|
+
* @param searchParameters - Object containing search parameters.
|
|
75
|
+
*/
|
|
76
|
+
async function searchFixture(ctx, searchParameters) {
|
|
77
|
+
return await (0, search_js_1.search)(ctx, "/fixture", "static", searchParameters);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Returns an index of fixture hooks.
|
|
81
|
+
*/
|
|
82
|
+
async function fixtureHooks(ctx) {
|
|
83
|
+
return await ctx.request({
|
|
84
|
+
method: "GET",
|
|
85
|
+
url: "/data/wow/fixture-hook/index",
|
|
86
|
+
namespace: "static",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns a fixture hook by ID.
|
|
91
|
+
*
|
|
92
|
+
* @param fixtureHookId - The ID of the fixture hook.
|
|
93
|
+
*/
|
|
94
|
+
async function fixtureHook(ctx, fixtureHookId) {
|
|
95
|
+
return await ctx.request({
|
|
96
|
+
method: "GET",
|
|
97
|
+
url: `/data/wow/fixture-hook/${fixtureHookId}`,
|
|
98
|
+
namespace: "static",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Performs a search of fixture hooks.
|
|
103
|
+
*
|
|
104
|
+
* @param searchParameters - Object containing search parameters.
|
|
105
|
+
*/
|
|
106
|
+
async function searchFixtureHook(ctx, searchParameters) {
|
|
107
|
+
return await (0, search_js_1.search)(ctx, "/fixture-hook", "static", searchParameters);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Returns an index of rooms.
|
|
111
|
+
*/
|
|
112
|
+
async function rooms(ctx) {
|
|
113
|
+
return await ctx.request({
|
|
114
|
+
method: "GET",
|
|
115
|
+
url: "/data/wow/room/index",
|
|
116
|
+
namespace: "static",
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Returns a room by ID.
|
|
121
|
+
*
|
|
122
|
+
* @param roomId - The ID of the room.
|
|
123
|
+
*/
|
|
124
|
+
async function room(ctx, roomId) {
|
|
125
|
+
return await ctx.request({
|
|
126
|
+
method: "GET",
|
|
127
|
+
url: `/data/wow/room/${roomId}`,
|
|
128
|
+
namespace: "static",
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Performs a search of rooms.
|
|
133
|
+
*
|
|
134
|
+
* @param searchParameters - Object containing search parameters.
|
|
135
|
+
*/
|
|
136
|
+
async function searchRoom(ctx, searchParameters) {
|
|
137
|
+
return await (0, search_js_1.search)(ctx, "/room", "static", searchParameters);
|
|
138
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Asset, KeyId, KeyNameId, LinkSelfHref, LocalizedString, NamedRef, TypeName } from "../../shared/index.js";
|
|
3
|
+
import type { Search, SearchParameters } from "../search.js";
|
|
4
|
+
export interface ItemClasses extends LinkSelfHref {
|
|
5
|
+
item_classes: KeyNameId[];
|
|
6
|
+
}
|
|
7
|
+
export interface ItemClass extends LinkSelfHref {
|
|
8
|
+
id: number;
|
|
9
|
+
name: LocalizedString;
|
|
10
|
+
item_subclasses: KeyNameId[];
|
|
11
|
+
}
|
|
12
|
+
export interface ItemSets extends LinkSelfHref {
|
|
13
|
+
item_sets: KeyNameId[];
|
|
14
|
+
}
|
|
15
|
+
export interface ItemSet extends LinkSelfHref {
|
|
16
|
+
id: number;
|
|
17
|
+
name: LocalizedString;
|
|
18
|
+
items: KeyNameId[];
|
|
19
|
+
effects: {
|
|
20
|
+
display_string: LocalizedString;
|
|
21
|
+
required_count: number;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export interface ItemSubclass extends LinkSelfHref {
|
|
25
|
+
id: number;
|
|
26
|
+
item_class: NamedRef;
|
|
27
|
+
display_name: LocalizedString;
|
|
28
|
+
verbose_name?: string;
|
|
29
|
+
hide_subclass_in_tooltips?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface Item extends LinkSelfHref {
|
|
32
|
+
id: number;
|
|
33
|
+
name: LocalizedString;
|
|
34
|
+
quality: TypeName;
|
|
35
|
+
level: number;
|
|
36
|
+
required_level: number;
|
|
37
|
+
media: KeyId;
|
|
38
|
+
item_class: KeyNameId;
|
|
39
|
+
item_subclass: KeyNameId;
|
|
40
|
+
inventory_type: TypeName;
|
|
41
|
+
purchase_price: number;
|
|
42
|
+
sell_price: number;
|
|
43
|
+
max_count: number;
|
|
44
|
+
is_equippable: boolean;
|
|
45
|
+
is_stackable: boolean;
|
|
46
|
+
preview_item: {
|
|
47
|
+
item: KeyId;
|
|
48
|
+
context?: number;
|
|
49
|
+
bonus_list?: number[];
|
|
50
|
+
quality: TypeName;
|
|
51
|
+
name: LocalizedString;
|
|
52
|
+
media: KeyId;
|
|
53
|
+
item_class: KeyNameId;
|
|
54
|
+
item_subclass: KeyNameId;
|
|
55
|
+
inventory_type: TypeName;
|
|
56
|
+
binding: TypeName;
|
|
57
|
+
unique_equipped: string;
|
|
58
|
+
weapon: {
|
|
59
|
+
damage: {
|
|
60
|
+
min_value: number;
|
|
61
|
+
max_value: number;
|
|
62
|
+
display_string: LocalizedString;
|
|
63
|
+
damage_class: TypeName;
|
|
64
|
+
};
|
|
65
|
+
additional_damage?: {
|
|
66
|
+
min_value: number;
|
|
67
|
+
max_value: number;
|
|
68
|
+
display_string: LocalizedString;
|
|
69
|
+
damage_class: TypeName;
|
|
70
|
+
}[];
|
|
71
|
+
attack_speed: {
|
|
72
|
+
value: number;
|
|
73
|
+
display_string: LocalizedString;
|
|
74
|
+
};
|
|
75
|
+
dps: {
|
|
76
|
+
value: number;
|
|
77
|
+
display_string: LocalizedString;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
stats: {
|
|
81
|
+
type: TypeName;
|
|
82
|
+
value: number;
|
|
83
|
+
is_negated?: boolean;
|
|
84
|
+
display: {
|
|
85
|
+
display_string: LocalizedString;
|
|
86
|
+
color: {
|
|
87
|
+
r: number;
|
|
88
|
+
g: number;
|
|
89
|
+
b: number;
|
|
90
|
+
a: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}[];
|
|
94
|
+
spells: {
|
|
95
|
+
spell: KeyNameId;
|
|
96
|
+
description: LocalizedString;
|
|
97
|
+
}[];
|
|
98
|
+
requirements: {
|
|
99
|
+
level: {
|
|
100
|
+
value: number;
|
|
101
|
+
display_string: LocalizedString;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
level?: {
|
|
105
|
+
value: number;
|
|
106
|
+
display_string: LocalizedString;
|
|
107
|
+
};
|
|
108
|
+
durability: {
|
|
109
|
+
value: number;
|
|
110
|
+
display_string: LocalizedString;
|
|
111
|
+
};
|
|
112
|
+
sell_price?: {
|
|
113
|
+
value: number;
|
|
114
|
+
display_strings: {
|
|
115
|
+
header: LocalizedString;
|
|
116
|
+
gold: string;
|
|
117
|
+
silver: string;
|
|
118
|
+
copper: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
purchase_quantity: number;
|
|
123
|
+
appearances?: KeyId[];
|
|
124
|
+
}
|
|
125
|
+
export interface ItemMedia extends LinkSelfHref {
|
|
126
|
+
assets: Asset[];
|
|
127
|
+
id: number;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns an index of item classes.
|
|
131
|
+
*
|
|
132
|
+
* @returns A promise that resolves to an object representing a list of item classes.
|
|
133
|
+
*/
|
|
134
|
+
export declare function itemClasses(ctx: ApiContext): Promise<ItemClasses>;
|
|
135
|
+
/**
|
|
136
|
+
* Returns an item class by ID.
|
|
137
|
+
*
|
|
138
|
+
* @param itemClassId - The unique identifier for the item class by ID.
|
|
139
|
+
* @returns A promise that resolves to an object representing details about an item class by ID.
|
|
140
|
+
*/
|
|
141
|
+
export declare function itemClass(ctx: ApiContext, itemClassId: number): Promise<ItemClass>;
|
|
142
|
+
/**
|
|
143
|
+
* Returns an index of item sets.
|
|
144
|
+
*
|
|
145
|
+
* @returns A promise that resolves to an object representing a list of item sets.
|
|
146
|
+
*/
|
|
147
|
+
export declare function itemSets(ctx: ApiContext): Promise<ItemSets>;
|
|
148
|
+
/**
|
|
149
|
+
* Returns an item set by ID.
|
|
150
|
+
*
|
|
151
|
+
* @param itemSetId - The unique identifier for the item set by ID.
|
|
152
|
+
* @returns A promise that resolves to an object representing details about an item set by ID.
|
|
153
|
+
*/
|
|
154
|
+
export declare function itemSet(ctx: ApiContext, itemSetId: number): Promise<ItemSet>;
|
|
155
|
+
/**
|
|
156
|
+
* Returns an item subclass by ID.
|
|
157
|
+
*
|
|
158
|
+
* @param itemClassId - The unique identifier for the item class by ID.
|
|
159
|
+
* @param itemSubclassId - The unique identifier for the item subclass by ID.
|
|
160
|
+
* @returns A promise that resolves to an object representing details about an item set by ID.
|
|
161
|
+
*/
|
|
162
|
+
export declare function itemSubclass(ctx: ApiContext, itemClassId: number, itemSubclassId: number): Promise<ItemSubclass>;
|
|
163
|
+
/**
|
|
164
|
+
* Returns an item by ID.
|
|
165
|
+
*
|
|
166
|
+
* @param itemId - The unique identifier for the item by ID.
|
|
167
|
+
* @returns A promise that resolves to an object representing details about an item by ID.
|
|
168
|
+
*/
|
|
169
|
+
export declare function item(ctx: ApiContext, itemId: number): Promise<Item>;
|
|
170
|
+
/**
|
|
171
|
+
* Returns media details about a specific item Id
|
|
172
|
+
*
|
|
173
|
+
* @param itemId - The unique identifier for the item
|
|
174
|
+
* @returns A promise that resolves to an object representing media details about an item.
|
|
175
|
+
*/
|
|
176
|
+
export declare function itemMedia(ctx: ApiContext, itemId: number): Promise<ItemMedia>;
|
|
177
|
+
/**
|
|
178
|
+
* Performs a search of items.
|
|
179
|
+
*
|
|
180
|
+
* @param SearchParameters - Object containing search parameters.
|
|
181
|
+
* @returns A promise that resolves to an object representing details about an item search.
|
|
182
|
+
*/
|
|
183
|
+
export declare function searchItem(ctx: ApiContext, searchParameters: SearchParameters): Promise<Search>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.itemClasses = itemClasses;
|
|
4
|
+
exports.itemClass = itemClass;
|
|
5
|
+
exports.itemSets = itemSets;
|
|
6
|
+
exports.itemSet = itemSet;
|
|
7
|
+
exports.itemSubclass = itemSubclass;
|
|
8
|
+
exports.item = item;
|
|
9
|
+
exports.itemMedia = itemMedia;
|
|
10
|
+
exports.searchItem = searchItem;
|
|
11
|
+
const search_js_1 = require("../search.js");
|
|
12
|
+
/**
|
|
13
|
+
* Returns an index of item classes.
|
|
14
|
+
*
|
|
15
|
+
* @returns A promise that resolves to an object representing a list of item classes.
|
|
16
|
+
*/
|
|
17
|
+
async function itemClasses(ctx) {
|
|
18
|
+
return await ctx.request({
|
|
19
|
+
method: "GET",
|
|
20
|
+
url: "/data/wow/item-class/index",
|
|
21
|
+
namespace: "static",
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns an item class by ID.
|
|
26
|
+
*
|
|
27
|
+
* @param itemClassId - The unique identifier for the item class by ID.
|
|
28
|
+
* @returns A promise that resolves to an object representing details about an item class by ID.
|
|
29
|
+
*/
|
|
30
|
+
async function itemClass(ctx, itemClassId) {
|
|
31
|
+
return await ctx.request({
|
|
32
|
+
method: "GET",
|
|
33
|
+
url: `/data/wow/item-class/${itemClassId}`,
|
|
34
|
+
namespace: "static",
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns an index of item sets.
|
|
39
|
+
*
|
|
40
|
+
* @returns A promise that resolves to an object representing a list of item sets.
|
|
41
|
+
*/
|
|
42
|
+
async function itemSets(ctx) {
|
|
43
|
+
return await ctx.request({
|
|
44
|
+
method: "GET",
|
|
45
|
+
url: "/data/wow/item-set/index",
|
|
46
|
+
namespace: "static",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns an item set by ID.
|
|
51
|
+
*
|
|
52
|
+
* @param itemSetId - The unique identifier for the item set by ID.
|
|
53
|
+
* @returns A promise that resolves to an object representing details about an item set by ID.
|
|
54
|
+
*/
|
|
55
|
+
async function itemSet(ctx, itemSetId) {
|
|
56
|
+
return await ctx.request({
|
|
57
|
+
method: "GET",
|
|
58
|
+
url: `/data/wow/item-set/${itemSetId}`,
|
|
59
|
+
namespace: "static",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns an item subclass by ID.
|
|
64
|
+
*
|
|
65
|
+
* @param itemClassId - The unique identifier for the item class by ID.
|
|
66
|
+
* @param itemSubclassId - The unique identifier for the item subclass by ID.
|
|
67
|
+
* @returns A promise that resolves to an object representing details about an item set by ID.
|
|
68
|
+
*/
|
|
69
|
+
async function itemSubclass(ctx, itemClassId, itemSubclassId) {
|
|
70
|
+
return await ctx.request({
|
|
71
|
+
method: "GET",
|
|
72
|
+
url: `/data/wow/item-class/${itemClassId}/item-subclass/${itemSubclassId}`,
|
|
73
|
+
namespace: "static",
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns an item by ID.
|
|
78
|
+
*
|
|
79
|
+
* @param itemId - The unique identifier for the item by ID.
|
|
80
|
+
* @returns A promise that resolves to an object representing details about an item by ID.
|
|
81
|
+
*/
|
|
82
|
+
async function item(ctx, itemId) {
|
|
83
|
+
return await ctx.request({
|
|
84
|
+
method: "GET",
|
|
85
|
+
url: `/data/wow/item/${itemId}`,
|
|
86
|
+
namespace: "static",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns media details about a specific item Id
|
|
91
|
+
*
|
|
92
|
+
* @param itemId - The unique identifier for the item
|
|
93
|
+
* @returns A promise that resolves to an object representing media details about an item.
|
|
94
|
+
*/
|
|
95
|
+
async function itemMedia(ctx, itemId) {
|
|
96
|
+
return await ctx.request({
|
|
97
|
+
method: "GET",
|
|
98
|
+
url: `/data/wow/media/item/${itemId}`,
|
|
99
|
+
namespace: "static",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Performs a search of items.
|
|
104
|
+
*
|
|
105
|
+
* @param SearchParameters - Object containing search parameters.
|
|
106
|
+
* @returns A promise that resolves to an object representing details about an item search.
|
|
107
|
+
*/
|
|
108
|
+
async function searchItem(ctx, searchParameters) {
|
|
109
|
+
return await (0, search_js_1.search)(ctx, "/item", "static", searchParameters);
|
|
110
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Href, KeyId, NamedRef } from "../../shared/index.js";
|
|
3
|
+
import type { Search, SearchParameters } from "../search.js";
|
|
4
|
+
export interface AppearanceSlot {
|
|
5
|
+
type: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ItemAppearance {
|
|
9
|
+
"_links": {
|
|
10
|
+
self: Href;
|
|
11
|
+
};
|
|
12
|
+
id: number;
|
|
13
|
+
slot: AppearanceSlot;
|
|
14
|
+
item_class: NamedRef;
|
|
15
|
+
item_subclass: NamedRef;
|
|
16
|
+
item_display_info_id: number;
|
|
17
|
+
items: NamedRef[];
|
|
18
|
+
media: KeyId;
|
|
19
|
+
}
|
|
20
|
+
export interface ItemAppearanceSets {
|
|
21
|
+
"_links": {
|
|
22
|
+
self: Href;
|
|
23
|
+
};
|
|
24
|
+
appearance_sets: NamedRef[];
|
|
25
|
+
}
|
|
26
|
+
export interface ItemAppearanceSet {
|
|
27
|
+
"_links": {
|
|
28
|
+
self: Href;
|
|
29
|
+
};
|
|
30
|
+
id: number;
|
|
31
|
+
set_name: string;
|
|
32
|
+
appearances: KeyId[];
|
|
33
|
+
}
|
|
34
|
+
export interface ItemAppearanceSlotRef {
|
|
35
|
+
key: Href;
|
|
36
|
+
}
|
|
37
|
+
export interface ItemAppearanceSlots {
|
|
38
|
+
"_links": {
|
|
39
|
+
self: Href;
|
|
40
|
+
};
|
|
41
|
+
slots: ItemAppearanceSlotRef[];
|
|
42
|
+
}
|
|
43
|
+
export interface ItemAppearanceSlot {
|
|
44
|
+
"_links": {
|
|
45
|
+
self: Href;
|
|
46
|
+
};
|
|
47
|
+
appearances: KeyId[];
|
|
48
|
+
}
|
|
49
|
+
export interface ItemAppearanceSearchResult {
|
|
50
|
+
key: Href;
|
|
51
|
+
data: {
|
|
52
|
+
id: number;
|
|
53
|
+
item_display_info_id: number;
|
|
54
|
+
slot: {
|
|
55
|
+
type: string;
|
|
56
|
+
name: string | Record<string, string>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface ItemAppearanceSearch extends Search {
|
|
61
|
+
results: ItemAppearanceSearchResult[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns an item appearance by ID.
|
|
65
|
+
*
|
|
66
|
+
* @param appearanceId - The unique identifier for the item appearance by ID.
|
|
67
|
+
* @returns A promise that resolves to an object representing details about an item appearance.
|
|
68
|
+
*/
|
|
69
|
+
export declare function itemAppearance(ctx: ApiContext, appearanceId: number): Promise<ItemAppearance>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns a index of item appearance sets.
|
|
72
|
+
*
|
|
73
|
+
* @returns A promise that resolves to an object representing a list of the index of item appearance sets.
|
|
74
|
+
*/
|
|
75
|
+
export declare function itemAppearanceSets(ctx: ApiContext): Promise<ItemAppearanceSets>;
|
|
76
|
+
/**
|
|
77
|
+
* Returns an item appearance set by ID.
|
|
78
|
+
*
|
|
79
|
+
* @param appearanceSetId - The unique identifier for the item appearance set by ID.
|
|
80
|
+
* @returns A promise that resolves to an object representing details about an item appearance set.
|
|
81
|
+
*/
|
|
82
|
+
export declare function itemAppearanceSet(ctx: ApiContext, appearanceSetId: number): Promise<ItemAppearanceSet>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns a index of item appearance slots.
|
|
85
|
+
*
|
|
86
|
+
* @returns A promise that resolves to an object representing a list of the index of item appearance slots.
|
|
87
|
+
*/
|
|
88
|
+
export declare function itemAppearanceSlots(ctx: ApiContext): Promise<ItemAppearanceSlots>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns an item appearance slot by slot type.
|
|
91
|
+
*
|
|
92
|
+
* @param slotType - The slot type (e.g. "HEAD", "SHOULDER", "BODY").
|
|
93
|
+
* @returns A promise that resolves to an object representing details about an item appearance slot.
|
|
94
|
+
*/
|
|
95
|
+
export declare function itemAppearanceSlot(ctx: ApiContext, slotType: string): Promise<ItemAppearanceSlot>;
|
|
96
|
+
/**
|
|
97
|
+
* Performs a search of item appearances.
|
|
98
|
+
*
|
|
99
|
+
* @param searchParameters - Object containing search parameters.
|
|
100
|
+
* @returns A promise that resolves to an object representing details about an item appearance search.
|
|
101
|
+
*/
|
|
102
|
+
export declare function searchItemAppearance(ctx: ApiContext, searchParameters: SearchParameters): Promise<ItemAppearanceSearch>;
|