Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "types",
"section": "API Type Coverage"
},
{
"type": "docs",
"section": "Documentation"
Expand Down
20 changes: 20 additions & 0 deletions src/types/Augmented/SkyBlock/Museum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Components } from "../../api";
import type { MinecraftInventoryData } from "../../AugmentedTypes";

export type SkyBlockMuseumItem = {
donated_time: number;
featured_slot: string;
borrowing?: boolean;
items: MinecraftInventoryData;
};

/** augment the typing of items / special */
export type SkyBlockMuseumMember = Omit<
Components.Schemas.SkyBlockMuseum,
"items"
> & {
items?: {
[key: string]: SkyBlockMuseumItem | undefined;
};
special?: SkyBlockMuseumItem[];
};
13 changes: 11 additions & 2 deletions src/types/AugmentedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
ElectionMayor,
} from "./Augmented/Resources/SkyBlock/Election";
import type { SkyBlockAuction } from "./Augmented/SkyBlock/Auction";
import type { SkyBlockMuseumMember } from "./Augmented/SkyBlock/Museum";
import type { SkyBlockProfile } from "./Augmented/SkyBlock/Profile";

export type BoostersResponse = Paths.V2Boosters.Get.Responses.$200 &
Expand Down Expand Up @@ -220,8 +221,16 @@ export type SkyblockProfilesResponse = Omit<
profiles: SkyBlockProfile[];
};

export type SkyblockMuseumResponse = Paths.V2SkyblockMuseum.Get.Responses.$200 &
Record<string, unknown>;
export type SkyblockMuseumResponse = Omit<
Paths.V2SkyblockMuseum.Get.Responses.$200,
"profile"
> &
Record<string, unknown> & {
success?: true;
members: {
[key: string]: SkyBlockMuseumMember | undefined;
};
};

