From 638f564eb6e904eb08b847460d95ab430f4c26aa Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Mon, 6 Apr 2026 18:26:30 +0200 Subject: [PATCH 1/8] feat: use the combined endpoint for the sections data --- .changeset/modern-eggs-shave.md | 5 ++ src/context/createContext.svelte.ts | 29 +++++++- src/lib/components/item/InventoryGrid.svelte | 71 ++++++++++++------- src/lib/layouts/stats/Main.svelte | 13 +++- src/lib/sections/Sections.svelte | 59 +++++++++------ src/lib/sections/stats/Accessories.svelte | 10 +-- src/lib/sections/stats/Bestiary.svelte | 9 +-- src/lib/sections/stats/Collections.svelte | 10 +-- src/lib/sections/stats/CrimsonIsle.svelte | 10 +-- src/lib/sections/stats/Dungeons.svelte | 8 +-- src/lib/sections/stats/Gear.svelte | 18 ++--- src/lib/sections/stats/Minions.svelte | 9 +-- src/lib/sections/stats/MiscSection.svelte | 10 +-- src/lib/sections/stats/Pets.svelte | 10 +-- src/lib/sections/stats/Rift.svelte | 8 +-- src/lib/sections/stats/SkillsSection.svelte | 11 +-- src/lib/sections/stats/Slayer.svelte | 8 +-- src/lib/shared/api/skycrypt-api.remote.ts | 69 ++---------------- src/lib/types/index.ts | 1 + .../stats/[ign]/[[profile]]/card/+server.ts | 8 +-- 20 files changed, 171 insertions(+), 205 deletions(-) create mode 100644 .changeset/modern-eggs-shave.md diff --git a/.changeset/modern-eggs-shave.md b/.changeset/modern-eggs-shave.md new file mode 100644 index 000000000..530f60ef6 --- /dev/null +++ b/.changeset/modern-eggs-shave.md @@ -0,0 +1,5 @@ +--- +"skycrypt-frontend": minor +--- + +feat: use the combined endpoint for the sections data diff --git a/src/context/createContext.svelte.ts b/src/context/createContext.svelte.ts index 0c582d91f..a9aded656 100644 --- a/src/context/createContext.svelte.ts +++ b/src/context/createContext.svelte.ts @@ -1,6 +1,7 @@ import type { IsHover } from "$lib/hooks/is-hover.svelte"; import type { IsMobile } from "$lib/hooks/is-mobile.svelte"; -import type { ModelsMiscOutput, ModelsResourcePackConfig, ModelsSkillsOutput, ModelsStatsOutput } from "$lib/shared/api/orval-generated"; +import type { ModelsCombinedOutput, ModelsMiscOutput, ModelsResourcePackConfig, ModelsSkillsOutput, ModelsStatsOutput } from "$lib/shared/api/orval-generated"; +import type { RemoteQuery } from "@sveltejs/kit"; import { createContext } from "svelte"; export class ProfileContext { @@ -15,6 +16,30 @@ export class ProfileContext { } } +export class CombinedContext { + #current: ModelsCombinedOutput | null = $state(null); + + get current() { + return this.#current; + } + + set current(value: ModelsCombinedOutput | null) { + this.#current = value; + } +} + +export class CombinedQueryContext { + #current: RemoteQuery | null = $state(null); + + get current() { + return this.#current; + } + + set current(value: RemoteQuery | null) { + this.#current = value; + } +} + export class PacksContext { #packs: ModelsResourcePackConfig[] = $state([]); @@ -52,6 +77,8 @@ export class SkillsContext { } export const [getProfileContext, setProfileContext] = createContext(); +export const [getCombinedContext, setCombinedContext] = createContext(); +export const [getCombinedQueryContext, setCombinedQueryContext] = createContext(); export const [getSkillsContext, setSkillsContext] = createContext(); export const [getMiscContext, setMiscContext] = createContext(); export const [getMobileContext, setMobileContext] = createContext(); diff --git a/src/lib/components/item/InventoryGrid.svelte b/src/lib/components/item/InventoryGrid.svelte index 5769f9c2c..9c539bf94 100644 --- a/src/lib/components/item/InventoryGrid.svelte +++ b/src/lib/components/item/InventoryGrid.svelte @@ -1,39 +1,58 @@ - - {#snippet children(items)} - {#if items?.length ?? 0 > 0} -
- {#each items as item, index (index)} - {#if index > 0} - {#if index % gap === 0} -
- {/if} - {/if} - {#if item.texture_path} -
- {@render itemSnippet(inventoryId === "inventory" ? ({ ...item, rarity: item.rarity ?? "uncommon" } as ModelsStrippedItem) : item)} -
- {:else} -
+{#snippet content(items: ModelsStrippedItem[] | undefined)} + {#if items?.length ?? 0 > 0} +
+ {#each items as item, index (index)} + {#if index > 0} + {#if index % gap === 0} +
{/if} - {/each} -
- {:else} -

- No items found in the {inventoryId.replaceAll("_", " ")}. -

- {/if} - {/snippet} - + {/if} + {#if item.texture_path} +
+ {@render itemSnippet(inventoryId === "inventory" ? ({ ...item, rarity: item.rarity ?? "uncommon" } as ModelsStrippedItem) : item)} +
+ {:else} +
+ {/if} + {/each} +
+ {:else} +

+ No items found in the {inventoryId.replaceAll("_", " ")}. +

+ {/if} +{/snippet} + +{#if inventoryId === "inventory"} + {#if combinedInventory} + {@render content(combinedInventory)} + {:else if combinedQuery.current?.error} +

Failed to load inventory.

+ {:else} + + {/if} +{:else} + + {#snippet children(items)} + {@render content(items)} + {/snippet} + +{/if} diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 0cc807ed0..606d96508 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -3,7 +3,7 @@ import { replaceState } from "$app/navigation"; import { resolve } from "$app/paths"; import { page } from "$app/state"; - import { getHoverContext, getInternalState, getPreferences, getProfileContext, getRecentSearches, ProfileContext, setProfileContext } from "$ctx"; + import { CombinedContext, CombinedQueryContext, getHoverContext, getInternalState, getPreferences, getProfileContext, getRecentSearches, ProfileContext, setCombinedContext, setCombinedQueryContext, setProfileContext } from "$ctx"; import { ContainedItemsGrid, ItemContent } from "$lib/components/item"; import { Navbar } from "$lib/components/misc"; import Skin3D from "$lib/components/misc/Skin3D.svelte"; @@ -13,6 +13,7 @@ import Stats from "$lib/layouts/stats/Stats.svelte"; import Sections from "$lib/sections/Sections.svelte"; import type { ModelsStatsOutput } from "$lib/shared/api/orval-generated"; + import { getCombined } from "$lib/shared/api/skycrypt-api.remote"; import { cn, flyAndScale } from "$lib/shared/utils"; import Image from "@lucide/svelte/icons/image"; import { Avatar, Dialog } from "bits-ui"; @@ -44,7 +45,12 @@ // Initialize the profile context const profileClass = new ProfileContext(); + const combinedClass = new CombinedContext(); + const combinedQueryClass = new CombinedQueryContext(); setProfileContext(profileClass); + setCombinedContext(combinedClass); + setCombinedQueryContext(combinedQueryClass); + const combined = $derived(ctx.uuid && ctx.profile_id ? getCombined({ uuid: ctx.uuid, profileId: ctx.profile_id }) : null); function rewriteURL() { if (!(ctx as ModelsStatsOutput)) return; @@ -102,6 +108,11 @@ profileClass.current = profile; }); + $effect.pre(() => { + combinedQueryClass.current = combined; + combinedClass.current = combined?.current ?? null; + }); + $effect(() => { rewriteURL(); }); diff --git a/src/lib/sections/Sections.svelte b/src/lib/sections/Sections.svelte index 140743584..ab0258fa3 100644 --- a/src/lib/sections/Sections.svelte +++ b/src/lib/sections/Sections.svelte @@ -1,5 +1,5 @@
@@ -166,7 +162,7 @@ {STATS_DATA[key.toLowerCase()].name} {#if Object.entries(accessories.enrichments).length - 1 !== index || (Object.entries(accessories.enrichments).length - 1 === index && accessories.enrichments.missing > 0)} - // {" "} + // {/if} {/if} {/each} diff --git a/src/lib/sections/stats/Bestiary.svelte b/src/lib/sections/stats/Bestiary.svelte index 1f548ec6a..d2968a621 100644 --- a/src/lib/sections/stats/Bestiary.svelte +++ b/src/lib/sections/stats/Bestiary.svelte @@ -1,20 +1,15 @@
diff --git a/src/lib/sections/stats/Collections.svelte b/src/lib/sections/stats/Collections.svelte index b2a3b5d1d..e60c48e1c 100644 --- a/src/lib/sections/stats/Collections.svelte +++ b/src/lib/sections/stats/Collections.svelte @@ -1,21 +1,15 @@
diff --git a/src/lib/sections/stats/CrimsonIsle.svelte b/src/lib/sections/stats/CrimsonIsle.svelte index 6f33d4d9d..314170d22 100644 --- a/src/lib/sections/stats/CrimsonIsle.svelte +++ b/src/lib/sections/stats/CrimsonIsle.svelte @@ -1,22 +1,16 @@
diff --git a/src/lib/sections/stats/Dungeons.svelte b/src/lib/sections/stats/Dungeons.svelte index cd54b57bf..63274815c 100644 --- a/src/lib/sections/stats/Dungeons.svelte +++ b/src/lib/sections/stats/Dungeons.svelte @@ -1,17 +1,13 @@
diff --git a/src/lib/sections/stats/Gear.svelte b/src/lib/sections/stats/Gear.svelte index 8ec2e1f79..8d33246ab 100644 --- a/src/lib/sections/stats/Gear.svelte +++ b/src/lib/sections/stats/Gear.svelte @@ -1,12 +1,11 @@
diff --git a/src/lib/sections/stats/Minions.svelte b/src/lib/sections/stats/Minions.svelte index e491a9632..1edd0400d 100644 --- a/src/lib/sections/stats/Minions.svelte +++ b/src/lib/sections/stats/Minions.svelte @@ -1,10 +1,9 @@ diff --git a/src/lib/sections/stats/Pets.svelte b/src/lib/sections/stats/Pets.svelte index 3f565ac1a..134462b14 100644 --- a/src/lib/sections/stats/Pets.svelte +++ b/src/lib/sections/stats/Pets.svelte @@ -1,10 +1,9 @@
diff --git a/src/lib/sections/stats/Rift.svelte b/src/lib/sections/stats/Rift.svelte index 7cacb62e0..fd9d86729 100644 --- a/src/lib/sections/stats/Rift.svelte +++ b/src/lib/sections/stats/Rift.svelte @@ -1,11 +1,10 @@
diff --git a/src/lib/shared/api/skycrypt-api.remote.ts b/src/lib/shared/api/skycrypt-api.remote.ts index a70be01cc..2df5c0e3c 100644 --- a/src/lib/shared/api/skycrypt-api.remote.ts +++ b/src/lib/shared/api/skycrypt-api.remote.ts @@ -1,6 +1,6 @@ import { prerender, query } from "$app/server"; -import { getApiAccessoriesUuidProfileId, getApiBestiaryUuidProfileId, getApiCollectionsUuidProfileId, getApiCrimsonIsleUuidProfileId, getApiDungeonsUuidProfileId, getApiEmbedUuid, getApiGardenUuidProfileId, getApiGearUuidProfileId, getApiInventoryUuidProfileIdInventoryId, getApiMinionsUuidProfileId, getApiMiscUuidProfileId, getApiNetworthUuidProfileId, getApiPetsUuidProfileId, getApiPlayerStatsUuidProfileId, getApiResourcepacks, getApiRiftUuidProfileId, getApiSkillsUuidProfileId, getApiSlayerUuidProfileId, getApiStatsUuidProfileId, getApiUsernameUuid, getApiUuidUsername, type ModelsProcessingError } from "$lib/shared/api/orval-generated"; -import { GetApiAccessoriesUuidProfileIdParams, GetApiBestiaryUuidProfileIdParams, GetApiCollectionsUuidProfileIdParams, GetApiCrimsonIsleUuidProfileIdParams, GetApiDungeonsUuidProfileIdParams, GetApiEmbedUuidParams, GetApiEmbedUuidQueryParams, GetApiGardenUuidProfileIdParams, GetApiGearUuidProfileIdParams, GetApiInventoryUuidProfileIdInventoryIdParams, GetApiInventoryUuidProfileIdInventoryIdQueryParams, GetApiMinionsUuidProfileIdParams, GetApiMiscUuidProfileIdParams, GetApiNetworthUuidProfileIdParams, GetApiPetsUuidProfileIdParams, GetApiPlayerStatsUuidProfileIdParams, GetApiRiftUuidProfileIdParams, GetApiSkillsUuidProfileIdParams, GetApiSlayerUuidProfileIdParams, GetApiStatsUuidProfileIdParams, GetApiUsernameUuidParams, GetApiUuidUsernameParams } from "$lib/shared/api/orval-generated-zod"; +import { getApiCombinedUuidProfileId, getApiEmbedUuid, getApiGardenUuidProfileId, getApiInventoryUuidProfileIdInventoryId, getApiNetworthUuidProfileId, getApiPlayerStatsUuidProfileId, getApiResourcepacks, getApiStatsUuidProfileId, getApiUsernameUuid, getApiUuidUsername, type ModelsProcessingError } from "$lib/shared/api/orval-generated"; +import { GetApiCombinedUuidProfileIdParams, GetApiEmbedUuidParams, GetApiEmbedUuidQueryParams, GetApiGardenUuidProfileIdParams, GetApiInventoryUuidProfileIdInventoryIdParams, GetApiInventoryUuidProfileIdInventoryIdQueryParams, GetApiNetworthUuidProfileIdParams, GetApiPlayerStatsUuidProfileIdParams, GetApiStatsUuidProfileIdParams, GetApiUsernameUuidParams, GetApiUuidUsernameParams } from "$lib/shared/api/orval-generated-zod"; import { APIEndpointName } from "$types"; import { error, isHttpError, redirect } from "@sveltejs/kit"; import z from "zod"; @@ -45,6 +45,11 @@ export const getProfileStats = query(GetApiStatsUuidProfileIdParams, async ({ uu return fetchSection(APIEndpointName.PROFILE, () => getApiStatsUuidProfileId(uuid, profileId)); }); +/** Fetch combined section data for a specific profile */ +export const getCombined = query(GetApiCombinedUuidProfileIdParams, async ({ uuid, profileId }) => { + return fetchSection(APIEndpointName.COMBINED, () => getApiCombinedUuidProfileId(uuid, profileId)); +}); + /** Fetch additional stats data for a specific profile */ export const getAdditionalStats = query(GetApiPlayerStatsUuidProfileIdParams, async ({ uuid, profileId }) => { return fetchSection(APIEndpointName.STATS, () => getApiPlayerStatsUuidProfileId(uuid, profileId)); @@ -55,21 +60,6 @@ export const getNetworth = query(GetApiNetworthUuidProfileIdParams, async ({ uui return fetchSection(APIEndpointName.NETWORTH, () => getApiNetworthUuidProfileId(uuid, profileId)); }); -/** Fetch gear section data (armor, equipment) for a specific profile */ -export const getGearSection = query(GetApiGearUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.GEAR, () => getApiGearUuidProfileId(uuid, profileId)); -}); - -/** Fetch accessories section data (talismans, enrichments) for a specific profile */ -export const getAccessoriesSection = query(GetApiAccessoriesUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.ACCESSORIES, () => getApiAccessoriesUuidProfileId(uuid, profileId)); -}); - -/** Fetch pets section data for a specific profile */ -export const getPetsSection = query(GetApiPetsUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.PETS, () => getApiPetsUuidProfileId(uuid, profileId)); -}); - /** Fetch inventory data for a specific profile and inventory type */ export const getInventorySection = query(z.object({ ...GetApiInventoryUuidProfileIdInventoryIdParams.shape, ...GetApiInventoryUuidProfileIdInventoryIdQueryParams.shape }), async ({ uuid, profileId, inventoryId, query }) => { return fetchSection(APIEndpointName.INVENTORY, () => getApiInventoryUuidProfileIdInventoryId(uuid, profileId, inventoryId, { query })); @@ -78,56 +68,11 @@ export const getInventorySection = query(z.object({ ...GetApiInventoryUuidProfil /** Fetch inventory data for a specific profile and inventory type */ export const searchInventorySection = getInventorySection; -/** Fetch skills section data (mining, farming, combat, etc.) for a specific profile */ -export const getSkillsSection = query(GetApiSkillsUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.SKILLS, () => getApiSkillsUuidProfileId(uuid, profileId)); -}); - /** Fetch garden data for a specific profile */ export const getGarden = query(GetApiGardenUuidProfileIdParams, async ({ uuid, profileId }) => { return fetchSection(APIEndpointName.GARDEN, () => getApiGardenUuidProfileId(uuid, profileId)); }); -/** Fetch dungeons section data (catacombs, master mode) for a specific profile */ -export const getDungeonsSection = query(GetApiDungeonsUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.DUNGEONS, () => getApiDungeonsUuidProfileId(uuid, profileId)); -}); - -/** Fetch slayer section data (zombie, spider, wolf, etc.) for a specific profile */ -export const getSlayerSection = query(GetApiSlayerUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.SLAYER, () => getApiSlayerUuidProfileId(uuid, profileId)); -}); - -/** Fetch minions section data for a specific profile */ -export const getMinionsSection = query(GetApiMinionsUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.MINIONS, () => getApiMinionsUuidProfileId(uuid, profileId)); -}); - -/** Fetch bestiary section data for a specific profile */ -export const getBestiarySection = query(GetApiBestiaryUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.BESTIARY, () => getApiBestiaryUuidProfileId(uuid, profileId)); -}); - -/** Fetch collections section data for a specific profile */ -export const getCollectionsSection = query(GetApiCollectionsUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.COLLECTIONS, () => getApiCollectionsUuidProfileId(uuid, profileId)); -}); - -/** Fetch crimson isle section data for a specific profile */ -export const getCrimsonIsleSection = query(GetApiCrimsonIsleUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.CRIMSON_ISLE, () => getApiCrimsonIsleUuidProfileId(uuid, profileId)); -}); - -/** Fetch rift section data for a specific profile */ -export const getRiftSection = query(GetApiRiftUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.RIFT, () => getApiRiftUuidProfileId(uuid, profileId)); -}); - -/** Fetch misc section data for a specific profile */ -export const getMiscSection = query(GetApiMiscUuidProfileIdParams, async ({ uuid, profileId }) => { - return fetchSection(APIEndpointName.MISC, () => getApiMiscUuidProfileId(uuid, profileId)); -}); - /** Fetch embed data */ export const getEmbedData = query(z.object({ ...GetApiEmbedUuidParams.shape, ...GetApiEmbedUuidQueryParams.shape }), async ({ uuid, profileId }) => { return fetchSection(APIEndpointName.EMBED, () => getApiEmbedUuid(uuid, { profileId: profileId })); diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts index 50138e37a..ec85cdfdd 100644 --- a/src/lib/types/index.ts +++ b/src/lib/types/index.ts @@ -1,5 +1,6 @@ // Enum for different API endpoint names export enum APIEndpointName { + COMBINED = "Combined", NETWORTH = "Networth", SKILLS = "Skills", GEAR = "Gear", diff --git a/src/routes/stats/[ign]/[[profile]]/card/+server.ts b/src/routes/stats/[ign]/[[profile]]/card/+server.ts index a7eee5d78..4be5a3ce5 100644 --- a/src/routes/stats/[ign]/[[profile]]/card/+server.ts +++ b/src/routes/stats/[ign]/[[profile]]/card/+server.ts @@ -5,7 +5,7 @@ import { DefaultCard } from "$src/lib/components/cards"; import ErrorCard from "$src/lib/components/cards/default/ErrorCard.svelte"; import { parseSettingsFromParams } from "$src/lib/components/cards/default/schema"; import { getApiUuidUsername, type ModelsPlayerResolve } from "$src/lib/shared/api/orval-generated"; -import { getDungeonsSection, getNetworth, getProfileStats } from "$src/lib/shared/api/skycrypt-api.remote"; +import { getCombined, getNetworth, getProfileStats } from "$src/lib/shared/api/skycrypt-api.remote"; import { html as toReactNode } from "satori-html"; import { render } from "svelte/server"; import { Renderer, type Font, type ImageSource } from "takumi-js/node"; @@ -32,19 +32,19 @@ export const GET: RequestHandler = async ({ params, request, url }) => { // prettier-ignore profileData, networthData, - dungeonsData + combinedData ] = await Promise.all([ // prettier-ignore getProfileStats({ uuid: user.uuid ?? ign, profileId: profile ?? "" }), getNetworth({ uuid: user.uuid ?? ign, profileId: profile ?? "" }), - getDungeonsSection({ uuid: user.uuid ?? ign, profileId: profile ?? "" }) + getCombined({ uuid: user.uuid ?? ign, profileId: profile ?? "" }) ]); const { body: renderedHTML } = render(DefaultCard, { props: { profile: profileData, networth: networthData, - dungeons: dungeonsData, + dungeons: combinedData.dungeons, settings } }); From 439d60f0d13f14a0ec93c6edca016f5b27028242 Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Mon, 6 Apr 2026 18:40:54 +0200 Subject: [PATCH 2/8] chore: remove unused getUsername function from API queries --- src/lib/shared/api/skycrypt-api.remote.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib/shared/api/skycrypt-api.remote.ts b/src/lib/shared/api/skycrypt-api.remote.ts index 2df5c0e3c..ab9260a16 100644 --- a/src/lib/shared/api/skycrypt-api.remote.ts +++ b/src/lib/shared/api/skycrypt-api.remote.ts @@ -87,11 +87,6 @@ export const searchUser = query(GetApiUuidUsernameParams, async ({ username }) = error(404, `No user with the name '${username}' was found`); }); -/** Fetch embed data */ -export const getUsername = query(GetApiUsernameUuidParams, async ({ uuid }) => { - return fetchSection(APIEndpointName.USERNAME, () => getApiUsernameUuid(uuid)); -}); - export const getUsernamePrerendered = prerender(GetApiUsernameUuidParams, async ({ uuid }) => { return fetchSection(APIEndpointName.USERNAME, () => getApiUsernameUuid(uuid)); }); From bd7398b93213bbd0db3ca24ba83bbb79c7765b7e Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:42:05 +0200 Subject: [PATCH 3/8] fix: refactor SectionBoundary to use query function instead of promise --- .changeset/chilly-garlics-divide.md | 5 +++++ src/lib/components/sections/SectionBoundary.svelte | 4 ++-- src/lib/sections/stats/farming/garden.svelte | 11 ++--------- 3 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 .changeset/chilly-garlics-divide.md diff --git a/.changeset/chilly-garlics-divide.md b/.changeset/chilly-garlics-divide.md new file mode 100644 index 000000000..2d45c1f29 --- /dev/null +++ b/.changeset/chilly-garlics-divide.md @@ -0,0 +1,5 @@ +--- +"skycrypt-frontend": patch +--- + +fix: refactor SectionBoundary to use query function instead of promise diff --git a/src/lib/components/sections/SectionBoundary.svelte b/src/lib/components/sections/SectionBoundary.svelte index ac48eb316..2d69bd7b3 100644 --- a/src/lib/components/sections/SectionBoundary.svelte +++ b/src/lib/components/sections/SectionBoundary.svelte @@ -3,7 +3,7 @@ import LoaderCircle from "@lucide/svelte/icons/loader-circle"; import type { Snippet } from "svelte"; - let { promise, children }: { promise: Promise; children: Snippet<[T]> } = $props(); + let { query, children }: { query: () => Promise; children: Snippet<[T]> } = $props(); @@ -14,7 +14,7 @@ {/snippet} - {#await promise then result} + {#await query() then result} {@render children(result)} {/await} diff --git a/src/lib/sections/stats/farming/garden.svelte b/src/lib/sections/stats/farming/garden.svelte index d2bb0dba1..a2bff7861 100644 --- a/src/lib/sections/stats/farming/garden.svelte +++ b/src/lib/sections/stats/farming/garden.svelte @@ -17,13 +17,6 @@ const profileId = $derived(profile?.profile_id); const gardenLocked = $derived((profile?.skyblock_level?.level ?? 0) <= 5); let sectionOpen: boolean = $derived(getCurrentTabContext().current === TabNamesEnum.Farming); - let hasOpened = $state(false); - - $effect(() => { - if (sectionOpen) { - hasOpened = true; - } - }); @@ -34,8 +27,8 @@ {#if gardenLocked}

This player does not have the Garden unlocked.

- {:else if hasOpened} - + {:else if sectionOpen} + getGarden({ uuid: profile?.uuid ?? "", profileId: profileId! })}> {#snippet children(garden)} {#if garden} {@const hasMaxed = garden.level?.maxed ?? false} From d38175cdf11f65390ca1f9b9cdf91da88a1d1340 Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:54:25 +0200 Subject: [PATCH 4/8] chore: regenerate orval --- src/lib/shared/api/orval-generated-zod.ts | 2145 ++------------------- src/lib/shared/api/orval-generated.ts | 489 +---- 2 files changed, 187 insertions(+), 2447 deletions(-) diff --git a/src/lib/shared/api/orval-generated-zod.ts b/src/lib/shared/api/orval-generated-zod.ts index 0c31f73e8..c4c0c1324 100644 --- a/src/lib/shared/api/orval-generated-zod.ts +++ b/src/lib/shared/api/orval-generated-zod.ts @@ -7,224 +7,6 @@ */ import * as zod from "zod"; -/** - * Returns accessories for the given user and profile ID - * @summary Get accessories stats of a specified player - */ -export const GetApiAccessoriesUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiAccessoriesUuidProfileIdResponse = zod.object({ - accessories: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - enrichments: zod.record(zod.string(), zod.number()).optional(), - magicalPower: zod - .object({ - abiphone: zod.number().optional(), - accessories: zod.number().optional(), - hegemony: zod - .object({ - amount: zod.number().optional(), - rarity: zod.string().optional() - }) - .optional(), - rarities: zod - .record( - zod.string(), - zod.object({ - amount: zod.number().optional(), - magicalPower: zod.number().optional() - }) - ) - .optional(), - riftPrism: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - missing: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - recombobulated: zod.number().optional(), - selectedPower: zod.string().optional(), - stats: zod.record(zod.string(), zod.number()).optional(), - total: zod.number().optional(), - totalRecombobulated: zod.number().optional(), - unique: zod.number().optional(), - upgrades: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional() -}); - -/** - * Returns bestiary for the given user and profile ID - * @summary Get bestiary stats of a specified player - */ -export const GetApiBestiaryUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiBestiaryUuidProfileIdResponse = zod.object({ - categories: zod - .record( - zod.string(), - zod.object({ - mobs: zod - .array( - zod.object({ - kills: zod.number().optional(), - maxKills: zod.number().optional(), - maxTier: zod.number().optional(), - name: zod.string().optional(), - nextTierKills: zod.number().optional(), - texture: zod.string().optional(), - tier: zod.number().optional() - }) - ) - .optional(), - mobsMaxed: zod.number().optional(), - mobsUnlocked: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - familiesCompleted: zod.number().optional(), - familiesUnlocked: zod.number().optional(), - familyTiers: zod.number().optional(), - level: zod.number().optional(), - maxFamilyTiers: zod.number().optional(), - maxLevel: zod.number().optional(), - totalFamilies: zod.number().optional() -}); - -/** - * Returns collections for the given user and profile ID - * @summary Get collections stats of a specified player - */ -export const GetApiCollectionsUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiCollectionsUuidProfileIdResponse = zod.object({ - categories: zod - .record( - zod.string(), - zod.object({ - items: zod - .array( - zod.object({ - amount: zod.number().optional(), - amounts: zod - .array( - zod.object({ - amount: zod.number().optional(), - username: zod.string().optional() - }) - ) - .optional(), - id: zod.string().optional(), - maxTier: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional(), - tier: zod.number().optional(), - totalAmount: zod.number().optional() - }) - ) - .optional(), - maxTiers: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional(), - totalTiers: zod.number().optional() - }) - ) - .optional(), - maxedCollections: zod.number().optional(), - totalCollections: zod.number().optional() -}); - /** * Returns combined stats for the given user and profile ID * @summary Get combined stats of a specified player @@ -789,35 +571,6 @@ export const GetApiCombinedUuidProfileIdResponse = zod.object({ .optional() }) .optional(), - inventory: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), minions: zod .object({ maxedMinions: zod.number().optional(), @@ -2064,285 +1817,74 @@ export const GetApiCombinedUuidProfileIdResponse = zod.object({ }); /** - * Returns Crimson Isle stats for the given user and profile ID - * @summary Get Crimson Isle stats of a specified player + * Returns embed data for the given user (UUID or username) and optional profile ID + * @summary Get embed data for a specified player */ -export const GetApiCrimsonIsleUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") +export const GetApiEmbedUuidParams = zod.object({ + uuid: zod.string().describe("User UUID or username") +}); + +export const GetApiEmbedUuidQueryParams = zod.object({ + profileId: zod.string().optional().describe("Profile ID (optional, defaults to selected profile)") }); -export const GetApiCrimsonIsleUuidProfileIdResponse = zod.object({ - dojo: zod +export const GetApiEmbedUuidResponse = zod.object({ + bank: zod.number().optional(), + displayName: zod.string().optional(), + dungeons: zod .object({ - challenges: zod - .array( - zod.object({ - id: zod.string().optional(), - name: zod.string().optional(), - points: zod.number().optional(), - rank: zod.string().optional(), - texture: zod.string().optional(), - time: zod.number().optional() - }) - ) - .optional(), - totalPoints: zod.number().optional() + classAverage: zod.number().optional(), + classes: zod.record(zod.string(), zod.number()).optional(), + dungeoneering: zod.number().optional() }) .optional(), - factions: zod + game_mode: zod.string().optional(), + joined: zod.number().optional(), + networth: zod .object({ - barbariansReputation: zod.number().optional(), - magesReputation: zod.number().optional(), - selectedFaction: zod.string().optional() + nonCosmetic: zod.number().optional(), + normal: zod.number().optional() }) .optional(), - kuudra: zod + profile_cute_name: zod.string().optional(), + profile_id: zod.string().optional(), + purse: zod.number().optional(), + rank: zod .object({ - tiers: zod - .array( - zod.object({ - id: zod.string().optional(), - kills: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - totalKills: zod.number().optional() + plusColor: zod.string().optional(), + plusText: zod.string().optional(), + rankColor: zod.string().optional(), + rankText: zod.string().optional() }) - .optional() + .optional(), + skills: zod + .object({ + skillAverage: zod.number().optional(), + skills: zod.record(zod.string(), zod.number()).optional() + }) + .optional(), + skyblock_level: zod.number().optional(), + slayers: zod + .object({ + slayers: zod.record(zod.string(), zod.number()).optional(), + xp: zod.number().optional() + }) + .optional(), + username: zod.string().optional(), + uuid: zod.string().optional() }); /** - * Returns dungeons for the given user and profile ID - * @summary Get dungeons stats of a specified player + * Retrieves all emojis from the database + * @summary Get all emojis + */ +export const GetApiEmojisResponse = zod.record(zod.string(), zod.unknown()); + +/** + * Returns garden data for the given profile ID + * @summary Get garden stats of a specified profile */ -export const GetApiDungeonsUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiDungeonsUuidProfileIdResponse = zod.object({ - catacombs: zod - .array( - zod.object({ - best_run: zod - .object({ - damage_dealt: zod.number().optional(), - damage_mitigated: zod.number().optional(), - deaths: zod.number().optional(), - dungeon_class: zod.string().optional(), - elapsed_time: zod.number().optional(), - grade: zod.string().optional(), - mobs_killed: zod.number().optional(), - score_bonus: zod.number().optional(), - score_exploration: zod.number().optional(), - score_skill: zod.number().optional(), - score_speed: zod.number().optional(), - secrets_found: zod.number().optional(), - timestamp: zod.number().optional() - }) - .optional(), - name: zod.string().optional(), - stats: zod - .object({ - best_score: zod.number().optional(), - fastest_time: zod.number().optional(), - fastest_time_s: zod.number().optional(), - fastest_time_s_plus: zod.number().optional(), - milestone_completions: zod.number().optional(), - mobs_killed: zod.number().optional(), - most_damage: zod - .object({ - damage: zod.number().optional(), - type: zod.string().optional() - }) - .optional(), - most_healing: zod.number().optional(), - most_mobs_killed: zod.number().optional(), - tier_completions: zod.number().optional(), - times_played: zod.number().optional(), - watcher_kills: zod.number().optional() - }) - .optional(), - texture: zod.string().optional() - }) - ) - .optional(), - classes: zod - .object({ - classAverage: zod.number().optional(), - classAverageWithProgress: zod.number().optional(), - classes: zod - .record( - zod.string(), - zod.object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - ) - .optional(), - selectedClass: zod.string().optional(), - totalClassExp: zod.number().optional() - }) - .optional(), - level: zod - .object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - master_catacombs: zod - .array( - zod.object({ - best_run: zod - .object({ - damage_dealt: zod.number().optional(), - damage_mitigated: zod.number().optional(), - deaths: zod.number().optional(), - dungeon_class: zod.string().optional(), - elapsed_time: zod.number().optional(), - grade: zod.string().optional(), - mobs_killed: zod.number().optional(), - score_bonus: zod.number().optional(), - score_exploration: zod.number().optional(), - score_skill: zod.number().optional(), - score_speed: zod.number().optional(), - secrets_found: zod.number().optional(), - timestamp: zod.number().optional() - }) - .optional(), - name: zod.string().optional(), - stats: zod - .object({ - best_score: zod.number().optional(), - fastest_time: zod.number().optional(), - fastest_time_s: zod.number().optional(), - fastest_time_s_plus: zod.number().optional(), - milestone_completions: zod.number().optional(), - mobs_killed: zod.number().optional(), - most_damage: zod - .object({ - damage: zod.number().optional(), - type: zod.string().optional() - }) - .optional(), - most_healing: zod.number().optional(), - most_mobs_killed: zod.number().optional(), - tier_completions: zod.number().optional(), - times_played: zod.number().optional(), - watcher_kills: zod.number().optional() - }) - .optional(), - texture: zod.string().optional() - }) - ) - .optional(), - stats: zod - .object({ - bloodMobKills: zod.number().optional(), - highestFloorBeatenMaster: zod.number().optional(), - highestFloorBeatenNormal: zod.number().optional(), - secrets: zod - .object({ - found: zod.number().optional(), - secretsPerRun: zod.number().optional() - }) - .optional() - }) - .optional() -}); - -/** - * Returns embed data for the given user (UUID or username) and optional profile ID - * @summary Get embed data for a specified player - */ -export const GetApiEmbedUuidParams = zod.object({ - uuid: zod.string().describe("User UUID or username") -}); - -export const GetApiEmbedUuidQueryParams = zod.object({ - profileId: zod.string().optional().describe("Profile ID (optional, defaults to selected profile)") -}); - -export const GetApiEmbedUuidResponse = zod.object({ - bank: zod.number().optional(), - displayName: zod.string().optional(), - dungeons: zod - .object({ - classAverage: zod.number().optional(), - classes: zod.record(zod.string(), zod.number()).optional(), - dungeoneering: zod.number().optional() - }) - .optional(), - game_mode: zod.string().optional(), - joined: zod.number().optional(), - networth: zod - .object({ - nonCosmetic: zod.number().optional(), - normal: zod.number().optional() - }) - .optional(), - profile_cute_name: zod.string().optional(), - profile_id: zod.string().optional(), - purse: zod.number().optional(), - rank: zod - .object({ - plusColor: zod.string().optional(), - plusText: zod.string().optional(), - rankColor: zod.string().optional(), - rankText: zod.string().optional() - }) - .optional(), - skills: zod - .object({ - skillAverage: zod.number().optional(), - skills: zod.record(zod.string(), zod.number()).optional() - }) - .optional(), - skyblock_level: zod.number().optional(), - slayers: zod - .object({ - slayers: zod.record(zod.string(), zod.number()).optional(), - xp: zod.number().optional() - }) - .optional(), - username: zod.string().optional(), - uuid: zod.string().optional() -}); - -/** - * Retrieves all emojis from the database - * @summary Get all emojis - */ -export const GetApiEmojisResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Returns garden data for the given profile ID - * @summary Get garden stats of a specified profile - */ -export const GetApiGardenUuidProfileIdParams = zod.object({ +export const GetApiGardenUuidProfileIdParams = zod.object({ uuid: zod.string().describe("User UUID"), profileId: zod.string().describe("Profile ID") }); @@ -2614,228 +2156,100 @@ export const GetApiGardenUuidProfileIdResponse = zod.object({ }); /** - * Returns gear for the given user and profile ID - * @summary Get gear stats of a specified player + * Returns a PNG image of a head for the given texture ID + * @summary Render and return a head image + */ +export const GetApiHeadTextureIdParams = zod.object({ + textureId: zod.string().describe("Texture ID") +}); + +export const GetApiHeadTextureIdResponse = zod.file(); + +/** + * Returns inventory items that match the search parameter for the given user and profile ID. Searches across all inventories and returns items that contain the search parameter in their name or lore. + * @summary Get searched inventory items for a specified player and search parameter */ -export const GetApiGearUuidProfileIdParams = zod.object({ +export const GetApiInventorySearchUuidProfileIdSearchParamParams = zod.object({ uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") + profileId: zod.string().describe("Profile ID"), + searchParam: zod.string().describe("Search parameter to filter inventory items") }); -export const GetApiGearUuidProfileIdResponse = zod.object({ - armor: zod +export const GetApiInventorySearchUuidProfileIdSearchParamResponseItem = zod.object({ + Count: zod.number().optional(), + containsItems: zod.array(zod.unknown()).optional(), + display_name: zod.string().optional(), + isInactive: zod.boolean().optional(), + lore: zod.array(zod.string()).optional(), + rarity: zod.string().optional(), + recombobulated: zod.boolean().optional(), + shiny: zod.boolean().optional(), + source: zod.string().optional(), + sourceTab: zod .object({ - armor: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - set_name: zod.string().optional(), - set_rarity: zod.string().optional(), - stats: zod.record(zod.string(), zod.number()).optional() + icon: zod.string().optional(), + name: zod.string().optional() }) .optional(), - equipment: zod + texture_pack: zod.string().optional(), + texture_path: zod.string().optional(), + wiki: zod .object({ - equipment: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - stats: zod.record(zod.string(), zod.number()).optional() + fandom: zod.string().optional(), + official: zod.string().optional() }) - .optional(), - wardrobe: zod + .optional() +}); +export const GetApiInventorySearchUuidProfileIdSearchParamResponse = zod.array(GetApiInventorySearchUuidProfileIdSearchParamResponseItem); + +/** + * Returns inventory items for the given user, profile ID + * @summary Get inventory items for a specified player + */ +export const GetApiInventoryUuidProfileIdParams = zod.object({ + uuid: zod.string().describe("User UUID"), + profileId: zod.string().describe("Profile ID") +}); + +export const GetApiInventoryUuidProfileIdQueryParams = zod.object({ + query: zod.string().optional().describe("Search query (required when inventoryId is 'search')") +}); + +export const GetApiInventoryUuidProfileIdResponseItem = zod.object({ + items: zod .array( - zod.array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - ) - .optional(), - weapons: zod - .object({ - highest_priority_weapon: zod - .object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - .optional(), - weapons: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() + zod.object({ + Count: zod.number().optional(), + containsItems: zod.array(zod.unknown()).optional(), + display_name: zod.string().optional(), + isInactive: zod.boolean().optional(), + lore: zod.array(zod.string()).optional(), + rarity: zod.string().optional(), + recombobulated: zod.boolean().optional(), + shiny: zod.boolean().optional(), + source: zod.string().optional(), + sourceTab: zod + .object({ + icon: zod.string().optional(), + name: zod.string().optional() }) - ) - .optional() - }) - .optional() -}); - -/** - * Returns a PNG image of a head for the given texture ID - * @summary Render and return a head image - */ -export const GetApiHeadTextureIdParams = zod.object({ - textureId: zod.string().describe("Texture ID") -}); - -export const GetApiHeadTextureIdResponse = zod.file(); - -/** - * Returns inventory items for the given user, profile ID, and inventory ID. Supports museum, search, and other inventories. - * @summary Get inventory items for a specified player - */ -export const GetApiInventoryUuidProfileIdInventoryIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID"), - inventoryId: zod.string().describe("Inventory ID (e.g., museum, search, or other inventory types)") -}); - -export const GetApiInventoryUuidProfileIdInventoryIdQueryParams = zod.object({ - query: zod.string().optional().describe("Search query (required when inventoryId is 'search')") -}); - -export const GetApiInventoryUuidProfileIdInventoryIdResponseItem = zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) + .optional(), + texture_pack: zod.string().optional(), + texture_path: zod.string().optional(), + wiki: zod + .object({ + fandom: zod.string().optional(), + official: zod.string().optional() + }) + .optional() + }) + ) .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() + name: zod.string().optional(), + separatorAfter: zod.number().optional(), + texture: zod.string().optional() }); -export const GetApiInventoryUuidProfileIdInventoryIdResponse = zod.array(GetApiInventoryUuidProfileIdInventoryIdResponseItem); +export const GetApiInventoryUuidProfileIdResponse = zod.array(GetApiInventoryUuidProfileIdResponseItem); /** * Returns a PNG image of an item for the given texture ID @@ -2858,175 +2272,6 @@ export const GetApiLeatherTypeColorParams = zod.object({ export const GetApiLeatherTypeColorResponse = zod.file(); -/** - * Returns minions for the given user and profile ID - * @summary Get minions stats of a specified player - */ -export const GetApiMinionsUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiMinionsUuidProfileIdResponse = zod.object({ - maxedMinions: zod.number().optional(), - maxedTiers: zod.number().optional(), - minions: zod - .record( - zod.string(), - zod.object({ - maxedMinions: zod.number().optional(), - maxedTiers: zod.number().optional(), - minions: zod - .array( - zod.object({ - maxTier: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional(), - tiers: zod.array(zod.number()).optional() - }) - ) - .optional(), - texture: zod.string().optional(), - totalMinions: zod.number().optional(), - totalTiers: zod.number().optional() - }) - ) - .optional(), - minionsSlots: zod - .object({ - bonusSlots: zod.number().optional(), - current: zod.number().optional(), - next: zod.number().optional() - }) - .optional(), - totalMinions: zod.number().optional(), - totalTiers: zod.number().optional() -}); - -/** - * Returns misc stats for the given user and profile ID - * @summary Get misc stats of a specified player - */ -export const GetApiMiscUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiMiscUuidProfileIdResponse = zod.object({ - auctions: zod - .object({ - bids: zod.number().optional(), - created: zod.number().optional(), - fees: zod.number().optional(), - gold_earned: zod.number().optional(), - gold_spent: zod.number().optional(), - highest_bid: zod.number().optional(), - no_bids: zod.number().optional(), - total_bought: zod.record(zod.string(), zod.number()).optional(), - total_sold: zod.record(zod.string(), zod.number()).optional(), - won: zod.number().optional() - }) - .optional(), - claimed_items: zod.record(zod.string(), zod.number()).optional(), - consumables: zod - .array( - zod.object({ - amount: zod.number().optional(), - maxAmount: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - damage: zod - .object({ - highest_critical_damage: zod.number().optional() - }) - .optional(), - dragons: zod - .object({ - deaths: zod.record(zod.string(), zod.number()).optional(), - ender_crystals_destroyed: zod.number().optional(), - fastest_kill: zod.record(zod.string(), zod.number()).optional(), - last_hits: zod.record(zod.string(), zod.number()).optional(), - most_damage: zod.record(zod.string(), zod.number()).optional() - }) - .optional(), - endstone_protector: zod - .object({ - deaths: zod.number().optional(), - kills: zod.number().optional() - }) - .optional(), - essence: zod - .array( - zod.object({ - amount: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - gifts: zod - .object({ - given: zod.number().optional(), - received: zod.number().optional() - }) - .optional(), - kills: zod - .object({ - deaths: zod - .array( - zod.object({ - amount: zod.number().optional(), - name: zod.string().optional() - }) - ) - .optional(), - kills: zod - .array( - zod.object({ - amount: zod.number().optional(), - name: zod.string().optional() - }) - ) - .optional(), - total_deaths: zod.number().optional(), - total_kills: zod.number().optional() - }) - .optional(), - mythological_event: zod - .object({ - burrows_chains_complete: zod.record(zod.string(), zod.number()).optional(), - burrows_dug_combat: zod.record(zod.string(), zod.number()).optional(), - burrows_dug_next: zod.record(zod.string(), zod.number()).optional(), - burrows_dug_treasure: zod.record(zod.string(), zod.number()).optional(), - kills: zod.number().optional() - }) - .optional(), - pet_milestones: zod - .record( - zod.string(), - zod.object({ - amount: zod.number().optional(), - progress: zod.string().optional(), - rarity: zod.string().optional(), - total: zod.number().optional() - }) - ) - .optional(), - profile_upgrades: zod.record(zod.string(), zod.number()).optional(), - season_of_jerry: zod - .object({ - most_cannonballs_hit: zod.number().optional(), - most_damage_dealt: zod.number().optional(), - most_magma_damage_dealt: zod.number().optional(), - most_snowballs_hit: zod.number().optional() - }) - .optional(), - uncategorized: zod.record(zod.string(), zod.unknown()).optional() -}); - /** * Returns networth for the given user and profile ID * @summary Get networth of a specified player @@ -3079,66 +2324,6 @@ export const GetApiNetworthUuidProfileIdResponse = zod.object({ .optional() }); -/** - * Returns pets for the given user and profile ID - * @summary Get pets stats of a specified player - */ -export const GetApiPetsUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiPetsUuidProfileIdResponse = zod.object({ - amount: zod.number().optional(), - amountSkins: zod.number().optional(), - missing: zod - .array( - zod.object({ - active: zod.boolean().optional(), - display_name: zod.string().optional(), - level: zod.number().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - stats: zod.record(zod.string(), zod.number()).optional(), - texture_path: zod.string().optional(), - type: zod.string().optional() - }) - ) - .optional(), - petScore: zod - .object({ - amount: zod.number().optional(), - reward: zod - .array( - zod.object({ - bonus: zod.number().optional(), - score: zod.number().optional(), - unlocked: zod.boolean().optional() - }) - ) - .optional(), - stats: zod.record(zod.string(), zod.number()).optional() - }) - .optional(), - pets: zod - .array( - zod.object({ - active: zod.boolean().optional(), - display_name: zod.string().optional(), - level: zod.number().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - stats: zod.record(zod.string(), zod.number()).optional(), - texture_path: zod.string().optional(), - type: zod.string().optional() - }) - ) - .optional(), - total: zod.number().optional(), - totalCandyUsed: zod.number().optional(), - totalPetExp: zod.number().optional() -}); - /** * Returns player stats for the given user and profile ID * @summary Get player stats of a specified player @@ -3178,1068 +2363,6 @@ export const GetApiResourcepacksResponseItem = zod.object({ }); export const GetApiResourcepacksResponse = zod.array(GetApiResourcepacksResponseItem); -/** - * Returns rift data for the given user and profile ID - * @summary Get rift stats of a specified player - */ -export const GetApiRiftUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiRiftUuidProfileIdResponse = zod.object({ - armor: zod - .object({ - armor: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - set_name: zod.string().optional(), - set_rarity: zod.string().optional(), - stats: zod.record(zod.string(), zod.number()).optional() - }) - .optional(), - castle: zod - .object({ - grubberStacks: zod.number().optional(), - maxBurgers: zod.number().optional() - }) - .optional(), - enigma: zod - .object({ - souls: zod.number().optional(), - totalSouls: zod.number().optional() - }) - .optional(), - equipment: zod - .object({ - equipment: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - stats: zod.record(zod.string(), zod.number()).optional() - }) - .optional(), - motes: zod - .object({ - lifetime: zod.number().optional(), - orbs: zod.number().optional(), - purse: zod.number().optional() - }) - .optional(), - porhtal: zod - .object({ - porhtals: zod - .array( - zod.object({ - name: zod.string().optional(), - texture: zod.string().optional(), - unlocked: zod.boolean().optional() - }) - ) - .optional(), - porhtalsFound: zod.number().optional() - }) - .optional(), - timecharms: zod - .object({ - timecharms: zod - .array( - zod.object({ - name: zod.string().optional(), - texture: zod.string().optional(), - unlocked: zod.boolean().optional(), - unlockedAt: zod.number().optional() - }) - ) - .optional(), - timecharmsFound: zod.number().optional() - }) - .optional(), - visits: zod.number().optional() -}); - -/** - * Returns skills for the given user and profile ID - * @summary Get skills stats of a specified player - */ -export const GetApiSkillsUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiSkillsUuidProfileIdResponse = zod.object({ - enchanting: zod - .object({ - data: zod - .record( - zod.string(), - zod.object({ - name: zod.string().optional(), - stats: zod - .object({ - bonusClicks: zod.number().optional(), - games: zod - .array( - zod.object({ - attempts: zod.number().optional(), - bestScore: zod.number().optional(), - claims: zod.number().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - lastAttempt: zod.number().optional(), - lastClaimed: zod.number().optional() - }) - .optional() - }) - ) - .optional(), - unlocked: zod.boolean().optional() - }) - .optional(), - farming: zod - .object({ - contests: zod - .record( - zod.string(), - zod.object({ - amount: zod.number().optional(), - collected: zod.number().optional(), - maxed: zod.boolean().optional(), - medals: zod.record(zod.string(), zod.number()).optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - contestsAttended: zod.number().optional(), - copper: zod.number().optional(), - medals: zod - .record( - zod.string(), - zod.object({ - amount: zod.number().optional(), - total: zod.number().optional() - }) - ) - .optional(), - pelts: zod.number().optional(), - tools: zod - .object({ - highest_priority_tool: zod - .object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - .optional(), - tools: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional() - }) - .optional(), - uniqueGolds: zod.number().optional() - }) - .optional(), - fishing: zod - .object({ - itemsFished: zod.number().optional(), - lavaSeaCreatures: zod - .array( - zod.object({ - amount: zod.number().optional(), - id: zod.string().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - seaCreaturesFished: zod.number().optional(), - shredderBait: zod.number().optional(), - shredderFished: zod.number().optional(), - tools: zod - .object({ - highest_priority_tool: zod - .object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - .optional(), - tools: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional() - }) - .optional(), - treasure: zod.number().optional(), - treasureLarge: zod.number().optional(), - trophyFish: zod - .object({ - stage: zod - .object({ - name: zod.string().optional(), - progress: zod - .array( - zod.object({ - caught: zod.number().optional(), - tier: zod.string().optional(), - total: zod.number().optional() - }) - ) - .optional() - }) - .optional(), - totalCaught: zod.number().optional(), - trophyFish: zod - .array( - zod.object({ - bronze: zod.number().optional(), - description: zod.string().optional(), - diamond: zod.number().optional(), - gold: zod.number().optional(), - id: zod.string().optional(), - maxed: zod.boolean().optional(), - name: zod.string().optional(), - silver: zod.number().optional(), - texture: zod.string().optional() - }) - ) - .optional() - }) - .optional(), - waterSeaCreatures: zod - .array( - zod.object({ - amount: zod.number().optional(), - id: zod.string().optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional() - }) - .optional(), - foraging: zod - .object({ - cotf: zod - .object({ - level: zod.number().optional(), - maxLevel: zod.number().optional() - }) - .optional(), - fishFamily: zod - .object({ - collected: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - foragingLevel: zod - .object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - hinaChapter: zod - .object({ - maxTier: zod.number().optional(), - tier: zod.number().optional() - }) - .optional(), - hotf: zod - .array( - zod.object({ - Count: zod.number().optional(), - Damage: zod.number().optional(), - categories: zod.array(zod.string()).optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - id: zod.string().optional(), - isInactive: zod.boolean().optional(), - itemIndex: zod.number().optional(), - lore: zod.array(zod.string()).optional(), - price: zod.number().optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - tag: zod - .object({ - ExtraAttributes: zod - .object({ - ability_scroll: zod.array(zod.string()).optional(), - additional_coins: zod.number().optional(), - artOfPeaceApplied: zod.number().optional(), - art_of_war_count: zod.number().optional(), - attributes: zod.record(zod.string(), zod.number()).optional(), - auction: zod.number().optional(), - bid: zod.number().optional(), - boosters: zod.array(zod.string()).optional(), - champion_combat_xp: zod.number().optional(), - collected_coins: zod.number().optional(), - compact_blocks: zod.number().optional(), - divan_powder_coating: zod.number().optional(), - donated_museum: zod.boolean().optional(), - drill_part_engine: zod.string().optional(), - drill_part_fuel_tank: zod.string().optional(), - drill_part_upgrade_module: zod.string().optional(), - dungeon_item_level: zod.unknown().optional(), - dye_item: zod.string().optional(), - edition: zod.number().optional(), - enchantments: zod.record(zod.string(), zod.number()).optional(), - ethermerge: zod.number().optional(), - expertise_kills: zod.number().optional(), - farmed_cultivating: zod.number().optional(), - farming_for_dummies_count: zod.number().optional(), - gems: zod.record(zod.string(), zod.unknown()).optional(), - hecatomb_s_runs: zod.number().optional(), - hook: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - hot_potato_count: zod.number().optional(), - id: zod.string().optional(), - is_shiny: zod.boolean().optional(), - item_tier: zod.number().optional(), - jalapeno_count: zod.number().optional(), - levelable_overclocks: zod.number().optional(), - line: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - mana_disintegrator_count: zod.number().optional(), - model: zod.string().optional(), - modifier: zod.string().optional(), - new_year_cake_bag_data: zod.array(zod.number()).optional(), - new_year_cake_bag_years: zod.array(zod.number()).optional(), - new_years_cake: zod.number().optional(), - party_hat_color: zod.string().optional(), - party_hat_emoji: zod.string().optional(), - petInfo: zod.string().optional(), - pickonimbus_durability: zod.number().optional(), - polarvoid: zod.number().optional(), - power_ability_scroll: zod.string().optional(), - price: zod.number().optional(), - rarity_upgrades: zod.number().optional(), - runes: zod.record(zod.string(), zod.number()).optional(), - sack_pss: zod.number().optional(), - sinker: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - skin: zod.string().optional(), - talisman_enrichment: zod.string().optional(), - thunder_charge: zod.number().optional(), - timestamp: zod.unknown().optional(), - tuned_transmission: zod.number().optional(), - upgrade_level: zod.unknown().optional(), - uuid: zod.string().optional(), - winning_bid: zod.number().optional(), - wood_singularity_count: zod.number().optional() - }) - .optional() - .describe('HideFlags int `nbt:\"HideFlags\" json:\"HideFlags,omitempty\"`\nUnbreakable int `nbt:\"Unbreakable\" json:\"Unbreakable,omitempty\"`\nEnchantments []Enchantment `nbt:\"ench\" json:\"ench,omitempty\"`'), - ItemModel: zod.string().optional(), - SkullOwner: zod - .object({ - Id: zod.string().optional(), - Properties: zod - .object({ - textures: zod - .array( - zod.object({ - Signature: zod.string().optional(), - Value: zod.string().optional() - }) - ) - .optional() - }) - .optional() - }) - .optional(), - display: zod - .object({ - Lore: zod.array(zod.string()).optional(), - Name: zod.string().optional(), - color: zod.number().optional() - }) - .optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - level: zod - .object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - selectedAxeAbility: zod.string().optional(), - tokens: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - tools: zod - .object({ - highest_priority_tool: zod - .object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - .optional(), - tools: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional() - }) - .optional(), - treeGift: zod - .record( - zod.string(), - zod.object({ - maxMilestone: zod.number().optional(), - milestone: zod.number().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - whispers: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional() - }) - .optional(), - hunting: zod - .object({ - maxSyphoned: zod.number().optional(), - maxUnlocked: zod.number().optional(), - shards: zod - .array( - zod.object({ - abilityLevel: zod.number().optional(), - abilityMaxLevel: zod.number().optional(), - abilityName: zod.string().optional(), - capturedTimestamp: zod.number().optional(), - family: zod.array(zod.string()).optional(), - lore: zod.array(zod.string()).optional(), - maxSyphon: zod.number().optional(), - name: zod.string().optional(), - owned: zod.number().optional(), - rarity: zod.string().optional(), - shardId: zod.string().optional(), - syphoned: zod.number().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - syphoned: zod.number().optional(), - unlocked: zod.number().optional() - }) - .optional(), - mining: zod - .object({ - commissions: zod - .object({ - completions: zod.number().optional(), - milestone: zod.number().optional() - }) - .optional(), - crystalHollows: zod - .object({ - crystalHollowsLastAccess: zod.number().optional(), - nucleusRuns: zod.number().optional(), - progress: zod - .object({ - crystals: zod.record(zod.string(), zod.string()).optional(), - parts: zod.record(zod.string(), zod.string()).optional() - }) - .optional() - }) - .optional(), - forge: zod - .array( - zod.object({ - duration: zod.number().optional(), - endingTime: zod.number().optional(), - id: zod.string().optional(), - name: zod.string().optional(), - slot: zod.number().optional(), - startingTime: zod.number().optional() - }) - ) - .optional(), - glaciteTunnels: zod - .object({ - corpses: zod - .object({ - corpses: zod - .array( - zod.object({ - amount: zod.number().optional(), - name: zod.string().optional(), - texture_path: zod.string().optional() - }) - ) - .optional(), - found: zod.number().optional(), - max: zod.number().optional() - }) - .optional(), - fossilDust: zod.number().optional(), - fossils: zod - .object({ - fossils: zod - .array( - zod.object({ - found: zod.boolean().optional(), - name: zod.string().optional(), - texture_path: zod.string().optional() - }) - ) - .optional(), - found: zod.number().optional(), - max: zod.number().optional() - }) - .optional(), - mineshaftsEntered: zod.number().optional() - }) - .optional(), - hotm: zod - .array( - zod.object({ - Count: zod.number().optional(), - Damage: zod.number().optional(), - categories: zod.array(zod.string()).optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - id: zod.string().optional(), - isInactive: zod.boolean().optional(), - itemIndex: zod.number().optional(), - lore: zod.array(zod.string()).optional(), - price: zod.number().optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - tag: zod - .object({ - ExtraAttributes: zod - .object({ - ability_scroll: zod.array(zod.string()).optional(), - additional_coins: zod.number().optional(), - artOfPeaceApplied: zod.number().optional(), - art_of_war_count: zod.number().optional(), - attributes: zod.record(zod.string(), zod.number()).optional(), - auction: zod.number().optional(), - bid: zod.number().optional(), - boosters: zod.array(zod.string()).optional(), - champion_combat_xp: zod.number().optional(), - collected_coins: zod.number().optional(), - compact_blocks: zod.number().optional(), - divan_powder_coating: zod.number().optional(), - donated_museum: zod.boolean().optional(), - drill_part_engine: zod.string().optional(), - drill_part_fuel_tank: zod.string().optional(), - drill_part_upgrade_module: zod.string().optional(), - dungeon_item_level: zod.unknown().optional(), - dye_item: zod.string().optional(), - edition: zod.number().optional(), - enchantments: zod.record(zod.string(), zod.number()).optional(), - ethermerge: zod.number().optional(), - expertise_kills: zod.number().optional(), - farmed_cultivating: zod.number().optional(), - farming_for_dummies_count: zod.number().optional(), - gems: zod.record(zod.string(), zod.unknown()).optional(), - hecatomb_s_runs: zod.number().optional(), - hook: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - hot_potato_count: zod.number().optional(), - id: zod.string().optional(), - is_shiny: zod.boolean().optional(), - item_tier: zod.number().optional(), - jalapeno_count: zod.number().optional(), - levelable_overclocks: zod.number().optional(), - line: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - mana_disintegrator_count: zod.number().optional(), - model: zod.string().optional(), - modifier: zod.string().optional(), - new_year_cake_bag_data: zod.array(zod.number()).optional(), - new_year_cake_bag_years: zod.array(zod.number()).optional(), - new_years_cake: zod.number().optional(), - party_hat_color: zod.string().optional(), - party_hat_emoji: zod.string().optional(), - petInfo: zod.string().optional(), - pickonimbus_durability: zod.number().optional(), - polarvoid: zod.number().optional(), - power_ability_scroll: zod.string().optional(), - price: zod.number().optional(), - rarity_upgrades: zod.number().optional(), - runes: zod.record(zod.string(), zod.number()).optional(), - sack_pss: zod.number().optional(), - sinker: zod - .object({ - donated_museum: zod.boolean().optional(), - part: zod.string().optional() - }) - .optional(), - skin: zod.string().optional(), - talisman_enrichment: zod.string().optional(), - thunder_charge: zod.number().optional(), - timestamp: zod.unknown().optional(), - tuned_transmission: zod.number().optional(), - upgrade_level: zod.unknown().optional(), - uuid: zod.string().optional(), - winning_bid: zod.number().optional(), - wood_singularity_count: zod.number().optional() - }) - .optional() - .describe('HideFlags int `nbt:\"HideFlags\" json:\"HideFlags,omitempty\"`\nUnbreakable int `nbt:\"Unbreakable\" json:\"Unbreakable,omitempty\"`\nEnchantments []Enchantment `nbt:\"ench\" json:\"ench,omitempty\"`'), - ItemModel: zod.string().optional(), - SkullOwner: zod - .object({ - Id: zod.string().optional(), - Properties: zod - .object({ - textures: zod - .array( - zod.object({ - Signature: zod.string().optional(), - Value: zod.string().optional() - }) - ) - .optional() - }) - .optional() - }) - .optional(), - display: zod - .object({ - Lore: zod.array(zod.string()).optional(), - Name: zod.string().optional(), - color: zod.number().optional() - }) - .optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional(), - level: zod - .object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - miningLevel: zod - .object({ - level: zod.number().optional(), - levelCap: zod.number().optional(), - levelWithProgress: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - progress: zod.number().optional(), - texture: zod.string().optional(), - uncappedLevel: zod.number().optional(), - unlockableLevelWithProgress: zod.number().optional(), - xp: zod.number().optional(), - xpCurrent: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - peakOfTheMountain: zod - .object({ - level: zod.number().optional(), - max_level: zod.number().optional() - }) - .optional(), - powder: zod - .object({ - gemstone: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - glacite: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - mithril: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional() - }) - .optional(), - selectedPickaxeAbility: zod.string().optional(), - tokens: zod - .object({ - available: zod.number().optional(), - spent: zod.number().optional(), - total: zod.number().optional() - }) - .optional(), - tools: zod - .object({ - highest_priority_tool: zod - .object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - .optional(), - tools: zod - .array( - zod.object({ - Count: zod.number().optional(), - containsItems: zod.array(zod.unknown()).optional(), - display_name: zod.string().optional(), - isInactive: zod.boolean().optional(), - lore: zod.array(zod.string()).optional(), - rarity: zod.string().optional(), - recombobulated: zod.boolean().optional(), - shiny: zod.boolean().optional(), - source: zod.string().optional(), - sourceTab: zod - .object({ - icon: zod.string().optional(), - name: zod.string().optional() - }) - .optional(), - texture_pack: zod.string().optional(), - texture_path: zod.string().optional(), - wiki: zod - .object({ - fandom: zod.string().optional(), - official: zod.string().optional() - }) - .optional() - }) - ) - .optional() - }) - .optional() - }) - .optional() -}); - -/** - * Returns slayer statistics for the given user and profile ID - * @summary Get slayer stats of a specified player - */ -export const GetApiSlayerUuidProfileIdParams = zod.object({ - uuid: zod.string().describe("User UUID"), - profileId: zod.string().describe("Profile ID") -}); - -export const GetApiSlayerUuidProfileIdResponse = zod.object({ - data: zod - .record( - zod.string(), - zod.object({ - kills: zod.record(zod.string(), zod.number()).optional(), - level: zod - .object({ - level: zod.number().optional(), - maxLevel: zod.number().optional(), - maxed: zod.boolean().optional(), - xp: zod.number().optional(), - xpForNext: zod.number().optional() - }) - .optional(), - name: zod.string().optional(), - texture: zod.string().optional() - }) - ) - .optional(), - stats: zod.record(zod.string(), zod.number()).optional(), - totalSlayerExp: zod.number().optional() -}); - /** * Returns stats for the given user and profile ID * @summary Get stats of a specified player diff --git a/src/lib/shared/api/orval-generated.ts b/src/lib/shared/api/orval-generated.ts index c2c2a9417..44530f1b8 100644 --- a/src/lib/shared/api/orval-generated.ts +++ b/src/lib/shared/api/orval-generated.ts @@ -996,7 +996,6 @@ export interface ModelsCombinedOutput { crimsonIsle?: ModelsCrimsonIsleOutput; dungeons?: ModelsDungeonsOutput; gear?: ModelsGear; - inventory?: ModelsStrippedItem[]; minions?: ModelsMinionsOutput; misc?: ModelsMiscOutput; pets?: ModelsOutputPets; @@ -1138,6 +1137,13 @@ export interface ModelsGarden { visitors?: ModelsVisitors; } +export interface ModelsInventory { + items?: ModelsStrippedItem[]; + name?: string; + separatorAfter?: number; + texture?: string; +} + export interface ModelsMemberStats { cute_name?: string; profile_id?: string; @@ -1266,120 +1272,13 @@ export type GetApiEmbedUuidParams = { export type GetApiEmojis200 = { [key: string]: unknown }; -export type GetApiInventoryUuidProfileIdInventoryIdParams = { +export type GetApiInventoryUuidProfileIdParams = { /** * Search query (required when inventoryId is 'search') */ query?: string; }; -/** - * Returns accessories for the given user and profile ID - * @summary Get accessories stats of a specified player - */ -export type getApiAccessoriesUuidProfileIdResponse200 = { - data: ModelsGetMissingAccessoresOutput; - status: 200; -}; - -export type getApiAccessoriesUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiAccessoriesUuidProfileIdResponse500 = { - data: ModelsProcessingError; - status: 500; -}; - -export type getApiAccessoriesUuidProfileIdResponseSuccess = getApiAccessoriesUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiAccessoriesUuidProfileIdResponseError = (getApiAccessoriesUuidProfileIdResponse400 | getApiAccessoriesUuidProfileIdResponse500) & { - headers: Headers; -}; - -export type getApiAccessoriesUuidProfileIdResponse = getApiAccessoriesUuidProfileIdResponseSuccess | getApiAccessoriesUuidProfileIdResponseError; - -export const getGetApiAccessoriesUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/accessories/${uuid}/${profileId}`; -}; - -export const getApiAccessoriesUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiAccessoriesUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns bestiary for the given user and profile ID - * @summary Get bestiary stats of a specified player - */ -export type getApiBestiaryUuidProfileIdResponse200 = { - data: ModelsBestiaryOutput; - status: 200; -}; - -export type getApiBestiaryUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiBestiaryUuidProfileIdResponseSuccess = getApiBestiaryUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiBestiaryUuidProfileIdResponseError = getApiBestiaryUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiBestiaryUuidProfileIdResponse = getApiBestiaryUuidProfileIdResponseSuccess | getApiBestiaryUuidProfileIdResponseError; - -export const getGetApiBestiaryUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/bestiary/${uuid}/${profileId}`; -}; - -export const getApiBestiaryUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiBestiaryUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns collections for the given user and profile ID - * @summary Get collections stats of a specified player - */ -export type getApiCollectionsUuidProfileIdResponse200 = { - data: ModelsCollectionsOutput; - status: 200; -}; - -export type getApiCollectionsUuidProfileIdResponse500 = { - data: ModelsProcessingError; - status: 500; -}; - -export type getApiCollectionsUuidProfileIdResponseSuccess = getApiCollectionsUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiCollectionsUuidProfileIdResponseError = getApiCollectionsUuidProfileIdResponse500 & { - headers: Headers; -}; - -export type getApiCollectionsUuidProfileIdResponse = getApiCollectionsUuidProfileIdResponseSuccess | getApiCollectionsUuidProfileIdResponseError; - -export const getGetApiCollectionsUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/collections/${uuid}/${profileId}`; -}; - -export const getApiCollectionsUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiCollectionsUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - /** * Returns combined stats for the given user and profile ID * @summary Get combined stats of a specified player @@ -1419,74 +1318,6 @@ export const getApiCombinedUuidProfileId = async (uuid: string, profileId: strin }); }; -/** - * Returns Crimson Isle stats for the given user and profile ID - * @summary Get Crimson Isle stats of a specified player - */ -export type getApiCrimsonIsleUuidProfileIdResponse200 = { - data: ModelsCrimsonIsleOutput; - status: 200; -}; - -export type getApiCrimsonIsleUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiCrimsonIsleUuidProfileIdResponseSuccess = getApiCrimsonIsleUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiCrimsonIsleUuidProfileIdResponseError = getApiCrimsonIsleUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiCrimsonIsleUuidProfileIdResponse = getApiCrimsonIsleUuidProfileIdResponseSuccess | getApiCrimsonIsleUuidProfileIdResponseError; - -export const getGetApiCrimsonIsleUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/crimson_isle/${uuid}/${profileId}`; -}; - -export const getApiCrimsonIsleUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiCrimsonIsleUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns dungeons for the given user and profile ID - * @summary Get dungeons stats of a specified player - */ -export type getApiDungeonsUuidProfileIdResponse200 = { - data: ModelsDungeonsOutput; - status: 200; -}; - -export type getApiDungeonsUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiDungeonsUuidProfileIdResponseSuccess = getApiDungeonsUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiDungeonsUuidProfileIdResponseError = getApiDungeonsUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiDungeonsUuidProfileIdResponse = getApiDungeonsUuidProfileIdResponseSuccess | getApiDungeonsUuidProfileIdResponseError; - -export const getGetApiDungeonsUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/dungeons/${uuid}/${profileId}`; -}; - -export const getApiDungeonsUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiDungeonsUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - /** * Returns embed data for the given user (UUID or username) and optional profile ID * @summary Get embed data for a specified player @@ -1605,117 +1436,117 @@ export const getApiGardenUuidProfileId = async (uuid: string, profileId: string, }; /** - * Returns gear for the given user and profile ID - * @summary Get gear stats of a specified player + * Returns a PNG image of a head for the given texture ID + * @summary Render and return a head image */ -export type getApiGearUuidProfileIdResponse200 = { - data: ModelsGear; +export type getApiHeadTextureIdResponse200ApplicationJson = { + data: unknown; status: 200; }; -export type getApiGearUuidProfileIdResponse400 = { +export type getApiHeadTextureIdResponse200ImagePng = { + data: Blob; + status: 200; +}; + +export type getApiHeadTextureIdResponse400 = { data: ModelsProcessingError; status: 400; }; -export type getApiGearUuidProfileIdResponse500 = { - data: ModelsProcessingError; +export type getApiHeadTextureIdResponse500 = { + data: string; status: 500; }; -export type getApiGearUuidProfileIdResponseSuccess = getApiGearUuidProfileIdResponse200 & { +export type getApiHeadTextureIdResponseSuccess = (getApiHeadTextureIdResponse200ApplicationJson | getApiHeadTextureIdResponse200ImagePng) & { headers: Headers; }; -export type getApiGearUuidProfileIdResponseError = (getApiGearUuidProfileIdResponse400 | getApiGearUuidProfileIdResponse500) & { +export type getApiHeadTextureIdResponseError = (getApiHeadTextureIdResponse400 | getApiHeadTextureIdResponse500) & { headers: Headers; }; -export type getApiGearUuidProfileIdResponse = getApiGearUuidProfileIdResponseSuccess | getApiGearUuidProfileIdResponseError; +export type getApiHeadTextureIdResponse = getApiHeadTextureIdResponseSuccess | getApiHeadTextureIdResponseError; -export const getGetApiGearUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/gear/${uuid}/${profileId}`; +export const getGetApiHeadTextureIdUrl = (textureId: string) => { + return `/api/head/${textureId}`; }; -export const getApiGearUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiGearUuidProfileIdUrl(uuid, profileId), { +export const getApiHeadTextureId = async (textureId: string, options?: RequestInit): Promise => { + return customFetch(getGetApiHeadTextureIdUrl(textureId), { ...options, method: "GET" }); }; /** - * Returns a PNG image of a head for the given texture ID - * @summary Render and return a head image + * Returns inventory items that match the search parameter for the given user and profile ID. Searches across all inventories and returns items that contain the search parameter in their name or lore. + * @summary Get searched inventory items for a specified player and search parameter */ -export type getApiHeadTextureIdResponse200ApplicationJson = { - data: unknown; - status: 200; -}; - -export type getApiHeadTextureIdResponse200ImagePng = { - data: Blob; +export type getApiInventorySearchUuidProfileIdSearchParamResponse200 = { + data: ModelsStrippedItem[]; status: 200; }; -export type getApiHeadTextureIdResponse400 = { +export type getApiInventorySearchUuidProfileIdSearchParamResponse400 = { data: ModelsProcessingError; status: 400; }; -export type getApiHeadTextureIdResponse500 = { - data: string; +export type getApiInventorySearchUuidProfileIdSearchParamResponse500 = { + data: ModelsProcessingError; status: 500; }; -export type getApiHeadTextureIdResponseSuccess = (getApiHeadTextureIdResponse200ApplicationJson | getApiHeadTextureIdResponse200ImagePng) & { +export type getApiInventorySearchUuidProfileIdSearchParamResponseSuccess = getApiInventorySearchUuidProfileIdSearchParamResponse200 & { headers: Headers; }; -export type getApiHeadTextureIdResponseError = (getApiHeadTextureIdResponse400 | getApiHeadTextureIdResponse500) & { +export type getApiInventorySearchUuidProfileIdSearchParamResponseError = (getApiInventorySearchUuidProfileIdSearchParamResponse400 | getApiInventorySearchUuidProfileIdSearchParamResponse500) & { headers: Headers; }; -export type getApiHeadTextureIdResponse = getApiHeadTextureIdResponseSuccess | getApiHeadTextureIdResponseError; +export type getApiInventorySearchUuidProfileIdSearchParamResponse = getApiInventorySearchUuidProfileIdSearchParamResponseSuccess | getApiInventorySearchUuidProfileIdSearchParamResponseError; -export const getGetApiHeadTextureIdUrl = (textureId: string) => { - return `/api/head/${textureId}`; +export const getGetApiInventorySearchUuidProfileIdSearchParamUrl = (uuid: string, profileId: string, searchParam: string) => { + return `/api/inventory/search/${uuid}/${profileId}/${searchParam}`; }; -export const getApiHeadTextureId = async (textureId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiHeadTextureIdUrl(textureId), { +export const getApiInventorySearchUuidProfileIdSearchParam = async (uuid: string, profileId: string, searchParam: string, options?: RequestInit): Promise => { + return customFetch(getGetApiInventorySearchUuidProfileIdSearchParamUrl(uuid, profileId, searchParam), { ...options, method: "GET" }); }; /** - * Returns inventory items for the given user, profile ID, and inventory ID. Supports museum, search, and other inventories. + * Returns inventory items for the given user, profile ID * @summary Get inventory items for a specified player */ -export type getApiInventoryUuidProfileIdInventoryIdResponse200 = { - data: ModelsStrippedItem[]; +export type getApiInventoryUuidProfileIdResponse200 = { + data: ModelsInventory[]; status: 200; }; -export type getApiInventoryUuidProfileIdInventoryIdResponse400 = { +export type getApiInventoryUuidProfileIdResponse400 = { data: ModelsProcessingError; status: 400; }; -export type getApiInventoryUuidProfileIdInventoryIdResponse500 = { +export type getApiInventoryUuidProfileIdResponse500 = { data: ModelsProcessingError; status: 500; }; -export type getApiInventoryUuidProfileIdInventoryIdResponseSuccess = getApiInventoryUuidProfileIdInventoryIdResponse200 & { +export type getApiInventoryUuidProfileIdResponseSuccess = getApiInventoryUuidProfileIdResponse200 & { headers: Headers; }; -export type getApiInventoryUuidProfileIdInventoryIdResponseError = (getApiInventoryUuidProfileIdInventoryIdResponse400 | getApiInventoryUuidProfileIdInventoryIdResponse500) & { +export type getApiInventoryUuidProfileIdResponseError = (getApiInventoryUuidProfileIdResponse400 | getApiInventoryUuidProfileIdResponse500) & { headers: Headers; }; -export type getApiInventoryUuidProfileIdInventoryIdResponse = getApiInventoryUuidProfileIdInventoryIdResponseSuccess | getApiInventoryUuidProfileIdInventoryIdResponseError; +export type getApiInventoryUuidProfileIdResponse = getApiInventoryUuidProfileIdResponseSuccess | getApiInventoryUuidProfileIdResponseError; -export const getGetApiInventoryUuidProfileIdInventoryIdUrl = (uuid: string, profileId: string, inventoryId: string, params?: GetApiInventoryUuidProfileIdInventoryIdParams) => { +export const getGetApiInventoryUuidProfileIdUrl = (uuid: string, profileId: string, params?: GetApiInventoryUuidProfileIdParams) => { const normalizedParams = new URLSearchParams(); Object.entries(params || {}).forEach(([key, value]) => { @@ -1726,11 +1557,11 @@ export const getGetApiInventoryUuidProfileIdInventoryIdUrl = (uuid: string, prof const stringifiedParams = normalizedParams.toString(); - return stringifiedParams.length > 0 ? `/api/inventory/${uuid}/${profileId}/${inventoryId}?${stringifiedParams}` : `/api/inventory/${uuid}/${profileId}/${inventoryId}`; + return stringifiedParams.length > 0 ? `/api/inventory/${uuid}/${profileId}?${stringifiedParams}` : `/api/inventory/${uuid}/${profileId}`; }; -export const getApiInventoryUuidProfileIdInventoryId = async (uuid: string, profileId: string, inventoryId: string, params?: GetApiInventoryUuidProfileIdInventoryIdParams, options?: RequestInit): Promise => { - return customFetch(getGetApiInventoryUuidProfileIdInventoryIdUrl(uuid, profileId, inventoryId, params), { +export const getApiInventoryUuidProfileId = async (uuid: string, profileId: string, params?: GetApiInventoryUuidProfileIdParams, options?: RequestInit): Promise => { + return customFetch(getGetApiInventoryUuidProfileIdUrl(uuid, profileId, params), { ...options, method: "GET" }); @@ -1824,74 +1655,6 @@ export const getApiLeatherTypeColor = async (type: string, color: string, option }); }; -/** - * Returns minions for the given user and profile ID - * @summary Get minions stats of a specified player - */ -export type getApiMinionsUuidProfileIdResponse200 = { - data: ModelsMinionsOutput; - status: 200; -}; - -export type getApiMinionsUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiMinionsUuidProfileIdResponseSuccess = getApiMinionsUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiMinionsUuidProfileIdResponseError = getApiMinionsUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiMinionsUuidProfileIdResponse = getApiMinionsUuidProfileIdResponseSuccess | getApiMinionsUuidProfileIdResponseError; - -export const getGetApiMinionsUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/minions/${uuid}/${profileId}`; -}; - -export const getApiMinionsUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiMinionsUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns misc stats for the given user and profile ID - * @summary Get misc stats of a specified player - */ -export type getApiMiscUuidProfileIdResponse200 = { - data: ModelsMiscOutput; - status: 200; -}; - -export type getApiMiscUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiMiscUuidProfileIdResponseSuccess = getApiMiscUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiMiscUuidProfileIdResponseError = getApiMiscUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiMiscUuidProfileIdResponse = getApiMiscUuidProfileIdResponseSuccess | getApiMiscUuidProfileIdResponseError; - -export const getGetApiMiscUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/misc/${uuid}/${profileId}`; -}; - -export const getApiMiscUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiMiscUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - /** * Returns networth for the given user and profile ID * @summary Get networth of a specified player @@ -1931,40 +1694,6 @@ export const getApiNetworthUuidProfileId = async (uuid: string, profileId: strin }); }; -/** - * Returns pets for the given user and profile ID - * @summary Get pets stats of a specified player - */ -export type getApiPetsUuidProfileIdResponse200 = { - data: ModelsOutputPets; - status: 200; -}; - -export type getApiPetsUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiPetsUuidProfileIdResponseSuccess = getApiPetsUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiPetsUuidProfileIdResponseError = getApiPetsUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiPetsUuidProfileIdResponse = getApiPetsUuidProfileIdResponseSuccess | getApiPetsUuidProfileIdResponseError; - -export const getGetApiPetsUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/pets/${uuid}/${profileId}`; -}; - -export const getApiPetsUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiPetsUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - /** * Returns player stats for the given user and profile ID * @summary Get player stats of a specified player @@ -2068,118 +1797,6 @@ export const getApiResourcepacks = async (options?: RequestInit): Promise { - return `/api/rift/${uuid}/${profileId}`; -}; - -export const getApiRiftUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiRiftUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns skills for the given user and profile ID - * @summary Get skills stats of a specified player - */ -export type getApiSkillsUuidProfileIdResponse200 = { - data: ModelsSkillsOutput; - status: 200; -}; - -export type getApiSkillsUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiSkillsUuidProfileIdResponse500 = { - data: ModelsProcessingError; - status: 500; -}; - -export type getApiSkillsUuidProfileIdResponseSuccess = getApiSkillsUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiSkillsUuidProfileIdResponseError = (getApiSkillsUuidProfileIdResponse400 | getApiSkillsUuidProfileIdResponse500) & { - headers: Headers; -}; - -export type getApiSkillsUuidProfileIdResponse = getApiSkillsUuidProfileIdResponseSuccess | getApiSkillsUuidProfileIdResponseError; - -export const getGetApiSkillsUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/skills/${uuid}/${profileId}`; -}; - -export const getApiSkillsUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiSkillsUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - -/** - * Returns slayer statistics for the given user and profile ID - * @summary Get slayer stats of a specified player - */ -export type getApiSlayerUuidProfileIdResponse200 = { - data: ModelsSlayersOutput; - status: 200; -}; - -export type getApiSlayerUuidProfileIdResponse400 = { - data: ModelsProcessingError; - status: 400; -}; - -export type getApiSlayerUuidProfileIdResponseSuccess = getApiSlayerUuidProfileIdResponse200 & { - headers: Headers; -}; -export type getApiSlayerUuidProfileIdResponseError = getApiSlayerUuidProfileIdResponse400 & { - headers: Headers; -}; - -export type getApiSlayerUuidProfileIdResponse = getApiSlayerUuidProfileIdResponseSuccess | getApiSlayerUuidProfileIdResponseError; - -export const getGetApiSlayerUuidProfileIdUrl = (uuid: string, profileId: string) => { - return `/api/slayer/${uuid}/${profileId}`; -}; - -export const getApiSlayerUuidProfileId = async (uuid: string, profileId: string, options?: RequestInit): Promise => { - return customFetch(getGetApiSlayerUuidProfileIdUrl(uuid, profileId), { - ...options, - method: "GET" - }); -}; - /** * Returns stats for the given user and profile ID * @summary Get stats of a specified player From 2c80f2d153a3cbd324f307458e4a43ee99c1d852 Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:54:49 +0200 Subject: [PATCH 5/8] feat: refactor inventory components to improve data fetching and rendering logic --- .changeset/ninety-plants-bathe.md | 5 + src/lib/components/item/InventoryGrid.svelte | 27 +- .../components/item/InventorySearch.svelte | 4 +- src/lib/sections/stats/Inventory.svelte | 303 +++++++----------- src/lib/shared/api/skycrypt-api.remote.ts | 16 +- 5 files changed, 136 insertions(+), 219 deletions(-) create mode 100644 .changeset/ninety-plants-bathe.md diff --git a/.changeset/ninety-plants-bathe.md b/.changeset/ninety-plants-bathe.md new file mode 100644 index 000000000..dacda0649 --- /dev/null +++ b/.changeset/ninety-plants-bathe.md @@ -0,0 +1,5 @@ +--- +"skycrypt-frontend": minor +--- + +feat: refactor inventory components to improve data fetching and rendering logic diff --git a/src/lib/components/item/InventoryGrid.svelte b/src/lib/components/item/InventoryGrid.svelte index 9c539bf94..8c4310421 100644 --- a/src/lib/components/item/InventoryGrid.svelte +++ b/src/lib/components/item/InventoryGrid.svelte @@ -1,19 +1,12 @@ {#snippet content(items: ModelsStrippedItem[] | undefined)} @@ -41,18 +34,4 @@ {/if} {/snippet} -{#if inventoryId === "inventory"} - {#if combinedInventory} - {@render content(combinedInventory)} - {:else if combinedQuery.current?.error} -

Failed to load inventory.

- {:else} - - {/if} -{:else} - - {#snippet children(items)} - {@render content(items)} - {/snippet} - -{/if} +{@render content(items)} diff --git a/src/lib/components/item/InventorySearch.svelte b/src/lib/components/item/InventorySearch.svelte index d36e35314..0c1c28d31 100644 --- a/src/lib/components/item/InventorySearch.svelte +++ b/src/lib/components/item/InventorySearch.svelte @@ -23,8 +23,8 @@ e.stopPropagation(); }} /> {#if debouncedSearch.current === "" || !debouncedSearch.current}{:else} - - {#snippet children(items)} + searchInventorySection({ uuid, profileId, searchParam: debouncedSearch.current! })}> + {#snippet children(items: ModelsStrippedItem[])} {#if !items || items.length === 0}

No items found.

{:else if debouncedSearch.current !== ""} diff --git a/src/lib/sections/stats/Inventory.svelte b/src/lib/sections/stats/Inventory.svelte index 535a40330..69ea4fb31 100644 --- a/src/lib/sections/stats/Inventory.svelte +++ b/src/lib/sections/stats/Inventory.svelte @@ -1,164 +1,99 @@
- - - - {#snippet viewportChildren()} -
- {#each tabs as tab (tab.id)} - - - - - - - - {tab.id.replaceAll("_", " ")} - {#if openTab === tab.id} -
- {:else} -
- {/if} -
- {/each} -
- {/snippet} - - - -
-
+ {#if inventories.length && currentInventory} + selectedTabName, handleTabChange} class="@container relative mb-0 rounded-lg bg-background/30 p-5 pt-4"> + + + {#snippet viewportChildren()} +
+ {#each inventories as tabItem (tabItem.name)} + + + + + + + + {tabItem.name} + {#if selectedTabName === tabItem.name} +
+ {:else} +
+ {/if} +
+ {/each} +
+ {/snippet} + + + +
+
- - {#if openTab === "backpack" || openTab === "museum" || openTab === "sacks"} - {@render multipleInventorySection()} - {:else if openTab == "search"} - {#if uuid && profileId} - + + {#if selectedTabName === "Search"} + {#if uuid && profileId} + + {/if} + {:else if usesNestedInventoryView} + {@render multipleInventorySection(currentInventory?.items ?? [])} + {:else} + {/if} - {:else if uuid && profileId} - - {/if} - -
+ +
+ {:else if inventoriesQuery?.error} +

Failed to load inventories.

+ {:else} + + {/if}
{#snippet itemSnippet(item: ModelsStrippedItem)} @@ -173,65 +108,61 @@
{/snippet} -{#snippet multipleInventorySection()} - - {#snippet children(items)} - - - {#if items?.length} - {#each items as item, index (index)} - - {#snippet child({ props })} -
- {#if item.texture_path} -
- {@render itemSnippet(item)} -
- {:else} - {@render emptyItem()} - {/if} +{#snippet multipleInventorySection(items: ModelsStrippedItem[])} + + + {#if items?.length} + {#each items as item, index (index)} + + {#snippet child({ props })} +
+ {#if item.texture_path} +
+ {@render itemSnippet(item)}
- {/snippet} - - {/each} - {/if} - - {#if items?.length} - {#each items as item, index (index)} - -
- {#if item?.containsItems} - {#each item.containsItems as containedItem, index2 (index2)} - {#if index2 > 0} - {#if index2 % 54 === 0} - {@render gap()} - {/if} - {/if} - - {#if containedItem.texture_path} -
- {@render itemSnippet(containedItem)} -
- {:else} - {@render emptyItem()} - {/if} -
- {/each} + {:else} + {@render emptyItem()} {/if}
-
-
- {#if item?.lore} - {#each item?.lore as lore, index (index)} - {@html renderLore(lore)} - {/each} + {/snippet} + + {/each} + {/if} + + {#if items?.length} + {#each items as item, index (index)} + +
+ {#if item?.containsItems} + {#each item.containsItems as containedItem, index2 (index2)} + {#if index2 > 0} + {#if index2 % 54 === 0} + {@render gap()} {/if} -
-
- - {/each} - {/if} - - {/snippet} - + {/if} + + {#if containedItem.texture_path} +
+ {@render itemSnippet(containedItem)} +
+ {:else} + {@render emptyItem()} + {/if} +
+ {/each} + {/if} +
+
+
+ {#if item?.lore} + {#each item?.lore as lore, index (index)} + {@html renderLore(lore)} + {/each} + {/if} +
+
+
+ {/each} + {/if} + {/snippet} diff --git a/src/lib/shared/api/skycrypt-api.remote.ts b/src/lib/shared/api/skycrypt-api.remote.ts index ab9260a16..f3a8a65d2 100644 --- a/src/lib/shared/api/skycrypt-api.remote.ts +++ b/src/lib/shared/api/skycrypt-api.remote.ts @@ -1,6 +1,6 @@ import { prerender, query } from "$app/server"; -import { getApiCombinedUuidProfileId, getApiEmbedUuid, getApiGardenUuidProfileId, getApiInventoryUuidProfileIdInventoryId, getApiNetworthUuidProfileId, getApiPlayerStatsUuidProfileId, getApiResourcepacks, getApiStatsUuidProfileId, getApiUsernameUuid, getApiUuidUsername, type ModelsProcessingError } from "$lib/shared/api/orval-generated"; -import { GetApiCombinedUuidProfileIdParams, GetApiEmbedUuidParams, GetApiEmbedUuidQueryParams, GetApiGardenUuidProfileIdParams, GetApiInventoryUuidProfileIdInventoryIdParams, GetApiInventoryUuidProfileIdInventoryIdQueryParams, GetApiNetworthUuidProfileIdParams, GetApiPlayerStatsUuidProfileIdParams, GetApiStatsUuidProfileIdParams, GetApiUsernameUuidParams, GetApiUuidUsernameParams } from "$lib/shared/api/orval-generated-zod"; +import { getApiCombinedUuidProfileId, getApiEmbedUuid, getApiGardenUuidProfileId, getApiInventorySearchUuidProfileIdSearchParam, getApiInventoryUuidProfileId, getApiNetworthUuidProfileId, getApiPlayerStatsUuidProfileId, getApiResourcepacks, getApiStatsUuidProfileId, getApiUsernameUuid, getApiUuidUsername, type ModelsProcessingError } from "$lib/shared/api/orval-generated"; +import { GetApiCombinedUuidProfileIdParams, GetApiEmbedUuidParams, GetApiEmbedUuidQueryParams, GetApiGardenUuidProfileIdParams, GetApiInventorySearchUuidProfileIdSearchParamParams, GetApiInventoryUuidProfileIdParams, GetApiNetworthUuidProfileIdParams, GetApiPlayerStatsUuidProfileIdParams, GetApiStatsUuidProfileIdParams, GetApiUsernameUuidParams, GetApiUuidUsernameParams } from "$lib/shared/api/orval-generated-zod"; import { APIEndpointName } from "$types"; import { error, isHttpError, redirect } from "@sveltejs/kit"; import z from "zod"; @@ -60,13 +60,15 @@ export const getNetworth = query(GetApiNetworthUuidProfileIdParams, async ({ uui return fetchSection(APIEndpointName.NETWORTH, () => getApiNetworthUuidProfileId(uuid, profileId)); }); -/** Fetch inventory data for a specific profile and inventory type */ -export const getInventorySection = query(z.object({ ...GetApiInventoryUuidProfileIdInventoryIdParams.shape, ...GetApiInventoryUuidProfileIdInventoryIdQueryParams.shape }), async ({ uuid, profileId, inventoryId, query }) => { - return fetchSection(APIEndpointName.INVENTORY, () => getApiInventoryUuidProfileIdInventoryId(uuid, profileId, inventoryId, { query })); +/** Fetch all inventory tabs for a specific profile */ +export const getInventories = query(GetApiInventoryUuidProfileIdParams, async ({ uuid, profileId }) => { + return fetchSection(APIEndpointName.INVENTORY, () => getApiInventoryUuidProfileId(uuid, profileId)); }); -/** Fetch inventory data for a specific profile and inventory type */ -export const searchInventorySection = getInventorySection; +/** Search all inventories for matching items */ +export const searchInventorySection = query(GetApiInventorySearchUuidProfileIdSearchParamParams, async ({ uuid, profileId, searchParam }) => { + return fetchSection(APIEndpointName.INVENTORY, () => getApiInventorySearchUuidProfileIdSearchParam(uuid, profileId, searchParam)); +}); /** Fetch garden data for a specific profile */ export const getGarden = query(GetApiGardenUuidProfileIdParams, async ({ uuid, profileId }) => { From ad75312427699ba142e3d53c23613bb77ba0842b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Apr 2026 20:58:11 +0000 Subject: [PATCH 6/8] chore: version packages (beta) [skip ci] --- .changeset/pre.json | 12 ++++++++++++ CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..58e958338 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,12 @@ +{ + "mode": "pre", + "tag": "beta", + "initialVersions": { + "skycrypt-frontend": "3.4.1" + }, + "changesets": [ + "chilly-garlics-divide", + "modern-eggs-shave", + "ninety-plants-bathe" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcc40d10..751b89c25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 3.5.0-beta.0 + +### Minor Changes + +- feat: use the combined endpoint for the sections data ([`638f564`](https://github.com/SkyCryptWebsite/SkyCrypt-Frontend/commit/638f564eb6e904eb08b847460d95ab430f4c26aa)) + +- feat: refactor inventory components to improve data fetching and rendering logic ([`2c80f2d`](https://github.com/SkyCryptWebsite/SkyCrypt-Frontend/commit/2c80f2d153a3cbd324f307458e4a43ee99c1d852)) + +### Patch Changes + +- fix: refactor SectionBoundary to use query function instead of promise ([`bd7398b`](https://github.com/SkyCryptWebsite/SkyCrypt-Frontend/commit/bd7398b93213bbd0db3ca24ba83bbb79c7765b7e)) + ## 3.4.1 ### Patch Changes diff --git a/package.json b/package.json index 538de4817..51033af61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skycrypt-frontend", - "version": "3.4.1", + "version": "3.5.0-beta.0", "private": true, "type": "module", "repository": { From d48ad93a641c8b8b2afab649a04bddb360f90156 Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Wed, 8 Apr 2026 03:50:18 +0200 Subject: [PATCH 7/8] fix: adjust layout and styling for header and main components --- src/lib/components/header/Header.svelte | 1 + src/lib/layouts/stats/Main.svelte | 2 +- src/routes/+layout.svelte | 2 +- src/routes/+page.svelte | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/header/Header.svelte b/src/lib/components/header/Header.svelte index 2edc1095d..5bcc31d18 100644 --- a/src/lib/components/header/Header.svelte +++ b/src/lib/components/header/Header.svelte @@ -15,6 +15,7 @@ const packageVersion = __NPM_PACKAGE_VERSION__; +
diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 606d96508..00444defb 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -222,7 +222,7 @@
-
+
{#if getProfileContext().current}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 63c7b65bc..bf55c1cf8 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -262,7 +262,7 @@ {#if internalState.themeEditorOpen && !isMobile.current} -
+
{/if} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index ed6788145..4c5fe1fe7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -85,7 +85,7 @@ }); -
+
From a7ff238610dd0c752576bdbc5d534fd2e1e62b08 Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Wed, 8 Apr 2026 03:56:04 +0200 Subject: [PATCH 8/8] chore: update takumi-js to version 1.0.0-rc.15 in package.json and pnpm-lock.yaml --- package.json | 2 +- pnpm-lock.yaml | 102 ++++++++++++++++++++++++------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 51033af61..e181f34c1 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@sentry/sveltekit": "^10.47.0", "culori": "^4.0.2", "simple-git-hooks": "^2.13.1", - "takumi-js": "1.0.0-rc.14" + "takumi-js": "1.0.0-rc.15" }, "engines": { "node": "^24", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7fcc8ed2c..9e1d20206 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^2.13.1 version: 2.13.1 takumi-js: - specifier: 1.0.0-rc.14 - version: 1.0.0-rc.14(react@19.2.4) + specifier: 1.0.0-rc.15 + version: 1.0.0-rc.15(react@19.2.4) devDependencies: '@changesets/cli': specifier: ^2.30.0 @@ -1714,64 +1714,64 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 - '@takumi-rs/core-darwin-arm64@1.0.0-rc.14': - resolution: {integrity: sha512-5EPv0/8RdhbqRAxCNpOv3NiLIF4TP2twU1Kbayt3LR6BSj6V+IoIC+DI0gpx40Vb2G5DvmVlX8v06tmVtSDMaA==} + '@takumi-rs/core-darwin-arm64@1.0.0-rc.15': + resolution: {integrity: sha512-m3WkPHMicUQnoj1uhaGbXdWlG4dyv1A3dnIaDhLSumIisFOm4Q83M5MCRP7XNuqdaWNWF3TK5vHkL8TKkAscog==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [darwin] - '@takumi-rs/core-darwin-x64@1.0.0-rc.14': - resolution: {integrity: sha512-2pnX/PNKVcTEwR2MHdjziwDTU5gdOOVTbWAfJmhuE3fO/s4qSS6YYeMIpE+TQQZHFvZleUqMd4haGBFx0Mx+LQ==} + '@takumi-rs/core-darwin-x64@1.0.0-rc.15': + resolution: {integrity: sha512-7O/nExzEA4n3dSNaU+CFxvIAisbrQYVhU3E6XzmLfh9IxhRZKSvPyPV0Dj3dURBgpiOm6ACY6QLEwuBz7Bcxrw==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [darwin] - '@takumi-rs/core-linux-arm64-gnu@1.0.0-rc.14': - resolution: {integrity: sha512-tnmwGIZbdYVRC+UjJtHA/z//UAtxc3b6BeQ9bRD1QrsL+veGO1He92QZcQ4YU/uVfuewc4wAtuDOuhs7hRz1Ng==} + '@takumi-rs/core-linux-arm64-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-ktlL8yz8Mbgi60ZkeN+6WlYQTH1jfybXSAwtpgLqNKl/w/IG0fZk81FS3B4Z9ProOszxhSZD/Md5RpjTaIKTzg==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] libc: [glibc] - '@takumi-rs/core-linux-arm64-musl@1.0.0-rc.14': - resolution: {integrity: sha512-m7kTqqUFaWtbGaGbQ1Efhs4t+AmUBAb0Un6TXWeIvXMXP+s2drdYFrQsIoacta4P/DTcBsRrRqUVZDOBH/iuJQ==} + '@takumi-rs/core-linux-arm64-musl@1.0.0-rc.15': + resolution: {integrity: sha512-VBw85ViZJlWk20RM8L3e7Y5soshbGyGvGPYyj7fPAyKTf4rlGjyBO19gUGTkCsjFYd5Ea3W9ro+ef1Lojji0Tw==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] libc: [musl] - '@takumi-rs/core-linux-x64-gnu@1.0.0-rc.14': - resolution: {integrity: sha512-r+LS1scqaDnWq6NSDRMhKMTXAgGUW2yqdV8T39jvPNHRbDihQvUDDqwvmK8oKakMYnQSmYbdK5DeHWzypf9QPw==} + '@takumi-rs/core-linux-x64-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-5+AlCHRkT8IALrwLVULA5Nho8Ywby9n0tegbTTGzXLMV7LROr3ISTImB9oFUC8r0l6FUanE9RYY9VvugkPgF9A==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] libc: [glibc] - '@takumi-rs/core-linux-x64-musl@1.0.0-rc.14': - resolution: {integrity: sha512-+Nk8zXtV1W6YDlMdtb8+OAq3gtAx65EpJrjewOs3+4LciAlK0CrZk86hTY4F461Vml5/4YiJ1TwrKGyDiM2vzw==} + '@takumi-rs/core-linux-x64-musl@1.0.0-rc.15': + resolution: {integrity: sha512-eAVbqeVh/2E8AOCyRVfbLRYJ6HObuJKDQUM12CSW6xjvBbciLFUiT4xc/Brljkp1jgvHxguWjOFguxyCYyADBQ==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] libc: [musl] - '@takumi-rs/core-win32-arm64-msvc@1.0.0-rc.14': - resolution: {integrity: sha512-UNOlC/f9I4vrvZKDUYyYnJY75R9Kl7BZObRLH75OJ0XGkae7NSvdRCV9dl6Nf/teSLLwLERUzXt2rDbERBF2tw==} + '@takumi-rs/core-win32-arm64-msvc@1.0.0-rc.15': + resolution: {integrity: sha512-HWtKgxPPeKKCvMIUTYFMcpl/3ocq9X+lvQIm9fc7NYJX4y7VYwugSgINqFLlJ0H0fGsCbxUKDfaAGVY2cwKX4w==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [win32] - '@takumi-rs/core-win32-x64-msvc@1.0.0-rc.14': - resolution: {integrity: sha512-/sSYh3oXmvFxshRKdYLkd0z7Kl9oha/ggC24kH0QMXRVE2GqrdaxIj7em6kZVvLbKsNhQKPOUGRE7/mbEPtv3g==} + '@takumi-rs/core-win32-x64-msvc@1.0.0-rc.15': + resolution: {integrity: sha512-8mgjKIAjutU0rHbFlEgm5j6MQB+sgFVKal2dxYpN1aXletQo02pOaSmPDyZJCwF8Me76zFLioG1qeyTMUw+JcQ==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [win32] - '@takumi-rs/core@1.0.0-rc.14': - resolution: {integrity: sha512-8o/czqmCqIN/gg/gDIaLNyy3ekqTq7tx5Lhgic2IY54UHJyp1QSxSscUyITJvT9DIquWz9sbkkYlIwO0esGGwg==} + '@takumi-rs/core@1.0.0-rc.15': + resolution: {integrity: sha512-wxPvTIUFb6paGaByMLEBUHqIawu3xSiCzlYX6VD6L7pF/KEJy4mj6I3Vk7geTVXaODEGuo7arPH/LWkU98hD7w==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} - '@takumi-rs/helpers@1.0.0-rc.14': - resolution: {integrity: sha512-FtCXU6/TfoqFvvl4mLmt41ttpbC/YliXkPj2nyTfYeLSYI51bPPn0ybubds6rXzFtjEm1PHKEVcEDZD/ttaDEw==} + '@takumi-rs/helpers@1.0.0-rc.15': + resolution: {integrity: sha512-zGaFKNHvzfPGU0Uj3zrs5yb1f/qI3Mn096DkrR4bX/B2VWsRmwsPScIUlUqPWsCnXYJQqUaK+lEq+C5hvfsblg==} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 @@ -1779,8 +1779,8 @@ packages: react-dom: optional: true - '@takumi-rs/wasm@1.0.0-rc.14': - resolution: {integrity: sha512-z9rgfFSsd71n2PCmO+mtrUuLXroeG+hhdGAvpUKrIigrbeIJ3yh/sU56HOSijqiQtK8iNtS+d+Bk6az4fDTo3g==} + '@takumi-rs/wasm@1.0.0-rc.15': + resolution: {integrity: sha512-EO1lJsW+SdIihJGKVoQ5xsM2r8zSli0DxUmlL+2fRDxCnjne+4ikqXJIas0m4mQu5cUEmsVsLFFIGhBnorqP3A==} '@testing-library/svelte-core@1.0.0': resolution: {integrity: sha512-VkUePoLV6oOYwSUvX6ShA8KLnJqZiYMIbP2JW2t0GLWLkJxKGvuH5qrrZBV/X7cXFnLGuFQEC7RheYiZOW68KQ==} @@ -3767,8 +3767,8 @@ packages: tailwindcss@4.2.2: resolution: {integrity: sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==} - takumi-js@1.0.0-rc.14: - resolution: {integrity: sha512-iX+g635TtXkRT/9ajHisReWWdJYev3see3xe9w6Vfijq0q+E2XtBUy9nomt4h/d1YPQb2SXcZFVM1BqjS+E9nw==} + takumi-js@1.0.0-rc.15: + resolution: {integrity: sha512-xwHOf29iiZnp68/ayhYQtrPJT4GzBQu1WzwEuOl8ADYBEIZQ30Hp00QvdTRcjIwn3lPq3sG1QcMBrwWgCVRsZg==} tapable@2.3.2: resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} @@ -5801,53 +5801,53 @@ snapshots: tailwindcss: 4.2.2 vite: 8.0.5(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.2)(esbuild@0.27.7)(jiti@2.6.1)(yaml@2.8.3) - '@takumi-rs/core-darwin-arm64@1.0.0-rc.14': + '@takumi-rs/core-darwin-arm64@1.0.0-rc.15': optional: true - '@takumi-rs/core-darwin-x64@1.0.0-rc.14': + '@takumi-rs/core-darwin-x64@1.0.0-rc.15': optional: true - '@takumi-rs/core-linux-arm64-gnu@1.0.0-rc.14': + '@takumi-rs/core-linux-arm64-gnu@1.0.0-rc.15': optional: true - '@takumi-rs/core-linux-arm64-musl@1.0.0-rc.14': + '@takumi-rs/core-linux-arm64-musl@1.0.0-rc.15': optional: true - '@takumi-rs/core-linux-x64-gnu@1.0.0-rc.14': + '@takumi-rs/core-linux-x64-gnu@1.0.0-rc.15': optional: true - '@takumi-rs/core-linux-x64-musl@1.0.0-rc.14': + '@takumi-rs/core-linux-x64-musl@1.0.0-rc.15': optional: true - '@takumi-rs/core-win32-arm64-msvc@1.0.0-rc.14': + '@takumi-rs/core-win32-arm64-msvc@1.0.0-rc.15': optional: true - '@takumi-rs/core-win32-x64-msvc@1.0.0-rc.14': + '@takumi-rs/core-win32-x64-msvc@1.0.0-rc.15': optional: true - '@takumi-rs/core@1.0.0-rc.14(react@19.2.4)': + '@takumi-rs/core@1.0.0-rc.15(react@19.2.4)': dependencies: - '@takumi-rs/helpers': 1.0.0-rc.14(react@19.2.4) + '@takumi-rs/helpers': 1.0.0-rc.15(react@19.2.4) optionalDependencies: - '@takumi-rs/core-darwin-arm64': 1.0.0-rc.14 - '@takumi-rs/core-darwin-x64': 1.0.0-rc.14 - '@takumi-rs/core-linux-arm64-gnu': 1.0.0-rc.14 - '@takumi-rs/core-linux-arm64-musl': 1.0.0-rc.14 - '@takumi-rs/core-linux-x64-gnu': 1.0.0-rc.14 - '@takumi-rs/core-linux-x64-musl': 1.0.0-rc.14 - '@takumi-rs/core-win32-arm64-msvc': 1.0.0-rc.14 - '@takumi-rs/core-win32-x64-msvc': 1.0.0-rc.14 + '@takumi-rs/core-darwin-arm64': 1.0.0-rc.15 + '@takumi-rs/core-darwin-x64': 1.0.0-rc.15 + '@takumi-rs/core-linux-arm64-gnu': 1.0.0-rc.15 + '@takumi-rs/core-linux-arm64-musl': 1.0.0-rc.15 + '@takumi-rs/core-linux-x64-gnu': 1.0.0-rc.15 + '@takumi-rs/core-linux-x64-musl': 1.0.0-rc.15 + '@takumi-rs/core-win32-arm64-msvc': 1.0.0-rc.15 + '@takumi-rs/core-win32-x64-msvc': 1.0.0-rc.15 transitivePeerDependencies: - react - react-dom - '@takumi-rs/helpers@1.0.0-rc.14(react@19.2.4)': + '@takumi-rs/helpers@1.0.0-rc.15(react@19.2.4)': dependencies: react: 19.2.4 - '@takumi-rs/wasm@1.0.0-rc.14(react@19.2.4)': + '@takumi-rs/wasm@1.0.0-rc.15(react@19.2.4)': dependencies: - '@takumi-rs/helpers': 1.0.0-rc.14(react@19.2.4) + '@takumi-rs/helpers': 1.0.0-rc.15(react@19.2.4) transitivePeerDependencies: - react - react-dom @@ -7814,11 +7814,11 @@ snapshots: tailwindcss@4.2.2: {} - takumi-js@1.0.0-rc.14(react@19.2.4): + takumi-js@1.0.0-rc.15(react@19.2.4): dependencies: - '@takumi-rs/core': 1.0.0-rc.14(react@19.2.4) - '@takumi-rs/helpers': 1.0.0-rc.14(react@19.2.4) - '@takumi-rs/wasm': 1.0.0-rc.14(react@19.2.4) + '@takumi-rs/core': 1.0.0-rc.15(react@19.2.4) + '@takumi-rs/helpers': 1.0.0-rc.15(react@19.2.4) + '@takumi-rs/wasm': 1.0.0-rc.15(react@19.2.4) transitivePeerDependencies: - react - react-dom