hypixel-api-reborn 11.3.4 → 12.0.0-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/.editorconfig +12 -0
- package/.github/ISSUE_TEMPLATE/Bug_report.md +9 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +25 -0
- package/.github/SECURITY.md +21 -0
- package/.github/labels.yml +24 -0
- package/.github/workflows/ci-cd.yml +126 -0
- package/.vscode/extensions.json +10 -0
- package/README.md +0 -63
- package/dist/API/getAchievements.d.ts +10 -0
- package/dist/API/getAchievements.js +22 -0
- package/dist/API/getAchievements.js.map +1 -0
- package/dist/API/getActiveHouses.d.ts +10 -0
- package/dist/API/getActiveHouses.js +22 -0
- package/dist/API/getActiveHouses.js.map +1 -0
- package/dist/API/getBoosters.d.ts +10 -0
- package/dist/API/getBoosters.js +22 -0
- package/dist/API/getBoosters.js.map +1 -0
- package/dist/API/getChallenges.d.ts +10 -0
- package/dist/API/getChallenges.js +22 -0
- package/dist/API/getChallenges.js.map +1 -0
- package/dist/API/getGameCounts.d.ts +10 -0
- package/dist/API/getGameCounts.js +22 -0
- package/dist/API/getGameCounts.js.map +1 -0
- package/dist/API/getGuild.d.ts +10 -0
- package/dist/API/getGuild.js +36 -0
- package/dist/API/getGuild.js.map +1 -0
- package/dist/API/getGuildAchievements.d.ts +10 -0
- package/dist/API/getGuildAchievements.js +22 -0
- package/dist/API/getGuildAchievements.js.map +1 -0
- package/dist/API/getHouse.d.ts +10 -0
- package/dist/API/getHouse.js +24 -0
- package/dist/API/getHouse.js.map +1 -0
- package/dist/API/getLeaderboards.d.ts +9 -0
- package/dist/API/getLeaderboards.js +32 -0
- package/dist/API/getLeaderboards.js.map +1 -0
- package/dist/API/getPlayer.d.ts +10 -0
- package/dist/API/getPlayer.js +37 -0
- package/dist/API/getPlayer.js.map +1 -0
- package/dist/API/getPlayerHouses.d.ts +10 -0
- package/dist/API/getPlayerHouses.js +25 -0
- package/dist/API/getPlayerHouses.js.map +1 -0
- package/dist/API/getQuests.d.ts +10 -0
- package/dist/API/getQuests.js +22 -0
- package/dist/API/getQuests.js.map +1 -0
- package/dist/API/getRecentGames.d.ts +10 -0
- package/dist/API/getRecentGames.js +25 -0
- package/dist/API/getRecentGames.js.map +1 -0
- package/dist/API/getSkyblockAuction.d.ts +10 -0
- package/dist/API/getSkyblockAuction.js +38 -0
- package/dist/API/getSkyblockAuction.js.map +1 -0
- package/dist/API/getSkyblockAuctions.d.ts +24 -0
- package/dist/API/getSkyblockAuctions.js +57 -0
- package/dist/API/getSkyblockAuctions.js.map +1 -0
- package/dist/API/getSkyblockAuctionsByPlayer.d.ts +10 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js +25 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js.map +1 -0
- package/dist/API/getSkyblockBazaar.d.ts +10 -0
- package/dist/API/getSkyblockBazaar.js +22 -0
- package/dist/API/getSkyblockBazaar.js.map +1 -0
- package/dist/API/getSkyblockBingo.d.ts +10 -0
- package/dist/API/getSkyblockBingo.js +22 -0
- package/dist/API/getSkyblockBingo.js.map +1 -0
- package/dist/API/getSkyblockFireSales.d.ts +10 -0
- package/dist/API/getSkyblockFireSales.js +22 -0
- package/dist/API/getSkyblockFireSales.js.map +1 -0
- package/dist/API/getSkyblockGarden.d.ts +10 -0
- package/dist/API/getSkyblockGarden.js +24 -0
- package/dist/API/getSkyblockGarden.js.map +1 -0
- package/dist/API/getSkyblockGovernment.d.ts +10 -0
- package/dist/API/getSkyblockGovernment.js +22 -0
- package/dist/API/getSkyblockGovernment.js.map +1 -0
- package/dist/API/getSkyblockMember.d.ts +10 -0
- package/dist/API/getSkyblockMember.js +46 -0
- package/dist/API/getSkyblockMember.js.map +1 -0
- package/dist/API/getSkyblockMuseum.d.ts +10 -0
- package/dist/API/getSkyblockMuseum.js +25 -0
- package/dist/API/getSkyblockMuseum.js.map +1 -0
- package/dist/API/getSkyblockNews.d.ts +10 -0
- package/dist/API/getSkyblockNews.js +22 -0
- package/dist/API/getSkyblockNews.js.map +1 -0
- package/dist/API/getSkyblockProfiles.d.ts +10 -0
- package/dist/API/getSkyblockProfiles.js +47 -0
- package/dist/API/getSkyblockProfiles.js.map +1 -0
- package/dist/API/getStatus.d.ts +10 -0
- package/dist/API/getStatus.js +23 -0
- package/dist/API/getStatus.js.map +1 -0
- package/dist/API/getWatchdogStats.d.ts +10 -0
- package/dist/API/getWatchdogStats.js +22 -0
- package/dist/API/getWatchdogStats.js.map +1 -0
- package/dist/API/index.d.ts +57 -0
- package/dist/API/index.js +62 -0
- package/dist/API/index.js.map +1 -0
- package/dist/Client.d.ts +29 -0
- package/dist/Client.js +76 -0
- package/dist/Client.js.map +1 -0
- package/dist/Errors.d.ts +27 -0
- package/dist/Errors.js +31 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Private/CacheHandler.d.ts +14 -0
- package/dist/Private/CacheHandler.js +37 -0
- package/dist/Private/CacheHandler.js.map +1 -0
- package/dist/Private/Endpoint.d.ts +7 -0
- package/dist/Private/Endpoint.js +13 -0
- package/dist/Private/Endpoint.js.map +1 -0
- package/dist/Private/RateLimit.d.ts +13 -0
- package/dist/Private/RateLimit.js +33 -0
- package/dist/Private/RateLimit.js.map +1 -0
- package/dist/Private/Requests.d.ts +29 -0
- package/dist/Private/Requests.js +112 -0
- package/dist/Private/Requests.js.map +1 -0
- package/dist/Private/Updater.d.ts +11 -0
- package/dist/Private/Updater.js +47 -0
- package/dist/Private/Updater.js.map +1 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +66 -0
- package/dist/src/API/getAchievements.js +16 -0
- package/dist/src/API/getAchievements.test.js +74 -0
- package/dist/src/API/getActiveHouses.js +16 -0
- package/dist/src/API/getActiveHouses.test.js +43 -0
- package/dist/src/API/getBoosters.js +16 -0
- package/dist/src/API/getBoosters.test.js +72 -0
- package/dist/src/API/getChallenges.js +16 -0
- package/dist/src/API/getChallenges.test.js +51 -0
- package/dist/src/API/getGameCounts.js +16 -0
- package/dist/src/API/getGameCounts.test.js +26 -0
- package/dist/src/API/getGuild.js +30 -0
- package/dist/src/API/getGuild.test.js +508 -0
- package/dist/src/API/getGuildAchievements.js +16 -0
- package/dist/src/API/getGuildAchievements.test.js +51 -0
- package/dist/src/API/getHouse.js +18 -0
- package/dist/src/API/getHouse.test.js +51 -0
- package/dist/src/API/getLeaderboards.js +23 -0
- package/dist/src/API/getLeaderboards.test.js +55 -0
- package/dist/src/API/getPlayer.js +31 -0
- package/dist/src/API/getPlayer.test.js +290 -0
- package/dist/src/API/getPlayerHouses.js +19 -0
- package/dist/src/API/getPlayerHouses.test.js +50 -0
- package/dist/src/API/getQuests.js +16 -0
- package/dist/src/API/getQuests.test.js +48 -0
- package/dist/src/API/getRecentGames.js +19 -0
- package/dist/src/API/getRecentGames.test.js +52 -0
- package/dist/src/API/getSkyblockAuction.js +32 -0
- package/dist/src/API/getSkyblockAuction.test.js +382 -0
- package/dist/src/API/getSkyblockAuctions.js +51 -0
- package/dist/src/API/getSkyblockAuctions.test.js +366 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.js +19 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.test.js +207 -0
- package/dist/src/API/getSkyblockBazaar.js +16 -0
- package/dist/src/API/getSkyblockBazaar.test.js +51 -0
- package/dist/src/API/getSkyblockBingo.js +16 -0
- package/dist/src/API/getSkyblockBingo.test.js +40 -0
- package/dist/src/API/getSkyblockFireSales.js +16 -0
- package/dist/src/API/getSkyblockFireSales.test.js +55 -0
- package/dist/src/API/getSkyblockGarden.js +18 -0
- package/dist/src/API/getSkyblockGarden.test.js +43 -0
- package/dist/src/API/getSkyblockGovernment.js +16 -0
- package/dist/src/API/getSkyblockGovernment.test.js +60 -0
- package/dist/src/API/getSkyblockMember.js +40 -0
- package/dist/src/API/getSkyblockMember.test.js +648 -0
- package/dist/src/API/getSkyblockMuseum.js +19 -0
- package/dist/src/API/getSkyblockMuseum.test.js +78 -0
- package/dist/src/API/getSkyblockNews.js +16 -0
- package/dist/src/API/getSkyblockNews.test.js +35 -0
- package/dist/src/API/getSkyblockProfiles.js +41 -0
- package/dist/src/API/getSkyblockProfiles.test.js +121 -0
- package/dist/src/API/getStatus.js +17 -0
- package/dist/src/API/getStatus.test.js +57 -0
- package/dist/src/API/getWatchdogStats.js +16 -0
- package/dist/src/API/getWatchdogStats.test.js +37 -0
- package/dist/src/API/index.js +56 -0
- package/dist/src/Client.js +70 -0
- package/dist/src/Client.test.js +115 -0
- package/dist/src/Errors.js +28 -0
- package/dist/src/Private/CacheHandler.js +31 -0
- package/dist/src/Private/CacheHandler.test.js +37 -0
- package/dist/src/Private/Endpoint.js +10 -0
- package/dist/src/Private/Endpoint.test.js +17 -0
- package/dist/src/Private/RateLimit.js +30 -0
- package/dist/src/Private/RateLimit.test.js +73 -0
- package/dist/src/Private/Requests.js +106 -0
- package/dist/src/Private/Requests.test.js +48 -0
- package/dist/src/Private/Updater.js +41 -0
- package/dist/src/Private/Updater.test.js +52 -0
- package/dist/src/index.js +34 -0
- package/dist/src/structures/Boosters/Booster.js +38 -0
- package/dist/src/structures/Boosters/Booster.test.js +7 -0
- package/dist/src/structures/Color.js +73 -0
- package/dist/src/structures/Color.test.js +23 -0
- package/dist/src/structures/Game.js +31 -0
- package/dist/src/structures/GameCounts.js +23 -0
- package/dist/src/structures/Guild/Guild.js +61 -0
- package/dist/src/structures/Guild/GuildMember.js +30 -0
- package/dist/src/structures/Guild/GuildRank.js +20 -0
- package/dist/src/structures/House.js +22 -0
- package/dist/src/structures/House.test.js +24 -0
- package/dist/src/structures/ItemBytes.js +10 -0
- package/dist/src/structures/Leaderboard.js +17 -0
- package/dist/src/structures/Leaderboard.test.js +25 -0
- package/dist/src/structures/MiniGames/Arcade.js +437 -0
- package/dist/src/structures/MiniGames/Arcade.test.js +643 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.js +48 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.test.js +120 -0
- package/dist/src/structures/MiniGames/BedWars.js +299 -0
- package/dist/src/structures/MiniGames/BedWars.test.js +936 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.js +170 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.test.js +2238 -0
- package/dist/src/structures/MiniGames/BuildBattle.js +27 -0
- package/dist/src/structures/MiniGames/BuildBattle.test.js +42 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.js +126 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.test.js +162 -0
- package/dist/src/structures/MiniGames/Duels.js +466 -0
- package/dist/src/structures/MiniGames/Duels.test.js +1853 -0
- package/dist/src/structures/MiniGames/MegaWalls.js +194 -0
- package/dist/src/structures/MiniGames/MegaWalls.test.js +4790 -0
- package/dist/src/structures/MiniGames/MurderMystery.js +84 -0
- package/dist/src/structures/MiniGames/MurderMystery.test.js +241 -0
- package/dist/src/structures/MiniGames/Paintball.js +36 -0
- package/dist/src/structures/MiniGames/Paintball.test.js +51 -0
- package/dist/src/structures/MiniGames/Pit.js +124 -0
- package/dist/src/structures/MiniGames/Pit.test.js +218 -0
- package/dist/src/structures/MiniGames/PitInventoryItem.js +19 -0
- package/dist/src/structures/MiniGames/Quakecraft.js +68 -0
- package/dist/src/structures/MiniGames/Quakecraft.test.js +105 -0
- package/dist/src/structures/MiniGames/SkyWars.js +264 -0
- package/dist/src/structures/MiniGames/Skywars.test.js +413 -0
- package/dist/src/structures/MiniGames/SmashHeroes.js +110 -0
- package/dist/src/structures/MiniGames/SmashHeroes.test.js +647 -0
- package/dist/src/structures/MiniGames/SpeedUHC.js +72 -0
- package/dist/src/structures/MiniGames/SpeedUHC.test.js +245 -0
- package/dist/src/structures/MiniGames/TNTGames.js +120 -0
- package/dist/src/structures/MiniGames/TNTGames.test.js +139 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.js +57 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.test.js +140 -0
- package/dist/src/structures/MiniGames/UHC.js +109 -0
- package/dist/src/structures/MiniGames/UHC.test.js +180 -0
- package/dist/src/structures/MiniGames/VampireZ.js +38 -0
- package/dist/src/structures/MiniGames/VampireZ.test.js +59 -0
- package/dist/src/structures/MiniGames/Walls.js +22 -0
- package/dist/src/structures/MiniGames/Walls.test.js +32 -0
- package/dist/src/structures/MiniGames/Warlords.js +76 -0
- package/dist/src/structures/MiniGames/Warlords.test.js +405 -0
- package/dist/src/structures/MiniGames/WoolWars.js +81 -0
- package/dist/src/structures/MiniGames/WoolWars.test.js +251 -0
- package/dist/src/structures/Pet.js +38 -0
- package/dist/src/structures/Pets.js +14 -0
- package/dist/src/structures/Player.js +147 -0
- package/dist/src/structures/Player.test.js +96 -0
- package/dist/src/structures/PlayerCosmetics.js +53 -0
- package/dist/src/structures/RecentGame.js +25 -0
- package/dist/src/structures/SkyBlock/Auctions/Auction.js +39 -0
- package/dist/src/structures/SkyBlock/Auctions/AuctionInfo.js +15 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.js +19 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.test.js +20 -0
- package/dist/src/structures/SkyBlock/Auctions/Bid.js +20 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.js +16 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.test.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.test.js +46 -0
- package/dist/src/structures/SkyBlock/News/SkyblockNews.js +32 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.js +62 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.test.js +22 -0
- package/dist/src/structures/SkyBlock/SkyblockInventoryItem.js +78 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.js +406 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.test.js +71 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseum.js +29 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseumItem.js +24 -0
- package/dist/src/structures/SkyBlock/SkyblockPet.js +27 -0
- package/dist/src/structures/SkyBlock/SkyblockProfile.js +36 -0
- package/dist/src/structures/SkyBlock/Static/Bingo.js +49 -0
- package/dist/src/structures/SkyBlock/Static/BingoData.js +19 -0
- package/dist/src/structures/SkyBlock/Static/Candidate.js +19 -0
- package/dist/src/structures/SkyBlock/Static/FireSale.js +22 -0
- package/dist/src/structures/SkyBlock/Static/Government.js +33 -0
- package/dist/src/structures/SkyBlock/Static/Perk.js +9 -0
- package/dist/src/structures/Static/Achievement.js +44 -0
- package/dist/src/structures/Static/AchievementTier.js +14 -0
- package/dist/src/structures/Static/Achievements.js +15 -0
- package/dist/src/structures/Static/Challenges.js +15 -0
- package/dist/src/structures/Static/GameAchievements.js +14 -0
- package/dist/src/structures/Static/GameChallenges.js +18 -0
- package/dist/src/structures/Static/GameQuests.js +10 -0
- package/dist/src/structures/Static/GuildAchievements.js +15 -0
- package/dist/src/structures/Static/Quest.js +24 -0
- package/dist/src/structures/Static/Quests.js +15 -0
- package/dist/src/structures/Status.js +17 -0
- package/dist/src/structures/Status.test.js +18 -0
- package/dist/src/structures/WatchdogStats.js +15 -0
- package/dist/src/structures/WatchdogStats.test.js +23 -0
- package/dist/src/utils/Constants.js +2170 -0
- package/dist/src/utils/Guild.js +71 -0
- package/dist/src/utils/Player.js +88 -0
- package/dist/src/utils/Player.test.js +82 -0
- package/dist/src/utils/SkyblockUtils.js +342 -0
- package/dist/src/utils/SkyblockUtils.test.js +8 -0
- package/dist/src/utils/divide.js +6 -0
- package/dist/src/utils/divide.test.js +12 -0
- package/dist/src/utils/isGuildID.js +3 -0
- package/dist/src/utils/isGuildID.test.js +16 -0
- package/dist/src/utils/isUUID.js +5 -0
- package/dist/src/utils/isUUID.test.js +31 -0
- package/dist/src/utils/oscillation.js +13 -0
- package/dist/src/utils/oscillation.test.js +17 -0
- package/dist/src/utils/removeSnakeCase.js +14 -0
- package/dist/src/utils/romanize.js +41 -0
- package/dist/src/utils/romanize.test.js +8 -0
- package/dist/structures/Boosters/Booster.d.ts +17 -0
- package/dist/structures/Boosters/Booster.js +44 -0
- package/dist/structures/Boosters/Booster.js.map +1 -0
- package/dist/structures/Color.d.ts +9 -0
- package/dist/structures/Color.js +76 -0
- package/dist/structures/Color.js.map +1 -0
- package/dist/structures/Game.d.ts +16 -0
- package/dist/structures/Game.js +35 -0
- package/dist/structures/Game.js.map +1 -0
- package/dist/structures/GameCounts.d.ts +7 -0
- package/dist/structures/GameCounts.js +29 -0
- package/dist/structures/GameCounts.js.map +1 -0
- package/dist/structures/Guild/Guild.d.ts +39 -0
- package/dist/structures/Guild/Guild.js +67 -0
- package/dist/structures/Guild/Guild.js.map +1 -0
- package/dist/structures/Guild/GuildMember.d.ts +15 -0
- package/dist/structures/Guild/GuildMember.js +33 -0
- package/dist/structures/Guild/GuildMember.js.map +1 -0
- package/dist/structures/Guild/GuildRank.d.ts +11 -0
- package/dist/structures/Guild/GuildRank.js +23 -0
- package/dist/structures/Guild/GuildRank.js.map +1 -0
- package/dist/structures/House.d.ts +12 -0
- package/dist/structures/House.js +25 -0
- package/dist/structures/House.js.map +1 -0
- package/dist/structures/ItemBytes.d.ts +7 -0
- package/dist/structures/ItemBytes.js +17 -0
- package/dist/structures/ItemBytes.js.map +1 -0
- package/dist/structures/Leaderboard.d.ts +8 -0
- package/dist/structures/Leaderboard.js +16 -0
- package/dist/structures/Leaderboard.js.map +1 -0
- package/dist/structures/MiniGames/Arcade.d.ts +234 -0
- package/dist/structures/MiniGames/Arcade.js +466 -0
- package/dist/structures/MiniGames/Arcade.js.map +1 -0
- package/dist/structures/MiniGames/ArenaBrawl.d.ts +26 -0
- package/dist/structures/MiniGames/ArenaBrawl.js +54 -0
- package/dist/structures/MiniGames/ArenaBrawl.js.map +1 -0
- package/dist/structures/MiniGames/BedWars.d.ts +116 -0
- package/dist/structures/MiniGames/BedWars.js +300 -0
- package/dist/structures/MiniGames/BedWars.js.map +1 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.d.ts +87 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js +176 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js.map +1 -0
- package/dist/structures/MiniGames/BuildBattle.d.ts +18 -0
- package/dist/structures/MiniGames/BuildBattle.js +33 -0
- package/dist/structures/MiniGames/BuildBattle.js.map +1 -0
- package/dist/structures/MiniGames/CopsAndCrims.d.ts +67 -0
- package/dist/structures/MiniGames/CopsAndCrims.js +132 -0
- package/dist/structures/MiniGames/CopsAndCrims.js.map +1 -0
- package/dist/structures/MiniGames/Duels.d.ts +188 -0
- package/dist/structures/MiniGames/Duels.js +473 -0
- package/dist/structures/MiniGames/Duels.js.map +1 -0
- package/dist/structures/MiniGames/MegaWalls.d.ts +99 -0
- package/dist/structures/MiniGames/MegaWalls.js +200 -0
- package/dist/structures/MiniGames/MegaWalls.js.map +1 -0
- package/dist/structures/MiniGames/MurderMystery.d.ts +44 -0
- package/dist/structures/MiniGames/MurderMystery.js +90 -0
- package/dist/structures/MiniGames/MurderMystery.js.map +1 -0
- package/dist/structures/MiniGames/Paintball.d.ts +19 -0
- package/dist/structures/MiniGames/Paintball.js +42 -0
- package/dist/structures/MiniGames/Paintball.js.map +1 -0
- package/dist/structures/MiniGames/Pit.d.ts +41 -0
- package/dist/structures/MiniGames/Pit.js +138 -0
- package/dist/structures/MiniGames/Pit.js.map +1 -0
- package/dist/structures/MiniGames/PitInventoryItem.d.ts +10 -0
- package/dist/structures/MiniGames/PitInventoryItem.js +20 -0
- package/dist/structures/MiniGames/PitInventoryItem.js.map +1 -0
- package/dist/structures/MiniGames/Quakecraft.d.ts +35 -0
- package/dist/structures/MiniGames/Quakecraft.js +74 -0
- package/dist/structures/MiniGames/Quakecraft.js.map +1 -0
- package/dist/structures/MiniGames/SkyWars.d.ts +112 -0
- package/dist/structures/MiniGames/SkyWars.js +272 -0
- package/dist/structures/MiniGames/SkyWars.js.map +1 -0
- package/dist/structures/MiniGames/SmashHeroes.d.ts +58 -0
- package/dist/structures/MiniGames/SmashHeroes.js +116 -0
- package/dist/structures/MiniGames/SmashHeroes.js.map +1 -0
- package/dist/structures/MiniGames/SpeedUHC.d.ts +36 -0
- package/dist/structures/MiniGames/SpeedUHC.js +74 -0
- package/dist/structures/MiniGames/SpeedUHC.js.map +1 -0
- package/dist/structures/MiniGames/TNTGames.d.ts +66 -0
- package/dist/structures/MiniGames/TNTGames.js +126 -0
- package/dist/structures/MiniGames/TNTGames.js.map +1 -0
- package/dist/structures/MiniGames/TurboKartRacers.d.ts +31 -0
- package/dist/structures/MiniGames/TurboKartRacers.js +60 -0
- package/dist/structures/MiniGames/TurboKartRacers.js.map +1 -0
- package/dist/structures/MiniGames/UHC.d.ts +31 -0
- package/dist/structures/MiniGames/UHC.js +115 -0
- package/dist/structures/MiniGames/UHC.js.map +1 -0
- package/dist/structures/MiniGames/VampireZ.d.ts +21 -0
- package/dist/structures/MiniGames/VampireZ.js +44 -0
- package/dist/structures/MiniGames/VampireZ.js.map +1 -0
- package/dist/structures/MiniGames/Walls.d.ts +12 -0
- package/dist/structures/MiniGames/Walls.js +28 -0
- package/dist/structures/MiniGames/Walls.js.map +1 -0
- package/dist/structures/MiniGames/Warlords.d.ts +40 -0
- package/dist/structures/MiniGames/Warlords.js +82 -0
- package/dist/structures/MiniGames/Warlords.js.map +1 -0
- package/dist/structures/MiniGames/WoolWars.d.ts +49 -0
- package/dist/structures/MiniGames/WoolWars.js +87 -0
- package/dist/structures/MiniGames/WoolWars.js.map +1 -0
- package/dist/structures/Pet.d.ts +19 -0
- package/dist/structures/Pet.js +41 -0
- package/dist/structures/Pet.js.map +1 -0
- package/dist/structures/Pets.d.ts +38 -0
- package/dist/structures/Pets.js +20 -0
- package/dist/structures/Pets.js.map +1 -0
- package/dist/structures/Player.d.ts +73 -0
- package/dist/structures/Player.js +158 -0
- package/dist/structures/Player.js.map +1 -0
- package/dist/structures/PlayerCosmetics.d.ts +26 -0
- package/dist/structures/PlayerCosmetics.js +120 -0
- package/dist/structures/PlayerCosmetics.js.map +1 -0
- package/dist/structures/RecentGame.d.ts +13 -0
- package/dist/structures/RecentGame.js +30 -0
- package/dist/structures/RecentGame.js.map +1 -0
- package/dist/structures/ServerInfo.d.ts +20 -0
- package/dist/structures/ServerInfo.js +34 -0
- package/dist/structures/ServerInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Auction.d.ts +22 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js +45 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.d.ts +10 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js +21 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js +25 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Bid.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js +23 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Order.d.ts +9 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js +19 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Product.d.ts +19 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js +33 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js.map +1 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.d.ts +10 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js +35 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockGarden.d.ts +60 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js +65 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.d.ts +38 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js +83 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMember.d.ts +80 -0
- package/dist/structures/SkyBlock/SkyblockMember.js +288 -0
- package/dist/structures/SkyBlock/SkyblockMember.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.d.ts +10 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js +35 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.d.ts +11 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js +30 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockPet.d.ts +15 -0
- package/dist/structures/SkyBlock/SkyblockPet.js +33 -0
- package/dist/structures/SkyBlock/SkyblockPet.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockProfile.d.ts +14 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js +42 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Bingo.d.ts +16 -0
- package/dist/structures/SkyBlock/Static/Bingo.js +52 -0
- package/dist/structures/SkyBlock/Static/Bingo.js.map +1 -0
- package/dist/structures/SkyBlock/Static/BingoData.d.ts +10 -0
- package/dist/structures/SkyBlock/Static/BingoData.js +25 -0
- package/dist/structures/SkyBlock/Static/BingoData.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Candidate.d.ts +11 -0
- package/dist/structures/SkyBlock/Static/Candidate.js +25 -0
- package/dist/structures/SkyBlock/Static/Candidate.js.map +1 -0
- package/dist/structures/SkyBlock/Static/FireSale.d.ts +12 -0
- package/dist/structures/SkyBlock/Static/FireSale.js +25 -0
- package/dist/structures/SkyBlock/Static/FireSale.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Government.d.ts +13 -0
- package/dist/structures/SkyBlock/Static/Government.js +39 -0
- package/dist/structures/SkyBlock/Static/Government.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Perk.d.ts +6 -0
- package/dist/structures/SkyBlock/Static/Perk.js +12 -0
- package/dist/structures/SkyBlock/Static/Perk.js.map +1 -0
- package/dist/structures/Static/Achievement.d.ts +14 -0
- package/dist/structures/Static/Achievement.js +50 -0
- package/dist/structures/Static/Achievement.js.map +1 -0
- package/dist/structures/Static/AchievementTier.d.ts +7 -0
- package/dist/structures/Static/AchievementTier.js +17 -0
- package/dist/structures/Static/AchievementTier.js.map +1 -0
- package/dist/structures/Static/Achievements.d.ts +9 -0
- package/dist/structures/Static/Achievements.js +21 -0
- package/dist/structures/Static/Achievements.js.map +1 -0
- package/dist/structures/Static/Challenges.d.ts +9 -0
- package/dist/structures/Static/Challenges.js +21 -0
- package/dist/structures/Static/Challenges.js.map +1 -0
- package/dist/structures/Static/GameAchievements.d.ts +10 -0
- package/dist/structures/Static/GameAchievements.js +20 -0
- package/dist/structures/Static/GameAchievements.js.map +1 -0
- package/dist/structures/Static/GameChallenges.d.ts +13 -0
- package/dist/structures/Static/GameChallenges.js +21 -0
- package/dist/structures/Static/GameChallenges.js.map +1 -0
- package/dist/structures/Static/GameQuests.d.ts +8 -0
- package/dist/structures/Static/GameQuests.js +16 -0
- package/dist/structures/Static/GameQuests.js.map +1 -0
- package/dist/structures/Static/GuildAchievements.d.ts +8 -0
- package/dist/structures/Static/GuildAchievements.js +21 -0
- package/dist/structures/Static/GuildAchievements.js.map +1 -0
- package/dist/structures/Static/Quest.d.ts +20 -0
- package/dist/structures/Static/Quest.js +27 -0
- package/dist/structures/Static/Quest.js.map +1 -0
- package/dist/structures/Static/Quests.d.ts +9 -0
- package/dist/structures/Static/Quests.js +21 -0
- package/dist/structures/Static/Quests.js.map +1 -0
- package/dist/structures/Status.d.ts +10 -0
- package/dist/structures/Status.js +23 -0
- package/dist/structures/Status.js.map +1 -0
- package/dist/structures/Watchdog/Stats.d.ts +9 -0
- package/dist/structures/Watchdog/Stats.js +18 -0
- package/dist/structures/Watchdog/Stats.js.map +1 -0
- package/dist/utils/Constants.d.ts +1017 -0
- package/dist/utils/Constants.js +2197 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/Guild.d.ts +15 -0
- package/dist/utils/Guild.js +85 -0
- package/dist/utils/Guild.js.map +1 -0
- package/dist/utils/Player.d.ts +8 -0
- package/dist/utils/Player.js +98 -0
- package/dist/utils/Player.js.map +1 -0
- package/dist/utils/SkyblockUtils.d.ts +131 -0
- package/dist/utils/SkyblockUtils.js +394 -0
- package/dist/utils/SkyblockUtils.js.map +1 -0
- package/dist/utils/divide.d.ts +1 -0
- package/dist/utils/divide.js +10 -0
- package/dist/utils/divide.js.map +1 -0
- package/dist/utils/isGuildID.d.ts +1 -0
- package/dist/utils/isGuildID.js +7 -0
- package/dist/utils/isGuildID.js.map +1 -0
- package/dist/utils/isUUID.d.ts +1 -0
- package/dist/utils/isUUID.js +9 -0
- package/dist/utils/isUUID.js.map +1 -0
- package/dist/utils/oscillation.d.ts +2 -0
- package/dist/utils/oscillation.js +15 -0
- package/dist/utils/oscillation.js.map +1 -0
- package/dist/utils/removeSnakeCase.d.ts +3 -0
- package/dist/utils/removeSnakeCase.js +20 -0
- package/dist/utils/removeSnakeCase.js.map +1 -0
- package/dist/utils/romanize.d.ts +1 -0
- package/dist/utils/romanize.js +45 -0
- package/dist/utils/romanize.js.map +1 -0
- package/{eslint.config.mjs → eslint.config.js} +16 -14
- package/package.json +32 -25
- package/renovate.json +21 -0
- package/src/API/API.d.ts +16 -0
- package/src/API/getAchievements.test.ts +81 -0
- package/src/API/getAchievements.ts +20 -0
- package/src/API/getActiveHouses.test.ts +45 -0
- package/src/API/getActiveHouses.ts +20 -0
- package/src/API/getBoosters.test.ts +53 -0
- package/src/API/getBoosters.ts +20 -0
- package/src/API/getChallenges.test.ts +54 -0
- package/src/API/getChallenges.ts +19 -0
- package/src/API/getGameCounts.test.ts +28 -0
- package/src/API/getGameCounts.ts +20 -0
- package/src/API/getGuild.test.ts +478 -0
- package/src/API/getGuild.ts +35 -0
- package/src/API/getGuildAchievements.test.ts +59 -0
- package/src/API/getGuildAchievements.ts +20 -0
- package/src/API/getHouse.test.ts +55 -0
- package/src/API/getHouse.ts +21 -0
- package/src/API/getLeaderboards.test.ts +41 -0
- package/src/API/getLeaderboards.ts +30 -0
- package/src/API/getPlayer.test.ts +494 -0
- package/src/API/getPlayer.ts +33 -0
- package/src/API/getPlayerHouses.test.ts +53 -0
- package/src/API/getPlayerHouses.ts +22 -0
- package/src/API/getQuests.test.ts +51 -0
- package/src/API/getQuests.ts +20 -0
- package/src/API/getRecentGames.test.ts +51 -0
- package/src/API/getRecentGames.ts +22 -0
- package/src/API/getSkyblockAuction.test.ts +293 -0
- package/src/API/getSkyblockAuction.ts +36 -0
- package/src/API/getSkyblockAuctions.test.ts +346 -0
- package/src/API/getSkyblockAuctions.ts +59 -0
- package/src/API/getSkyblockAuctionsByPlayer.test.ts +249 -0
- package/src/API/getSkyblockAuctionsByPlayer.ts +22 -0
- package/src/API/getSkyblockBazaar.test.ts +52 -0
- package/src/API/getSkyblockBazaar.ts +20 -0
- package/src/API/getSkyblockBingo.test.ts +42 -0
- package/src/API/getSkyblockBingo.ts +20 -0
- package/src/API/getSkyblockFireSales.test.ts +43 -0
- package/src/API/getSkyblockFireSales.ts +20 -0
- package/src/API/getSkyblockGarden.test.ts +60 -0
- package/src/API/getSkyblockGarden.ts +21 -0
- package/src/API/getSkyblockGovernment.test.ts +78 -0
- package/src/API/getSkyblockGovernment.ts +20 -0
- package/src/API/getSkyblockMember.test.ts +308 -0
- package/src/API/getSkyblockMember.ts +45 -0
- package/src/API/getSkyblockMuseum.test.ts +91 -0
- package/src/API/getSkyblockMuseum.ts +22 -0
- package/src/API/getSkyblockNews.test.ts +45 -0
- package/src/API/getSkyblockNews.ts +20 -0
- package/src/API/getSkyblockProfiles.test.ts +164 -0
- package/src/API/getSkyblockProfiles.ts +43 -0
- package/src/API/getStatus.test.ts +42 -0
- package/src/API/getStatus.ts +21 -0
- package/src/API/getWatchdogStats.test.ts +44 -0
- package/src/API/getWatchdogStats.ts +20 -0
- package/src/API/index.ts +56 -0
- package/src/Client.test.ts +148 -0
- package/src/Client.ts +91 -0
- package/src/Errors.ts +42 -0
- package/src/Private/CacheHandler.test.ts +49 -0
- package/src/Private/CacheHandler.ts +41 -0
- package/src/Private/Endpoint.test.ts +23 -0
- package/src/Private/Endpoint.ts +14 -0
- package/src/Private/RateLimit.test.ts +99 -0
- package/src/Private/RateLimit.ts +38 -0
- package/src/Private/Requests.test.ts +59 -0
- package/src/Private/Requests.ts +128 -0
- package/src/Private/Updater.test.ts +68 -0
- package/src/Private/Updater.ts +48 -0
- package/src/index.ts +119 -0
- package/src/structures/Boosters/Booster.ts +40 -0
- package/src/structures/Color.ts +79 -0
- package/src/structures/Game.ts +147 -0
- package/src/structures/GameCounts.ts +26 -0
- package/src/structures/Guild/Guild.ts +67 -0
- package/src/structures/Guild/GuildMember.ts +33 -0
- package/src/structures/Guild/GuildRank.ts +22 -0
- package/src/structures/House.ts +24 -0
- package/src/structures/ItemBytes.ts +18 -0
- package/src/structures/Leaderboard.ts +14 -0
- package/src/structures/MiniGames/Arcade.ts +460 -0
- package/src/structures/MiniGames/ArenaBrawl.ts +51 -0
- package/src/structures/MiniGames/{BedWars.js → BedWars.ts} +198 -298
- package/src/structures/MiniGames/BlitzSurvivalGames.ts +173 -0
- package/src/structures/MiniGames/BuildBattle.ts +36 -0
- package/src/structures/MiniGames/CopsAndCrims.ts +131 -0
- package/src/structures/MiniGames/{Duels.js → Duels.ts} +200 -737
- package/src/structures/MiniGames/MegaWalls.ts +197 -0
- package/src/structures/MiniGames/MurderMystery.ts +87 -0
- package/src/structures/MiniGames/Paintball.ts +38 -0
- package/src/structures/MiniGames/Pit.ts +139 -0
- package/src/structures/MiniGames/PitInventoryItem.ts +18 -0
- package/src/structures/MiniGames/Quakecraft.ts +70 -0
- package/src/structures/MiniGames/SkyWars.ts +288 -0
- package/src/structures/MiniGames/SmashHeroes.ts +114 -0
- package/src/structures/MiniGames/SpeedUHC.ts +71 -0
- package/src/structures/MiniGames/TNTGames.ts +126 -0
- package/src/structures/MiniGames/TurboKartRacers.ts +59 -0
- package/src/structures/MiniGames/{UHC.js → UHC.ts} +32 -114
- package/src/structures/MiniGames/VampireZ.ts +41 -0
- package/src/structures/MiniGames/Walls.ts +24 -0
- package/src/structures/MiniGames/Warlords.ts +79 -0
- package/src/structures/MiniGames/WoolWars.ts +106 -0
- package/src/structures/Pet.ts +40 -0
- package/src/structures/Pets.ts +46 -0
- package/src/structures/Player.ts +199 -0
- package/src/structures/{PlayerCosmetics.js → PlayerCosmetics.ts} +36 -63
- package/src/structures/RecentGame.ts +27 -0
- package/src/structures/ServerInfo.ts +40 -0
- package/src/structures/SkyBlock/Auctions/Auction.ts +43 -0
- package/src/structures/SkyBlock/Auctions/AuctionInfo.ts +20 -0
- package/src/structures/SkyBlock/Auctions/BaseAuction.ts +22 -0
- package/src/structures/SkyBlock/Auctions/Bid.ts +22 -0
- package/src/structures/SkyBlock/Bazzar/Order.ts +18 -0
- package/src/structures/SkyBlock/Bazzar/Product.ts +40 -0
- package/src/structures/SkyBlock/News/SkyblockNews.ts +35 -0
- package/src/structures/SkyBlock/SkyblockGarden.ts +118 -0
- package/src/structures/SkyBlock/SkyblockInventoryItem.ts +83 -0
- package/src/structures/SkyBlock/SkyblockMember.ts +317 -0
- package/src/structures/SkyBlock/SkyblockMuseum.ts +43 -0
- package/src/structures/SkyBlock/SkyblockMuseumItem.ts +26 -0
- package/src/structures/SkyBlock/SkyblockPet.ts +30 -0
- package/src/structures/SkyBlock/SkyblockProfile.ts +42 -0
- package/src/structures/SkyBlock/Static/Bingo.ts +50 -0
- package/src/structures/SkyBlock/Static/BingoData.ts +21 -0
- package/src/structures/SkyBlock/Static/Candidate.ts +22 -0
- package/src/structures/SkyBlock/Static/FireSale.ts +24 -0
- package/src/structures/SkyBlock/Static/Government.ts +42 -0
- package/src/structures/SkyBlock/Static/Perk.ts +10 -0
- package/src/structures/Static/Achievement.ts +49 -0
- package/src/structures/Static/AchievementTier.ts +18 -0
- package/src/structures/Static/Achievements.ts +20 -0
- package/src/structures/Static/Challenges.ts +20 -0
- package/src/structures/Static/GameAchievements.ts +19 -0
- package/src/structures/Static/GameChallenges.ts +28 -0
- package/src/structures/Static/GameQuests.ts +13 -0
- package/src/structures/Static/GuildAchievements.ts +19 -0
- package/src/structures/Static/Quest.ts +37 -0
- package/src/structures/Static/Quests.ts +20 -0
- package/src/structures/Status.ts +20 -0
- package/src/structures/Watchdog/Stats.ts +16 -0
- package/src/typings/index.d.ts +24 -0
- package/src/utils/{Constants.js → Constants.ts} +201 -1248
- package/src/utils/Guild.ts +90 -0
- package/src/utils/Player.ts +93 -0
- package/src/utils/SkyblockUtils.test.ts +9 -0
- package/src/utils/SkyblockUtils.ts +516 -0
- package/src/utils/divide.test.ts +13 -0
- package/src/utils/{divide.js → divide.ts} +2 -2
- package/src/utils/isGuildID.test.ts +19 -0
- package/src/utils/isGuildID.ts +3 -0
- package/src/utils/isUUID.test.ts +35 -0
- package/src/utils/{isUUID.js → isUUID.ts} +2 -2
- package/src/utils/oscillation.ts +11 -0
- package/src/utils/removeSnakeCase.ts +18 -0
- package/src/utils/romanize.test.ts +9 -0
- package/src/utils/{romanize.js → romanize.ts} +3 -4
- package/tsconfig.json +25 -0
- package/vitest.config.ts +8 -0
- package/vitest.setup.ts +2 -0
- package/src/API/getAPIStatus.js +0 -8
- package/src/API/getAchievements.js +0 -7
- package/src/API/getBoosters.js +0 -7
- package/src/API/getChallenges.js +0 -7
- package/src/API/getGameCounts.js +0 -7
- package/src/API/getGuild.js +0 -19
- package/src/API/getGuildAchievements.js +0 -7
- package/src/API/getLeaderboards.js +0 -15
- package/src/API/getPlayer.js +0 -23
- package/src/API/getQuests.js +0 -7
- package/src/API/getRecentGames.js +0 -14
- package/src/API/getServerInfo.js +0 -71
- package/src/API/getStatus.js +0 -9
- package/src/API/getWatchdogStats.js +0 -7
- package/src/API/housing/getActiveHouses.js +0 -7
- package/src/API/housing/getHouse.js +0 -9
- package/src/API/housing/getPlayerHouses.js +0 -11
- package/src/API/index.js +0 -35
- package/src/API/skyblock/getAuction.js +0 -21
- package/src/API/skyblock/getAuctions.js +0 -74
- package/src/API/skyblock/getAuctionsByPlayer.js +0 -11
- package/src/API/skyblock/getBazaar.js +0 -8
- package/src/API/skyblock/getBingo.js +0 -7
- package/src/API/skyblock/getBingoByPlayer.js +0 -14
- package/src/API/skyblock/getEndedAuctions.js +0 -11
- package/src/API/skyblock/getFireSales.js +0 -7
- package/src/API/skyblock/getGarden.js +0 -11
- package/src/API/skyblock/getGovernment.js +0 -7
- package/src/API/skyblock/getMember.js +0 -35
- package/src/API/skyblock/getMuseum.js +0 -15
- package/src/API/skyblock/getNews.js +0 -7
- package/src/API/skyblock/getProfiles.js +0 -49
- package/src/Client.js +0 -547
- package/src/Errors.js +0 -66
- package/src/Private/defaultCache.js +0 -77
- package/src/Private/rateLimit.js +0 -83
- package/src/Private/requests.js +0 -76
- package/src/Private/updater.js +0 -34
- package/src/Private/uuidCache.js +0 -30
- package/src/Private/validate.js +0 -108
- package/src/index.js +0 -96
- package/src/structures/APIIncident.js +0 -71
- package/src/structures/APIStatus.js +0 -46
- package/src/structures/Boosters/Booster.js +0 -84
- package/src/structures/Color.js +0 -174
- package/src/structures/Game.js +0 -166
- package/src/structures/GameCounts.js +0 -151
- package/src/structures/Guild/Guild.js +0 -191
- package/src/structures/Guild/GuildMember.js +0 -66
- package/src/structures/Guild/GuildRank.js +0 -48
- package/src/structures/House.js +0 -54
- package/src/structures/ItemBytes.js +0 -33
- package/src/structures/Leaderboard.js +0 -31
- package/src/structures/MiniGames/Arcade.js +0 -1058
- package/src/structures/MiniGames/ArenaBrawl.js +0 -118
- package/src/structures/MiniGames/BlitzSurvivalGames.js +0 -424
- package/src/structures/MiniGames/BuildBattle.js +0 -64
- package/src/structures/MiniGames/CopsAndCrims.js +0 -318
- package/src/structures/MiniGames/MegaWalls.js +0 -478
- package/src/structures/MiniGames/MurderMystery.js +0 -214
- package/src/structures/MiniGames/Paintball.js +0 -87
- package/src/structures/MiniGames/Pit.js +0 -247
- package/src/structures/MiniGames/PitInventoryItem.js +0 -43
- package/src/structures/MiniGames/Quakecraft.js +0 -164
- package/src/structures/MiniGames/SkyWars.js +0 -669
- package/src/structures/MiniGames/SmashHeroes.js +0 -272
- package/src/structures/MiniGames/SpeedUHC.js +0 -168
- package/src/structures/MiniGames/TNTGames.js +0 -285
- package/src/structures/MiniGames/TurboKartRacers.js +0 -141
- package/src/structures/MiniGames/VampireZ.js +0 -93
- package/src/structures/MiniGames/Walls.js +0 -52
- package/src/structures/MiniGames/Warlords.js +0 -187
- package/src/structures/MiniGames/WoolWars.js +0 -174
- package/src/structures/Pet.js +0 -96
- package/src/structures/Pets.js +0 -64
- package/src/structures/Player.js +0 -346
- package/src/structures/RecentGame.js +0 -57
- package/src/structures/ServerInfo.js +0 -78
- package/src/structures/SkyBlock/Auctions/Auction.js +0 -106
- package/src/structures/SkyBlock/Auctions/AuctionInfo.js +0 -56
- package/src/structures/SkyBlock/Auctions/BaseAuction.js +0 -46
- package/src/structures/SkyBlock/Auctions/Bid.js +0 -49
- package/src/structures/SkyBlock/Auctions/PartialAuction.js +0 -26
- package/src/structures/SkyBlock/Bazzar/Order.js +0 -38
- package/src/structures/SkyBlock/Bazzar/Product.js +0 -53
- package/src/structures/SkyBlock/News/SkyblockNews.js +0 -60
- package/src/structures/SkyBlock/PlayerBingo.js +0 -49
- package/src/structures/SkyBlock/SkyblockGarden.js +0 -146
- package/src/structures/SkyBlock/SkyblockInventoryItem.js +0 -168
- package/src/structures/SkyBlock/SkyblockMember.js +0 -591
- package/src/structures/SkyBlock/SkyblockMuseum.js +0 -60
- package/src/structures/SkyBlock/SkyblockMuseumItem.js +0 -54
- package/src/structures/SkyBlock/SkyblockPet.js +0 -71
- package/src/structures/SkyBlock/SkyblockProfile.js +0 -81
- package/src/structures/SkyBlock/Static/Bingo.js +0 -101
- package/src/structures/SkyBlock/Static/BingoData.js +0 -45
- package/src/structures/SkyBlock/Static/Candidate.js +0 -50
- package/src/structures/SkyBlock/Static/FireSale.js +0 -55
- package/src/structures/SkyBlock/Static/Government.js +0 -79
- package/src/structures/SkyBlock/Static/Perk.js +0 -23
- package/src/structures/Static/Achievement.js +0 -87
- package/src/structures/Static/AchievementTier.js +0 -33
- package/src/structures/Static/Achievements.js +0 -30
- package/src/structures/Static/Challenges.js +0 -29
- package/src/structures/Static/GameAchievements.js +0 -36
- package/src/structures/Static/GameChallenges.js +0 -40
- package/src/structures/Static/GameQuests.js +0 -24
- package/src/structures/Static/GuildAchievements.js +0 -34
- package/src/structures/Static/Quest.js +0 -66
- package/src/structures/Static/Quests.js +0 -31
- package/src/structures/Status.js +0 -41
- package/src/structures/Watchdog/Stats.js +0 -36
- package/src/utils/Guild.js +0 -90
- package/src/utils/Player.js +0 -112
- package/src/utils/SkyblockUtils.js +0 -667
- package/src/utils/arrayTools.js +0 -4
- package/src/utils/index.js +0 -14
- package/src/utils/isGuildID.js +0 -3
- package/src/utils/oscillation.js +0 -17
- package/src/utils/removeSnakeCase.js +0 -33
- package/src/utils/rgbToHexColor.js +0 -8
- package/src/utils/toUuid.js +0 -24
- package/src/utils/varInt.js +0 -17
- package/typings/index.d.ts +0 -4297
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import SkyblockMember from '../structures/SkyBlock/SkyblockMember';
|
|
3
|
+
import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile';
|
|
4
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
5
|
+
|
|
6
|
+
test('getSkyblockProfiles (raw)', async () => {
|
|
7
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
|
+
// @ts-expect-error
|
|
10
|
+
const data = await client.getSkyblockProfiles('14727faefbdc4aff848cd2713eb9939e', { raw: true });
|
|
11
|
+
expect(data).toBeDefined();
|
|
12
|
+
expectTypeOf(data).toEqualTypeOf<object>();
|
|
13
|
+
client.destroy();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('getSkyblockProfiles (no input)', () => {
|
|
17
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-expect-error
|
|
20
|
+
expect(() => client.getSkyblockProfiles()).rejects.toThrowError(client.errors.NO_NICKNAME_UUID);
|
|
21
|
+
client.destroy();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test('getSkyblockProfiles (no profiles)', () => {
|
|
25
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
expect(() => client.getSkyblockProfiles('b45add7b081443909fb00aa9a3e15eb0')).rejects.toThrowError(
|
|
29
|
+
client.errors.NO_SKYBLOCK_PROFILES
|
|
30
|
+
);
|
|
31
|
+
client.destroy();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('getSkyblockProfiles', async () => {
|
|
35
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
const data = await client.getSkyblockProfiles('14727faefbdc4aff848cd2713eb9939e');
|
|
39
|
+
expect(data).toBeDefined();
|
|
40
|
+
expectTypeOf(data).toEqualTypeOf<SkyblockProfile[]>();
|
|
41
|
+
|
|
42
|
+
data.forEach((profile: SkyblockProfile) => {
|
|
43
|
+
expect(profile).toBeDefined();
|
|
44
|
+
expectTypeOf(profile).toEqualTypeOf<SkyblockProfile>();
|
|
45
|
+
|
|
46
|
+
expect(profile.profileId).toBeDefined();
|
|
47
|
+
expectTypeOf(profile.profileId).toEqualTypeOf<string>();
|
|
48
|
+
|
|
49
|
+
expect(profile.profileName).toBeDefined();
|
|
50
|
+
expectTypeOf(profile.profileName).toEqualTypeOf<string>();
|
|
51
|
+
|
|
52
|
+
expect(profile.gameMode).toBeDefined();
|
|
53
|
+
expectTypeOf(profile.gameMode).toEqualTypeOf<string | null>();
|
|
54
|
+
|
|
55
|
+
expect(profile.banking).toBeDefined();
|
|
56
|
+
expectTypeOf(profile.banking).toEqualTypeOf<object>();
|
|
57
|
+
|
|
58
|
+
expect(profile.communityUpgrades).toBeDefined();
|
|
59
|
+
expectTypeOf(profile.communityUpgrades).toEqualTypeOf<object>();
|
|
60
|
+
|
|
61
|
+
expect(profile.selected).toBeDefined();
|
|
62
|
+
expectTypeOf(profile.selected).toEqualTypeOf<boolean>();
|
|
63
|
+
|
|
64
|
+
expect(profile.members).toBeDefined();
|
|
65
|
+
expectTypeOf(profile.members).toEqualTypeOf<SkyblockMember[]>();
|
|
66
|
+
|
|
67
|
+
expect(profile.me).toBeDefined();
|
|
68
|
+
expectTypeOf(profile.me).toEqualTypeOf<SkyblockMember | undefined>();
|
|
69
|
+
|
|
70
|
+
expect(profile.toString()).toBeDefined();
|
|
71
|
+
expectTypeOf(profile.toString()).toEqualTypeOf<string>();
|
|
72
|
+
expect(profile.toString()).toBe(profile.profileName);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
client.destroy();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
test('getSkyblockProfiles (garden)', async () => {
|
|
79
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
81
|
+
// @ts-expect-error
|
|
82
|
+
const data = await client.getSkyblockProfiles('kathund', { garden: true });
|
|
83
|
+
expect(data).toBeDefined();
|
|
84
|
+
expectTypeOf(data).toEqualTypeOf<SkyblockProfile[]>();
|
|
85
|
+
|
|
86
|
+
data.forEach((profile: SkyblockProfile) => {
|
|
87
|
+
expect(profile).toBeDefined();
|
|
88
|
+
expectTypeOf(profile).toEqualTypeOf<SkyblockProfile>();
|
|
89
|
+
|
|
90
|
+
expect(profile.profileId).toBeDefined();
|
|
91
|
+
expectTypeOf(profile.profileId).toEqualTypeOf<string>();
|
|
92
|
+
|
|
93
|
+
expect(profile.profileName).toBeDefined();
|
|
94
|
+
expectTypeOf(profile.profileName).toEqualTypeOf<string>();
|
|
95
|
+
|
|
96
|
+
expect(profile.gameMode).toBeDefined();
|
|
97
|
+
expectTypeOf(profile.gameMode).toEqualTypeOf<string | null>();
|
|
98
|
+
|
|
99
|
+
expect(profile.banking).toBeDefined();
|
|
100
|
+
expectTypeOf(profile.banking).toEqualTypeOf<object>();
|
|
101
|
+
|
|
102
|
+
expect(profile.communityUpgrades).toBeDefined();
|
|
103
|
+
expectTypeOf(profile.communityUpgrades).toEqualTypeOf<object>();
|
|
104
|
+
|
|
105
|
+
expect(profile.selected).toBeDefined();
|
|
106
|
+
expectTypeOf(profile.selected).toEqualTypeOf<boolean>();
|
|
107
|
+
|
|
108
|
+
expect(profile.members).toBeDefined();
|
|
109
|
+
expectTypeOf(profile.members).toEqualTypeOf<SkyblockMember[]>();
|
|
110
|
+
|
|
111
|
+
expect(profile.me).toBeDefined();
|
|
112
|
+
expectTypeOf(profile.me).toEqualTypeOf<SkyblockMember | undefined>();
|
|
113
|
+
|
|
114
|
+
expect(profile.toString()).toBeDefined();
|
|
115
|
+
expectTypeOf(profile.toString()).toEqualTypeOf<string>();
|
|
116
|
+
expect(profile.toString()).toBe(profile.profileName);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
client.destroy();
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test('getSkyblockProfiles (museum)', async () => {
|
|
123
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
125
|
+
// @ts-expect-error
|
|
126
|
+
const data = await client.getSkyblockProfiles('14727faefbdc4aff848cd2713eb9939e', { museum: true });
|
|
127
|
+
expect(data).toBeDefined();
|
|
128
|
+
expectTypeOf(data).toEqualTypeOf<SkyblockProfile[]>();
|
|
129
|
+
|
|
130
|
+
data.forEach((profile: SkyblockProfile) => {
|
|
131
|
+
expect(profile).toBeDefined();
|
|
132
|
+
expectTypeOf(profile).toEqualTypeOf<SkyblockProfile>();
|
|
133
|
+
|
|
134
|
+
expect(profile.profileId).toBeDefined();
|
|
135
|
+
expectTypeOf(profile.profileId).toEqualTypeOf<string>();
|
|
136
|
+
|
|
137
|
+
expect(profile.profileName).toBeDefined();
|
|
138
|
+
expectTypeOf(profile.profileName).toEqualTypeOf<string>();
|
|
139
|
+
|
|
140
|
+
expect(profile.gameMode).toBeDefined();
|
|
141
|
+
expectTypeOf(profile.gameMode).toEqualTypeOf<string | null>();
|
|
142
|
+
|
|
143
|
+
expect(profile.banking).toBeDefined();
|
|
144
|
+
expectTypeOf(profile.banking).toEqualTypeOf<object>();
|
|
145
|
+
|
|
146
|
+
expect(profile.communityUpgrades).toBeDefined();
|
|
147
|
+
expectTypeOf(profile.communityUpgrades).toEqualTypeOf<object>();
|
|
148
|
+
|
|
149
|
+
expect(profile.selected).toBeDefined();
|
|
150
|
+
expectTypeOf(profile.selected).toEqualTypeOf<boolean>();
|
|
151
|
+
|
|
152
|
+
expect(profile.members).toBeDefined();
|
|
153
|
+
expectTypeOf(profile.members).toEqualTypeOf<SkyblockMember[]>();
|
|
154
|
+
|
|
155
|
+
expect(profile.me).toBeDefined();
|
|
156
|
+
expectTypeOf(profile.me).toEqualTypeOf<SkyblockMember | undefined>();
|
|
157
|
+
|
|
158
|
+
expect(profile.toString()).toBeDefined();
|
|
159
|
+
expectTypeOf(profile.toString()).toEqualTypeOf<string>();
|
|
160
|
+
expect(profile.toString()).toBe(profile.profileName);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
client.destroy();
|
|
164
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import Endpoint from '../Private/Endpoint';
|
|
3
|
+
import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile';
|
|
4
|
+
import { SkyblockRequestOptions } from './API';
|
|
5
|
+
|
|
6
|
+
class getSkyblockProfiles extends Endpoint {
|
|
7
|
+
readonly client: Client;
|
|
8
|
+
constructor(client: Client) {
|
|
9
|
+
super(client);
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async execute(query: string, options?: SkyblockRequestOptions): Promise<SkyblockProfile[]> {
|
|
14
|
+
if (!query) throw new Error(this.client.errors.NO_NICKNAME_UUID);
|
|
15
|
+
query = await this.client.requests.toUUID(query);
|
|
16
|
+
const res = await this.client.requests.request(`/skyblock/profiles?uuid=${query}`, options);
|
|
17
|
+
if (res.options.raw) return res.data;
|
|
18
|
+
if (!res.data.profiles || !res.data.profiles.length) throw new Error(this.client.errors.NO_SKYBLOCK_PROFILES);
|
|
19
|
+
const profiles = [];
|
|
20
|
+
for (let i = 0; i < res.data.profiles.length; i++) {
|
|
21
|
+
profiles.push({
|
|
22
|
+
uuid: query,
|
|
23
|
+
profileId: res.data.profiles[i].profile_id,
|
|
24
|
+
profileName: res.data.profiles[i].cute_name,
|
|
25
|
+
gameMode: res.data.profiles[i].game_mode || null,
|
|
26
|
+
m: res.data.profiles[i].members[query],
|
|
27
|
+
banking: res.data.profiles[i].banking,
|
|
28
|
+
communityUpgrades: res.data.profiles[i].community_upgrades,
|
|
29
|
+
selected: res.data.profiles[i].selected,
|
|
30
|
+
members: res.data.profiles[i].members,
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
32
|
+
// @ts-expect-error
|
|
33
|
+
garden: options?.garden ? await this.client.getSkyblockGarden(res.data.profiles[i].profile_id) : null,
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
35
|
+
// @ts-expect-error
|
|
36
|
+
museum: options?.garden ? await this.client.getSkyblockMuseum(query, res.data.profiles[i].profile_id) : null
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return profiles.map((p) => new SkyblockProfile(p));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default getSkyblockProfiles;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import Game from '../structures/Game';
|
|
3
|
+
import Status from '../structures/Status';
|
|
4
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
5
|
+
|
|
6
|
+
test('getStatus (raw)', async () => {
|
|
7
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
|
+
// @ts-expect-error
|
|
10
|
+
const data = await client.getStatus('14727faefbdc4aff848cd2713eb9939e', { raw: true });
|
|
11
|
+
expect(data).toBeDefined();
|
|
12
|
+
expectTypeOf(data).toEqualTypeOf<object>();
|
|
13
|
+
client.destroy();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('getStatus', async () => {
|
|
17
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-expect-error
|
|
20
|
+
const data = await client.getStatus('14727faefbdc4aff848cd2713eb9939e');
|
|
21
|
+
expect(data).toBeDefined();
|
|
22
|
+
expect(data).toBeInstanceOf(Status);
|
|
23
|
+
expectTypeOf(data).toEqualTypeOf<Status>();
|
|
24
|
+
|
|
25
|
+
expect(data.online).toBeDefined();
|
|
26
|
+
expectTypeOf(data.online).toEqualTypeOf<boolean>();
|
|
27
|
+
|
|
28
|
+
expect(data.game).toBeDefined();
|
|
29
|
+
expectTypeOf(data.game).toEqualTypeOf<Game | null>();
|
|
30
|
+
|
|
31
|
+
expect(data.mode).toBeDefined();
|
|
32
|
+
expectTypeOf(data.mode).toEqualTypeOf<string | null>();
|
|
33
|
+
|
|
34
|
+
expect(data.map).toBeDefined();
|
|
35
|
+
expectTypeOf(data.map).toEqualTypeOf<string | null>();
|
|
36
|
+
|
|
37
|
+
expect(data.toString()).toBeDefined();
|
|
38
|
+
expectTypeOf(data.toString()).toEqualTypeOf<'Online' | 'Offline'>();
|
|
39
|
+
expect(data.toString()).toBe(data.online ? 'Online' : 'Offline');
|
|
40
|
+
|
|
41
|
+
client.destroy();
|
|
42
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import Endpoint from '../Private/Endpoint';
|
|
3
|
+
import Status from '../structures/Status';
|
|
4
|
+
import { RequestOptions } from '../Private/Requests';
|
|
5
|
+
|
|
6
|
+
class getStatus extends Endpoint {
|
|
7
|
+
readonly client: Client;
|
|
8
|
+
constructor(client: Client) {
|
|
9
|
+
super(client);
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async execute(query: string, options?: RequestOptions): Promise<Status> {
|
|
14
|
+
query = await this.client.requests.toUUID(query);
|
|
15
|
+
const res = await this.client.requests.request(`/status?uuid=${query}`, options);
|
|
16
|
+
if (res.options.raw) return res.data;
|
|
17
|
+
return new Status(res.data.session);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default getStatus;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import WatchdogStats from '../structures/Watchdog/Stats';
|
|
3
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
4
|
+
|
|
5
|
+
test('getWatchdogStats (raw)', async () => {
|
|
6
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
const data = await client.getWatchdogStats({ raw: true });
|
|
10
|
+
expect(data).toBeDefined();
|
|
11
|
+
expectTypeOf(data).toEqualTypeOf<object>();
|
|
12
|
+
client.destroy();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('getWatchdogStats', async () => {
|
|
16
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false });
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
const data = await client.getWatchdogStats();
|
|
20
|
+
expect(data).toBeDefined();
|
|
21
|
+
expectTypeOf(data).toEqualTypeOf<WatchdogStats>();
|
|
22
|
+
expect(data).toBeInstanceOf(WatchdogStats);
|
|
23
|
+
|
|
24
|
+
expect(data.byWatchdogTotal).toBeDefined();
|
|
25
|
+
expectTypeOf(data.byWatchdogTotal).toEqualTypeOf<number>();
|
|
26
|
+
expect(data.byWatchdogTotal).toBeGreaterThanOrEqual(0);
|
|
27
|
+
|
|
28
|
+
expect(data.byWatchdogLastMinute).toBeDefined();
|
|
29
|
+
expectTypeOf(data.byWatchdogLastMinute).toEqualTypeOf<number>();
|
|
30
|
+
expect(data.byWatchdogLastMinute).toBeGreaterThanOrEqual(0);
|
|
31
|
+
|
|
32
|
+
expect(data.byWatchdogRollingDay).toBeDefined();
|
|
33
|
+
expectTypeOf(data.byWatchdogRollingDay).toEqualTypeOf<number>();
|
|
34
|
+
expect(data.byWatchdogRollingDay).toBeGreaterThanOrEqual(0);
|
|
35
|
+
|
|
36
|
+
expect(data.byStaffTotal).toBeDefined();
|
|
37
|
+
expectTypeOf(data.byStaffTotal).toEqualTypeOf<number>();
|
|
38
|
+
expect(data.byStaffTotal).toBeGreaterThanOrEqual(0);
|
|
39
|
+
|
|
40
|
+
expect(data.byStaffRollingDay).toBeDefined();
|
|
41
|
+
expectTypeOf(data.byStaffRollingDay).toEqualTypeOf<number>();
|
|
42
|
+
expect(data.byStaffRollingDay).toBeGreaterThanOrEqual(0);
|
|
43
|
+
client.destroy();
|
|
44
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Client from '../Client';
|
|
2
|
+
import Endpoint from '../Private/Endpoint';
|
|
3
|
+
import WatchdogStats from '../structures/Watchdog/Stats';
|
|
4
|
+
import { RequestOptions } from '../Private/Requests';
|
|
5
|
+
|
|
6
|
+
class getWatchdogStats extends Endpoint {
|
|
7
|
+
readonly client: Client;
|
|
8
|
+
constructor(client: Client) {
|
|
9
|
+
super(client);
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async execute(options?: RequestOptions): Promise<WatchdogStats> {
|
|
14
|
+
const res = await this.client.requests.request('/punishmentstats', options);
|
|
15
|
+
if (res.options.raw) return res.data;
|
|
16
|
+
return new WatchdogStats(res.data);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default getWatchdogStats;
|
package/src/API/index.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import getAchievements from './getAchievements';
|
|
2
|
+
import getActiveHouses from './getActiveHouses';
|
|
3
|
+
import getBoosters from './getBoosters';
|
|
4
|
+
import getChallenges from './getChallenges';
|
|
5
|
+
import getGameCounts from './getGameCounts';
|
|
6
|
+
import getGuild from './getGuild';
|
|
7
|
+
import getGuildAchievements from './getGuildAchievements';
|
|
8
|
+
import getHouse from './getHouse';
|
|
9
|
+
import getLeaderboards from './getLeaderboards';
|
|
10
|
+
import getPlayer from './getPlayer';
|
|
11
|
+
import getPlayerHouses from './getPlayerHouses';
|
|
12
|
+
import getQuests from './getQuests';
|
|
13
|
+
import getRecentGames from './getRecentGames';
|
|
14
|
+
import getSkyblockAuction from './getSkyblockAuction';
|
|
15
|
+
import getSkyblockAuctions from './getSkyblockAuctions';
|
|
16
|
+
import getSkyblockAuctionsByPlayer from './getSkyblockAuctionsByPlayer';
|
|
17
|
+
import getSkyblockBazaar from './getSkyblockBazaar';
|
|
18
|
+
import getSkyblockBingo from './getSkyblockBingo';
|
|
19
|
+
import getSkyblockFireSales from './getSkyblockFireSales';
|
|
20
|
+
import getSkyblockGarden from './getSkyblockGarden';
|
|
21
|
+
import getSkyblockGovernment from './getSkyblockGovernment';
|
|
22
|
+
import getSkyblockMember from './getSkyblockMember';
|
|
23
|
+
import getSkyblockMuseum from './getSkyblockMuseum';
|
|
24
|
+
import getSkyblockNews from './getSkyblockNews';
|
|
25
|
+
import getSkyblockProfiles from './getSkyblockProfiles';
|
|
26
|
+
import getStatus from './getStatus';
|
|
27
|
+
import getWatchdogStats from './getWatchdogStats';
|
|
28
|
+
export default {
|
|
29
|
+
getAchievements,
|
|
30
|
+
getActiveHouses,
|
|
31
|
+
getBoosters,
|
|
32
|
+
getChallenges,
|
|
33
|
+
getGameCounts,
|
|
34
|
+
getGuild,
|
|
35
|
+
getGuildAchievements,
|
|
36
|
+
getHouse,
|
|
37
|
+
getLeaderboards,
|
|
38
|
+
getPlayer,
|
|
39
|
+
getPlayerHouses,
|
|
40
|
+
getQuests,
|
|
41
|
+
getRecentGames,
|
|
42
|
+
getSkyblockAuction,
|
|
43
|
+
getSkyblockAuctions,
|
|
44
|
+
getSkyblockAuctionsByPlayer,
|
|
45
|
+
getSkyblockBazaar,
|
|
46
|
+
getSkyblockBingo,
|
|
47
|
+
getSkyblockFireSales,
|
|
48
|
+
getSkyblockGarden,
|
|
49
|
+
getSkyblockGovernment,
|
|
50
|
+
getSkyblockMember,
|
|
51
|
+
getSkyblockMuseum,
|
|
52
|
+
getSkyblockNews,
|
|
53
|
+
getSkyblockProfiles,
|
|
54
|
+
getStatus,
|
|
55
|
+
getWatchdogStats
|
|
56
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import CacheHandler from './Private/CacheHandler';
|
|
2
|
+
import Client, { ClientOptions } from './Client';
|
|
3
|
+
import Errors from './Errors';
|
|
4
|
+
import Requests from './Private/Requests';
|
|
5
|
+
import Updater from './Private/Updater';
|
|
6
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
7
|
+
const errors = new Errors();
|
|
8
|
+
|
|
9
|
+
test('Client (No Key)', () => {
|
|
10
|
+
expect(() => new Client('')).toThrowError(errors.NO_API_KEY);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('Client (No Options)', () => {
|
|
14
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '');
|
|
15
|
+
expect(client).toBeDefined();
|
|
16
|
+
expect(client).toBeInstanceOf(Client);
|
|
17
|
+
expectTypeOf(client).toEqualTypeOf<Client>();
|
|
18
|
+
|
|
19
|
+
expect(client.key).toBe(process.env.HYPIXEL_KEY ?? '');
|
|
20
|
+
expectTypeOf(client.key).toBeString();
|
|
21
|
+
|
|
22
|
+
expect(client.options).toBeDefined();
|
|
23
|
+
expectTypeOf(client.options).toEqualTypeOf<ClientOptions>();
|
|
24
|
+
|
|
25
|
+
expect(client.options.cache).toBeDefined();
|
|
26
|
+
expect(client.options.cache).toBe(true);
|
|
27
|
+
expect(client.options.cache).toBeTruthy();
|
|
28
|
+
|
|
29
|
+
expect(client.options.cacheTime).toBeDefined();
|
|
30
|
+
expectTypeOf(client.options.cacheTime).toEqualTypeOf<number | undefined>();
|
|
31
|
+
expect(client.options.cacheTime).toBe(300);
|
|
32
|
+
|
|
33
|
+
expect(client.options.cacheMaxKeys).toBeDefined();
|
|
34
|
+
expectTypeOf(client.options.cacheMaxKeys).toEqualTypeOf<number | undefined>();
|
|
35
|
+
expect(client.options.cacheMaxKeys).toBe(-1);
|
|
36
|
+
|
|
37
|
+
expect(client.options.cacheCheckPeriod).toBeDefined();
|
|
38
|
+
expectTypeOf(client.options.cacheCheckPeriod).toEqualTypeOf<number | undefined>();
|
|
39
|
+
expect(client.options.cacheCheckPeriod).toBe(180);
|
|
40
|
+
|
|
41
|
+
expect(client.options.rateLimit).toBeDefined();
|
|
42
|
+
expectTypeOf(client.options.rateLimit).toEqualTypeOf<'AUTO' | 'NONE' | undefined>();
|
|
43
|
+
expect(client.options.rateLimit).toBe('AUTO');
|
|
44
|
+
|
|
45
|
+
expect(client.options.silent).toBeDefined();
|
|
46
|
+
expectTypeOf(client.options.silent).toEqualTypeOf<boolean | undefined>();
|
|
47
|
+
expect(client.options.silent).toBe(false);
|
|
48
|
+
expect(client.options.silent).toBeFalsy();
|
|
49
|
+
|
|
50
|
+
expect(client.options.checkForUpdates).toBeDefined();
|
|
51
|
+
expect(client.options.checkForUpdates).toBeTruthy();
|
|
52
|
+
expect(client.options.checkForUpdates).toBe(true);
|
|
53
|
+
|
|
54
|
+
expect(client.options.checkForUpdatesInterval).toBeDefined();
|
|
55
|
+
expectTypeOf(client.options.checkForUpdatesInterval).toEqualTypeOf<number | undefined>();
|
|
56
|
+
expect(client.options.checkForUpdatesInterval).toBe(60);
|
|
57
|
+
|
|
58
|
+
expect(client.requests).toBeDefined();
|
|
59
|
+
expect(client.requests).toBeInstanceOf(Requests);
|
|
60
|
+
expectTypeOf(client.requests).toEqualTypeOf<Requests>();
|
|
61
|
+
|
|
62
|
+
expect(client.cacheHandler).toBeDefined();
|
|
63
|
+
expect(client.cacheHandler).toBeInstanceOf(CacheHandler);
|
|
64
|
+
expectTypeOf(client.cacheHandler).toEqualTypeOf<CacheHandler>();
|
|
65
|
+
|
|
66
|
+
expect(client.updater).toBeDefined();
|
|
67
|
+
expect(client.updater).toBeInstanceOf(Updater);
|
|
68
|
+
expectTypeOf(client.updater).toEqualTypeOf<Updater>();
|
|
69
|
+
|
|
70
|
+
expect(client.errors).toBeDefined();
|
|
71
|
+
expect(client.errors).toBeInstanceOf(Errors);
|
|
72
|
+
expectTypeOf(client.errors).toEqualTypeOf<Errors>();
|
|
73
|
+
|
|
74
|
+
client.destroy();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('Client (Options)', () => {
|
|
78
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', {
|
|
79
|
+
cache: false,
|
|
80
|
+
cacheTime: 600,
|
|
81
|
+
cacheMaxKeys: 100,
|
|
82
|
+
cacheCheckPeriod: 300,
|
|
83
|
+
rateLimit: 'NONE',
|
|
84
|
+
silent: true,
|
|
85
|
+
checkForUpdates: false,
|
|
86
|
+
checkForUpdatesInterval: 120
|
|
87
|
+
});
|
|
88
|
+
expect(client).toBeDefined();
|
|
89
|
+
expect(client).toBeInstanceOf(Client);
|
|
90
|
+
expectTypeOf(client).toEqualTypeOf<Client>();
|
|
91
|
+
|
|
92
|
+
expect(client.key).toBe(process.env.HYPIXEL_KEY ?? '');
|
|
93
|
+
expectTypeOf(client.key).toBeString();
|
|
94
|
+
|
|
95
|
+
expect(client.options).toBeDefined();
|
|
96
|
+
expectTypeOf(client.options).toEqualTypeOf<ClientOptions>();
|
|
97
|
+
|
|
98
|
+
expect(client.options.cache).toBeDefined();
|
|
99
|
+
expect(client.options.cache).toBe(false);
|
|
100
|
+
expect(client.options.cache).toBeFalsy();
|
|
101
|
+
|
|
102
|
+
expect(client.options.cacheTime).toBeDefined();
|
|
103
|
+
expectTypeOf(client.options.cacheTime).toEqualTypeOf<number | undefined>();
|
|
104
|
+
expect(client.options.cacheTime).toBe(600);
|
|
105
|
+
|
|
106
|
+
expect(client.options.cacheMaxKeys).toBeDefined();
|
|
107
|
+
expectTypeOf(client.options.cacheMaxKeys).toEqualTypeOf<number | undefined>();
|
|
108
|
+
expect(client.options.cacheMaxKeys).toBe(100);
|
|
109
|
+
|
|
110
|
+
expect(client.options.cacheCheckPeriod).toBeDefined();
|
|
111
|
+
expectTypeOf(client.options.cacheCheckPeriod).toEqualTypeOf<number | undefined>();
|
|
112
|
+
expect(client.options.cacheCheckPeriod).toBe(300);
|
|
113
|
+
|
|
114
|
+
expect(client.options.rateLimit).toBeDefined();
|
|
115
|
+
expectTypeOf(client.options.rateLimit).toEqualTypeOf<'AUTO' | 'NONE' | undefined>();
|
|
116
|
+
expect(client.options.rateLimit).toBe('NONE');
|
|
117
|
+
|
|
118
|
+
expect(client.options.silent).toBeDefined();
|
|
119
|
+
expectTypeOf(client.options.silent).toEqualTypeOf<boolean | undefined>();
|
|
120
|
+
expect(client.options.silent).toBe(true);
|
|
121
|
+
expect(client.options.silent).toBeTruthy();
|
|
122
|
+
|
|
123
|
+
expect(client.options.checkForUpdates).toBeDefined();
|
|
124
|
+
expect(client.options.checkForUpdates).toBeFalsy();
|
|
125
|
+
expect(client.options.checkForUpdates).toBe(false);
|
|
126
|
+
|
|
127
|
+
expect(client.options.checkForUpdatesInterval).toBeDefined();
|
|
128
|
+
expectTypeOf(client.options.checkForUpdatesInterval).toEqualTypeOf<number | undefined>();
|
|
129
|
+
expect(client.options.checkForUpdatesInterval).toBe(120);
|
|
130
|
+
|
|
131
|
+
expect(client.requests).toBeDefined();
|
|
132
|
+
expect(client.requests).toBeInstanceOf(Requests);
|
|
133
|
+
expectTypeOf(client.requests).toEqualTypeOf<Requests>();
|
|
134
|
+
|
|
135
|
+
expect(client.cacheHandler).toBeDefined();
|
|
136
|
+
expect(client.cacheHandler).toBeInstanceOf(CacheHandler);
|
|
137
|
+
expectTypeOf(client.cacheHandler).toEqualTypeOf<CacheHandler>();
|
|
138
|
+
|
|
139
|
+
expect(client.updater).toBeDefined();
|
|
140
|
+
expect(client.updater).toBeInstanceOf(Updater);
|
|
141
|
+
expectTypeOf(client.updater).toEqualTypeOf<Updater>();
|
|
142
|
+
|
|
143
|
+
expect(client.errors).toBeDefined();
|
|
144
|
+
expect(client.errors).toBeInstanceOf(Errors);
|
|
145
|
+
expectTypeOf(client.errors).toEqualTypeOf<Errors>();
|
|
146
|
+
|
|
147
|
+
client.destroy();
|
|
148
|
+
});
|
package/src/Client.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import API from './API';
|
|
2
|
+
import CacheHandler from './Private/CacheHandler';
|
|
3
|
+
import Errors from './Errors';
|
|
4
|
+
import RateLimit from './Private/RateLimit';
|
|
5
|
+
import Requests from './Private/Requests';
|
|
6
|
+
import Updater from './Private/Updater';
|
|
7
|
+
|
|
8
|
+
export interface ClientOptions {
|
|
9
|
+
cache?: boolean;
|
|
10
|
+
cacheTime?: number;
|
|
11
|
+
cacheMaxKeys?: number;
|
|
12
|
+
cacheCheckPeriod?: number;
|
|
13
|
+
rateLimit?: 'AUTO' | 'NONE';
|
|
14
|
+
silent?: boolean;
|
|
15
|
+
checkForUpdates?: boolean;
|
|
16
|
+
checkForUpdatesInterval?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const clients: Client[] = [];
|
|
20
|
+
|
|
21
|
+
class Client {
|
|
22
|
+
declare options: ClientOptions;
|
|
23
|
+
declare requests: Requests;
|
|
24
|
+
declare cacheHandler: CacheHandler;
|
|
25
|
+
declare updater: Updater;
|
|
26
|
+
declare errors: Errors;
|
|
27
|
+
declare rateLimit: RateLimit;
|
|
28
|
+
readonly key: string;
|
|
29
|
+
declare interval: NodeJS.Timeout;
|
|
30
|
+
constructor(key: string, options?: ClientOptions) {
|
|
31
|
+
this.key = key;
|
|
32
|
+
this.errors = new Errors();
|
|
33
|
+
if (!this.key.length) throw new Error(this.errors.NO_API_KEY);
|
|
34
|
+
this.options = this.parasOptions(options);
|
|
35
|
+
this.requests = new Requests(this);
|
|
36
|
+
this.cacheHandler = new CacheHandler(this);
|
|
37
|
+
this.updater = new Updater(this);
|
|
38
|
+
this.rateLimit = new RateLimit(this);
|
|
39
|
+
if ('NONE' !== this.options.rateLimit) this.rateLimit.initialize();
|
|
40
|
+
for (const func in API) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
|
+
// @ts-expect-error
|
|
43
|
+
const endpoint = new API[func](this);
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
45
|
+
// @ts-expect-error
|
|
46
|
+
this[func] = endpoint.execute.bind(endpoint);
|
|
47
|
+
}
|
|
48
|
+
if (clients.find((x) => x.key === key)) {
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
50
|
+
console.warn(this.errors.MULTIPLE_INSTANCES);
|
|
51
|
+
const found = clients.find((x) => x.key === key);
|
|
52
|
+
if (found) {
|
|
53
|
+
this.destroy();
|
|
54
|
+
Object.assign(this, found);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (this.options.checkForUpdates) {
|
|
60
|
+
this.interval = setInterval(
|
|
61
|
+
() => {
|
|
62
|
+
this.updater.checkForUpdates();
|
|
63
|
+
},
|
|
64
|
+
1000 * 60 * (this.options.checkForUpdatesInterval ?? 60)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
clients.push(this);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
destroy() {
|
|
71
|
+
const clientIndex = clients.findIndex((client) => client.key === this.key);
|
|
72
|
+
if (-1 !== clientIndex) clients.splice(clientIndex, 1);
|
|
73
|
+
if (this.interval) clearInterval(this.interval);
|
|
74
|
+
if (this.rateLimit.interval) clearInterval(this.rateLimit.interval);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private parasOptions(options?: ClientOptions): ClientOptions {
|
|
78
|
+
return {
|
|
79
|
+
cache: options?.cache ?? true,
|
|
80
|
+
cacheTime: options?.cacheTime ?? 300,
|
|
81
|
+
cacheMaxKeys: options?.cacheMaxKeys ?? -1,
|
|
82
|
+
cacheCheckPeriod: options?.cacheCheckPeriod ?? 180,
|
|
83
|
+
rateLimit: options?.rateLimit ?? 'AUTO',
|
|
84
|
+
silent: options?.silent ?? false,
|
|
85
|
+
checkForUpdates: options?.checkForUpdates ?? true,
|
|
86
|
+
checkForUpdatesInterval: options?.checkForUpdatesInterval ?? 60
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default Client;
|
package/src/Errors.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
class Errors {
|
|
3
|
+
INVALID_API_KEY: string =
|
|
4
|
+
'[Hypixel-API-Reborn] Invalid API Key! For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
5
|
+
NO_API_KEY: string =
|
|
6
|
+
'[Hypixel-API-Reborn] No API Key specified! For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
7
|
+
ERROR_CODE_CAUSE: string =
|
|
8
|
+
'[Hypixel-API-Reborn] Code: {code} - {cause}! For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
9
|
+
ERROR_STATUSTEXT: string =
|
|
10
|
+
'[Hypixel-API-Reborn] {statustext}! For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
11
|
+
NO_NICKNAME_UUID: string = '[Hypixel-API-Reborn] No nickname or uuid specified.';
|
|
12
|
+
NO_UUID: string = '[Hypixel-API-Reborn] No uuid specified.';
|
|
13
|
+
UUID_NICKNAME_MUST_BE_A_STRING: string = '[Hypixel-API-Reborn] Nickname or uuid must be a string.';
|
|
14
|
+
MALFORMED_UUID: string = '[Hypixel-API-Reborn] Malformed UUID!';
|
|
15
|
+
PLAYER_HAS_NEVER_LOGGED: string = '[Hypixel-API-Reborn] Player has never logged into Hypixel.';
|
|
16
|
+
NO_GUILD_QUERY: string = '[Hypixel-API-Reborn] No guild search query specified.';
|
|
17
|
+
INVALID_GUILD_ID: string = '[Hypixel-API-Reborn] Specified Guild ID is invalid.';
|
|
18
|
+
INVALID_GUILD_SEARCH_PARAMETER: string =
|
|
19
|
+
"[Hypixel-API-Reborn] getGuild() searchParameter must be 'id'; 'guild' or 'player'.";
|
|
20
|
+
SOMETHING_WENT_WRONG: string = '[Hypixel-API-Reborn] Something went wrong. {cause}';
|
|
21
|
+
GUILD_DOES_NOT_EXIST: string = '[Hypixel-API-Reborn] Guild does not exist.';
|
|
22
|
+
PAGE_INDEX_ERROR: string =
|
|
23
|
+
'[Hypixel-API-Reborn] Invalid page index. Must be an integer, an array of 2 integers, or a keyword. For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
24
|
+
INVALID_OPTION_VALUE: string =
|
|
25
|
+
'[Hypixel-API-Reborn] Invalid option value! For help join our Discord Server https://discord.gg/NSEBNMM';
|
|
26
|
+
UPDATER_REQUEST_NOT_OK: string = '[Hypixel-API-Reborn] Something went wrong while checking for updates.';
|
|
27
|
+
MULTIPLE_INSTANCES: string =
|
|
28
|
+
'[Hypixel-API-Reborn] Multiple instances of hypixel-api-reborn are found so we merged them for you. Please refrain from spawning multiple instances in the future. For more information, join our Discord Server https://discord.gg/NSEBNMM.';
|
|
29
|
+
UNEXPECTED_ERROR: string =
|
|
30
|
+
"[Hypixel-API-Reborn] The data provided to hypixel API is malformed and thus not recognized by hypixel, but this shouldn't be your fault. Please report this error in our Discord Server https://discord.gg/NSEBNMM or GitHub. ";
|
|
31
|
+
RATE_LIMIT_EXCEEDED: string =
|
|
32
|
+
"[Hypixel-API-Reborn] The rate limitations on your API Key has been exceeded. There might be an outage (Check Hypixel's status page), or you simply did too many requests in a short time. Hint: Enable rate limit options! They can help you avoid this error! For help join our Discord Server https://discord.gg/NSEBNMM";
|
|
33
|
+
NO_SKYBLOCK_PROFILES: string = '[Hypixel-API-Reborn] The player has no skyblock profiles.';
|
|
34
|
+
BAD_AUCTION_FILTER: string =
|
|
35
|
+
'[Hypixel-API-Reborn] Unexpected filter for Client#getSkyblockAuction. Expected one of "PLAYER", "AUCTION", "PROFILE", but got something else.';
|
|
36
|
+
NOT_IMPLEMENTED: string =
|
|
37
|
+
'[Hypixel-API-Reborn] Endpoint execute method is not implemented yet! Please report this https://discord.gg/NSEBNMM';
|
|
38
|
+
RATE_LIMIT_INIT_ERROR: string =
|
|
39
|
+
'[hypixel-api-reborn] An error happened whilst initializing rate limit. We strongly recommend restarting the code as this can lead to desynchronization.';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default Errors;
|