export type SkyblockGardenResponse = Paths.V2SkyblockGarden.Get.Responses.$200 &
Record<string, unknown>;
Expand Down
108 changes: 81 additions & 27 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export declare namespace Components {
* "team_normal": "Doubles"
* }
*/
modeNames?: unknown;
modeNames?: {
[key: string]: unknown;
};
/**
* True if the game is retired and no longer playable.
*/
Expand Down Expand Up @@ -335,7 +337,9 @@ export declare namespace Components {
* "andrew": 3
* }
*/
visits?: unknown;
visits?: {
[key: string]: unknown;
};
/**
* A map of visitor identifier to completed count
* example:
Expand All @@ -345,7 +349,9 @@ export declare namespace Components {
* "andrew": 2
* }
*/
completed?: unknown;
completed?: {
[key: string]: unknown;
};
total_completed?: number; // int32
unique_npcs_served?: number; // int32
};
Expand All @@ -367,7 +373,9 @@ export declare namespace Components {
* }
* }
*/
composter_data?: unknown;
composter_data?: {
[key: string]: unknown;
};
/**
* example:
* {
Expand Down Expand Up @@ -438,7 +446,9 @@ export declare namespace Components {
* }
* }
*/
active_commissions?: unknown;
active_commissions?: {
[key: string]: unknown;
};
/**
* A map of resource ID to amount collected
* example:
Expand All @@ -448,7 +458,9 @@ export declare namespace Components {
* "INK_SACK:3": 100
* }
*/
resources_collected?: unknown;
resources_collected?: {
[key: string]: unknown;
};
/**
* example:
* {
Expand All @@ -457,7 +469,9 @@ export declare namespace Components {
* "INK_SACK:3": 3
* }
*/
crop_upgrade_levels?: unknown;
crop_upgrade_levels?: {
[key: string]: unknown;
};
/**
* example:
* [
Expand Down Expand Up @@ -524,7 +538,9 @@ export declare namespace Components {
export interface SkyBlockMuseum {
value?: number; // int64
appraisal?: boolean;
items?: unknown;
items?: {
[key: string]: unknown;
};
special?: unknown[];
}
export interface SkyBlockProfile {
Expand All @@ -551,7 +567,9 @@ export declare namespace Components {
* Whether or not this is the currently selected profile, only provided on the profiles endpoint
*/
selected?: boolean | null;
community_upgrades?: unknown | null;
community_upgrades?: {
[key: string]: unknown;
} | null;
/**
* Information about the bank account for this profile, only present if the API banking setting is enabled
*/
Expand Down Expand Up @@ -608,7 +626,9 @@ export declare namespace Paths {
* }
* }
*/
games?: unknown;
games?: {
[key: string]: unknown;
};
}
export type $403 = Components.Responses.InvalidKey;
export type $429 = Components.Responses.RateLimited;
Expand All @@ -630,7 +650,9 @@ export declare namespace Paths {
namespace Responses {
export interface $200 {
success?: boolean;
guild?: unknown;
guild?: {
[key: string]: unknown;
};
}
export type $400 = Components.Responses.DataMissing;
export type $403 = Components.Responses.InvalidKey;
Expand Down Expand Up @@ -683,7 +705,9 @@ export declare namespace Paths {
namespace Responses {
export interface $200 {
success?: boolean;
leaderboards?: unknown;
leaderboards?: {
[key: string]: unknown;
};
}
export type $403 = Components.Responses.InvalidKey;
export type $429 = Components.Responses.RateLimited;
Expand Down Expand Up @@ -720,7 +744,9 @@ export declare namespace Paths {
firstLogin?: number | null;
lastLogin?: number | null;
lastLogout?: number | null;
stats?: unknown | null;
stats?: {
[key: string]: unknown;
} | null;
};
}
export type $400 = Components.Responses.DataMissing;
Expand Down Expand Up @@ -779,7 +805,9 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
achievements?: unknown;
achievements?: {
[key: string]: unknown;
};
}
}
}
Expand All @@ -790,7 +818,9 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
challenges?: unknown;
challenges?: {
[key: string]: unknown;
};
}
}
}
Expand Down Expand Up @@ -830,8 +860,12 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
one_time?: unknown;
tiered?: unknown;
one_time?: {
[key: string]: unknown;
};
tiered?: {
[key: string]: unknown;
};
}
}
}
Expand All @@ -842,7 +876,9 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
quests?: unknown;
quests?: {
[key: string]: unknown;
};
}
}
}
Expand Down Expand Up @@ -934,7 +970,9 @@ export declare namespace Paths {
* 0.11.22
*/
version?: string;
collections?: unknown;
collections?: {
[key: string]: unknown;
};
}
}
}
Expand All @@ -948,11 +986,15 @@ export declare namespace Paths {
/**
* Data regarding the current mayor
*/
mayor?: unknown;
mayor?: {
[key: string]: unknown;
};
/**
* Data regarding the current election, will not be provided if there is no open election ongoing
*/
current?: unknown;
current?: {
[key: string]: unknown;
};
}
}
}
Expand Down Expand Up @@ -995,7 +1037,9 @@ export declare namespace Paths {
* 0.11.22
*/
version?: string;
skills?: unknown;
skills?: {
[key: string]: unknown;
};
}
}
}
Expand All @@ -1006,8 +1050,12 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
types?: unknown;
rarities?: unknown;
types?: {
[key: string]: unknown;
};
rarities?: {
[key: string]: unknown;
};
}
}
}
Expand All @@ -1018,8 +1066,12 @@ export declare namespace Paths {
export interface $200 {
success?: boolean;
lastUpdated?: number;
types?: unknown;
rarities?: unknown;
types?: {
[key: string]: unknown;
};
rarities?: {
[key: string]: unknown;
};
}
}
}
Expand Down Expand Up @@ -1226,7 +1278,9 @@ export declare namespace Paths {
* }
* }
*/
products?: unknown;
products?: {
[key: string]: unknown;
};
}
export type $503 = Components.Responses.NotPopulated;
}
Expand Down