@pinta365/blizzard_api 0.4.0 → 0.6.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.
Files changed (423) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +153 -37
  3. package/esm/mod.d.ts +43 -6
  4. package/esm/mod.js +69 -6
  5. package/esm/src/client.d.ts +95 -0
  6. package/esm/src/client.js +52 -0
  7. package/esm/src/diablo3/community/act.d.ts +29 -0
  8. package/esm/src/diablo3/community/act.js +23 -0
  9. package/esm/src/diablo3/community/artisan.d.ts +50 -0
  10. package/esm/src/diablo3/community/artisan.js +25 -0
  11. package/esm/src/diablo3/community/follower.d.ts +25 -0
  12. package/esm/src/diablo3/community/follower.js +12 -0
  13. package/esm/src/diablo3/community/hero.d.ts +57 -0
  14. package/esm/src/diablo3/community/hero.js +25 -0
  15. package/esm/src/diablo3/community/item.d.ts +48 -0
  16. package/esm/src/diablo3/community/item.js +12 -0
  17. package/esm/src/diablo3/community/item_type.d.ts +26 -0
  18. package/esm/src/diablo3/community/item_type.js +23 -0
  19. package/esm/src/diablo3/community/profile.d.ts +352 -0
  20. package/esm/src/diablo3/community/profile.js +61 -0
  21. package/esm/src/diablo3/game_data/d3.d.ts +127 -0
  22. package/esm/src/diablo3/game_data/d3.js +72 -0
  23. package/esm/src/diablo3/index.d.ts +8 -0
  24. package/esm/src/diablo3/index.js +8 -0
  25. package/esm/src/diablo3/types.d.ts +8 -0
  26. package/esm/src/diablo3/types.js +1 -0
  27. package/esm/src/generated/diablo3_api.d.ts +156 -0
  28. package/esm/src/generated/diablo3_api.js +2 -0
  29. package/esm/src/generated/hearthstone_api.d.ts +51 -0
  30. package/esm/src/generated/hearthstone_api.js +2 -0
  31. package/esm/src/generated/sc2_api.d.ts +139 -0
  32. package/esm/src/generated/sc2_api.js +2 -0
  33. package/esm/src/generated/wow_api.d.ts +1482 -0
  34. package/esm/src/generated/wow_api.js +2 -0
  35. package/esm/src/generated/wow_classic_api.d.ts +555 -0
  36. package/esm/src/generated/wow_classic_api.js +2 -0
  37. package/esm/src/generated/wow_classic_era_api.d.ts +418 -0
  38. package/esm/src/generated/wow_classic_era_api.js +2 -0
  39. package/esm/src/hearthstone/game_data/card_backs.d.ts +31 -0
  40. package/esm/src/hearthstone/game_data/card_backs.js +22 -0
  41. package/esm/src/hearthstone/game_data/cards.d.ts +55 -0
  42. package/esm/src/hearthstone/game_data/cards.js +26 -0
  43. package/esm/src/hearthstone/game_data/decks.d.ts +29 -0
  44. package/esm/src/hearthstone/game_data/decks.js +13 -0
  45. package/esm/src/hearthstone/game_data/metadata.d.ts +82 -0
  46. package/esm/src/hearthstone/game_data/metadata.js +11 -0
  47. package/esm/src/hearthstone/index.d.ts +4 -0
  48. package/esm/src/hearthstone/index.js +4 -0
  49. package/esm/src/hearthstone/search.d.ts +21 -0
  50. package/esm/src/hearthstone/search.js +28 -0
  51. package/esm/src/hearthstone/types.d.ts +5 -0
  52. package/esm/src/hearthstone/types.js +1 -0
  53. package/esm/src/shared/bind.d.ts +14 -0
  54. package/esm/src/shared/bind.js +15 -0
  55. package/esm/src/shared/context.d.ts +163 -0
  56. package/esm/src/shared/context.js +304 -0
  57. package/esm/src/shared/errors.d.ts +53 -0
  58. package/esm/src/shared/errors.js +95 -0
  59. package/esm/src/shared/index.d.ts +4 -0
  60. package/esm/src/shared/index.js +2 -0
  61. package/esm/src/shared/types.d.ts +133 -0
  62. package/esm/src/shared/types.js +2 -0
  63. package/esm/src/starcraft2/community/account.d.ts +19 -0
  64. package/esm/src/starcraft2/community/account.js +15 -0
  65. package/esm/src/starcraft2/community/ladder.d.ts +29 -0
  66. package/esm/src/starcraft2/community/ladder.js +27 -0
  67. package/esm/src/starcraft2/community/legacy.d.ts +206 -0
  68. package/esm/src/starcraft2/community/legacy.js +83 -0
  69. package/esm/src/starcraft2/community/profile.d.ts +255 -0
  70. package/esm/src/starcraft2/community/profile.js +73 -0
  71. package/esm/src/starcraft2/game_data/league.d.ts +35 -0
  72. package/esm/src/starcraft2/game_data/league.js +20 -0
  73. package/esm/src/starcraft2/index.d.ts +5 -0
  74. package/esm/src/starcraft2/index.js +5 -0
  75. package/esm/src/starcraft2/types.d.ts +5 -0
  76. package/esm/src/starcraft2/types.js +1 -0
  77. package/esm/src/wow/game_data/achievement.d.ts +87 -0
  78. package/esm/src/wow/game_data/achievement.js +68 -0
  79. package/esm/src/wow/game_data/auction_house.d.ts +65 -0
  80. package/esm/src/wow/game_data/auction_house.js +33 -0
  81. package/esm/src/wow/game_data/azerite_essence.d.ts +50 -0
  82. package/esm/src/wow/game_data/azerite_essence.js +48 -0
  83. package/esm/src/wow/game_data/connected_realm.d.ts +62 -0
  84. package/esm/src/wow/game_data/connected_realm.js +35 -0
  85. package/esm/src/wow/game_data/covenant.d.ts +115 -0
  86. package/esm/src/wow/game_data/covenant.js +88 -0
  87. package/esm/src/wow/game_data/creature.d.ts +98 -0
  88. package/esm/src/wow/game_data/creature.js +99 -0
  89. package/esm/src/wow/game_data/guild_crest.d.ts +56 -0
  90. package/esm/src/wow/game_data/guild_crest.js +38 -0
  91. package/esm/src/wow/game_data/heirloom.d.ts +82 -0
  92. package/esm/src/wow/game_data/heirloom.js +25 -0
  93. package/esm/src/wow/game_data/housing.d.ts +111 -0
  94. package/esm/src/wow/game_data/housing.js +124 -0
  95. package/esm/src/wow/game_data/item.d.ts +183 -0
  96. package/esm/src/wow/game_data/item.js +100 -0
  97. package/esm/src/wow/game_data/item_appearance.d.ts +102 -0
  98. package/esm/src/wow/game_data/item_appearance.js +73 -0
  99. package/esm/src/wow/game_data/journal.d.ts +124 -0
  100. package/esm/src/wow/game_data/journal.js +98 -0
  101. package/esm/src/wow/game_data/keystone_affix.d.ts +39 -0
  102. package/esm/src/wow/game_data/keystone_affix.js +38 -0
  103. package/esm/src/wow/game_data/media_search.d.ts +9 -0
  104. package/esm/src/wow/game_data/media_search.js +10 -0
  105. package/esm/src/wow/game_data/modified_crafting.d.ts +65 -0
  106. package/esm/src/wow/game_data/modified_crafting.js +62 -0
  107. package/esm/src/wow/game_data/mount.d.ts +38 -0
  108. package/esm/src/wow/game_data/mount.js +35 -0
  109. package/esm/src/wow/game_data/mythic_keystone_dungeon.d.ts +92 -0
  110. package/esm/src/wow/game_data/mythic_keystone_dungeon.js +87 -0
  111. package/esm/src/wow/game_data/mythic_keystone_leaderboard.d.ts +70 -0
  112. package/esm/src/wow/game_data/mythic_keystone_leaderboard.js +28 -0
  113. package/esm/src/wow/game_data/mythic_raid_leaderboard.d.ts +36 -0
  114. package/esm/src/wow/game_data/mythic_raid_leaderboard.js +14 -0
  115. package/esm/src/wow/game_data/neighborhood.d.ts +36 -0
  116. package/esm/src/wow/game_data/neighborhood.js +38 -0
  117. package/esm/src/wow/game_data/pet.d.ts +93 -0
  118. package/esm/src/wow/game_data/pet.js +76 -0
  119. package/esm/src/wow/game_data/playable_class.d.ts +58 -0
  120. package/esm/src/wow/game_data/playable_class.js +51 -0
  121. package/esm/src/wow/game_data/playable_race.d.ts +31 -0
  122. package/esm/src/wow/game_data/playable_race.js +25 -0
  123. package/esm/src/wow/game_data/playable_specialization.d.ts +63 -0
  124. package/esm/src/wow/game_data/playable_specialization.js +38 -0
  125. package/esm/src/wow/game_data/power_type.d.ts +22 -0
  126. package/esm/src/wow/game_data/power_type.js +25 -0
  127. package/esm/src/wow/game_data/profession.d.ts +88 -0
  128. package/esm/src/wow/game_data/profession.js +78 -0
  129. package/esm/src/wow/game_data/pvp_season.d.ts +108 -0
  130. package/esm/src/wow/game_data/pvp_season.js +66 -0
  131. package/esm/src/wow/game_data/pvp_tier.d.ts +41 -0
  132. package/esm/src/wow/game_data/pvp_tier.js +38 -0
  133. package/esm/src/wow/game_data/quest.d.ts +116 -0
  134. package/esm/src/wow/game_data/quest.js +100 -0
  135. package/esm/src/wow/game_data/realm.d.ts +43 -0
  136. package/esm/src/wow/game_data/realm.js +35 -0
  137. package/esm/src/wow/game_data/region.d.ts +26 -0
  138. package/esm/src/wow/game_data/region.js +25 -0
  139. package/esm/src/wow/game_data/reputations.d.ts +57 -0
  140. package/esm/src/wow/game_data/reputations.js +50 -0
  141. package/esm/src/wow/game_data/spell.d.ts +34 -0
  142. package/esm/src/wow/game_data/spell.js +36 -0
  143. package/esm/src/wow/game_data/talent.d.ts +143 -0
  144. package/esm/src/wow/game_data/talent.js +89 -0
  145. package/esm/src/wow/game_data/tech_talent.d.ts +72 -0
  146. package/esm/src/wow/game_data/tech_talent.js +63 -0
  147. package/esm/src/wow/game_data/title.d.ts +33 -0
  148. package/esm/src/wow/game_data/title.js +25 -0
  149. package/esm/src/wow/game_data/token.d.ts +17 -0
  150. package/esm/src/wow/game_data/token.js +18 -0
  151. package/esm/src/wow/game_data/toy.d.ts +25 -0
  152. package/esm/src/wow/game_data/toy.js +25 -0
  153. package/esm/src/wow/index.d.ts +59 -0
  154. package/esm/src/wow/index.js +61 -0
  155. package/esm/src/wow/profile/account_profile.d.ts +185 -0
  156. package/esm/src/wow/profile/account_profile.js +132 -0
  157. package/esm/src/wow/profile/character_achievements.d.ts +88 -0
  158. package/esm/src/wow/profile/character_achievements.js +28 -0
  159. package/esm/src/wow/profile/character_appearance.d.ts +79 -0
  160. package/esm/src/wow/profile/character_appearance.js +14 -0
  161. package/esm/src/wow/profile/character_collections.d.ts +132 -0
  162. package/esm/src/wow/profile/character_collections.js +98 -0
  163. package/esm/src/wow/profile/character_encounters.d.ts +78 -0
  164. package/esm/src/wow/profile/character_encounters.js +42 -0
  165. package/esm/src/wow/profile/character_equipment.d.ts +177 -0
  166. package/esm/src/wow/profile/character_equipment.js +14 -0
  167. package/esm/src/wow/profile/character_house.d.ts +16 -0
  168. package/esm/src/wow/profile/character_house.js +17 -0
  169. package/esm/src/wow/profile/character_hunter_pets.d.ts +22 -0
  170. package/esm/src/wow/profile/character_hunter_pets.js +14 -0
  171. package/esm/src/wow/profile/character_media.d.ts +14 -0
  172. package/esm/src/wow/profile/character_media.js +14 -0
  173. package/esm/src/wow/profile/character_mythic_keystone_profile.d.ts +70 -0
  174. package/esm/src/wow/profile/character_mythic_keystone_profile.js +31 -0
  175. package/esm/src/wow/profile/character_professions.d.ts +29 -0
  176. package/esm/src/wow/profile/character_professions.js +14 -0
  177. package/esm/src/wow/profile/character_profile.d.ts +83 -0
  178. package/esm/src/wow/profile/character_profile.js +39 -0
  179. package/esm/src/wow/profile/character_pvp.d.ts +53 -0
  180. package/esm/src/wow/profile/character_pvp.js +29 -0
  181. package/esm/src/wow/profile/character_quests.d.ts +29 -0
  182. package/esm/src/wow/profile/character_quests.js +28 -0
  183. package/esm/src/wow/profile/character_reputations.d.ts +30 -0
  184. package/esm/src/wow/profile/character_reputations.js +14 -0
  185. package/esm/src/wow/profile/character_soulbinds.d.ts +31 -0
  186. package/esm/src/wow/profile/character_soulbinds.js +14 -0
  187. package/esm/src/wow/profile/character_specializations.d.ts +82 -0
  188. package/esm/src/wow/profile/character_specializations.js +14 -0
  189. package/esm/src/wow/profile/character_statistics.d.ts +104 -0
  190. package/esm/src/wow/profile/character_statistics.js +14 -0
  191. package/esm/src/wow/profile/character_titles.d.ts +14 -0
  192. package/esm/src/wow/profile/character_titles.js +14 -0
  193. package/esm/src/wow/profile/guild.d.ts +150 -0
  194. package/esm/src/wow/profile/guild.js +56 -0
  195. package/esm/src/wow/search.d.ts +23 -0
  196. package/esm/src/wow/search.js +29 -0
  197. package/esm/src/wow/types.d.ts +58 -0
  198. package/esm/src/wow/types.js +1 -0
  199. package/esm/src/wow_classic/auction_house.d.ts +41 -0
  200. package/esm/src/wow_classic/auction_house.js +31 -0
  201. package/esm/src/wow_classic/character_specializations.d.ts +45 -0
  202. package/esm/src/wow_classic/character_specializations.js +18 -0
  203. package/esm/src/wow_classic/era.d.ts +8 -0
  204. package/esm/src/wow_classic/era.js +10 -0
  205. package/esm/src/wow_classic/index.d.ts +15 -0
  206. package/esm/src/wow_classic/index.js +17 -0
  207. package/esm/src/wow_classic/profile_overrides.d.ts +125 -0
  208. package/esm/src/wow_classic/profile_overrides.js +111 -0
  209. package/esm/src/wow_classic/shared.d.ts +23 -0
  210. package/esm/src/wow_classic/shared.js +26 -0
  211. package/esm/src/wow_classic/types.d.ts +3 -0
  212. package/esm/src/wow_classic/types.js +1 -0
  213. package/package.json +23 -2
  214. package/script/mod.d.ts +43 -6
  215. package/script/mod.js +91 -21
  216. package/script/src/client.d.ts +95 -0
  217. package/script/src/client.js +89 -0
  218. package/script/src/diablo3/community/act.d.ts +29 -0
  219. package/script/src/diablo3/community/act.js +27 -0
  220. package/script/src/diablo3/community/artisan.d.ts +50 -0
  221. package/script/src/diablo3/community/artisan.js +29 -0
  222. package/script/src/diablo3/community/follower.d.ts +25 -0
  223. package/script/src/diablo3/community/follower.js +15 -0
  224. package/script/src/diablo3/community/hero.d.ts +57 -0
  225. package/script/src/diablo3/community/hero.js +29 -0
  226. package/script/src/diablo3/community/item.d.ts +48 -0
  227. package/script/src/diablo3/community/item.js +15 -0
  228. package/script/src/diablo3/community/item_type.d.ts +26 -0
  229. package/script/src/diablo3/community/item_type.js +27 -0
  230. package/script/src/diablo3/community/profile.d.ts +352 -0
  231. package/script/src/diablo3/community/profile.js +67 -0
  232. package/script/src/diablo3/game_data/d3.d.ts +127 -0
  233. package/script/src/diablo3/game_data/d3.js +80 -0
  234. package/script/src/diablo3/index.d.ts +8 -0
  235. package/script/src/diablo3/index.js +31 -0
  236. package/script/src/diablo3/types.d.ts +8 -0
  237. package/script/src/diablo3/types.js +2 -0
  238. package/script/src/generated/diablo3_api.d.ts +156 -0
  239. package/script/src/generated/diablo3_api.js +3 -0
  240. package/script/src/generated/hearthstone_api.d.ts +51 -0
  241. package/script/src/generated/hearthstone_api.js +3 -0
  242. package/script/src/generated/sc2_api.d.ts +139 -0
  243. package/script/src/generated/sc2_api.js +3 -0
  244. package/script/src/generated/wow_api.d.ts +1482 -0
  245. package/script/src/generated/wow_api.js +3 -0
  246. package/script/src/generated/wow_classic_api.d.ts +555 -0
  247. package/script/src/generated/wow_classic_api.js +3 -0
  248. package/script/src/generated/wow_classic_era_api.d.ts +418 -0
  249. package/script/src/generated/wow_classic_era_api.js +3 -0
  250. package/script/src/hearthstone/game_data/card_backs.d.ts +31 -0
  251. package/script/src/hearthstone/game_data/card_backs.js +26 -0
  252. package/script/src/hearthstone/game_data/cards.d.ts +55 -0
  253. package/script/src/hearthstone/game_data/cards.js +30 -0
  254. package/script/src/hearthstone/game_data/decks.d.ts +29 -0
  255. package/script/src/hearthstone/game_data/decks.js +16 -0
  256. package/script/src/hearthstone/game_data/metadata.d.ts +82 -0
  257. package/script/src/hearthstone/game_data/metadata.js +14 -0
  258. package/script/src/hearthstone/index.d.ts +4 -0
  259. package/script/src/hearthstone/index.js +13 -0
  260. package/script/src/hearthstone/search.d.ts +21 -0
  261. package/script/src/hearthstone/search.js +31 -0
  262. package/script/src/hearthstone/types.d.ts +5 -0
  263. package/script/src/hearthstone/types.js +2 -0
  264. package/script/src/shared/bind.d.ts +14 -0
  265. package/script/src/shared/bind.js +18 -0
  266. package/script/src/shared/context.d.ts +163 -0
  267. package/script/src/shared/context.js +312 -0
  268. package/script/src/shared/errors.d.ts +53 -0
  269. package/script/src/shared/errors.js +104 -0
  270. package/script/src/shared/index.d.ts +4 -0
  271. package/script/src/shared/index.js +10 -0
  272. package/script/src/shared/types.d.ts +133 -0
  273. package/script/src/shared/types.js +3 -0
  274. package/script/src/starcraft2/community/account.d.ts +19 -0
  275. package/script/src/starcraft2/community/account.js +18 -0
  276. package/script/src/starcraft2/community/ladder.d.ts +29 -0
  277. package/script/src/starcraft2/community/ladder.js +31 -0
  278. package/script/src/starcraft2/community/legacy.d.ts +206 -0
  279. package/script/src/starcraft2/community/legacy.js +91 -0
  280. package/script/src/starcraft2/community/profile.d.ts +255 -0
  281. package/script/src/starcraft2/community/profile.js +80 -0
  282. package/script/src/starcraft2/game_data/league.d.ts +35 -0
  283. package/script/src/starcraft2/game_data/league.js +23 -0
  284. package/script/src/starcraft2/index.d.ts +5 -0
  285. package/script/src/starcraft2/index.js +23 -0
  286. package/script/src/starcraft2/types.d.ts +5 -0
  287. package/script/src/starcraft2/types.js +2 -0
  288. package/script/src/wow/game_data/achievement.d.ts +87 -0
  289. package/script/src/wow/game_data/achievement.js +75 -0
  290. package/script/src/wow/game_data/auction_house.d.ts +65 -0
  291. package/script/src/wow/game_data/auction_house.js +37 -0
  292. package/script/src/wow/game_data/azerite_essence.d.ts +50 -0
  293. package/script/src/wow/game_data/azerite_essence.js +54 -0
  294. package/script/src/wow/game_data/connected_realm.d.ts +62 -0
  295. package/script/src/wow/game_data/connected_realm.js +40 -0
  296. package/script/src/wow/game_data/covenant.d.ts +115 -0
  297. package/script/src/wow/game_data/covenant.js +97 -0
  298. package/script/src/wow/game_data/creature.d.ts +98 -0
  299. package/script/src/wow/game_data/creature.js +109 -0
  300. package/script/src/wow/game_data/guild_crest.d.ts +56 -0
  301. package/script/src/wow/game_data/guild_crest.js +43 -0
  302. package/script/src/wow/game_data/heirloom.d.ts +82 -0
  303. package/script/src/wow/game_data/heirloom.js +29 -0
  304. package/script/src/wow/game_data/housing.d.ts +111 -0
  305. package/script/src/wow/game_data/housing.js +138 -0
  306. package/script/src/wow/game_data/item.d.ts +183 -0
  307. package/script/src/wow/game_data/item.js +110 -0
  308. package/script/src/wow/game_data/item_appearance.d.ts +102 -0
  309. package/script/src/wow/game_data/item_appearance.js +81 -0
  310. package/script/src/wow/game_data/journal.d.ts +124 -0
  311. package/script/src/wow/game_data/journal.js +108 -0
  312. package/script/src/wow/game_data/keystone_affix.d.ts +39 -0
  313. package/script/src/wow/game_data/keystone_affix.js +43 -0
  314. package/script/src/wow/game_data/media_search.d.ts +9 -0
  315. package/script/src/wow/game_data/media_search.js +13 -0
  316. package/script/src/wow/game_data/modified_crafting.d.ts +65 -0
  317. package/script/src/wow/game_data/modified_crafting.js +69 -0
  318. package/script/src/wow/game_data/mount.d.ts +38 -0
  319. package/script/src/wow/game_data/mount.js +40 -0
  320. package/script/src/wow/game_data/mythic_keystone_dungeon.d.ts +92 -0
  321. package/script/src/wow/game_data/mythic_keystone_dungeon.js +96 -0
  322. package/script/src/wow/game_data/mythic_keystone_leaderboard.d.ts +70 -0
  323. package/script/src/wow/game_data/mythic_keystone_leaderboard.js +32 -0
  324. package/script/src/wow/game_data/mythic_raid_leaderboard.d.ts +36 -0
  325. package/script/src/wow/game_data/mythic_raid_leaderboard.js +17 -0
  326. package/script/src/wow/game_data/neighborhood.d.ts +36 -0
  327. package/script/src/wow/game_data/neighborhood.js +43 -0
  328. package/script/src/wow/game_data/pet.d.ts +93 -0
  329. package/script/src/wow/game_data/pet.js +84 -0
  330. package/script/src/wow/game_data/playable_class.d.ts +58 -0
  331. package/script/src/wow/game_data/playable_class.js +57 -0
  332. package/script/src/wow/game_data/playable_race.d.ts +31 -0
  333. package/script/src/wow/game_data/playable_race.js +29 -0
  334. package/script/src/wow/game_data/playable_specialization.d.ts +63 -0
  335. package/script/src/wow/game_data/playable_specialization.js +43 -0
  336. package/script/src/wow/game_data/power_type.d.ts +22 -0
  337. package/script/src/wow/game_data/power_type.js +29 -0
  338. package/script/src/wow/game_data/profession.d.ts +88 -0
  339. package/script/src/wow/game_data/profession.js +86 -0
  340. package/script/src/wow/game_data/pvp_season.d.ts +108 -0
  341. package/script/src/wow/game_data/pvp_season.js +73 -0
  342. package/script/src/wow/game_data/pvp_tier.d.ts +41 -0
  343. package/script/src/wow/game_data/pvp_tier.js +43 -0
  344. package/script/src/wow/game_data/quest.d.ts +116 -0
  345. package/script/src/wow/game_data/quest.js +110 -0
  346. package/script/src/wow/game_data/realm.d.ts +43 -0
  347. package/script/src/wow/game_data/realm.js +40 -0
  348. package/script/src/wow/game_data/region.d.ts +26 -0
  349. package/script/src/wow/game_data/region.js +29 -0
  350. package/script/src/wow/game_data/reputations.d.ts +57 -0
  351. package/script/src/wow/game_data/reputations.js +56 -0
  352. package/script/src/wow/game_data/spell.d.ts +34 -0
  353. package/script/src/wow/game_data/spell.js +41 -0
  354. package/script/src/wow/game_data/talent.d.ts +143 -0
  355. package/script/src/wow/game_data/talent.js +98 -0
  356. package/script/src/wow/game_data/tech_talent.d.ts +72 -0
  357. package/script/src/wow/game_data/tech_talent.js +70 -0
  358. package/script/src/wow/game_data/title.d.ts +33 -0
  359. package/script/src/wow/game_data/title.js +29 -0
  360. package/script/src/wow/game_data/token.d.ts +17 -0
  361. package/script/src/wow/game_data/token.js +21 -0
  362. package/script/src/wow/game_data/toy.d.ts +25 -0
  363. package/script/src/wow/game_data/toy.js +29 -0
  364. package/script/src/wow/index.d.ts +59 -0
  365. package/script/src/wow/index.js +272 -0
  366. package/script/src/wow/profile/account_profile.d.ts +185 -0
  367. package/script/src/wow/profile/account_profile.js +143 -0
  368. package/script/src/wow/profile/character_achievements.d.ts +88 -0
  369. package/script/src/wow/profile/character_achievements.js +32 -0
  370. package/script/src/wow/profile/character_appearance.d.ts +79 -0
  371. package/script/src/wow/profile/character_appearance.js +17 -0
  372. package/script/src/wow/profile/character_collections.d.ts +132 -0
  373. package/script/src/wow/profile/character_collections.js +107 -0
  374. package/script/src/wow/profile/character_encounters.d.ts +78 -0
  375. package/script/src/wow/profile/character_encounters.js +47 -0
  376. package/script/src/wow/profile/character_equipment.d.ts +177 -0
  377. package/script/src/wow/profile/character_equipment.js +17 -0
  378. package/script/src/wow/profile/character_house.d.ts +16 -0
  379. package/script/src/wow/profile/character_house.js +20 -0
  380. package/script/src/wow/profile/character_hunter_pets.d.ts +22 -0
  381. package/script/src/wow/profile/character_hunter_pets.js +17 -0
  382. package/script/src/wow/profile/character_media.d.ts +14 -0
  383. package/script/src/wow/profile/character_media.js +17 -0
  384. package/script/src/wow/profile/character_mythic_keystone_profile.d.ts +70 -0
  385. package/script/src/wow/profile/character_mythic_keystone_profile.js +35 -0
  386. package/script/src/wow/profile/character_professions.d.ts +29 -0
  387. package/script/src/wow/profile/character_professions.js +17 -0
  388. package/script/src/wow/profile/character_profile.d.ts +83 -0
  389. package/script/src/wow/profile/character_profile.js +43 -0
  390. package/script/src/wow/profile/character_pvp.d.ts +53 -0
  391. package/script/src/wow/profile/character_pvp.js +33 -0
  392. package/script/src/wow/profile/character_quests.d.ts +29 -0
  393. package/script/src/wow/profile/character_quests.js +32 -0
  394. package/script/src/wow/profile/character_reputations.d.ts +30 -0
  395. package/script/src/wow/profile/character_reputations.js +17 -0
  396. package/script/src/wow/profile/character_soulbinds.d.ts +31 -0
  397. package/script/src/wow/profile/character_soulbinds.js +17 -0
  398. package/script/src/wow/profile/character_specializations.d.ts +82 -0
  399. package/script/src/wow/profile/character_specializations.js +17 -0
  400. package/script/src/wow/profile/character_statistics.d.ts +104 -0
  401. package/script/src/wow/profile/character_statistics.js +17 -0
  402. package/script/src/wow/profile/character_titles.d.ts +14 -0
  403. package/script/src/wow/profile/character_titles.js +17 -0
  404. package/script/src/wow/profile/guild.d.ts +150 -0
  405. package/script/src/wow/profile/guild.js +62 -0
  406. package/script/src/wow/search.d.ts +23 -0
  407. package/script/src/wow/search.js +32 -0
  408. package/script/src/wow/types.d.ts +58 -0
  409. package/script/src/wow/types.js +2 -0
  410. package/script/src/wow_classic/auction_house.d.ts +41 -0
  411. package/script/src/wow_classic/auction_house.js +35 -0
  412. package/script/src/wow_classic/character_specializations.d.ts +45 -0
  413. package/script/src/wow_classic/character_specializations.js +21 -0
  414. package/script/src/wow_classic/era.d.ts +8 -0
  415. package/script/src/wow_classic/era.js +30 -0
  416. package/script/src/wow_classic/index.d.ts +15 -0
  417. package/script/src/wow_classic/index.js +55 -0
  418. package/script/src/wow_classic/profile_overrides.d.ts +125 -0
  419. package/script/src/wow_classic/profile_overrides.js +123 -0
  420. package/script/src/wow_classic/shared.d.ts +23 -0
  421. package/script/src/wow_classic/shared.js +81 -0
  422. package/script/src/wow_classic/types.d.ts +3 -0
  423. package/script/src/wow_classic/types.js +2 -0
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This module provides the StarCraft II ladder endpoints (grandmaster leaderboard and season) using the Blizzard API.
3
+ */
4
+ import type { ApiContext } from "../../shared/index.js";
5
+ import type { Sc2LadderTeam } from "./profile.js";
6
+ export interface Sc2GrandmasterLeaderboard {
7
+ ladderTeams: Sc2LadderTeam[];
8
+ }
9
+ export interface Sc2Season {
10
+ seasonId: number;
11
+ number: number;
12
+ year: number;
13
+ startDate: string;
14
+ endDate: string;
15
+ }
16
+ /**
17
+ * Returns the grandmaster leaderboard for a region.
18
+ *
19
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
20
+ * @returns A promise that resolves to an object representing the grandmaster leaderboard.
21
+ */
22
+ export declare function grandmasterLeaderboard(ctx: ApiContext, regionId: number): Promise<Sc2GrandmasterLeaderboard>;
23
+ /**
24
+ * Returns the current season for a region.
25
+ *
26
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
27
+ * @returns A promise that resolves to an object representing the season.
28
+ */
29
+ export declare function season(ctx: ApiContext, regionId: number): Promise<Sc2Season>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This module provides the StarCraft II ladder endpoints (grandmaster leaderboard and season) using the Blizzard API.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.grandmasterLeaderboard = grandmasterLeaderboard;
7
+ exports.season = season;
8
+ /**
9
+ * Returns the grandmaster leaderboard for a region.
10
+ *
11
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
12
+ * @returns A promise that resolves to an object representing the grandmaster leaderboard.
13
+ */
14
+ async function grandmasterLeaderboard(ctx, regionId) {
15
+ return await ctx.request({
16
+ method: "GET",
17
+ url: `/sc2/ladder/grandmaster/${regionId}`,
18
+ });
19
+ }
20
+ /**
21
+ * Returns the current season for a region.
22
+ *
23
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
24
+ * @returns A promise that resolves to an object representing the season.
25
+ */
26
+ async function season(ctx, regionId) {
27
+ return await ctx.request({
28
+ method: "GET",
29
+ url: `/sc2/ladder/season/${regionId}`,
30
+ });
31
+ }
@@ -0,0 +1,206 @@
1
+ /**
2
+ * This module provides the legacy StarCraft II community endpoints (profile, ladders, matches, ladder, achievements and
3
+ * rewards) using the Blizzard API.
4
+ */
5
+ import type { ApiContext } from "../../shared/index.js";
6
+ export interface Sc2LegacyIcon {
7
+ x: number;
8
+ y: number;
9
+ w: number;
10
+ h: number;
11
+ offset: number;
12
+ url: string;
13
+ }
14
+ export interface Sc2LegacyCharacter {
15
+ id: string;
16
+ realm: number;
17
+ region: number;
18
+ displayName: string;
19
+ clanName: string;
20
+ clanTag: string;
21
+ profilePath: string;
22
+ }
23
+ export interface Sc2LegacyCareer {
24
+ primaryRace: string;
25
+ terranWins: number;
26
+ protossWins: number;
27
+ zergWins: number;
28
+ highest1v1Rank: string | null;
29
+ highestTeamRank: string | null;
30
+ seasonTotalGames: number;
31
+ careerTotalGames: number;
32
+ }
33
+ export interface Sc2LegacySwarmLevel {
34
+ level: number;
35
+ totalLevelXP: number;
36
+ currentLevelXP: number;
37
+ }
38
+ export interface Sc2LegacySwarmLevels {
39
+ level: number;
40
+ terran: Sc2LegacySwarmLevel;
41
+ zerg: Sc2LegacySwarmLevel;
42
+ protoss: Sc2LegacySwarmLevel;
43
+ }
44
+ export interface Sc2LegacySeason {
45
+ seasonId: number;
46
+ seasonNumber: number;
47
+ seasonYear: number;
48
+ totalGamesThisSeason: number;
49
+ stats: {
50
+ type: string;
51
+ wins: number;
52
+ games: number;
53
+ }[];
54
+ }
55
+ export interface Sc2LegacyAchievementsSummary {
56
+ points: {
57
+ totalPoints: number;
58
+ categoryPoints: Record<string, number>;
59
+ };
60
+ achievements: {
61
+ achievementId: string;
62
+ completionDate: number;
63
+ }[];
64
+ }
65
+ export interface Sc2LegacyProfile {
66
+ id: string;
67
+ realm: number;
68
+ displayName: string;
69
+ clanName: string;
70
+ clanTag: string;
71
+ profilePath: string;
72
+ portrait: Sc2LegacyIcon;
73
+ career: Sc2LegacyCareer;
74
+ swarmLevels: Sc2LegacySwarmLevels;
75
+ campaign: Record<string, unknown>;
76
+ season: Sc2LegacySeason;
77
+ rewards: {
78
+ selected: string[];
79
+ earned: string[];
80
+ };
81
+ achievements: Sc2LegacyAchievementsSummary;
82
+ }
83
+ export interface Sc2LegacyLadderGroup {
84
+ ladder: unknown[];
85
+ characters: Sc2LegacyCharacter[];
86
+ nonRanked: {
87
+ mmq: string;
88
+ gamesPlayed: number;
89
+ }[];
90
+ }
91
+ export interface Sc2LegacyLadders {
92
+ currentSeason: Sc2LegacyLadderGroup[];
93
+ previousSeason: Sc2LegacyLadderGroup[];
94
+ showcasePlacement: Sc2LegacyLadderGroup[];
95
+ }
96
+ export interface Sc2LegacyMatch {
97
+ map: string;
98
+ type: string;
99
+ decision: string;
100
+ speed: string;
101
+ date: number;
102
+ }
103
+ export interface Sc2LegacyMatches {
104
+ matches: Sc2LegacyMatch[];
105
+ }
106
+ export interface Sc2LegacyLadder {
107
+ ladderMembers: {
108
+ character: Sc2LegacyCharacter;
109
+ joinTimestamp: number;
110
+ points: number;
111
+ wins: number;
112
+ losses: number;
113
+ highestRank: number;
114
+ previousRank: number;
115
+ favoriteRaceP1: string;
116
+ }[];
117
+ }
118
+ export interface Sc2LegacyAchievement {
119
+ title: string;
120
+ description: string;
121
+ achievementId: string;
122
+ categoryId: string;
123
+ points: number;
124
+ icon: Sc2LegacyIcon;
125
+ }
126
+ export interface Sc2LegacyAchievementCategory {
127
+ title: string;
128
+ categoryId: string;
129
+ featuredAchievementId: string;
130
+ children?: {
131
+ title: string;
132
+ categoryId: string;
133
+ featuredAchievementId: string;
134
+ }[];
135
+ }
136
+ export interface Sc2LegacyAchievements {
137
+ achievements: Sc2LegacyAchievement[];
138
+ categories: Sc2LegacyAchievementCategory[];
139
+ }
140
+ export interface Sc2LegacyReward {
141
+ title: string;
142
+ id: string;
143
+ icon: Sc2LegacyIcon;
144
+ achievementId: string;
145
+ }
146
+ export interface Sc2LegacyRewards {
147
+ portraits: Sc2LegacyReward[];
148
+ terranDecals: Sc2LegacyReward[];
149
+ zergDecals: Sc2LegacyReward[];
150
+ protossDecals: Sc2LegacyReward[];
151
+ skins: (Sc2LegacyReward & {
152
+ name: string;
153
+ })[];
154
+ animations: (Sc2LegacyReward & {
155
+ command: string;
156
+ })[];
157
+ }
158
+ /**
159
+ * Returns the legacy StarCraft II profile of a player.
160
+ *
161
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
162
+ * @param realmId - The realm: 1 or 2.
163
+ * @param profileId - The unique identifier for the profile.
164
+ * @returns A promise that resolves to an object representing the legacy profile.
165
+ */
166
+ export declare function legacyProfile(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2LegacyProfile>;
167
+ /**
168
+ * Returns the legacy StarCraft II ladders of a player.
169
+ *
170
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
171
+ * @param realmId - The realm: 1 or 2.
172
+ * @param profileId - The unique identifier for the profile.
173
+ * @returns A promise that resolves to an object representing the legacy ladders.
174
+ */
175
+ export declare function legacyLadders(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2LegacyLadders>;
176
+ /**
177
+ * Returns the legacy StarCraft II matches of a player.
178
+ *
179
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
180
+ * @param realmId - The realm: 1 or 2.
181
+ * @param profileId - The unique identifier for the profile.
182
+ * @returns A promise that resolves to an object representing the legacy matches.
183
+ */
184
+ export declare function legacyMatches(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2LegacyMatches>;
185
+ /**
186
+ * Returns a legacy StarCraft II ladder.
187
+ *
188
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
189
+ * @param ladderId - The unique identifier for the ladder.
190
+ * @returns A promise that resolves to an object representing the legacy ladder.
191
+ */
192
+ export declare function legacyLadder(ctx: ApiContext, regionId: number, ladderId: string): Promise<Sc2LegacyLadder>;
193
+ /**
194
+ * Returns the legacy StarCraft II achievements for a region.
195
+ *
196
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
197
+ * @returns A promise that resolves to an object representing the legacy achievements.
198
+ */
199
+ export declare function legacyAchievements(ctx: ApiContext, regionId: number): Promise<Sc2LegacyAchievements>;
200
+ /**
201
+ * Returns the legacy StarCraft II rewards for a region.
202
+ *
203
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
204
+ * @returns A promise that resolves to an object representing the legacy rewards.
205
+ */
206
+ export declare function legacyRewards(ctx: ApiContext, regionId: number): Promise<Sc2LegacyRewards>;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /**
3
+ * This module provides the legacy StarCraft II community endpoints (profile, ladders, matches, ladder, achievements and
4
+ * rewards) using the Blizzard API.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.legacyProfile = legacyProfile;
8
+ exports.legacyLadders = legacyLadders;
9
+ exports.legacyMatches = legacyMatches;
10
+ exports.legacyLadder = legacyLadder;
11
+ exports.legacyAchievements = legacyAchievements;
12
+ exports.legacyRewards = legacyRewards;
13
+ /**
14
+ * Returns the legacy StarCraft II profile of a player.
15
+ *
16
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
17
+ * @param realmId - The realm: 1 or 2.
18
+ * @param profileId - The unique identifier for the profile.
19
+ * @returns A promise that resolves to an object representing the legacy profile.
20
+ */
21
+ async function legacyProfile(ctx, regionId, realmId, profileId) {
22
+ return await ctx.request({
23
+ method: "GET",
24
+ url: `/sc2/legacy/profile/${regionId}/${realmId}/${profileId}`,
25
+ });
26
+ }
27
+ /**
28
+ * Returns the legacy StarCraft II ladders of a player.
29
+ *
30
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
31
+ * @param realmId - The realm: 1 or 2.
32
+ * @param profileId - The unique identifier for the profile.
33
+ * @returns A promise that resolves to an object representing the legacy ladders.
34
+ */
35
+ async function legacyLadders(ctx, regionId, realmId, profileId) {
36
+ return await ctx.request({
37
+ method: "GET",
38
+ url: `/sc2/legacy/profile/${regionId}/${realmId}/${profileId}/ladders`,
39
+ });
40
+ }
41
+ /**
42
+ * Returns the legacy StarCraft II matches of a player.
43
+ *
44
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
45
+ * @param realmId - The realm: 1 or 2.
46
+ * @param profileId - The unique identifier for the profile.
47
+ * @returns A promise that resolves to an object representing the legacy matches.
48
+ */
49
+ async function legacyMatches(ctx, regionId, realmId, profileId) {
50
+ return await ctx.request({
51
+ method: "GET",
52
+ url: `/sc2/legacy/profile/${regionId}/${realmId}/${profileId}/matches`,
53
+ });
54
+ }
55
+ /**
56
+ * Returns a legacy StarCraft II ladder.
57
+ *
58
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
59
+ * @param ladderId - The unique identifier for the ladder.
60
+ * @returns A promise that resolves to an object representing the legacy ladder.
61
+ */
62
+ async function legacyLadder(ctx, regionId, ladderId) {
63
+ return await ctx.request({
64
+ method: "GET",
65
+ url: `/sc2/legacy/ladder/${regionId}/${ladderId}`,
66
+ });
67
+ }
68
+ /**
69
+ * Returns the legacy StarCraft II achievements for a region.
70
+ *
71
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
72
+ * @returns A promise that resolves to an object representing the legacy achievements.
73
+ */
74
+ async function legacyAchievements(ctx, regionId) {
75
+ return await ctx.request({
76
+ method: "GET",
77
+ url: `/sc2/legacy/data/achievements/${regionId}`,
78
+ });
79
+ }
80
+ /**
81
+ * Returns the legacy StarCraft II rewards for a region.
82
+ *
83
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
84
+ * @returns A promise that resolves to an object representing the legacy rewards.
85
+ */
86
+ async function legacyRewards(ctx, regionId) {
87
+ return await ctx.request({
88
+ method: "GET",
89
+ url: `/sc2/legacy/data/rewards/${regionId}`,
90
+ });
91
+ }
@@ -0,0 +1,255 @@
1
+ /**
2
+ * This module provides the StarCraft II profile endpoints (static, metadata, profile, ladder summary and ladder) using
3
+ * the Blizzard API.
4
+ */
5
+ import type { ApiContext } from "../../shared/index.js";
6
+ export interface Sc2StaticAchievement {
7
+ categoryId: string;
8
+ chainAchievementIds: string[];
9
+ chainRewardSize: number;
10
+ criteriaIds: string[];
11
+ description: string;
12
+ flags: number;
13
+ id: string;
14
+ imageUrl: string;
15
+ isChained: boolean;
16
+ points: number;
17
+ title: string;
18
+ uiOrderHint: number;
19
+ }
20
+ export interface Sc2StaticCriterion {
21
+ achievementId: string;
22
+ description: string;
23
+ evaluationClass: string;
24
+ flags: number;
25
+ id: string;
26
+ necessaryQuantity: number;
27
+ uiOrderHint: number;
28
+ }
29
+ export interface Sc2StaticCategory {
30
+ childrenCategoryIds: string[];
31
+ featuredAchievementId: string;
32
+ id: string;
33
+ name: string;
34
+ parentCategoryId: string;
35
+ points: number;
36
+ uiOrderHint: number;
37
+ medalTiers: number[];
38
+ }
39
+ export interface Sc2StaticReward {
40
+ flags: number;
41
+ id: string;
42
+ achievementId: string;
43
+ name: string;
44
+ imageUrl: string;
45
+ unlockableType: string;
46
+ isSkin: boolean;
47
+ uiOrderHint: number;
48
+ command?: string;
49
+ }
50
+ export interface Sc2StaticProfile {
51
+ achievements: Sc2StaticAchievement[];
52
+ criteria: Sc2StaticCriterion[];
53
+ categories: Sc2StaticCategory[];
54
+ rewards: Sc2StaticReward[];
55
+ }
56
+ export interface Sc2ProfileMetadata {
57
+ name: string;
58
+ profileUrl: string;
59
+ avatarUrl: string;
60
+ profileId: string;
61
+ regionId: number;
62
+ realmId: number;
63
+ }
64
+ export interface Sc2ProfileSummary {
65
+ id: string;
66
+ realm: number;
67
+ displayName: string;
68
+ clanName: string;
69
+ clanTag: string;
70
+ portrait: string;
71
+ decalTerran: string;
72
+ decalProtoss: string;
73
+ decalZerg: string;
74
+ totalSwarmLevel: number;
75
+ totalAchievementPoints: number;
76
+ }
77
+ export interface Sc2SeasonSnapshotEntry {
78
+ rank: number;
79
+ leagueName: string | null;
80
+ totalGames: number;
81
+ totalWins: number;
82
+ }
83
+ export interface Sc2Career {
84
+ terranWins: number;
85
+ zergWins: number;
86
+ protossWins: number;
87
+ totalCareerGames: number;
88
+ totalGamesThisSeason: number;
89
+ current1v1LeagueName: string | null;
90
+ currentBestTeamLeagueName: string | null;
91
+ best1v1Finish: {
92
+ leagueName: string | null;
93
+ timesAchieved: number;
94
+ };
95
+ bestTeamFinish: {
96
+ leagueName: string | null;
97
+ timesAchieved: number;
98
+ };
99
+ }
100
+ export interface Sc2SwarmLevel {
101
+ level: number;
102
+ maxLevelPoints: number;
103
+ currentLevelPoints: number;
104
+ }
105
+ export interface Sc2SwarmLevels {
106
+ level: number;
107
+ terran: Sc2SwarmLevel;
108
+ zerg: Sc2SwarmLevel;
109
+ protoss: Sc2SwarmLevel;
110
+ }
111
+ export interface Sc2CategoryPointProgress {
112
+ categoryId: string;
113
+ pointsEarned: number;
114
+ }
115
+ export interface Sc2EarnedReward {
116
+ rewardId: string;
117
+ selected: boolean;
118
+ achievementId?: string;
119
+ category?: string;
120
+ }
121
+ export interface Sc2EarnedAchievement {
122
+ achievementId: string;
123
+ completionDate: number;
124
+ numCompletedAchievementsInSeries: number;
125
+ totalAchievementsInSeries: number;
126
+ isComplete: boolean;
127
+ inProgress: boolean;
128
+ criteria: unknown[];
129
+ nextProgressEarnedQuantity?: number;
130
+ nextProgressRequiredQuantity?: number;
131
+ }
132
+ export interface Sc2PlayerProfile {
133
+ summary: Sc2ProfileSummary;
134
+ snapshot: {
135
+ seasonSnapshot: Record<string, Sc2SeasonSnapshotEntry>;
136
+ totalRankedSeasonGamesPlayed: number;
137
+ };
138
+ career: Sc2Career;
139
+ swarmLevels: Sc2SwarmLevels;
140
+ campaign: Record<string, unknown>;
141
+ categoryPointProgress: Sc2CategoryPointProgress[];
142
+ achievementShowcase: unknown[];
143
+ earnedRewards: Sc2EarnedReward[];
144
+ earnedAchievements: Sc2EarnedAchievement[];
145
+ }
146
+ export interface Sc2LadderTeamMember {
147
+ id: string;
148
+ realm: number;
149
+ region: number;
150
+ displayName: string;
151
+ clanTag?: string;
152
+ favoriteRace: string;
153
+ }
154
+ export interface Sc2LadderTeam {
155
+ teamMembers: Sc2LadderTeamMember[];
156
+ previousRank: number;
157
+ points: number;
158
+ wins: number;
159
+ losses: number;
160
+ mmr: number;
161
+ joinTimestamp: number;
162
+ }
163
+ export interface Sc2LadderMembership {
164
+ ladderId: string;
165
+ localizedGameMode: string;
166
+ rank: number;
167
+ }
168
+ export interface Sc2LadderShowcaseEntry {
169
+ ladderId: string;
170
+ team: {
171
+ localizedGameMode: string;
172
+ members: {
173
+ favoriteRace: string;
174
+ name: string;
175
+ playerId: string;
176
+ region: number;
177
+ }[];
178
+ };
179
+ leagueName: string;
180
+ localizedDivisionName: string;
181
+ rank: number;
182
+ wins: number;
183
+ losses: number;
184
+ }
185
+ export interface Sc2PlacementMatch {
186
+ localizedGameMode: string;
187
+ members: {
188
+ name: string;
189
+ playerId: string;
190
+ region: number;
191
+ }[];
192
+ gamesRemaining: number;
193
+ }
194
+ export interface Sc2LadderSummary {
195
+ showCaseEntries: Sc2LadderShowcaseEntry[];
196
+ placementMatches: Sc2PlacementMatch[];
197
+ allLadderMemberships: Sc2LadderMembership[];
198
+ }
199
+ export interface Sc2Ladder {
200
+ ladderTeams: Sc2LadderTeam[];
201
+ allLadderMemberships: Sc2LadderMembership[];
202
+ league: string;
203
+ currentLadderMembership: {
204
+ ladderId: string;
205
+ localizedGameMode: string;
206
+ };
207
+ ranksAndPools: {
208
+ rank: number;
209
+ mmr: number;
210
+ }[];
211
+ }
212
+ /**
213
+ * Returns the static StarCraft II profile data (achievements, criteria, categories and rewards) for a region.
214
+ *
215
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
216
+ * @returns A promise that resolves to an object representing the static profile data.
217
+ */
218
+ export declare function staticProfile(ctx: ApiContext, regionId: number): Promise<Sc2StaticProfile>;
219
+ /**
220
+ * Returns the metadata of a StarCraft II profile.
221
+ *
222
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
223
+ * @param realmId - The realm: 1 or 2.
224
+ * @param profileId - The unique identifier for the profile.
225
+ * @returns A promise that resolves to an object representing the profile metadata.
226
+ */
227
+ export declare function metadataProfile(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2ProfileMetadata>;
228
+ /**
229
+ * Returns a StarCraft II profile.
230
+ *
231
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
232
+ * @param realmId - The realm: 1 or 2.
233
+ * @param profileId - The unique identifier for the profile.
234
+ * @returns A promise that resolves to an object representing the profile.
235
+ */
236
+ export declare function profile(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2PlayerProfile>;
237
+ /**
238
+ * Returns the ladder summary of a StarCraft II profile.
239
+ *
240
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
241
+ * @param realmId - The realm: 1 or 2.
242
+ * @param profileId - The unique identifier for the profile.
243
+ * @returns A promise that resolves to an object representing the ladder summary.
244
+ */
245
+ export declare function ladderSummary(ctx: ApiContext, regionId: number, realmId: number, profileId: number): Promise<Sc2LadderSummary>;
246
+ /**
247
+ * Returns a StarCraft II ladder.
248
+ *
249
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
250
+ * @param realmId - The realm: 1 or 2.
251
+ * @param profileId - The unique identifier for the profile.
252
+ * @param ladderId - The unique identifier for the ladder.
253
+ * @returns A promise that resolves to an object representing the ladder.
254
+ */
255
+ export declare function ladder(ctx: ApiContext, regionId: number, realmId: number, profileId: number, ladderId: string): Promise<Sc2Ladder>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * This module provides the StarCraft II profile endpoints (static, metadata, profile, ladder summary and ladder) using
4
+ * the Blizzard API.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.staticProfile = staticProfile;
8
+ exports.metadataProfile = metadataProfile;
9
+ exports.profile = profile;
10
+ exports.ladderSummary = ladderSummary;
11
+ exports.ladder = ladder;
12
+ /**
13
+ * Returns the static StarCraft II profile data (achievements, criteria, categories and rewards) for a region.
14
+ *
15
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
16
+ * @returns A promise that resolves to an object representing the static profile data.
17
+ */
18
+ async function staticProfile(ctx, regionId) {
19
+ return await ctx.request({
20
+ method: "GET",
21
+ url: `/sc2/static/profile/${regionId}`,
22
+ });
23
+ }
24
+ /**
25
+ * Returns the metadata of a StarCraft II profile.
26
+ *
27
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
28
+ * @param realmId - The realm: 1 or 2.
29
+ * @param profileId - The unique identifier for the profile.
30
+ * @returns A promise that resolves to an object representing the profile metadata.
31
+ */
32
+ async function metadataProfile(ctx, regionId, realmId, profileId) {
33
+ return await ctx.request({
34
+ method: "GET",
35
+ url: `/sc2/metadata/profile/${regionId}/${realmId}/${profileId}`,
36
+ });
37
+ }
38
+ /**
39
+ * Returns a StarCraft II profile.
40
+ *
41
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
42
+ * @param realmId - The realm: 1 or 2.
43
+ * @param profileId - The unique identifier for the profile.
44
+ * @returns A promise that resolves to an object representing the profile.
45
+ */
46
+ async function profile(ctx, regionId, realmId, profileId) {
47
+ return await ctx.request({
48
+ method: "GET",
49
+ url: `/sc2/profile/${regionId}/${realmId}/${profileId}`,
50
+ });
51
+ }
52
+ /**
53
+ * Returns the ladder summary of a StarCraft II profile.
54
+ *
55
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
56
+ * @param realmId - The realm: 1 or 2.
57
+ * @param profileId - The unique identifier for the profile.
58
+ * @returns A promise that resolves to an object representing the ladder summary.
59
+ */
60
+ async function ladderSummary(ctx, regionId, realmId, profileId) {
61
+ return await ctx.request({
62
+ method: "GET",
63
+ url: `/sc2/profile/${regionId}/${realmId}/${profileId}/ladder/summary`,
64
+ });
65
+ }
66
+ /**
67
+ * Returns a StarCraft II ladder.
68
+ *
69
+ * @param regionId - The region: 1=US, 2=EU, 3=KR/TW, 5=CN.
70
+ * @param realmId - The realm: 1 or 2.
71
+ * @param profileId - The unique identifier for the profile.
72
+ * @param ladderId - The unique identifier for the ladder.
73
+ * @returns A promise that resolves to an object representing the ladder.
74
+ */
75
+ async function ladder(ctx, regionId, realmId, profileId, ladderId) {
76
+ return await ctx.request({
77
+ method: "GET",
78
+ url: `/sc2/profile/${regionId}/${realmId}/${profileId}/ladder/${ladderId}`,
79
+ });
80
+ }