Skip to content

Commit

Permalink
fix: override SkyBlockAuction component to ensure consistent typing
Browse files Browse the repository at this point in the history
  • Loading branch information
zikeji committed Sep 17, 2024
1 parent af78f75 commit a99c061
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/types/Augmented/SkyBlock/Auction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Components } from "../../api";

export type SkyBlockAuction = Components.Schemas.SkyBlockAuction & {
bin?: boolean;
};
19 changes: 11 additions & 8 deletions src/types/AugmentedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
ElectionCurrent,
ElectionMayor,
} from "./Augmented/Resources/SkyBlock/Election";
import type { SkyBlockAuction } from "./Augmented/SkyBlock/Auction";
import type { SkyBlockProfile } from "./Augmented/SkyBlock/Profile";

export type BoostersResponse = Paths.V2Boosters.Get.Responses.$200 &
Expand Down Expand Up @@ -143,16 +144,18 @@ export type SkyblockNewsResponse = Paths.V2SkyblockNews.Get.Responses.$200 &
}[];
};

export type SkyblockAuctionResponse = Paths.V2SkyblockAuction.Get.Responses.$200 & {
auctions?: {
bin?: boolean;
}[];
export type SkyblockAuctionResponse = Omit<
Paths.V2SkyblockAuction.Get.Responses.$200,
"auctions"
> & {
auctions?: SkyBlockAuction[];
} & Record<string, unknown>;

export type SkyblockAuctionsResponse = Paths.V2SkyblockAuctions.Get.Responses.$200 & {
auctions?: {
bin?: boolean;
}[];
export type SkyblockAuctionsResponse = Omit<
Paths.V2SkyblockAuctions.Get.Responses.$200,
"auctions"
> & {
auctions?: SkyBlockAuction[];
} & Record<string, unknown>;

export type SkyblockAuctionsEndedResponse = Paths.V2SkyblockAuctionsEnded.Get.Responses.$200 &
Expand Down

0 comments on commit a99c061

Please sign in to comment.