Skip to content

Commit f85b28b

Browse files
committed
Random typescript fixes
1 parent 1c6e40a commit f85b28b

File tree

2 files changed

+133
-107
lines changed

2 files changed

+133
-107
lines changed

src/API/skyblock/getFireSales.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ module.exports = async function () {
33
// eslint-disable-next-line no-underscore-dangle
44
const res = await this._makeRequest('/skyblock/firesales');
55
if (res.raw) return res;
6-
return res.sales.length ? res.sales.map((a) => new FireSale(a)) : [];
6+
return res.sales.length ? res.sales.map((sale) => new FireSale(sale)) : [];
77
};

typings/index.d.ts

Lines changed: 132 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,13 @@ export interface methodOptions {
375375
noCaching?: boolean;
376376
}
377377
export interface playerMethodOptions extends methodOptions {
378-
raw?: boolean;
379378
guild?: boolean;
380379
recentGames?: boolean;
381380
}
382381
export interface skyblockMemberOptions extends methodOptions {
383-
raw?: boolean;
384382
fetchPlayer?: boolean;
383+
getMuseum?: boolean;
384+
getGarden?: boolean;
385385
}
386386
export interface auctionsOptions extends methodOptions {
387387
noInfo?: boolean;
@@ -1124,112 +1124,45 @@ declare module 'hypixel-api-reborn' {
11241124
*/
11251125
readonly cache: Map<string, any>;
11261126
/**
1127-
* @description Allows you to get statistics of player
1128-
* @param query - player nickname or uuid
1129-
* @param options - player search options
1127+
* @description Retrieves information about Hypixel achievements.
1128+
* @param {methodOptions} [options] - The method options.
11301129
*/
1131-
getPlayer(query: string, options?: playerMethodOptions): Promise<Player>;
1130+
getAchievements(options?: methodOptions): Promise<Achievements>;
11321131
/**
1133-
* @description Allows you to get statistics of hypixel guild
1134-
* @param searchParameter - 'name', 'player' or 'id'
1135-
* @param query - guild name, player nickname or guild id
1132+
* @description Parses the RSS feed from status.hypixel.net
1133+
* @param {methodOptions} [options] - The method options.
11361134
*/
1137-
getGuild(searchParameter: 'name' | 'player' | 'id', query: string, options?: methodOptions): Promise<Guild>;
1138-
/**
1139-
* @description Allows you to get statistics of watchdog anticheat
1140-
*/
1141-
getWatchdogStats(options?: methodOptions): Promise<WatchdogStats>;
1135+
getAPIStatus(options?: methodOptions): Promise<APIStatus>;
11421136
/**
11431137
* @description Allows you to get all active boosters
1138+
* @param {methodOptions} [options] - The method options.
11441139
*/
11451140
getBoosters(options?: methodOptions): Promise<Booster[]>;
11461141
/**
1147-
* @description Allows you to get a player's skyblock profiles
1148-
* @param query - player nickname or uuid
1149-
*/
1150-
getSkyblockProfiles(query: string, options?: skyblockMemberOptions): Promise<SkyblockProfile[]>;
1151-
/**
1152-
* @description Allows you to get a player's skyblock member data from all their profiles
1153-
* @param query - player nickname or uuid
1154-
*/
1155-
getSkyblockMember(query: string, options?: skyblockMemberOptions): Promise<Map<string, SkyblockMember>>;
1156-
/**
1157-
* Allows you to get filtered skyblock auctions
1158-
* Using auction ID will return an array of at most 1 element
1159-
* @method
1160-
* @name Client#getSkyblockAuction
1161-
* @param type - Filter to use
1162-
* @param query - uuid of profile, player, or auction. IGN can be used as well
1163-
* @param includeItemBytes - include item bytes (optional)
1164-
* @param options - Options
1165-
*/
1166-
getSkyblockAuction(
1167-
type: 'PROFILE' | 'PLAYER' | 'AUCTION',
1168-
query: string,
1169-
includeItemBytes?: boolean,
1170-
options?: methodOptions
1171-
): Promise<Auction[]>; /**
1172-
* @description Allows you to get all auctions of player
1173-
* @deprecated Use Client#getSkyblockAuction
1174-
* @param query - player nickname or uuid
1175-
* @param includeItemBytes - include item bytes (optional)
1176-
*/
1177-
getEndedSkyblockAuctions(
1178-
includeItemBytes?: boolean,
1179-
options?: methodOptions
1180-
): Promise<{ info: AuctionInfo; auctions: PartialAuction[] }>;
1181-
/**
1182-
* @description Allows you to get all auctions of player
1183-
* @param query - player nickname or uuid
1184-
* @param includeItemBytes - include item bytes (optional)
1185-
*/
1186-
getSkyblockAuctionsByPlayer(query: string, includeItemBytes?: boolean, options?: methodOptions): Promise<Auction[]>;
1187-
/**
1188-
* @description Allows you to get list of products
1189-
*/
1190-
getSkyblockBazaar(options?: methodOptions): Promise<Product[]>;
1191-
/**
1192-
* @description Gets bingo data
1193-
*/
1194-
getSkyblockBingo(options?: methodOptions): Promise<BingoData>;
1195-
/**
1196-
* @description Gets bingo data of a player
1197-
* @param query - UUID/IGN of player
1198-
*/
1199-
getSkyblockBingoByPlayer(query: string, options?: playerBingoOptions): Promise<PlayerBingo>;
1200-
/**
1201-
* @description Gets data of skyblock government
1202-
*/
1203-
getSkyblockGovernment(options?: methodOptions): Promise<GovernmentData>;
1204-
/**
1205-
* @description Gets data of skyblock government
1206-
*/
1207-
getSkyblockGovernment(options?: methodOptions): Promise<FireSale[]>;
1208-
/**
1209-
* @description Allows you to get skyblock news
1210-
*/
1211-
getSkyblockNews(options?: methodOptions): Promise<SkyblockNews>;
1212-
/**
1213-
* @description Get a array of active houses
1142+
* @description Allows you to get information about hypixel challenges [NO KEY REQUIRED]
1143+
* @param {methodOptions} [options] - The method options.
12141144
*/
1215-
getActiveHouses(options?: methodOptions): Promise<House[]>;
1145+
getChallenges(options?: methodOptions): Promise<Challenges>;
12161146
/**
1217-
* @description Get a array of houses for a user
1218-
* @param query - UUID / IGN of player
1147+
* @description Allows you to get player count along with the player count of each public game
1148+
* @param {methodOptions} [options] - The method options.
12191149
*/
1220-
getPlayerHouses(query: string, options?: methodOptions): Promise<House[]>;
1150+
getGameCounts(options?: methodOptions): Promise<GameCounts>;
12211151
/**
1222-
* @description Get a house
1223-
* @param query - house uuid
1152+
* @description Allows you to get statistics of hypixel guild
1153+
* @param {"id"|"name"|"player"} searchParameter - How you want to search
1154+
* @param {string} query - guild name, player nickname or guild id
1155+
* @param {methodOptions} [options] - The method options.
12241156
*/
1225-
getHouse(query: string, options?: methodOptions): Promise<House>;
1157+
getGuild(searchParameter: 'id' | 'name' | 'player', query: string, options?: methodOptions): Promise<Guild>;
12261158
/**
1227-
* @description Allows you to get player's network status
1228-
* @param query - player nickname or uuid
1159+
* @description Allows you to get information about hypixel guild achievements [NO KEY REQUIRED]
1160+
* @param {methodOptions} [options] - The method options.
12291161
*/
1230-
getStatus(query: string, options?: methodOptions): Promise<Status>;
1162+
getGuildAchievements(options?: methodOptions): Promise<GuildAchievements>;
12311163
/**
12321164
* @description Allows you to get leaderboards of each mini-game
1165+
* @param {methodOptions} [options] - The method options.
12331166
*/
12341167
getLeaderboards(options?: methodOptions): Promise<{
12351168
ARENA: Leaderboard[];
@@ -1257,38 +1190,131 @@ declare module 'hypixel-api-reborn' {
12571190
VAMPIREZ: Leaderboard[];
12581191
}>;
12591192
/**
1260-
* @description Allows you to get recent games of a player
1193+
* @description Allows you to get statistics of player
1194+
* @param {string} query - player nickname or uuid
1195+
* @param {playerMethodOptions} [options] - player search options
12611196
*/
1262-
getRecentGames(query: string, options?: methodOptions): Promise<RecentGame[]>;
1197+
getPlayer(query: string, options?: playerMethodOptions): Promise<Player>;
12631198
/**
1264-
* @description Allows you to get player count along with the player count of each public game
1199+
* @description Allows you to get information about hypixel quests [NO KEY REQUIRED]
1200+
* @param {methodOptions} [options] - Options
12651201
*/
1266-
getGameCounts(options?: methodOptions): Promise<GameCounts>;
1202+
getQuests(options?: methodOptions): Promise<Quests>;
1203+
/**
1204+
* @description Allows you to get recent games of a player
1205+
* @param {string} query - player nickname or uuid
1206+
* @param {methodOptions} [options] - Options
1207+
*/
1208+
getRecentGames(query: string, options?: methodOptions): Promise<RecentGame[]>;
12671209
/**
1268-
* @param repeats Amount of times to ping hypixel, preferably between 1 and 10 times.
12691210
* @description Parses information returned by hypixel upon a status request packet
1211+
* @param {number} repeats Amount of times to ping hypixel, preferably between 1 and 10 times.
12701212
*/
12711213
getServerInfo(repeats?: number): Promise<ServerInfo>;
12721214
/**
1273-
* @description Parses the RSS feed from status.hypixel.net
1215+
* @description Allows you to get player's network status
1216+
* @param {string} query - player nickname or uuid
1217+
* @param {methodOptions} [options] - Options
12741218
*/
1275-
getAPIStatus(): Promise<APIStatus>;
1219+
getStatus(query: string, options?: methodOptions): Promise<Status>;
12761220
/**
1277-
* @description Allows you to get information about hypixel challenges [NO KEY REQUIRED]
1221+
* @description Allows you to get statistics of watchdog anticheat
1222+
* @param {methodOptions} [options] - Options
12781223
*/
1279-
getChallenges(options?: methodOptions): Promise<Challenges>;
1224+
getWatchdogStats(options?: methodOptions): Promise<WatchdogStats>;
12801225
/**
1281-
* @description Allows you to get information about hypixel quests [NO KEY REQUIRED]
1226+
* @description Allows you to get filtered skyblock auctions. Using auction ID will return an array of at most 1 element
1227+
* @name Client#getSkyblockAuction
1228+
* @param {'PROFILE' | 'PLAYER' | 'AUCTION'} type - Filter to use
1229+
* @param {string} query - uuid of profile, player, or auction. IGN can be used as well
1230+
* @param {boolean} includeItemBytes - include item bytes (optional)
1231+
* @param {methodOptions} [options] - Options
12821232
*/
1283-
getQuests(options?: methodOptions): Promise<Quests>;
1233+
getSkyblockAuction(
1234+
type: 'PROFILE' | 'PLAYER' | 'AUCTION',
1235+
query: string,
1236+
includeItemBytes?: boolean,
1237+
options?: methodOptions
1238+
): Promise<Auction[]>;
12841239
/**
1285-
* Allows you to get information about hypixel achievements [NO KEY REQUIRED]
1240+
* @description Allows you to get all auctions of player
1241+
* @param {string} query - player nickname or uuid
1242+
* @param {boolean} includeItemBytes - include item bytes (optional)
1243+
* @param {methodOptions} [options] - Options
12861244
*/
1287-
getAchievements(options?: methodOptions): Promise<Achievements>;
1245+
getSkyblockAuctionsByPlayer(query: string, includeItemBytes?: boolean, options?: methodOptions): Promise<Auction[]>;
12881246
/**
1289-
* @description Allows you to get information about hypixel guild achievements [NO KEY REQUIRED]
1247+
* @description Allows you to get list of products
1248+
* @param {methodOptions} [options] - Options
12901249
*/
1291-
getGuildAchievements(options?: methodOptions): Promise<GuildAchievements>;
1250+
getSkyblockBazaar(options?: methodOptions): Promise<Product[]>;
1251+
/**
1252+
* @description Gets bingo data
1253+
* @param {methodOptions} [options] - Options
1254+
*/
1255+
getSkyblockBingo(options?: methodOptions): Promise<BingoData>;
1256+
/**
1257+
* @description Gets bingo data of a player
1258+
* @param {string} query - UUID/IGN of player
1259+
* @param {methodOptions} [options] - Options
1260+
*/
1261+
getSkyblockBingoByPlayer(query: string, options?: playerBingoOptions): Promise<PlayerBingo>;
1262+
/**
1263+
* @description Allows you to get list of active skyblock firesales
1264+
* @param {methodOptions} [options] - Options
1265+
*/
1266+
getSkyblockFireSales(options?: methodOptions): Promise<FireSale[]>;
1267+
/**
1268+
* @description Allows you to get a profiles skyblock garden
1269+
* @param {methodOptions} [options] - Options
1270+
*/
1271+
getSkyblockGarden(profileId: string, options?: methodOptions);
1272+
/**
1273+
* @description Gets data of skyblock government
1274+
* @param {methodOptions} [options] - Options
1275+
*/
1276+
getSkyblockGovernment(options?: methodOptions): Promise<GovernmentData>;
1277+
/**
1278+
* @description Allows you to get a player's skyblock member data from all their profiles
1279+
* @param query - player nickname or uuid
1280+
* @param {methodOptions} [options] - Options
1281+
*/
1282+
getSkyblockMember(query: string, options?: skyblockMemberOptions): Promise<Map<string, SkyblockMember>>;
1283+
/**
1284+
* @description Allows you to get statistics of player
1285+
* @param {string} query - player nickname or uuid
1286+
* @param {string} profileId - profile id
1287+
* @param {methodOptions} [options] - Options
1288+
*/
1289+
getSkyblockMuseum(query: string, profileId: string, options?: methodOptions);
1290+
/**
1291+
* @description Allows you to get skyblock news
1292+
* @param {methodOptions} [options] - Options
1293+
*/
1294+
getSkyblockNews(options?: methodOptions): Promise<SkyblockNews>;
1295+
/**
1296+
* @description Allows you to get a player's skyblock profiles
1297+
* @param query - player nickname or uuid
1298+
* @param {methodOptions} [options] - Options
1299+
*/
1300+
getSkyblockProfiles(query: string, options?: skyblockMemberOptions): Promise<SkyblockProfile[]>;
1301+
/**
1302+
* @description Get a array of active houses
1303+
* @param {methodOptions} [options] - Options
1304+
*/
1305+
getActiveHouses(options?: methodOptions): Promise<House[]>;
1306+
/**
1307+
* @description Get a array of houses for a user
1308+
* @param query - UUID / IGN of player
1309+
* @param {methodOptions} [options] - Options
1310+
*/
1311+
getPlayerHouses(query: string, options?: methodOptions): Promise<House[]>;
1312+
/**
1313+
* @description Get a house
1314+
* @param query - house uuid
1315+
* @param {methodOptions} [options] - Options
1316+
*/
1317+
getHouse(query: string, options?: methodOptions): Promise<House>;
12921318
/**
12931319
* @param amount - Amount of cache entries to delete
12941320
* @description Allows you to clear cache

0 commit comments

Comments
 (0)