@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,29 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyNameId, LinkSelfHref } from "../../shared/index.js";
|
|
3
|
+
export interface CharacterQuests extends LinkSelfHref {
|
|
4
|
+
character: Character;
|
|
5
|
+
in_progress: KeyNameId[];
|
|
6
|
+
completed: {
|
|
7
|
+
href: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface CharacterCompletedQuests extends LinkSelfHref {
|
|
11
|
+
character: Character;
|
|
12
|
+
quests: KeyNameId[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Returns a character's active quests as well as a link to the character's completed quests.
|
|
16
|
+
*
|
|
17
|
+
* @param realmSlug - The slug of the realm.
|
|
18
|
+
* @param characterName - The lowercase name of the character.
|
|
19
|
+
* @returns A promise that resolves to an object representing a character's active quests as well as a link to the character's completed quests.
|
|
20
|
+
*/
|
|
21
|
+
export declare function characterQuests(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterQuests>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a list of quests that a character has completed.
|
|
24
|
+
*
|
|
25
|
+
* @param realmSlug - The slug of the realm.
|
|
26
|
+
* @param characterName - The lowercase name of the character.
|
|
27
|
+
* @returns A promise that resolves to an object representing a list of quests that a character has completed.
|
|
28
|
+
*/
|
|
29
|
+
export declare function characterCompletedQuests(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterCompletedQuests>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterQuests = characterQuests;
|
|
4
|
+
exports.characterCompletedQuests = characterCompletedQuests;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a character's active quests as well as a link to the character's completed quests.
|
|
7
|
+
*
|
|
8
|
+
* @param realmSlug - The slug of the realm.
|
|
9
|
+
* @param characterName - The lowercase name of the character.
|
|
10
|
+
* @returns A promise that resolves to an object representing a character's active quests as well as a link to the character's completed quests.
|
|
11
|
+
*/
|
|
12
|
+
async function characterQuests(ctx, realmSlug, characterName) {
|
|
13
|
+
return await ctx.request({
|
|
14
|
+
method: "GET",
|
|
15
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/quests`,
|
|
16
|
+
namespace: "profile",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns a list of quests that a character has completed.
|
|
21
|
+
*
|
|
22
|
+
* @param realmSlug - The slug of the realm.
|
|
23
|
+
* @param characterName - The lowercase name of the character.
|
|
24
|
+
* @returns A promise that resolves to an object representing a list of quests that a character has completed.
|
|
25
|
+
*/
|
|
26
|
+
async function characterCompletedQuests(ctx, realmSlug, characterName) {
|
|
27
|
+
return await ctx.request({
|
|
28
|
+
method: "GET",
|
|
29
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/quests/completed`,
|
|
30
|
+
namespace: "profile",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyNameId, LinkSelfHref, LocalizedString } from "../../shared/index.js";
|
|
3
|
+
export interface CharacterReputations extends LinkSelfHref {
|
|
4
|
+
character: Character;
|
|
5
|
+
reputations: {
|
|
6
|
+
faction: KeyNameId;
|
|
7
|
+
standing: {
|
|
8
|
+
raw: number;
|
|
9
|
+
value: number;
|
|
10
|
+
max: number;
|
|
11
|
+
tier?: number;
|
|
12
|
+
renown_level?: number;
|
|
13
|
+
name: LocalizedString;
|
|
14
|
+
};
|
|
15
|
+
/** Paragon progress, for factions at maximum standing that have a paragon track. */
|
|
16
|
+
paragon?: {
|
|
17
|
+
raw: number;
|
|
18
|
+
value: number;
|
|
19
|
+
max: number;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns a summary of a character's reputations.
|
|
25
|
+
*
|
|
26
|
+
* @param realmSlug - The slug of the realm.
|
|
27
|
+
* @param characterName - The lowercase name of the character.
|
|
28
|
+
* @returns A promise that resolves to an object representing a character's reputations.
|
|
29
|
+
*/
|
|
30
|
+
export declare function characterReputations(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterReputations>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterReputations = characterReputations;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a summary of a character's reputations.
|
|
6
|
+
*
|
|
7
|
+
* @param realmSlug - The slug of the realm.
|
|
8
|
+
* @param characterName - The lowercase name of the character.
|
|
9
|
+
* @returns A promise that resolves to an object representing a character's reputations.
|
|
10
|
+
*/
|
|
11
|
+
async function characterReputations(ctx, realmSlug, characterName) {
|
|
12
|
+
return await ctx.request({
|
|
13
|
+
method: "GET",
|
|
14
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/reputations`,
|
|
15
|
+
namespace: "profile",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyNameId, LinkSelfHref, TypeName } from "../../shared/index.js";
|
|
3
|
+
export interface CharacterSoulbinds extends LinkSelfHref {
|
|
4
|
+
character: Character;
|
|
5
|
+
chosen_covenant: KeyNameId;
|
|
6
|
+
renown_level: number;
|
|
7
|
+
soulbinds: {
|
|
8
|
+
soulbind: KeyNameId;
|
|
9
|
+
traits?: {
|
|
10
|
+
trait?: KeyNameId;
|
|
11
|
+
conduit_socket?: {
|
|
12
|
+
type: TypeName;
|
|
13
|
+
socket: {
|
|
14
|
+
conduit: KeyNameId;
|
|
15
|
+
rank: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
tier: number;
|
|
19
|
+
display_order: number;
|
|
20
|
+
}[];
|
|
21
|
+
is_active?: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns a character's soulbinds.
|
|
26
|
+
*
|
|
27
|
+
* @param realmSlug - The slug of the realm.
|
|
28
|
+
* @param characterName - The lowercase name of the character.
|
|
29
|
+
* @returns A promise that resolves to an object representing a character's soulbinds.
|
|
30
|
+
*/
|
|
31
|
+
export declare function characterSoulbinds(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterSoulbinds>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterSoulbinds = characterSoulbinds;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a character's soulbinds.
|
|
6
|
+
*
|
|
7
|
+
* @param realmSlug - The slug of the realm.
|
|
8
|
+
* @param characterName - The lowercase name of the character.
|
|
9
|
+
* @returns A promise that resolves to an object representing a character's soulbinds.
|
|
10
|
+
*/
|
|
11
|
+
async function characterSoulbinds(ctx, realmSlug, characterName) {
|
|
12
|
+
return await ctx.request({
|
|
13
|
+
method: "GET",
|
|
14
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/soulbinds`,
|
|
15
|
+
namespace: "profile",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyId, KeyName, KeyNameId, LinkSelfHref, LocalizedString, NamedRef, NameId } from "../../shared/index.js";
|
|
3
|
+
export interface Detail {
|
|
4
|
+
talent: KeyId & {
|
|
5
|
+
name?: string;
|
|
6
|
+
};
|
|
7
|
+
spell_tooltip: {
|
|
8
|
+
spell: KeyId & {
|
|
9
|
+
name?: string;
|
|
10
|
+
};
|
|
11
|
+
description?: LocalizedString | null;
|
|
12
|
+
cast_time?: LocalizedString;
|
|
13
|
+
power_cost?: LocalizedString;
|
|
14
|
+
cooldown?: LocalizedString;
|
|
15
|
+
range?: LocalizedString;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CharacterSpecializationTalent {
|
|
19
|
+
id: number;
|
|
20
|
+
rank: number;
|
|
21
|
+
tooltip?: Detail;
|
|
22
|
+
default_points?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ClassicSpecializationTalent {
|
|
25
|
+
talent: {
|
|
26
|
+
name: string;
|
|
27
|
+
id: number;
|
|
28
|
+
};
|
|
29
|
+
spell_tooltip: {
|
|
30
|
+
spell: {
|
|
31
|
+
name: string;
|
|
32
|
+
id: number;
|
|
33
|
+
};
|
|
34
|
+
description: string;
|
|
35
|
+
cast_time: string;
|
|
36
|
+
cooldown?: string;
|
|
37
|
+
power_cost?: string | null;
|
|
38
|
+
range?: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface CharacterSpecializations extends LinkSelfHref {
|
|
42
|
+
specializations: {
|
|
43
|
+
specialization: KeyNameId;
|
|
44
|
+
specialization_name?: string;
|
|
45
|
+
glyphs?: KeyNameId[];
|
|
46
|
+
talents?: ClassicSpecializationTalent[];
|
|
47
|
+
pvp_talent_slots?: {
|
|
48
|
+
selected: Detail;
|
|
49
|
+
slot_number: number;
|
|
50
|
+
}[];
|
|
51
|
+
loadouts?: {
|
|
52
|
+
is_active: boolean;
|
|
53
|
+
talent_loadout_code: string;
|
|
54
|
+
selected_class_talents: CharacterSpecializationTalent[];
|
|
55
|
+
selected_spec_talents: CharacterSpecializationTalent[];
|
|
56
|
+
selected_hero_talents?: CharacterSpecializationTalent[];
|
|
57
|
+
selected_class_talent_tree?: KeyName;
|
|
58
|
+
selected_spec_talent_tree?: KeyName;
|
|
59
|
+
selected_hero_talent_tree?: KeyNameId;
|
|
60
|
+
}[];
|
|
61
|
+
}[];
|
|
62
|
+
specialization_groups?: {
|
|
63
|
+
is_active: boolean;
|
|
64
|
+
glyphs?: NameId[];
|
|
65
|
+
specializations?: {
|
|
66
|
+
specialization?: KeyNameId;
|
|
67
|
+
specialization_name: string;
|
|
68
|
+
talents: ClassicSpecializationTalent[];
|
|
69
|
+
}[];
|
|
70
|
+
}[];
|
|
71
|
+
active_specialization: KeyNameId;
|
|
72
|
+
active_hero_talent_tree?: NamedRef;
|
|
73
|
+
character: Character;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns a summary of a character's specializations.
|
|
77
|
+
*
|
|
78
|
+
* @param realmSlug - The slug of the realm.
|
|
79
|
+
* @param characterName - The lowercase name of the character.
|
|
80
|
+
* @returns A promise that resolves to an object representing a summary of a character's specializations.
|
|
81
|
+
*/
|
|
82
|
+
export declare function characterSpecializations(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterSpecializations>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterSpecializations = characterSpecializations;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a summary of a character's specializations.
|
|
6
|
+
*
|
|
7
|
+
* @param realmSlug - The slug of the realm.
|
|
8
|
+
* @param characterName - The lowercase name of the character.
|
|
9
|
+
* @returns A promise that resolves to an object representing a summary of a character's specializations.
|
|
10
|
+
*/
|
|
11
|
+
async function characterSpecializations(ctx, realmSlug, characterName) {
|
|
12
|
+
return await ctx.request({
|
|
13
|
+
method: "GET",
|
|
14
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/specializations`,
|
|
15
|
+
namespace: "profile",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyNameId, LinkSelfHref } from "../../shared/index.js";
|
|
3
|
+
export interface StatRating {
|
|
4
|
+
rating_bonus: number;
|
|
5
|
+
value: number;
|
|
6
|
+
rating_normalized: number;
|
|
7
|
+
}
|
|
8
|
+
export interface StatRatingBonus {
|
|
9
|
+
rating_bonus: number;
|
|
10
|
+
rating_normalized: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CharacterStatistics extends LinkSelfHref {
|
|
13
|
+
health: number;
|
|
14
|
+
power: number;
|
|
15
|
+
power_type: KeyNameId;
|
|
16
|
+
speed: StatRatingBonus;
|
|
17
|
+
strength: {
|
|
18
|
+
base: number;
|
|
19
|
+
effective: number;
|
|
20
|
+
};
|
|
21
|
+
agility: {
|
|
22
|
+
base: number;
|
|
23
|
+
effective: number;
|
|
24
|
+
};
|
|
25
|
+
intellect: {
|
|
26
|
+
base: number;
|
|
27
|
+
effective: number;
|
|
28
|
+
};
|
|
29
|
+
stamina: {
|
|
30
|
+
base: number;
|
|
31
|
+
effective: number;
|
|
32
|
+
};
|
|
33
|
+
melee_crit: StatRating;
|
|
34
|
+
melee_haste: StatRating;
|
|
35
|
+
mastery: StatRating;
|
|
36
|
+
bonus_armor: number;
|
|
37
|
+
lifesteal: StatRating;
|
|
38
|
+
versatility: number;
|
|
39
|
+
versatility_damage_done_bonus: number;
|
|
40
|
+
versatility_healing_done_bonus: number;
|
|
41
|
+
versatility_damage_taken_bonus: number;
|
|
42
|
+
avoidance: StatRatingBonus;
|
|
43
|
+
attack_power: number;
|
|
44
|
+
main_hand_damage_min: number;
|
|
45
|
+
main_hand_damage_max: number;
|
|
46
|
+
main_hand_speed: number;
|
|
47
|
+
main_hand_dps: number;
|
|
48
|
+
off_hand_damage_min: number;
|
|
49
|
+
off_hand_damage_max: number;
|
|
50
|
+
off_hand_speed: number;
|
|
51
|
+
off_hand_dps: number;
|
|
52
|
+
spell_power: number;
|
|
53
|
+
spell_penetration: number;
|
|
54
|
+
spell_crit: StatRating;
|
|
55
|
+
mana_regen: number;
|
|
56
|
+
mana_regen_combat: number;
|
|
57
|
+
armor: {
|
|
58
|
+
base: number;
|
|
59
|
+
effective: number;
|
|
60
|
+
};
|
|
61
|
+
dodge: StatRating;
|
|
62
|
+
parry: StatRating;
|
|
63
|
+
block: StatRating;
|
|
64
|
+
ranged_crit: StatRating;
|
|
65
|
+
ranged_haste: StatRating;
|
|
66
|
+
spell_haste: StatRating;
|
|
67
|
+
spirit?: {
|
|
68
|
+
base: number;
|
|
69
|
+
effective: number;
|
|
70
|
+
};
|
|
71
|
+
defense?: {
|
|
72
|
+
base: number;
|
|
73
|
+
effective: number;
|
|
74
|
+
};
|
|
75
|
+
arcane_resistance?: {
|
|
76
|
+
base: number;
|
|
77
|
+
effective: number;
|
|
78
|
+
};
|
|
79
|
+
fire_resistance?: {
|
|
80
|
+
base: number;
|
|
81
|
+
effective: number;
|
|
82
|
+
};
|
|
83
|
+
holy_resistance?: {
|
|
84
|
+
base: number;
|
|
85
|
+
effective: number;
|
|
86
|
+
};
|
|
87
|
+
nature_resistance?: {
|
|
88
|
+
base: number;
|
|
89
|
+
effective: number;
|
|
90
|
+
};
|
|
91
|
+
shadow_resistance?: {
|
|
92
|
+
base: number;
|
|
93
|
+
effective: number;
|
|
94
|
+
};
|
|
95
|
+
character: Character;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns a statistics summary for a character.
|
|
99
|
+
*
|
|
100
|
+
* @param realmSlug - The slug of the realm.
|
|
101
|
+
* @param characterName - The lowercase name of the character.
|
|
102
|
+
* @returns A promise that resolves to an object representing a statistics summary for a character.
|
|
103
|
+
*/
|
|
104
|
+
export declare function characterStatistics(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterStatistics>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterStatistics = characterStatistics;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a statistics summary for a character.
|
|
6
|
+
*
|
|
7
|
+
* @param realmSlug - The slug of the realm.
|
|
8
|
+
* @param characterName - The lowercase name of the character.
|
|
9
|
+
* @returns A promise that resolves to an object representing a statistics summary for a character.
|
|
10
|
+
*/
|
|
11
|
+
async function characterStatistics(ctx, realmSlug, characterName) {
|
|
12
|
+
return await ctx.request({
|
|
13
|
+
method: "GET",
|
|
14
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/statistics`,
|
|
15
|
+
namespace: "profile",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, KeyNameId, LinkSelfHref } from "../../shared/index.js";
|
|
3
|
+
export interface CharacterTitles extends LinkSelfHref {
|
|
4
|
+
character: Character;
|
|
5
|
+
titles: KeyNameId[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Returns a summary of titles a character has obtained.
|
|
9
|
+
*
|
|
10
|
+
* @param realmSlug - The slug of the realm.
|
|
11
|
+
* @param characterName - The lowercase name of the character.
|
|
12
|
+
* @returns A promise that resolves to an object representing a summary of titles a character has obtained.
|
|
13
|
+
*/
|
|
14
|
+
export declare function characterTitles(ctx: ApiContext, realmSlug: string, characterName: string): Promise<CharacterTitles>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characterTitles = characterTitles;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a summary of titles a character has obtained.
|
|
6
|
+
*
|
|
7
|
+
* @param realmSlug - The slug of the realm.
|
|
8
|
+
* @param characterName - The lowercase name of the character.
|
|
9
|
+
* @returns A promise that resolves to an object representing a summary of titles a character has obtained.
|
|
10
|
+
*/
|
|
11
|
+
async function characterTitles(ctx, realmSlug, characterName) {
|
|
12
|
+
return await ctx.request({
|
|
13
|
+
method: "GET",
|
|
14
|
+
url: `/profile/wow/character/${realmSlug}/${characterName}/titles`,
|
|
15
|
+
namespace: "profile",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
+
import type { Character, Href, KeyId, KeyNameId, LinkSelfHref, LocalizedString, TypeName } from "../../shared/index.js";
|
|
3
|
+
export interface GuildCrestRgba {
|
|
4
|
+
r: number;
|
|
5
|
+
g: number;
|
|
6
|
+
b: number;
|
|
7
|
+
a: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CrestAsset {
|
|
10
|
+
id?: number;
|
|
11
|
+
media?: KeyId;
|
|
12
|
+
color: {
|
|
13
|
+
id: number;
|
|
14
|
+
rgba?: GuildCrestRgba;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface GuildReference {
|
|
18
|
+
key: Href;
|
|
19
|
+
name: string;
|
|
20
|
+
id: number;
|
|
21
|
+
realm: {
|
|
22
|
+
key: Href;
|
|
23
|
+
name: LocalizedString;
|
|
24
|
+
id: number;
|
|
25
|
+
slug: string;
|
|
26
|
+
};
|
|
27
|
+
faction: TypeName;
|
|
28
|
+
}
|
|
29
|
+
export interface Guild extends LinkSelfHref {
|
|
30
|
+
key?: Href;
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
faction: TypeName;
|
|
34
|
+
achievement_points?: number;
|
|
35
|
+
member_count?: number;
|
|
36
|
+
realm: {
|
|
37
|
+
key: Href;
|
|
38
|
+
name: LocalizedString;
|
|
39
|
+
id: number;
|
|
40
|
+
slug: string;
|
|
41
|
+
};
|
|
42
|
+
crest?: {
|
|
43
|
+
emblem: CrestAsset;
|
|
44
|
+
border: CrestAsset;
|
|
45
|
+
background: CrestAsset;
|
|
46
|
+
};
|
|
47
|
+
roster?: Href;
|
|
48
|
+
achievements?: Href;
|
|
49
|
+
created_timestamp?: number;
|
|
50
|
+
activity?: Href;
|
|
51
|
+
name_search: string;
|
|
52
|
+
}
|
|
53
|
+
export interface GuildActivity extends LinkSelfHref {
|
|
54
|
+
guild: GuildReference;
|
|
55
|
+
activities?: {
|
|
56
|
+
character_achievement?: {
|
|
57
|
+
character: Character;
|
|
58
|
+
achievement: KeyNameId;
|
|
59
|
+
};
|
|
60
|
+
encounter_completed?: {
|
|
61
|
+
encounter: KeyNameId;
|
|
62
|
+
mode: TypeName;
|
|
63
|
+
};
|
|
64
|
+
activity: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
timestamp: number;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
export interface Critiera {
|
|
71
|
+
id: number;
|
|
72
|
+
amount?: number;
|
|
73
|
+
is_completed: boolean;
|
|
74
|
+
child_criteria?: Critiera[];
|
|
75
|
+
}
|
|
76
|
+
export interface GuildAchievements extends LinkSelfHref {
|
|
77
|
+
guild: GuildReference;
|
|
78
|
+
total_quantity: number;
|
|
79
|
+
total_points: number;
|
|
80
|
+
achievements: {
|
|
81
|
+
id: number;
|
|
82
|
+
achievement: KeyNameId;
|
|
83
|
+
criteria?: Critiera;
|
|
84
|
+
completed_timestamp?: number;
|
|
85
|
+
}[];
|
|
86
|
+
category_progress?: {
|
|
87
|
+
category: KeyNameId;
|
|
88
|
+
quantity: number;
|
|
89
|
+
points: number;
|
|
90
|
+
}[];
|
|
91
|
+
recent_events?: {
|
|
92
|
+
achievement: KeyNameId;
|
|
93
|
+
timestamp: number;
|
|
94
|
+
}[];
|
|
95
|
+
}
|
|
96
|
+
export interface GuildRosterMemberCharacter {
|
|
97
|
+
key: Href;
|
|
98
|
+
name: string;
|
|
99
|
+
id: number;
|
|
100
|
+
realm: {
|
|
101
|
+
key: Href;
|
|
102
|
+
id: number;
|
|
103
|
+
slug: string;
|
|
104
|
+
};
|
|
105
|
+
level: number;
|
|
106
|
+
playable_class: KeyId;
|
|
107
|
+
playable_race: KeyId;
|
|
108
|
+
faction: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface GuildRoster extends LinkSelfHref {
|
|
113
|
+
guild: GuildReference;
|
|
114
|
+
members: {
|
|
115
|
+
character: GuildRosterMemberCharacter;
|
|
116
|
+
rank: number;
|
|
117
|
+
}[];
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Returns a single guild by its name and realm.
|
|
121
|
+
*
|
|
122
|
+
* @param realmSlug - The slug of the realm.
|
|
123
|
+
* @param nameSlug - The slug of the guild.
|
|
124
|
+
* @returns A promise that resolves to an object representing a single guild by its name and realm.
|
|
125
|
+
*/
|
|
126
|
+
export declare function guild(ctx: ApiContext, realmSlug: string, nameSlug: string): Promise<Guild>;
|
|
127
|
+
/**
|
|
128
|
+
* Returns a single guild's activity by name and realm.
|
|
129
|
+
*
|
|
130
|
+
* @param realmSlug - The slug of the realm.
|
|
131
|
+
* @param nameSlug - The slug of the guild.
|
|
132
|
+
* @returns A promise that resolves to an object representing a single guild's activity by its name and realm.
|
|
133
|
+
*/
|
|
134
|
+
export declare function guildActivity(ctx: ApiContext, realmSlug: string, nameSlug: string): Promise<GuildActivity>;
|
|
135
|
+
/**
|
|
136
|
+
* Returns a single guild's achievements by name and realm.
|
|
137
|
+
*
|
|
138
|
+
* @param realmSlug - The slug of the realm.
|
|
139
|
+
* @param nameSlug - The slug of the guild.
|
|
140
|
+
* @returns A promise that resolves to an object representing a single guild's achievements by its name and realm.
|
|
141
|
+
*/
|
|
142
|
+
export declare function guildAchievements(ctx: ApiContext, realmSlug: string, nameSlug: string): Promise<GuildAchievements>;
|
|
143
|
+
/**
|
|
144
|
+
* Returns a single guild's roster by its name and realm.
|
|
145
|
+
*
|
|
146
|
+
* @param realmSlug - The slug of the realm.
|
|
147
|
+
* @param nameSlug - The slug of the guild.
|
|
148
|
+
* @returns A promise that resolves to an object representing a single guild's roster by its name and realm.
|
|
149
|
+
*/
|
|
150
|
+
export declare function guildRoster(ctx: ApiContext, realmSlug: string, nameSlug: string): Promise<GuildRoster>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guild = guild;
|
|
4
|
+
exports.guildActivity = guildActivity;
|
|
5
|
+
exports.guildAchievements = guildAchievements;
|
|
6
|
+
exports.guildRoster = guildRoster;
|
|
7
|
+
/**
|
|
8
|
+
* Returns a single guild by its name and realm.
|
|
9
|
+
*
|
|
10
|
+
* @param realmSlug - The slug of the realm.
|
|
11
|
+
* @param nameSlug - The slug of the guild.
|
|
12
|
+
* @returns A promise that resolves to an object representing a single guild by its name and realm.
|
|
13
|
+
*/
|
|
14
|
+
async function guild(ctx, realmSlug, nameSlug) {
|
|
15
|
+
return await ctx.request({
|
|
16
|
+
method: "GET",
|
|
17
|
+
url: `/data/wow/guild/${realmSlug}/${nameSlug}`,
|
|
18
|
+
namespace: "profile",
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns a single guild's activity by name and realm.
|
|
23
|
+
*
|
|
24
|
+
* @param realmSlug - The slug of the realm.
|
|
25
|
+
* @param nameSlug - The slug of the guild.
|
|
26
|
+
* @returns A promise that resolves to an object representing a single guild's activity by its name and realm.
|
|
27
|
+
*/
|
|
28
|
+
async function guildActivity(ctx, realmSlug, nameSlug) {
|
|
29
|
+
return await ctx.request({
|
|
30
|
+
method: "GET",
|
|
31
|
+
url: `/data/wow/guild/${realmSlug}/${nameSlug}/activity`,
|
|
32
|
+
namespace: "profile",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns a single guild's achievements by name and realm.
|
|
37
|
+
*
|
|
38
|
+
* @param realmSlug - The slug of the realm.
|
|
39
|
+
* @param nameSlug - The slug of the guild.
|
|
40
|
+
* @returns A promise that resolves to an object representing a single guild's achievements by its name and realm.
|
|
41
|
+
*/
|
|
42
|
+
async function guildAchievements(ctx, realmSlug, nameSlug) {
|
|
43
|
+
return await ctx.request({
|
|
44
|
+
method: "GET",
|
|
45
|
+
url: `/data/wow/guild/${realmSlug}/${nameSlug}/achievements`,
|
|
46
|
+
namespace: "profile",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns a single guild's roster by its name and realm.
|
|
51
|
+
*
|
|
52
|
+
* @param realmSlug - The slug of the realm.
|
|
53
|
+
* @param nameSlug - The slug of the guild.
|
|
54
|
+
* @returns A promise that resolves to an object representing a single guild's roster by its name and realm.
|
|
55
|
+
*/
|
|
56
|
+
async function guildRoster(ctx, realmSlug, nameSlug) {
|
|
57
|
+
return await ctx.request({
|
|
58
|
+
method: "GET",
|
|
59
|
+
url: `/data/wow/guild/${realmSlug}/${nameSlug}/roster`,
|
|
60
|
+
namespace: "profile",
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ApiContext } from "../shared/index.js";
|
|
2
|
+
import type { Namespaces } from "../shared/index.js";
|
|
3
|
+
export interface SearchParameters {
|
|
4
|
+
searchFields?: Record<string | symbol, string | number>;
|
|
5
|
+
orderBy?: string;
|
|
6
|
+
page?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface Search {
|
|
10
|
+
page: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
maxPageSize: number;
|
|
13
|
+
pageCount: number;
|
|
14
|
+
resultCountCapped?: boolean;
|
|
15
|
+
results: unknown[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Performs a search.
|
|
19
|
+
*
|
|
20
|
+
* @param SearchParameters - Object containing search parameters.
|
|
21
|
+
* @returns A promise that resolves to an object representing details about the search.
|
|
22
|
+
*/
|
|
23
|
+
export declare function search(ctx: ApiContext, url: string, namespace: Namespaces, searchParameters: SearchParameters): Promise<Search>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.search = search;
|
|
4
|
+
/**
|
|
5
|
+
* Performs a search.
|
|
6
|
+
*
|
|
7
|
+
* @param SearchParameters - Object containing search parameters.
|
|
8
|
+
* @returns A promise that resolves to an object representing details about the search.
|
|
9
|
+
*/
|
|
10
|
+
async function search(ctx, url, namespace, searchParameters) {
|
|
11
|
+
const searchFields = searchParameters.searchFields
|
|
12
|
+
? Object.fromEntries(Object.entries(searchParameters.searchFields).map(([key, value]) => [key, value.toString()]))
|
|
13
|
+
: undefined;
|
|
14
|
+
const qs = {
|
|
15
|
+
...searchFields,
|
|
16
|
+
};
|
|
17
|
+
if (searchParameters.orderBy) {
|
|
18
|
+
qs.orderby = searchParameters.orderBy;
|
|
19
|
+
}
|
|
20
|
+
if (searchParameters.page !== undefined) {
|
|
21
|
+
qs._page = searchParameters.page;
|
|
22
|
+
}
|
|
23
|
+
if (searchParameters.pageSize !== undefined) {
|
|
24
|
+
qs._pageSize = searchParameters.pageSize;
|
|
25
|
+
}
|
|
26
|
+
return await ctx.request({
|
|
27
|
+
method: "GET",
|
|
28
|
+
url: `/data/wow/search${url}`,
|
|
29
|
+
qs,
|
|
30
|
+
namespace,
|
|
31
|
+
});
|
|
32
|
+
}
|