From 88957abb159eb843761c3dd1a0a01aea2215771d Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 20:40:14 +0100 Subject: [PATCH 01/52] Initial look at using ts-to-zod --- generated/classic-wow/auction-house.ts | 32 ++ .../classic-wow/character-achievements.ts | 8 + generated/classic-wow/character-equipment.ts | 2 + .../classic-wow/character-hunter-pets.ts | 2 + generated/classic-wow/character-media.ts | 2 + generated/classic-wow/character-profile.ts | 54 ++ .../classic-wow/character-specialization.ts | 42 ++ generated/classic-wow/character-statistics.ts | 60 +++ generated/classic-wow/connected-realm.ts | 2 + generated/classic-wow/creature.ts | 2 + generated/classic-wow/guild-crest.ts | 2 + generated/classic-wow/guild.ts | 69 +++ generated/classic-wow/item.ts | 2 + generated/classic-wow/media-search.ts | 2 + generated/classic-wow/playable-class.ts | 30 ++ generated/classic-wow/playable-race.ts | 2 + generated/classic-wow/power-type.ts | 2 + generated/classic-wow/pvp-season.ts | 2 + generated/classic-wow/realm.ts | 2 + generated/classic-wow/region.ts | 2 + generated/core/namespace.ts | 18 + generated/d3/act.ts | 26 + generated/d3/artisan-and-recipe.ts | 50 ++ generated/d3/character-class-and-skill.ts | 42 ++ generated/d3/follower.ts | 20 + generated/d3/game-data.ts | 132 +++++ generated/d3/item-type.ts | 16 + generated/d3/item.ts | 47 ++ generated/d3/profile.ts | 358 +++++++++++++ generated/hs/card-backs.ts | 47 ++ generated/hs/cards.ts | 118 +++++ generated/hs/decks.ts | 81 +++ generated/hs/metadata.ts | 85 +++ generated/sc2/ladder.ts | 33 ++ generated/sc2/league.ts | 55 ++ generated/sc2/legacy.ts | 153 ++++++ generated/sc2/profile.ts | 84 +++ generated/wow/account-profile.ts | 168 ++++++ generated/wow/achievements.ts | 82 +++ generated/wow/auction-house.ts | 62 +++ generated/wow/azerite-essence.ts | 75 +++ generated/wow/character-achievements.ts | 91 ++++ generated/wow/character-appearance.ts | 76 +++ generated/wow/character-collections.ts | 98 ++++ generated/wow/character-encounters.ts | 102 ++++ generated/wow/character-equipment.ts | 180 +++++++ generated/wow/character-hunter-pets.ts | 29 + generated/wow/character-media.ts | 16 + .../wow/character-mythic-keystone-profile.ts | 74 +++ generated/wow/character-professions.ts | 35 ++ generated/wow/character-profile.ts | 71 +++ generated/wow/character-pvp.ts | 54 ++ generated/wow/character-quests.ts | 21 + generated/wow/character-reputations.ts | 33 ++ generated/wow/character-soulbinds.ts | 47 ++ generated/wow/character-specializations.ts | 75 +++ generated/wow/character-statistics.ts | 65 +++ generated/wow/character-titles.ts | 18 + generated/wow/connected-realm.ts | 98 ++++ generated/wow/covenant.ts | 140 +++++ generated/wow/creature.ts | 132 +++++ generated/wow/guild-crest.ts | 57 ++ generated/wow/guild.ts | 139 +++++ generated/wow/heirloom.ts | 107 ++++ generated/wow/item.ts | 335 ++++++++++++ generated/wow/journal.ts | 254 +++++++++ generated/wow/media-search.ts | 33 ++ generated/wow/modified-crafting.ts | 60 +++ generated/wow/mount.ts | 81 +++ generated/wow/mythic-keystone-affix.ts | 42 ++ generated/wow/mythic-keystone-dungeon.ts | 96 ++++ generated/wow/mythic-keystone-leaderboard.ts | 80 +++ generated/wow/mythic-raid-leaderboard.ts | 48 ++ generated/wow/pet.ts | 96 ++++ generated/wow/playable-class.ts | 63 +++ generated/wow/playable-race.ts | 32 ++ generated/wow/playable-specialization.ts | 73 +++ generated/wow/power-type.ts | 22 + generated/wow/profession.ts | 93 ++++ generated/wow/pvp-season.ts | 111 ++++ generated/wow/pvp-tier.ts | 50 ++ generated/wow/quest.ts | 119 +++++ generated/wow/realm.ts | 137 +++++ generated/wow/region.ts | 27 + generated/wow/reputations.ts | 62 +++ generated/wow/spell.ts | 61 +++ generated/wow/talent.ts | 190 +++++++ generated/wow/tech-talent.ts | 67 +++ generated/wow/title.ts | 26 + generated/wow/toy.ts | 37 ++ generated/wow/wow-token.ts | 13 + package.json | 5 +- packages/d3/src/profile/profile.ts | 8 +- packages/d3/src/profile/types.ts | 2 +- packages/sc2/src/legacy/types.ts | 8 +- packages/wow/src/base.ts | 31 +- .../wow/src/character-achievements/types.ts | 22 +- .../wow/src/character-encounters/types.ts | 24 +- packages/wow/src/connected-realm/types.ts | 6 +- packages/wow/src/guild/types.ts | 8 +- packages/wow/src/journal/types.ts | 37 +- packages/wow/src/mount/types.ts | 2 +- .../src/mythic-keystone-leaderboard/types.ts | 2 +- .../mythic-raid-leaderboard.ts | 2 +- .../wow/src/mythic-raid-leaderboard/types.ts | 2 +- packages/wow/src/pvp-season/types.ts | 2 +- packages/wow/src/realm/types.ts | 24 +- pnpm-lock.yaml | 496 +++++++++++++++++- scripts/generate-zod.ts | 96 ++++ tsconfig.json | 2 +- 110 files changed, 6845 insertions(+), 73 deletions(-) create mode 100644 generated/classic-wow/auction-house.ts create mode 100644 generated/classic-wow/character-achievements.ts create mode 100644 generated/classic-wow/character-equipment.ts create mode 100644 generated/classic-wow/character-hunter-pets.ts create mode 100644 generated/classic-wow/character-media.ts create mode 100644 generated/classic-wow/character-profile.ts create mode 100644 generated/classic-wow/character-specialization.ts create mode 100644 generated/classic-wow/character-statistics.ts create mode 100644 generated/classic-wow/connected-realm.ts create mode 100644 generated/classic-wow/creature.ts create mode 100644 generated/classic-wow/guild-crest.ts create mode 100644 generated/classic-wow/guild.ts create mode 100644 generated/classic-wow/item.ts create mode 100644 generated/classic-wow/media-search.ts create mode 100644 generated/classic-wow/playable-class.ts create mode 100644 generated/classic-wow/playable-race.ts create mode 100644 generated/classic-wow/power-type.ts create mode 100644 generated/classic-wow/pvp-season.ts create mode 100644 generated/classic-wow/realm.ts create mode 100644 generated/classic-wow/region.ts create mode 100644 generated/core/namespace.ts create mode 100644 generated/d3/act.ts create mode 100644 generated/d3/artisan-and-recipe.ts create mode 100644 generated/d3/character-class-and-skill.ts create mode 100644 generated/d3/follower.ts create mode 100644 generated/d3/game-data.ts create mode 100644 generated/d3/item-type.ts create mode 100644 generated/d3/item.ts create mode 100644 generated/d3/profile.ts create mode 100644 generated/hs/card-backs.ts create mode 100644 generated/hs/cards.ts create mode 100644 generated/hs/decks.ts create mode 100644 generated/hs/metadata.ts create mode 100644 generated/sc2/ladder.ts create mode 100644 generated/sc2/league.ts create mode 100644 generated/sc2/legacy.ts create mode 100644 generated/sc2/profile.ts create mode 100644 generated/wow/account-profile.ts create mode 100644 generated/wow/achievements.ts create mode 100644 generated/wow/auction-house.ts create mode 100644 generated/wow/azerite-essence.ts create mode 100644 generated/wow/character-achievements.ts create mode 100644 generated/wow/character-appearance.ts create mode 100644 generated/wow/character-collections.ts create mode 100644 generated/wow/character-encounters.ts create mode 100644 generated/wow/character-equipment.ts create mode 100644 generated/wow/character-hunter-pets.ts create mode 100644 generated/wow/character-media.ts create mode 100644 generated/wow/character-mythic-keystone-profile.ts create mode 100644 generated/wow/character-professions.ts create mode 100644 generated/wow/character-profile.ts create mode 100644 generated/wow/character-pvp.ts create mode 100644 generated/wow/character-quests.ts create mode 100644 generated/wow/character-reputations.ts create mode 100644 generated/wow/character-soulbinds.ts create mode 100644 generated/wow/character-specializations.ts create mode 100644 generated/wow/character-statistics.ts create mode 100644 generated/wow/character-titles.ts create mode 100644 generated/wow/connected-realm.ts create mode 100644 generated/wow/covenant.ts create mode 100644 generated/wow/creature.ts create mode 100644 generated/wow/guild-crest.ts create mode 100644 generated/wow/guild.ts create mode 100644 generated/wow/heirloom.ts create mode 100644 generated/wow/item.ts create mode 100644 generated/wow/journal.ts create mode 100644 generated/wow/media-search.ts create mode 100644 generated/wow/modified-crafting.ts create mode 100644 generated/wow/mount.ts create mode 100644 generated/wow/mythic-keystone-affix.ts create mode 100644 generated/wow/mythic-keystone-dungeon.ts create mode 100644 generated/wow/mythic-keystone-leaderboard.ts create mode 100644 generated/wow/mythic-raid-leaderboard.ts create mode 100644 generated/wow/pet.ts create mode 100644 generated/wow/playable-class.ts create mode 100644 generated/wow/playable-race.ts create mode 100644 generated/wow/playable-specialization.ts create mode 100644 generated/wow/power-type.ts create mode 100644 generated/wow/profession.ts create mode 100644 generated/wow/pvp-season.ts create mode 100644 generated/wow/pvp-tier.ts create mode 100644 generated/wow/quest.ts create mode 100644 generated/wow/realm.ts create mode 100644 generated/wow/region.ts create mode 100644 generated/wow/reputations.ts create mode 100644 generated/wow/spell.ts create mode 100644 generated/wow/talent.ts create mode 100644 generated/wow/tech-talent.ts create mode 100644 generated/wow/title.ts create mode 100644 generated/wow/toy.ts create mode 100644 generated/wow/wow-token.ts create mode 100644 scripts/generate-zod.ts diff --git a/generated/classic-wow/auction-house.ts b/generated/classic-wow/auction-house.ts new file mode 100644 index 00000000..9a55e4c0 --- /dev/null +++ b/generated/classic-wow/auction-house.ts @@ -0,0 +1,32 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const auctionSchema = z.object({ + bid: z.number(), + buyout: z.number(), + id: z.number(), + item: z.object({ + id: z.number(), + rand: z.number().optional(), + seed: z.number().optional(), + }), + quantity: z.number(), + time_left: z.union([z.literal('LONG'), z.literal('MEDIUM'), z.literal('SHORT'), z.literal('VERY_LONG')]), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ + auctions: z.array(nameIdKeySchema), +}); + +export const auctionsResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + auctions: z.array(auctionSchema), + connected_realm: z.object({ + href: z.string(), + }), +}); diff --git a/generated/classic-wow/character-achievements.ts b/generated/classic-wow/character-achievements.ts new file mode 100644 index 00000000..e29ef51d --- /dev/null +++ b/generated/classic-wow/character-achievements.ts @@ -0,0 +1,8 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const characterAchievementsSummaryRetailResponseSchema = z.any(); + +export const characterAchievementsSummaryResponseSchema = characterAchievementsSummaryRetailResponseSchema.omit({ + statistics: true, +}); diff --git a/generated/classic-wow/character-equipment.ts b/generated/classic-wow/character-equipment.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/character-equipment.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/character-hunter-pets.ts b/generated/classic-wow/character-hunter-pets.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/character-hunter-pets.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/character-media.ts b/generated/classic-wow/character-media.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/character-media.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/character-profile.ts b/generated/classic-wow/character-profile.ts new file mode 100644 index 00000000..0c7c6c44 --- /dev/null +++ b/generated/classic-wow/character-profile.ts @@ -0,0 +1,54 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const factionSchema = z.any(); + +const genderSchema = z.any(); + +const realmSchema = z.any(); + +const guildSchema = nameIdKeySchema.extend({ + faction: factionSchema, + realm: realmSchema, +}); + +export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ + achievement_points: z.number().optional(), + achievements: hrefSchema.optional(), + active_spec: nameIdKeySchema, + active_title: z + .object({ + name: z.string(), + }) + .optional(), + appearance: hrefSchema, + average_item_level: z.number(), + character_class: nameIdKeySchema, + equipment: hrefSchema, + equipped_item_level: z.number(), + experience: z.number(), + faction: factionSchema, + gender: genderSchema, + guild: guildSchema, + id: z.number(), + //Hardcore only + is_ghost: z.boolean().optional(), + //Hardcore only + is_self_found: z.boolean().optional(), + last_login_timestamp: z.number(), + level: z.number(), + media: hrefSchema, + name: z.string(), + pvp_summary: hrefSchema, + race: nameIdKeySchema, + realm: realmSchema, + specializations: hrefSchema, + statistics: hrefSchema, + titles: hrefSchema, +}); diff --git a/generated/classic-wow/character-specialization.ts b/generated/classic-wow/character-specialization.ts new file mode 100644 index 00000000..1645b167 --- /dev/null +++ b/generated/classic-wow/character-specialization.ts @@ -0,0 +1,42 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdSchema = z.any(); + +const spellTooltipSchema = z.object({ + cast_time: z.union([z.literal('Channeled'), z.literal('Instant'), z.literal('Instant cast'), z.literal('Passive')]), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional().nullable(), + range: z.string().optional(), + spell: nameIdSchema, +}); + +const talentElementSchema = z.object({ + spell_tooltip: spellTooltipSchema, + talent: z.object({ + id: z.number(), + }), + talent_rank: z.number(), +}); + +const specializationSchema = z.object({ + specialization_name: z.string(), + spent_points: z.number(), + talents: z.array(talentElementSchema), +}); + +const specializationGroupSchema = z.object({ + glyphs: z.array(nameIdSchema).optional(), + is_active: z.boolean(), + specializations: z.array(specializationSchema).optional(), +}); + +export const characterSpecializationsSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + specialization_groups: z.array(specializationGroupSchema), +}); diff --git a/generated/classic-wow/character-statistics.ts b/generated/classic-wow/character-statistics.ts new file mode 100644 index 00000000..91b04968 --- /dev/null +++ b/generated/classic-wow/character-statistics.ts @@ -0,0 +1,60 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const baseEffectiveStatSchema = z.object({ + base: z.number(), + effective: z.number(), +}); + +const ratingWithValueSchema = z.object({ + rating: z.number(), + rating_bonus: z.number(), + value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +export const characterStatisticsSummaryResponseSchema = responseBaseSchema.extend({ + agility: baseEffectiveStatSchema, + arcane_resistance: baseEffectiveStatSchema, + armor: baseEffectiveStatSchema, + attack_power: z.number(), + block: ratingWithValueSchema, + bonus_armor: z.number().optional(), + character: characterSchema, + defense: baseEffectiveStatSchema.optional(), + dodge: ratingWithValueSchema, + fire_resistance: baseEffectiveStatSchema, + health: z.number(), + holy_resistance: baseEffectiveStatSchema, + intellect: baseEffectiveStatSchema, + main_hand_damage_max: z.number(), + main_hand_damage_min: z.number(), + main_hand_dps: z.number(), + main_hand_speed: z.number(), + mana_regen: z.number(), + mana_regen_combat: z.number(), + mastery: ratingWithValueSchema.optional(), + melee_crit: ratingWithValueSchema, + melee_haste: ratingWithValueSchema.optional(), + nature_resistance: baseEffectiveStatSchema, + off_hand_damage_max: z.number(), + off_hand_damage_min: z.number(), + off_hand_dps: z.number(), + off_hand_speed: z.number(), + parry: ratingWithValueSchema, + power: z.number(), + power_type: characterSchema, + ranged_crit: ratingWithValueSchema, + ranged_haste: ratingWithValueSchema.optional(), + shadow_resistance: baseEffectiveStatSchema, + spell_crit: ratingWithValueSchema, + spell_haste: ratingWithValueSchema.optional(), + spell_penetration: z.number(), + spell_power: z.number(), + spirit: baseEffectiveStatSchema, + stamina: baseEffectiveStatSchema, + strength: baseEffectiveStatSchema, +}); diff --git a/generated/classic-wow/connected-realm.ts b/generated/classic-wow/connected-realm.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/connected-realm.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/creature.ts b/generated/classic-wow/creature.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/creature.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/guild-crest.ts b/generated/classic-wow/guild-crest.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/guild-crest.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/guild.ts b/generated/classic-wow/guild.ts new file mode 100644 index 00000000..22c7d3f0 --- /dev/null +++ b/generated/classic-wow/guild.ts @@ -0,0 +1,69 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const guildRetailResponseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const characterSchema = z.any(); + +const factionSchema = z.any(); + +const realmSchema = z.any(); + +const keyBaseSchema = z.any(); + +const guildSchema = nameIdKeySchema.extend({ + faction: factionSchema, + realm: realmSchema, +}); + +export const guildResponseSchema = guildRetailResponseSchema.omit({ crest: true }).and( + z.object({ + crest: guildRetailResponseSchema.shape.crest.optional(), + }), +); + +const characterAchievementSchema = z.object({ + achievement: nameIdKeySchema, + character: characterSchema, +}); + +const playableSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const rosterMemberCharacterSchema = characterSchema.extend({ + level: z.number(), + playable_class: playableSchema, + playable_race: playableSchema, +}); + +export const guildAchievementsClassicEraResponseSchema = responseBaseSchema.extend({ + guild: guildSchema, +}); + +const activityElementSchema = z.object({ + activity: z.object({ + type: z.string(), + }), + character_achievement: characterAchievementSchema, + timestamp: z.number(), +}); + +const memberSchema = z.object({ + character: rosterMemberCharacterSchema, + rank: z.number(), +}); + +export const guildActivityResponseSchema = responseBaseSchema.extend({ + activities: z.array(activityElementSchema).optional(), + guild: guildSchema, +}); + +export const guildRosterResponseSchema = responseBaseSchema.extend({ + guild: guildSchema, + members: z.array(memberSchema), +}); diff --git a/generated/classic-wow/item.ts b/generated/classic-wow/item.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/item.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/media-search.ts b/generated/classic-wow/media-search.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/media-search.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/playable-class.ts b/generated/classic-wow/playable-class.ts new file mode 100644 index 00000000..9dbe8e01 --- /dev/null +++ b/generated/classic-wow/playable-class.ts @@ -0,0 +1,30 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const nameIdSchema = z.any(); + +const responseBaseSchema = z.any(); + +const genderNameSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a playable class. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft-classic/game-data-apis} + */ +export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + gender_name: genderNameSchema, + media: mediaSchema, + playable_races: z.array(nameIdKeySchema), + power_type: nameIdKeySchema, + pvp_talent_slots: z.object({ + href: z.string(), + }), +}); diff --git a/generated/classic-wow/playable-race.ts b/generated/classic-wow/playable-race.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/playable-race.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/power-type.ts b/generated/classic-wow/power-type.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/power-type.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/pvp-season.ts b/generated/classic-wow/pvp-season.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/pvp-season.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/realm.ts b/generated/classic-wow/realm.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/realm.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/classic-wow/region.ts b/generated/classic-wow/region.ts new file mode 100644 index 00000000..f5c91046 --- /dev/null +++ b/generated/classic-wow/region.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from 'zod'; diff --git a/generated/core/namespace.ts b/generated/core/namespace.ts new file mode 100644 index 00000000..64436710 --- /dev/null +++ b/generated/core/namespace.ts @@ -0,0 +1,18 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +/** + * Blizzard API namespaces. + * @see https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces + */ +export const blizzardNamespacesSchema = z.union([ + z.literal('dynamic'), + z.literal('dynamic-classic1x'), + z.literal('dynamic-classic'), + z.literal('profile'), + z.literal('profile-classic1x'), + z.literal('profile-classic'), + z.literal('static'), + z.literal('static-classic1x'), + z.literal('static-classic'), +]); diff --git a/generated/d3/act.ts b/generated/d3/act.ts new file mode 100644 index 00000000..2dac17b0 --- /dev/null +++ b/generated/d3/act.ts @@ -0,0 +1,26 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const questSchema = z.object({ + id: z.number(), + name: z.string(), + slug: z.string(), +}); + +const actSchema = z.object({ + name: z.string(), + number: z.number(), + quests: z.array(questSchema), + slug: z.string(), +}); + +export const actIndexResponseSchema = z.object({ + acts: z.array(actSchema), +}); + +export const actResponseSchema = z.object({ + name: z.string(), + number: z.number(), + quests: z.array(questSchema), + slug: z.string(), +}); diff --git a/generated/d3/artisan-and-recipe.ts b/generated/d3/artisan-and-recipe.ts new file mode 100644 index 00000000..4752dfb7 --- /dev/null +++ b/generated/d3/artisan-and-recipe.ts @@ -0,0 +1,50 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const itemSchema = z.object({ + icon: z.string(), + id: z.string(), + name: z.string(), + path: z.string(), + slug: z.string(), +}); + +const reagentSchema = z.object({ + item: itemSchema, + quantity: z.number(), +}); + +const recipeSchema = z.object({ + cost: z.number(), + id: z.string(), + itemProduced: itemSchema, + name: z.string(), + reagents: z.array(reagentSchema), + slug: z.string(), +}); + +const tierSchema = z.object({ + taughtRecipes: z.array(recipeSchema), + tier: z.number(), + trainedRecipes: z.array(recipeSchema), +}); + +const trainingSchema = z.object({ + tiers: z.array(tierSchema), +}); + +export const artisanResponseSchema = z.object({ + name: z.string(), + portrait: z.string(), + slug: z.string(), + training: trainingSchema, +}); + +export const recipeResponseSchema = z.object({ + cost: z.number(), + id: z.string(), + itemProduced: itemSchema, + name: z.string(), + reagents: z.array(reagentSchema), + slug: z.string(), +}); diff --git a/generated/d3/character-class-and-skill.ts b/generated/d3/character-class-and-skill.ts new file mode 100644 index 00000000..cc0f3a11 --- /dev/null +++ b/generated/d3/character-class-and-skill.ts @@ -0,0 +1,42 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const skillCategorySchema = z.object({ + name: z.string(), + slug: z.string(), +}); + +const skillSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + flavorText: z.string().optional(), + icon: z.string(), + level: z.number(), + name: z.string(), + slug: z.string(), + tooltipUrl: z.string(), +}); + +const runeSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + level: z.number(), + name: z.string(), + slug: z.string(), + type: z.string(), +}); + +export const characterClassResponseSchema = z.object({ + femaleName: z.string(), + icon: z.string(), + maleName: z.string(), + name: z.string(), + skillCategories: z.array(skillCategorySchema), + skills: z.record(z.union([z.literal('active'), z.literal('passive')]), z.array(skillSchema)), + slug: z.string(), +}); + +export const skillResponseSchema = z.object({ + runes: z.array(runeSchema), + skill: skillSchema, +}); diff --git a/generated/d3/follower.ts b/generated/d3/follower.ts new file mode 100644 index 00000000..11722d1b --- /dev/null +++ b/generated/d3/follower.ts @@ -0,0 +1,20 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const skillSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + icon: z.string(), + level: z.number(), + name: z.string(), + slug: z.string(), + tooltipUrl: z.string(), +}); + +export const followerResponseSchema = z.object({ + name: z.string(), + portrait: z.string(), + realName: z.string(), + skills: z.array(skillSchema), + slug: z.string(), +}); diff --git a/generated/d3/game-data.ts b/generated/d3/game-data.ts new file mode 100644 index 00000000..138bd06c --- /dev/null +++ b/generated/d3/game-data.ts @@ -0,0 +1,132 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const leaderboardSchema = z.object({ + hardcore: z.boolean().optional(), + hero_class_string: z.string().optional(), + ladder: z.object({ + href: z.string(), + }), + team_size: z.number().optional(), +}); + +const leaderboardIdSchema = z.union([ + z.literal('AchievementPoints'), + z.literal('BattleTag'), + z.literal('ClanName'), + z.literal('CompletedTime'), + z.literal('GameAccount'), + z.literal('HeroBattleTag'), + z.literal('HeroClanTag'), + z.literal('HeroClass'), + z.literal('HeroGender'), + z.literal('HeroId'), + z.literal('HeroLevel'), + z.literal('HeroVisualItems'), + z.literal('ParagonLevel'), + z.literal('Rank'), + z.literal('RiftLevel'), + z.literal('RiftTime'), +]); + +const selfSchema = z.object({ + href: z.string(), +}); + +const rowDataSchema = z.object({ + id: leaderboardIdSchema, + number: z.number().optional(), + string: z.string().optional(), + timestamp: z.number().optional(), +}); + +const playerSchema = z.object({ + accountId: z.number(), + data: z.array(rowDataSchema), + key: z.string(), +}); + +const responseBaseSchema = z.any(); + +export const eraIndexResponseSchema = responseBaseSchema.extend({ + current_era: z.number(), + era: z.array( + z.object({ + href: z.string(), + }), + ), + generated_by: z.string(), + last_update_time: z.string(), +}); + +const columnSchema = z.object({ + hidden: z.boolean(), + id: leaderboardIdSchema, + label: z.string().nullable(), + order: z.number().optional(), + type: z.union([z.literal('DATETIME'), z.literal('NUMBER'), z.literal('STRING')]), +}); + +const rowSchema = z.object({ + data: z.array(rowDataSchema), + order: z.number(), + player: z.array(playerSchema), +}); + +const eraLeaderboardSchema = z.object({ + hardcore: z.boolean().optional(), + hero_class_string: z.string().optional(), + ladder: selfSchema, + team_size: z.number(), +}); + +export const seasonIndexResponseSchema = responseBaseSchema.extend({ + current_season: z.number(), + generated_by: z.string(), + last_update_time: z.string(), + season: z.array( + z.object({ + href: z.string(), + }), + ), + service_current_season: z.number(), + service_season_state: z.string(), +}); + +export const seasonLeaderboardResponseSchema = responseBaseSchema.extend({ + achievement_points: z.boolean(), + column: z.array(columnSchema), + generated_by: z.string(), + key: z.string(), + last_update_time: z.string(), + row: z.array(rowSchema), + season: z.number(), + title: z.string(), +}); + +export const seasonResponseSchema = responseBaseSchema.extend({ + generated_by: z.string(), + last_update_time: z.string(), + leaderboard: z.array(leaderboardSchema), + season_id: z.number(), +}); + +export const eraLeaderboardResponseSchema = responseBaseSchema.extend({ + column: z.array(columnSchema), + era: z.number(), + generated_by: z.string(), + greater_rift: z.boolean(), + greater_rift_solo_class: z.string(), + key: z.string(), + last_update_time: z.string(), + row: z.array(rowSchema), + title: z.string(), +}); + +export const eraResponseSchema = responseBaseSchema.extend({ + era_id: z.number(), + era_start_date: z.number(), + generated_by: z.string(), + last_update_time: z.string(), + leaderboard: z.array(eraLeaderboardSchema), +}); diff --git a/generated/d3/item-type.ts b/generated/d3/item-type.ts new file mode 100644 index 00000000..92c1e5b1 --- /dev/null +++ b/generated/d3/item-type.ts @@ -0,0 +1,16 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const itemTypeIndexResponseSchema = z.object({ + id: z.string(), + name: z.string(), + path: z.string(), +}); + +export const itemTypeResponseSchema = z.object({ + icon: z.string(), + id: z.string(), + name: z.string(), + path: z.string(), + slug: z.string(), +}); diff --git a/generated/d3/item.ts b/generated/d3/item.ts new file mode 100644 index 00000000..bc1d8dca --- /dev/null +++ b/generated/d3/item.ts @@ -0,0 +1,47 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const primarySchema = z.object({ + text: z.string(), + textHtml: z.string(), +}); + +export const attributesSchema = z.object({ + other: z.array(z.unknown()), + primary: z.array(primarySchema), + secondary: z.array(primarySchema), +}); + +export const randomAffixSchema = z.object({ + oneOf: z.array(primarySchema), +}); + +export const typeSchema = z.object({ + id: z.string(), + twoHanded: z.boolean(), +}); + +export const itemResponseSchema = z.object({ + accountBound: z.boolean(), + attributes: attributesSchema, + color: z.string(), + damage: z.string(), + damageHtml: z.string(), + dps: z.string(), + flavorText: z.string(), + flavorTextHtml: z.string(), + icon: z.string(), + id: z.string(), + isSeasonRequiredToDrop: z.boolean(), + name: z.string(), + randomAffixes: z.array(randomAffixSchema), + requiredLevel: z.number(), + seasonRequiredToDrop: z.number(), + setItems: z.array(z.unknown()), + slots: z.array(z.string()), + slug: z.string(), + stackSizeMax: z.number(), + tooltipParams: z.string(), + type: typeSchema, + typeName: z.string(), +}); diff --git a/generated/d3/profile.ts b/generated/d3/profile.ts new file mode 100644 index 00000000..9d3fa64f --- /dev/null +++ b/generated/d3/profile.ts @@ -0,0 +1,358 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const attributesSchema = z.object({ + primary: z.array(z.string()), + secondary: z.array(z.string()).optional(), +}); + +const displayColorSchema = z.union([ + z.literal('blue'), + z.literal('green'), + z.literal('orange'), + z.literal('white'), + z.literal('yellow'), +]); + +const setSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + name: z.string(), + slug: z.string(), +}); + +const killsSchema = z.object({ + elites: z.number(), +}); + +const artisanSchema = z.object({ + level: z.number(), + slug: z.union([z.literal('blacksmith'), z.literal('jeweler'), z.literal('mystic')]), +}); + +const accountResponseKillsSchema = z.object({ + elites: z.number(), + hardcoreMonsters: z.number(), + monsters: z.number(), +}); + +const progressionSchema = z.object({ + act1: z.boolean(), + act2: z.boolean(), + act3: z.boolean(), + act4: z.boolean(), + act5: z.boolean(), +}); + +const timePlayedSchema = z.object({ + barbarian: z.number(), + crusader: z.number(), + 'demon-hunter': z.number(), + monk: z.number(), + necromancer: z.number(), + 'witch-doctor': z.number(), + wizard: z.number(), +}); + +const accountHeroItemSchema = z.object({ + icon: z.string(), + id: z.string(), + name: z.string(), + path: z.string(), + slug: z.string(), +}); + +const completedQuestSchema = z.object({ + name: z.string(), + slug: z.string(), +}); + +const runeSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + level: z.number(), + name: z.string(), + slug: z.string(), + type: z.string(), +}); + +const skillSchema = z.object({ + description: z.string(), + descriptionHtml: z.string(), + flavorText: z.string().optional(), + icon: z.string(), + level: z.number(), + name: z.string(), + slug: z.string(), + tooltipUrl: z.string(), +}); + +const itemProducedSchema = z.object({ + id: z.string(), + path: z.string(), +}); + +const reagentSchema = z.object({ + item: accountHeroItemSchema, + quantity: z.number(), +}); + +const dyeSchema = z.object({ + icon: z.string(), + id: z.string(), + name: z.string(), + tooltipParams: z.string(), +}); + +const statsSchema = z.object({ + experienceBonus: z.number(), + goldFind: z.number(), + magicFind: z.number(), +}); + +const itemSchema = z.object({ + displayColor: displayColorSchema.optional(), + dyeColor: dyeSchema.optional(), + icon: z.string(), + id: z.string(), + name: z.string(), + tooltipParams: z.string(), +}); + +const craftedBySchema = z.object({ + cost: z.number(), + id: z.string(), + itemProduced: itemProducedSchema, + name: z.string(), + reagents: z.array(reagentSchema), + slug: z.string(), +}); + +const scoundrelSchema = z.object({ + items: z.record(z.string(), itemSchema), + level: z.number(), + skills: z.array(skillSchema), + slug: z.string(), + stats: statsSchema, +}); + +const gemSchema = z.object({ + attributes: z.array(z.string()), + isGem: z.boolean(), + isJewel: z.boolean(), + item: accountHeroItemSchema, + jewelRank: z.number().optional(), + jewelSecondaryUnlockRank: z.number().optional(), +}); + +const heroKillsSchema = z.object({ + elites: z.number(), +}); + +const actSchema = z.object({ + completed: z.boolean(), + completedQuests: z.array(completedQuestSchema), +}); + +const passiveSchema = z.object({ + skill: skillSchema, +}); + +const seasonSchema = z.object({ + highestHardcoreLevel: z.number(), + kills: accountResponseKillsSchema, + paragonLevel: z.number(), + paragonLevelHardcore: z.number(), + seasonId: z.number(), + timePlayed: timePlayedSchema, +}); + +const activeSchema = z.object({ + rune: runeSchema, + skill: skillSchema, +}); + +const templarItemsSchema = z.object({ + bracers: itemSchema, + feet: itemSchema, + hands: itemSchema, + head: itemSchema, + mainHand: itemSchema, + offHand: itemSchema, + shoulders: itemSchema, + torso: itemSchema, + waist: itemSchema, +}); + +const followerItemSchema = z.object({ + accountBound: z.boolean(), + armor: z.number(), + attacksPerSecond: z.number(), + attributes: attributesSchema.optional(), + attributesHtml: attributesSchema.optional(), + blockChance: z.string().optional(), + craftedBy: craftedBySchema.optional(), + damage: z.string().optional(), + displayColor: z.string(), + dps: z.string().optional(), + dye: dyeSchema.optional(), + flavorText: z.string().optional(), + icon: z.string(), + id: z.string(), + isSeasonRequiredToDrop: z.boolean(), + itemLevel: z.number(), + maxDamage: z.number(), + minDamage: z.number(), + name: z.string(), + openSockets: z.number(), + requiredLevel: z.number(), + seasonRequiredToDrop: z.number(), + set: setSchema.optional(), + slots: z.string(), + stackSizeMax: z.number(), + tooltipParams: z.string(), + type: z.record(z.string(), z.union([z.boolean(), z.string()])), + typeName: z.string(), +}); + +export const accountHeroItemsResponseSchema = z.object({ + accountBound: z.boolean(), + armor: z.number(), + attacksPerSecond: z.number(), + attributes: attributesSchema, + attributesHtml: attributesSchema, + craftedBy: craftedBySchema.optional(), + damage: z.string().optional(), + displayColor: displayColorSchema, + dps: z.string().optional(), + elementalType: z.string().optional(), + flavorText: z.string(), + gems: z.array(gemSchema).optional(), + icon: z.string(), + id: z.string(), + isSeasonRequiredToDrop: z.boolean(), + itemLevel: z.number(), + maxDamage: z.number(), + minDamage: z.number(), + name: z.string(), + openSockets: z.number(), + requiredLevel: z.number(), + seasonRequiredToDrop: z.number(), + set: setSchema.optional(), + slots: z.string(), + stackSizeMax: z.number(), + tooltipParams: z.string(), + type: z.record(z.string(), z.union([z.boolean(), z.string()])), + typeName: z.string(), +}); + +const heroProgressionSchema = z.object({ + act1: actSchema, + act2: actSchema, + act3: actSchema, + act4: actSchema, + act5: actSchema, +}); + +const skillsSchema = z.object({ + active: z.array(activeSchema), + passive: z.array(passiveSchema), +}); + +const heroSchema = z.object({ + class: z.string(), + classSlug: z.string(), + dead: z.boolean(), + gender: z.number(), + hardcore: z.boolean(), + id: z.number(), + kills: heroKillsSchema, + 'last-updated': z.number(), + level: z.number(), + name: z.string(), + paragonLevel: z.number(), + seasonal: z.boolean(), +}); + +const enchantressItemsSchema = z.object({ + mainHand: itemSchema, +}); + +const enchantressSchema = z.object({ + items: enchantressItemsSchema, + level: z.number(), + skills: z.array(z.unknown()), + slug: z.string(), + stats: statsSchema, +}); + +const templarSchema = z.object({ + items: templarItemsSchema, + level: z.number(), + skills: z.array(skillSchema), + slug: z.string(), + stats: statsSchema, +}); + +export const accountHeroFollowerItemsResponseSchema = z.object({ + enchantress: z.record(z.string(), followerItemSchema), + scoundrel: z.record(z.string(), followerItemSchema), + templar: z.record(z.string(), followerItemSchema), +}); + +const followersSchema = z.object({ + enchantress: enchantressSchema, + scoundrel: scoundrelSchema, + templar: templarSchema, +}); + +export const accountResponseSchema = z.object({ + battleTag: z.string(), + blacksmith: artisanSchema, + blacksmithHardcore: artisanSchema, + blacksmithSeason: artisanSchema, + blacksmithSeasonHardcore: artisanSchema, + guildName: z.string(), + heroes: z.array(heroSchema), + highestHardcoreLevel: z.number(), + jeweler: artisanSchema, + jewelerHardcore: artisanSchema, + jewelerSeason: artisanSchema, + jewelerSeasonHardcore: artisanSchema, + kills: accountResponseKillsSchema, + lastHeroPlayed: z.number(), + lastUpdated: z.number(), + mystic: artisanSchema, + mysticHardcore: artisanSchema, + mysticSeason: artisanSchema, + mysticSeasonHardcore: artisanSchema, + paragonLevel: z.number(), + paragonLevelHardcore: z.number(), + paragonLevelSeason: z.number(), + paragonLevelSeasonHardcore: z.number(), + progression: progressionSchema, + seasonalProfiles: z.record(z.string(), seasonSchema), + timePlayed: timePlayedSchema, +}); + +export const accountHeroResponseSchema = z.object({ + alive: z.boolean(), + class: z.string(), + followers: followersSchema, + gender: z.number(), + hardcore: z.boolean(), + highestSoloRiftCompleted: z.number(), + id: z.number(), + items: z.record(z.string(), itemSchema), + kills: killsSchema, + lastUpdated: z.number(), + legendaryPowers: z.array(itemSchema), + level: z.number(), + name: z.string(), + paragonLevel: z.number(), + progression: heroProgressionSchema, + seasonal: z.boolean(), + seasonCreated: z.number(), + skills: skillsSchema, + stats: z.record(z.string(), z.number()), +}); diff --git a/generated/hs/card-backs.ts b/generated/hs/card-backs.ts new file mode 100644 index 00000000..cabccd42 --- /dev/null +++ b/generated/hs/card-backs.ts @@ -0,0 +1,47 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const localesSchema = z.any(); + +const searchSortOptionSchema = z.any(); + +export const cardBackSearchParametersSchema = z.object({ + cardBackCategory: z + .union([ + z.literal('achieve'), + z.literal('base'), + z.literal('blizzard'), + z.literal('esports'), + z.literal('events'), + z.literal('fireside'), + z.literal('game_license'), + z.literal('golden'), + z.literal('heroes'), + z.literal('legend'), + z.literal('pre_purchase'), + z.literal('promotion'), + z.literal('season'), + ]) + .optional(), + locale: localesSchema.optional(), + page: z.number().optional(), + pageSize: z.number().optional(), + sort: searchSortOptionSchema.optional(), + textFilter: z.string().optional(), +}); + +export const singleCardBackSearchResponseSchema = z.object({ + id: z.number(), + image: z.string(), + name: z.union([z.record(localesSchema, z.string()), z.string()]), + slug: z.string(), + sortCategory: z.number(), + text: z.union([z.record(localesSchema, z.string()), z.string()]), +}); + +export const cardBackSearchResponseSchema = z.object({ + cardBacks: z.array(singleCardBackSearchResponseSchema), + cardCount: z.number(), + page: z.number(), + pageCount: z.number(), +}); diff --git a/generated/hs/cards.ts b/generated/hs/cards.ts new file mode 100644 index 00000000..cc0191df --- /dev/null +++ b/generated/hs/cards.ts @@ -0,0 +1,118 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const statsByLevelSchema = z.object({ + attack: z.number(), + health: z.number(), +}); + +const localesSchema = z.any(); + +const gameModeSchema = z.any(); + +const baseSearchParametersSchema = z.object({ + gameMode: gameModeSchema.optional(), + locale: localesSchema.optional(), + mercenaryRole: z.string().optional(), + minionType: z.string().optional(), + page: z.number().optional(), + pageSize: z.number().optional(), + sort: z + .union([ + z.literal('attack:asc'), + z.literal('attack:desc'), + z.literal('health:asc'), + z.literal('health:desc'), + z.literal('name:asc'), + z.literal('name:desc'), + z.literal('tier:asc'), + z.literal('tier:desc'), + ]) + .optional(), + textFilter: z.string().optional(), + tier: z + .union([z.literal(1), z.literal(2), z.literal(3), z.literal(4), z.literal(5), z.literal(6), z.literal('hero')]) + .optional(), +}); + +export const cardSearchParametersSchema = baseSearchParametersSchema.extend({ + attack: z.union([z.array(z.number()), z.number()]).optional(), + defaultMercenary: z.union([z.array(z.number()), z.number()]).optional(), + health: z.union([z.array(z.number()), z.number()]).optional(), + mercenaryId: z.union([z.array(z.number()), z.number()]).optional(), +}); + +export const fetchOneCardResponseSchema = z.object({ + artistName: z.string(), + attack: z.number(), + cardSetId: z.number(), + cardTypeId: z.number(), + classId: z.number(), + collectible: z.number(), + cropImage: z.string(), + flavorText: z.union([z.record(localesSchema, z.string()), z.string()]), + health: z.number(), + id: z.number(), + image: z.union([z.record(localesSchema, z.string()), z.string()]), + imageGold: z.union([z.record(localesSchema, z.string()), z.string()]), + isZilliaxCosmeticModule: z.boolean(), + isZilliaxFunctionalModule: z.boolean(), + keywordIds: z.array(z.number()), + manaCost: z.number(), + multiClassIds: z.array(z.number()), + name: z.union([z.record(localesSchema, z.string()), z.string()]), + rarityId: z.number(), + slug: z.string(), + text: z.union([z.record(localesSchema, z.string()), z.string()]), +}); + +const mercenaryHeroSchema = z.object({ + collectible: z.number(), + craftingCost: z.number(), + default: z.number(), + faction: z.number().nullable(), + mercId: z.number(), + rarity: z.number(), + roleId: z.number(), + statsByLevel: z.record(z.string(), statsByLevelSchema), +}); + +export const blizzardCardSearchParametersSchema = baseSearchParametersSchema.extend({ + attack: z.string().optional(), + defaultMercenary: z.string().optional(), + health: z.string().optional(), + mercenaryId: z.string().optional(), +}); + +const cardSchema = z.object({ + artistName: z.string().nullable(), + attack: z.number(), + cardSetId: z.number(), + cardTypeId: z.number(), + classId: z.number().nullable(), + collectible: z.number(), + cropImage: z.string().nullable(), + flavorText: z.string(), + health: z.number(), + id: z.number(), + image: z.string(), + imageGold: z.string(), + isZilliaxCosmeticModule: z.boolean(), + isZilliaxFunctionalModule: z.boolean(), + manaCost: z.number(), + mercenaryHero: mercenaryHeroSchema, + minionTypeId: z.number(), + multiClassIds: z.array(z.number()), + multiTypeIds: z.array(z.number()).optional(), + name: z.string(), + rarityId: z.number(), + slug: z.string(), + text: z.string(), +}); + +export const cardSearchResponseSchema = z.object({ + cardCount: z.number(), + cards: z.array(cardSchema), + page: z.number(), + pageCount: z.number(), +}); diff --git a/generated/hs/decks.ts b/generated/hs/decks.ts new file mode 100644 index 00000000..8d80f32f --- /dev/null +++ b/generated/hs/decks.ts @@ -0,0 +1,81 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const cardSchema = z.object({ + armor: z.number().optional(), + artistName: z.string(), + attack: z.number().optional(), + bannedFromSideboard: z.number().optional(), + cardSetId: z.number(), + cardTypeId: z.number(), + childIds: z.array(z.number()).optional(), + classId: z.number(), + collectible: z.number(), + cropImage: z.string(), + flavorText: z.string(), + health: z.number().optional(), + id: z.number(), + image: z.string(), + imageGold: z.string(), + isZilliaxCosmeticModule: z.boolean(), + isZilliaxFunctionalModule: z.boolean(), + keywordIds: z.array(z.number()).optional(), + manaCost: z.number(), + minionTypeId: z.number().optional(), + multiClassIds: z.array(z.number()), + name: z.string(), + rarityId: z.number(), + slug: z.string(), + spellSchoolId: z.number().optional(), + text: z.string(), +}); + +const classSchema = z.object({ + id: z.number(), + name: z.string(), + slug: z.string(), +}); + +const heroSchema = z.object({ + artistName: z.string().nullable(), + cardSetId: z.number(), + cardTypeId: z.number(), + classId: z.number(), + collectible: z.number(), + cropImage: z.null(), + flavorText: z.string(), + health: z.number().optional(), + id: z.number(), + image: z.string(), + imageGold: z.string(), + isZilliaxCosmeticModule: z.boolean(), + isZilliaxFunctionalModule: z.boolean(), + manaCost: z.number(), + multiClassIds: z.array(z.number()), + name: z.string(), + parentId: z.number(), + rarityId: z.number().nullable(), + slug: z.string(), + text: z.string(), +}); + +export const deckSearchParametersSchema = z.union([ + z.object({ + code: z.string(), + }), + z.object({ + hero: z.string().optional(), + ids: z.string(), + }), +]); + +export const deckResponseSchema = z.object({ + cardCount: z.number(), + cards: z.array(cardSchema), + class: classSchema, + deckCode: z.string(), + format: z.string(), + hero: heroSchema, + heroPower: heroSchema, + version: z.number(), +}); diff --git a/generated/hs/metadata.ts b/generated/hs/metadata.ts new file mode 100644 index 00000000..bb074b16 --- /dev/null +++ b/generated/hs/metadata.ts @@ -0,0 +1,85 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const classSchema = z.object({ + alternateHeroCardIds: z.array(z.number()).optional(), + cardId: z.number().optional(), + heroPowerCardId: z.number().optional(), + id: z.number(), + name: z.string(), + slug: z.string(), +}); + +const setGroupSchema = z.object({ + cardSets: z.array(z.string()), + icon: z.string().optional(), + name: z.string(), + slug: z.string(), + standard: z.boolean().optional(), + svg: z.string().optional().nullable(), + year: z.number().optional(), + yearRange: z.string().optional(), +}); + +const setTypeSchema = z.union([z.literal(''), z.literal('adventure'), z.literal('base'), z.literal('expansion')]); + +const nameIdSchema = z.any(); + +const gameModeSchema = nameIdSchema.extend({ + gameModes: z.array(z.number()).optional(), + slug: z.string(), +}); + +const keywordSchema = nameIdSchema.extend({ + gameModes: z.array(z.number()), + refText: z.string(), + slug: z.string(), + text: z.string(), +}); + +const raritySchema = nameIdSchema.extend({ + craftingCost: z.array(z.number().nullable()), + dustValue: z.array(z.number().nullable()), + slug: z.string(), +}); + +const setSchema = nameIdSchema.extend({ + aliasSetIds: z.array(z.number()).optional(), + collectibleCount: z.number(), + collectibleRevealedCount: z.number(), + hyped: z.boolean(), + nonCollectibleCount: z.number(), + nonCollectibleRevealedCount: z.number(), + slug: z.string(), + type: setTypeSchema, +}); + +export const specificMetadataResponseSchema = nameIdSchema.extend({ + aliasSetIds: z.array(z.number()).optional(), + collectibleCount: z.number(), + collectibleRevealedCount: z.number(), + hyped: z.boolean(), + nonCollectibleCount: z.number(), + nonCollectibleRevealedCount: z.number(), + slug: z.string(), + type: setTypeSchema, +}); + +export const allMetadataResponseSchema = z.object({ + arenaIds: z.array(z.number()), + bgGameModes: z.array(gameModeSchema), + cardBackCategories: z.array(gameModeSchema), + classes: z.array(classSchema), + filterableFields: z.array(z.string()), + gameModes: z.array(gameModeSchema), + keywords: z.array(keywordSchema), + mercenaryFactions: z.array(gameModeSchema), + mercenaryRoles: z.array(gameModeSchema), + minionTypes: z.array(gameModeSchema), + numericFields: z.array(z.string()), + rarities: z.array(raritySchema), + setGroups: z.array(setGroupSchema), + sets: z.array(setSchema), + spellSchools: z.array(gameModeSchema), + types: z.array(gameModeSchema), +}); diff --git a/generated/sc2/ladder.ts b/generated/sc2/ladder.ts new file mode 100644 index 00000000..2da44fae --- /dev/null +++ b/generated/sc2/ladder.ts @@ -0,0 +1,33 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const seasonResponseSchema = z.object({ + endDate: z.string(), + number: z.number(), + seasonId: z.number(), + startDate: z.string(), + year: z.number(), +}); + +const teamMemberSchema = z.object({ + clanTag: z.string().optional(), + displayName: z.string(), + favoriteRace: z.union([z.literal('protoss'), z.literal('random'), z.literal('terran'), z.literal('zerg')]), + id: z.string(), + realm: z.number(), + region: z.number(), +}); + +const ladderTeamSchema = z.object({ + joinTimestamp: z.number(), + losses: z.number(), + mmr: z.number(), + points: z.number(), + previousRank: z.number(), + teamMembers: z.array(teamMemberSchema), + wins: z.number(), +}); + +export const grandmasterLeaderboardResponseSchema = z.object({ + ladderTeams: z.array(ladderTeamSchema), +}); diff --git a/generated/sc2/league.ts b/generated/sc2/league.ts new file mode 100644 index 00000000..b456e4b6 --- /dev/null +++ b/generated/sc2/league.ts @@ -0,0 +1,55 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const keySchema = z.object({ + league_id: z.number(), + queue_id: z.number(), + season_id: z.number(), + team_type: z.number(), +}); + +export const starcraftLeagueIdSchema = z.union([ + z.literal('bronze'), + z.literal('diamond'), + z.literal('gold'), + z.literal('grandmaster'), + z.literal('master'), + z.literal('platinum'), + z.literal('silver'), +]); + +export const starcraftLeagueQueueSchema = z.union([ + z.literal('hots-1v1'), + z.literal('hots-2v2'), + z.literal('hots-3v3'), + z.literal('hots-4v4'), + z.literal('lotv-1v1'), + z.literal('lotv-2v2'), + z.literal('lotv-3v3'), + z.literal('lotv-4v4'), + z.literal('lotv-archon'), + z.literal('wol-1v1'), + z.literal('wol-2v2'), + z.literal('wol-3v3'), + z.literal('wol-4v4'), +]); + +export const starcraftLeagueTeamTypeSchema = z.union([z.literal('arranged'), z.literal('random')]); + +const divisionSchema = z.object({ + id: z.number(), + ladder_id: z.number(), + member_count: z.number(), +}); + +const tierSchema = z.object({ + division: z.array(divisionSchema), + id: z.number(), +}); + +const responseBaseSchema = z.any(); + +export const leagueDataResponseSchema = responseBaseSchema.extend({ + key: keySchema, + tier: z.array(tierSchema), +}); diff --git a/generated/sc2/legacy.ts b/generated/sc2/legacy.ts new file mode 100644 index 00000000..73dadd9e --- /dev/null +++ b/generated/sc2/legacy.ts @@ -0,0 +1,153 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const legacyLaddersResponseSchema = z.object({ + currentSeason: z.array(z.unknown()), + previousSeason: z.array(z.unknown()), + showcasePlacement: z.array(z.unknown()), +}); + +const matchSchema = z.object({ + date: z.number(), + decision: z.union([z.literal('Left'), z.literal('Loss'), z.literal('Win')]), + map: z.string(), + speed: z.union([z.literal('Fast'), z.literal('Faster')]), + type: z.union([z.literal('2v2'), z.literal('3v3'), z.literal('Co-Op'), z.literal('Custom')]), +}); + +const campaignSchema = z.object({ + hots: z.string(), + wol: z.string(), +}); + +const careerSchema = z.object({ + careerTotalGames: z.number(), + highest1v1Rank: z.string(), + highestTeamRank: z.string(), + primaryRace: z.string(), + protossWins: z.number(), + seasonTotalGames: z.number(), + terranWins: z.number(), + zergWins: z.number(), +}); + +const iconSchema = z.object({ + h: z.number(), + offset: z.number(), + url: z.string(), + w: z.number(), + x: z.number(), + y: z.number(), +}); + +const rewardsSchema = z.object({ + earned: z.array(z.string()), + selected: z.array(z.string()), +}); + +const animationSchema = z.object({ + achievementId: z.string(), + command: z.literal('/dance').optional(), + icon: iconSchema, + id: z.string(), + name: z.string().optional(), + title: z.string(), +}); + +const achievementSchema = z.object({ + achievementId: z.string(), + categoryId: z.string(), + description: z.string(), + icon: iconSchema, + points: z.number(), + title: z.string(), +}); + +const pointsSchema = z.object({ + categoryPoints: z.record(z.string(), z.number()), + totalPoints: z.number(), +}); + +const categoryChildSchema = z.object({ + categoryId: z.string(), + featuredAchievementId: z.string(), + title: z.string(), +}); + +const statSchema = z.object({ + games: z.number(), + type: z.string(), + wins: z.number(), +}); + +const swarmLevelsByRaceSchema = z.object({ + currentLevelXP: z.number(), + level: z.number(), + totalLevelXP: z.number(), +}); + +const categorySchema = z.object({ + categoryId: z.string(), + children: z.array(categoryChildSchema).optional(), + featuredAchievementId: z.string(), + title: z.string(), +}); + +export const legacyMatchHistoryResponseSchema = z.object({ + matches: z.array(matchSchema), +}); + +const achievementsSchema = z.object({ + achievements: z.array( + z.object({ + achievementId: z.string(), + completionDate: z.number(), + }), + ), + points: pointsSchema, +}); + +const seasonSchema = z.object({ + seasonId: z.number(), + seasonNumber: z.number(), + seasonYear: z.number(), + stats: z.array(statSchema), + totalGamesThisSeason: z.number(), +}); + +const swarmLevelsSchema = z.object({ + level: z.number(), + protoss: swarmLevelsByRaceSchema, + terran: swarmLevelsByRaceSchema, + zerg: swarmLevelsByRaceSchema, +}); + +export const legacyRewardsResponseSchema = z.object({ + animations: z.array(animationSchema), + portraits: z.array(animationSchema), + protossDecals: z.array(animationSchema), + skins: z.array(animationSchema), + terranDecals: z.array(animationSchema), + zergDecals: z.array(animationSchema), +}); + +export const legacyAchievementsResponseSchema = z.object({ + achievements: z.array(achievementSchema), + categories: z.array(categorySchema), +}); + +export const legacyProfileResponseSchema = z.object({ + achievements: achievementsSchema, + campaign: campaignSchema, + career: careerSchema, + clanName: z.string(), + clanTag: z.string(), + displayName: z.string(), + id: z.string(), + portrait: iconSchema, + profilePath: z.string(), + realm: z.number(), + rewards: rewardsSchema, + season: seasonSchema, + swarmLevels: swarmLevelsSchema, +}); diff --git a/generated/sc2/profile.ts b/generated/sc2/profile.ts new file mode 100644 index 00000000..64a8b8db --- /dev/null +++ b/generated/sc2/profile.ts @@ -0,0 +1,84 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const ladderResponseSchema = z.object({ + allLadderMemberships: z.array(z.unknown()), + ladderTeams: z.array(z.unknown()), + ranksAndPools: z.array(z.unknown()), +}); + +export const ladderSummaryResponseSchema = z.object({ + allLadderMemberships: z.array(z.unknown()), + placementMatches: z.array(z.unknown()), + showCaseEntries: z.array(z.unknown()), +}); + +export const metadataResponseSchema = z.object({ + avatarUrl: z.string(), + name: z.string(), + profileId: z.string(), + profileUrl: z.string(), + realmId: z.number(), + regionId: z.number(), +}); + +const achievementSchema = z.object({ + categoryId: z.string(), + chainAchievementIds: z.array(z.string()), + chainRewardSize: z.number(), + criteriaIds: z.array(z.string()).optional(), + description: z.string(), + flags: z.number(), + id: z.string(), + imageUrl: z.string(), + isChained: z.boolean(), + points: z.number(), + title: z.string(), + uiOrderHint: z.number(), +}); + +const categorySchema = z.object({ + childrenCategoryIds: z.array(z.string()), + featuredAchievementId: z.string(), + id: z.string(), + medalTiers: z.array(z.number()).optional(), + name: z.string(), + parentCategoryId: z.string().nullable(), + points: z.number(), + uiOrderHint: z.number(), +}); + +const criterionSchema = z.object({ + achievementId: z.string(), + description: z.string(), + evaluationClass: z.union([ + z.literal('Achv'), + z.literal('Clnt'), + z.literal('S2Gm'), + z.literal('Sunk'), + z.literal('Trny'), + ]), + flags: z.number(), + id: z.string(), + necessaryQuantity: z.number(), + uiOrderHint: z.number(), +}); + +const rewardSchema = z.object({ + achievementId: z.string().optional(), + command: z.literal('/dance').optional(), + flags: z.number(), + id: z.string(), + imageUrl: z.string(), + isSkin: z.boolean(), + name: z.string(), + uiOrderHint: z.number(), + unlockableType: z.string(), +}); + +export const staticProfileResponseSchema = z.object({ + achievements: z.array(achievementSchema), + categories: z.array(categorySchema), + criteria: z.array(criterionSchema), + rewards: z.array(rewardSchema), +}); diff --git a/generated/wow/account-profile.ts b/generated/wow/account-profile.ts new file mode 100644 index 00000000..b22b9102 --- /dev/null +++ b/generated/wow/account-profile.ts @@ -0,0 +1,168 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const slotSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const protectedStatsSchema = z.object({ + level_gold_gained: z.number(), + level_gold_lost: z.number(), + level_item_value_gained: z.number(), + level_number_deaths: z.number(), + total_gold_gained: z.number(), + total_gold_lost: z.number(), + total_item_value_gained: z.number(), + total_number_deaths: z.number(), +}); + +const qualitySchema = z.object({ + name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), +}); + +const statsSchema = z.object({ + breed_id: z.number(), + health: z.number(), + power: z.number(), + speed: z.number(), +}); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const realmSchema = z.any(); + +const factionSchema = z.any(); + +const genderSchema = z.any(); + +const keyBaseSchema = z.any(); + +const nameIdSchema = z.any(); + +const linksSchema = z.object({ + profile: hrefSchema, + self: hrefSchema, + user: hrefSchema, +}); + +const heirloomSchema = z.object({ + heirloom: nameIdKeySchema, + upgrade: z.object({ + level: z.number(), + }), +}); + +const mountSchema = z.object({ + is_favorite: z.boolean().optional(), + mount: nameIdKeySchema, +}); + +const petSchema = z.object({ + active_slot: z.number().optional(), + creature_display: keyBaseSchema + .and( + z.object({ + id: z.number(), + }), + ) + .optional(), + id: z.number(), + is_active: z.boolean().optional(), + is_favorite: z.boolean().optional(), + level: z.number(), + name: z.string().optional(), + quality: qualitySchema, + species: nameIdKeySchema, + stats: statsSchema, +}); + +const toySchema = z.object({ + is_favorite: z.boolean().optional(), + toy: nameIdKeySchema, +}); + +export const accountTransmogsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + appearance_sets: z.array(nameIdKeySchema), + slots: z.array(slotSchema), +}); + +const positionSchema = z.object({ + facing: z.number(), + map: nameIdSchema, + x: z.number(), + y: z.number(), + z: z.number(), + zone: nameIdSchema, +}); + +const characterSchema = z.object({ + character: hrefSchema, + faction: factionSchema, + gender: genderSchema, + id: z.number(), + level: z.number(), + name: z.string(), + playable_class: nameIdKeySchema, + playable_race: nameIdKeySchema, + protected_character: hrefSchema, + realm: realmSchema, +}); + +const wowAccountSchema = z.object({ + characters: z.array(characterSchema), + id: z.number(), +}); + +export const accountCollectionsIndexResponseSchema = z.object({ + _links: linksSchema, + heirlooms: hrefSchema, + mounts: hrefSchema, + pets: hrefSchema, + toys: hrefSchema, + transmogs: hrefSchema, +}); + +export const accountHeirloomsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + heirlooms: z.array(heirloomSchema), +}); + +export const accountMountsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + mounts: z.array(mountSchema), +}); + +export const accountPetsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + pets: z.array(petSchema), + unlocked_battle_pet_slots: z.number(), +}); + +export const accountProfileSummaryResponseSchema = z.object({ + _links: linksSchema, + collections: hrefSchema, + id: z.number(), + wow_accounts: z.array(wowAccountSchema).optional(), +}); + +export const accountToysCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + toys: z.array(toySchema), +}); + +export const protectedCharacterProfileSummaryResponseSchema = z.object({ + _links: linksSchema, + bind_position: positionSchema, + character: nameIdKeySchema.and(realmSchema), + id: z.number(), + money: z.number(), + name: z.string(), + position: positionSchema, + protected_stats: protectedStatsSchema, + wow_account: z.number(), +}); diff --git a/generated/wow/achievements.ts b/generated/wow/achievements.ts new file mode 100644 index 00000000..46d384a3 --- /dev/null +++ b/generated/wow/achievements.ts @@ -0,0 +1,82 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const achievementMediaItemSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * Interface for a response from the achievement category index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementCategoryIndexResponseSchema = responseBaseSchema.extend({ + categories: z.array(nameIdKeySchema), + guild_categories: z.array(nameIdKeySchema), + root_categories: z.array(nameIdKeySchema), +}); + +/** + * Interface for a response from the achievement category endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + achievements: z.array(nameIdKeySchema), + aggregates_by_faction: z.object({ + alliance: z.object({ + points: z.number(), + quantity: z.number(), + }), + horde: z.object({ + points: z.number(), + quantity: z.number(), + }), + }), + display_order: z.number(), + isGuildCategory: z.boolean(), + parent_category: nameIdKeySchema, +}); + +/** + * Interface for a response from the achievement index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementIndexResponseSchema = responseBaseSchema.extend({ + achievements: z.array(nameIdKeySchema), +}); + +/** + * Interface for a response from the achievement media endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(achievementMediaItemSchema), + id: z.number(), +}); + +/** + * Interface for a response from the achievement endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + category: nameIdKeySchema, + criteria: z.object({ + amount: z.number(), + description: z.string(), + id: z.number(), + }), + description: z.string(), + display_order: z.number(), + is_account_wide: z.boolean(), + media: keyBaseSchema, + points: z.number(), +}); diff --git a/generated/wow/auction-house.ts b/generated/wow/auction-house.ts new file mode 100644 index 00000000..119306c4 --- /dev/null +++ b/generated/wow/auction-house.ts @@ -0,0 +1,62 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const auctionHouseTimeLeftSchema = z.union([ + z.literal('LONG'), + z.literal('MEDIUM'), + z.literal('SHORT'), + z.literal('VERY_LONG'), +]); + +const auctionHousePostingSchema = z.object({ + bid: z.number(), + buyout: z.number(), + id: z.number(), + item: z.object({ + bonus_lists: z.array(z.number()), + context: z.number(), + id: z.number(), + modifiers: z.array( + z.object({ + type: z.number(), + value: z.number(), + }), + ), + }), + quantity: z.number(), + time_left: auctionHouseTimeLeftSchema, +}); + +const responseBaseSchema = z.any(); + +const auctionHouseCommoditySchema = z.object({ + id: z.number(), + item: z.object({ + id: z.number(), + }), + quantity: z.number(), + time_left: auctionHouseTimeLeftSchema, + unit_price: z.number(), +}); + +/** + * Interface for a response from the auction house endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const auctionHouseResponseSchema = responseBaseSchema.extend({ + auctions: z.array(auctionHousePostingSchema), + commodities: z.object({ + href: z.string(), + }), + connected_realm: z.object({ + href: z.string(), + }), +}); + +/** + * Interface for a response from the auction house commodities endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const auctionHouseCommoditiesResponseSchema = responseBaseSchema.extend({ + auctions: z.array(auctionHouseCommoditySchema), +}); diff --git a/generated/wow/azerite-essence.ts b/generated/wow/azerite-essence.ts new file mode 100644 index 00000000..5b73fdb7 --- /dev/null +++ b/generated/wow/azerite-essence.ts @@ -0,0 +1,75 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const keyBaseSchema = z.any(); + +const localesSchema = z.any(); + +/** + * Interface for a response from the azerite essence index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const azeriteEssenceIndexResponseSchema = responseBaseSchema.extend({ + azerite_essences: z.array(nameIdKeySchema), +}); + +/** + * Interface for a response from the azerite essence media endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const azeriteEssenceMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const powerSchema = z.object({ + id: z.number(), + main_power_spell: nameIdKeySchema, + passive_power_spell: nameIdKeySchema, + rank: z.number(), +}); + +/** + * Interface for search parameters for azerite essences. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ + 'allowed_specializations.id': z.number().optional(), +}); + +/** + * Interface for a response item from the azerite essence search endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + allowed_specializations: z.array(nameIdSchema), + name: z.record(localesSchema, z.string()), + }), +}); + +/** + * Interface for a response from the azerite essence endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const azeriteEssenceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + allowed_specializations: z.array(nameIdKeySchema), + media: mediaSchema, + powers: z.array(powerSchema), +}); diff --git a/generated/wow/character-achievements.ts b/generated/wow/character-achievements.ts new file mode 100644 index 00000000..88e7b78f --- /dev/null +++ b/generated/wow/character-achievements.ts @@ -0,0 +1,91 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const statisticSchema = z.object({ + description: z.string().optional().nullable(), + id: z.number(), + last_updated_timestamp: z.number(), + name: z.string(), + quantity: z.number(), +}); + +const subCategorySchema = z.object({ + id: z.number(), + name: z.string(), + statistics: z.array(statisticSchema), +}); + +const childCriterum3Schema = z.object({ + amount: z.number().optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const categoryProgressSchema = z.object({ + category: nameIdKeySchema, + points: z.number(), + quantity: z.number(), +}); + +const recentEventSchema = z.object({ + achievement: nameIdKeySchema, + timestamp: z.number(), +}); + +const categorySchema = z.object({ + id: z.number(), + name: z.string(), + statistics: z.array(statisticSchema), + sub_categories: z.array(subCategorySchema), +}); + +const childCriterum2Schema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterum3Schema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const childCriterumSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterum2Schema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +export const characterAchievementStatisticsResponseSchema = responseBaseSchema.extend({ + categories: z.array(categorySchema), + character: characterSchema, +}); + +const criteriaSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterumSchema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const achievementSchema = z.object({ + achievement: nameIdKeySchema, + completed_timestamp: z.number().optional(), + criteria: criteriaSchema.optional(), + id: z.number(), +}); + +export const characterAchievementsSummaryResponseSchema = responseBaseSchema.extend({ + achievements: z.array(achievementSchema), + category_progress: z.array(categoryProgressSchema), + character: characterSchema, + recent_events: z.array(recentEventSchema), + statistics: hrefSchema, + total_points: z.number(), + total_quantity: z.number(), +}); diff --git a/generated/wow/character-appearance.ts b/generated/wow/character-appearance.ts new file mode 100644 index 00000000..6f876929 --- /dev/null +++ b/generated/wow/character-appearance.ts @@ -0,0 +1,76 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const itemSchema = z.object({ + enchant: z.number(), + id: z.number(), + internal_slot_id: z.number(), + item_appearance_modifier_id: z.number(), + slot: z.object({ + name: z.string(), + type: z.string(), + }), + subclass: z.number(), +}); + +const choiceSchema = z.object({ + display_order: z.number(), + id: z.number(), + name: z.string().optional(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const characterSchema = z.any(); + +const factionSchema = z.any(); + +const genderSchema = z.any(); + +const keyBaseSchema = z.any(); + +const nameIdSchema = z.any(); + +const colorSchema = z.any(); + +const customizationSchema = z.object({ + choice: choiceSchema, + option: nameIdSchema, +}); + +const rgbWithIdSchema = z.object({ + id: z.number(), + rgba: colorSchema, +}); + +const borderEmblemSchema = z.object({ + color: rgbWithIdSchema, + id: z.number(), + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), +}); + +const guildCrestSchema = z.object({ + background: z.object({ + color: rgbWithIdSchema, + }), + border: borderEmblemSchema, + emblem: borderEmblemSchema, +}); + +export const characterAppearanceResponseSchema = responseBaseSchema.extend({ + active_spec: nameIdKeySchema, + character: characterSchema, + customizations: z.array(customizationSchema), + faction: factionSchema, + gender: genderSchema, + guild_crest: guildCrestSchema, + items: z.array(itemSchema), + playable_class: nameIdKeySchema, + playable_race: nameIdKeySchema, +}); diff --git a/generated/wow/character-collections.ts b/generated/wow/character-collections.ts new file mode 100644 index 00000000..ca6a6fbe --- /dev/null +++ b/generated/wow/character-collections.ts @@ -0,0 +1,98 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const slotSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const qualitySchema = z.object({ + name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), +}); + +const statsSchema = z.object({ + breed_id: z.number(), + health: z.number(), + power: z.number(), + speed: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +export const characterCollectionsIndexResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + heirlooms: hrefSchema, + mounts: hrefSchema, + pets: hrefSchema, + toys: hrefSchema, + transmogs: hrefSchema, +}); + +const heirloomSchema = z.object({ + heirloom: nameIdKeySchema, + upgrade: z.object({ + level: z.number(), + }), +}); + +const mountSchema = z.object({ + is_character_specific: z.boolean().optional(), + is_favorite: z.boolean().optional(), + is_useable: z.boolean(), + mount: nameIdKeySchema, +}); + +const petSchema = z.object({ + active_slot: z.number().optional(), + creature_display: keyBaseSchema + .and( + z.object({ + id: z.number(), + }), + ) + .optional(), + id: z.number(), + is_active: z.boolean().optional(), + is_favorite: z.boolean().optional(), + level: z.number(), + name: z.string().optional(), + quality: qualitySchema, + species: nameIdKeySchema, + stats: statsSchema, +}); + +const toySchema = z.object({ + is_favorite: z.boolean().optional(), + toy: nameIdKeySchema, +}); + +export const characterTransmogCollectionSummaryResponseSchema = responseBaseSchema.extend({ + appearance_sets: z.array(nameIdKeySchema), + slots: z.array(slotSchema), +}); + +export const characterHeirloomsCollectionSummaryResponseSchema = responseBaseSchema.extend({ + heirlooms: z.array(heirloomSchema), +}); + +export const characterMountsCollectionSummaryResponseSchema = responseBaseSchema.extend({ + mounts: z.array(mountSchema), +}); + +export const characterPetsCollectionSummaryResponseSchema = responseBaseSchema.extend({ + pets: z.array(petSchema), + unlocked_battle_pet_slots: z.number(), +}); + +export const characterToysCollectionSummaryResponseSchema = responseBaseSchema.extend({ + toys: z.array(toySchema), +}); diff --git a/generated/wow/character-encounters.ts b/generated/wow/character-encounters.ts new file mode 100644 index 00000000..62d536dc --- /dev/null +++ b/generated/wow/character-encounters.ts @@ -0,0 +1,102 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const dungeonDifficultiesSchema = z.object({ + name: z.union([z.literal('Heroic'), z.literal('Mythic'), z.literal('Mythic+ Dungeons'), z.literal('Normal')]), + type: z.union([z.literal('HEROIC'), z.literal('MYTHIC'), z.literal('MYTHIC_KEYSTONE'), z.literal('NORMAL')]), +}); + +const statusSchema = z.object({ + name: z.union([z.literal('Complete'), z.literal('In Progress')]), + type: z.union([z.literal('COMPLETE'), z.literal('IN_PROGRESS')]), +}); + +const raidDifficultiesSchema = z.object({ + name: z.union([ + z.literal('10 Player'), + z.literal('10 Player (Heroic)'), + z.literal('25 Player'), + z.literal('25 Player (Heroic)'), + z.literal('Heroic'), + z.literal('Mythic'), + z.literal('Normal'), + z.literal('Raid Finder'), + ]), + type: z.union([ + z.literal('HEROIC'), + z.literal('LEGACY_10_MAN'), + z.literal('LEGACY_10_MAN_HEROIC'), + z.literal('LEGACY_25_MAN'), + z.literal('LEGACY_25_MAN_HEROIC'), + z.literal('LFR'), + z.literal('MYTHIC'), + z.literal('NORMAL'), + ]), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +export const characterEncountersSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + dungeons: hrefSchema, + raids: hrefSchema, +}); + +const encounterSchema = z.object({ + completed_count: z.number(), + encounter: nameIdKeySchema, + last_kill_timestamp: z.number(), +}); + +const progressSchema = z.object({ + completed_count: z.number(), + encounters: z.array(encounterSchema), + total_count: z.number(), +}); + +const raidModeSchema = z.object({ + difficulty: raidDifficultiesSchema, + progress: progressSchema, + status: statusSchema, +}); + +const dungeonModeSchema = z.object({ + difficulty: dungeonDifficultiesSchema, + progress: progressSchema, + status: statusSchema, +}); + +const dungeonInstanceSchema = z.object({ + instance: nameIdKeySchema, + modes: z.array(dungeonModeSchema), +}); + +const raidInstanceSchema = z.object({ + instance: nameIdKeySchema, + modes: z.array(raidModeSchema), +}); + +const expansionWithDungeonInstancesSchema = z.object({ + expansion: nameIdKeySchema, + instances: z.array(dungeonInstanceSchema), +}); + +const expansionWithRaidInstancesSchema = z.object({ + expansion: nameIdKeySchema, + instances: z.array(raidInstanceSchema), +}); + +export const characterDungeonsResponseSchema = responseBaseSchema.extend({ + expansions: z.array(expansionWithDungeonInstancesSchema), +}); + +export const characterRaidsResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + expansions: z.array(expansionWithRaidInstancesSchema), +}); diff --git a/generated/wow/character-equipment.ts b/generated/wow/character-equipment.ts new file mode 100644 index 00000000..7f65d589 --- /dev/null +++ b/generated/wow/character-equipment.ts @@ -0,0 +1,180 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const nameTypeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const displayStringsSchema = z.object({ + copper: z.string(), + gold: z.string(), + header: z.string(), + silver: z.string(), +}); + +const displayStringValueSchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + +const effectSchema = z.object({ + display_string: z.string(), + is_active: z.boolean(), + required_count: z.number(), +}); + +const enchantmentSlotSchema = z.object({ + id: z.number(), + type: z.string(), +}); + +const modifiedCraftingStatSchema = z.object({ + id: z.number(), + name: z.string(), + type: z.string(), +}); + +const sellPriceSchema = z.object({ + display_strings: displayStringsSchema, + value: z.number(), +}); + +const damageSchema = z.object({ + damage_class: nameTypeSchema, + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +const colorSchema = z.any(); + +const nameDescriptionSchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + +const enchantmentSchema = z.object({ + display_string: z.string(), + enchantment_id: z.number(), + enchantment_slot: enchantmentSlotSchema, + source_item: nameIdKeySchema.optional(), +}); + +const armorSchema = z.object({ + display: nameDescriptionSchema, + value: z.number(), +}); + +const socketSchema = z.object({ + display_string: z.string(), + item: nameIdKeySchema, + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + socket_type: nameTypeSchema, +}); + +const spellSchema = z.object({ + description: z.string(), + spell: nameIdKeySchema, +}); + +const statSchema = z.object({ + display: nameDescriptionSchema, + is_equip_bonus: z.boolean().optional(), + is_negated: z.boolean().optional(), + type: nameTypeSchema, + value: z.number(), +}); + +const transmogSchema = z.object({ + display_string: z.string(), + item: nameIdKeySchema, + item_modified_appearance_id: z.number(), +}); + +const weaponSchema = z.object({ + attack_speed: displayStringValueSchema, + damage: damageSchema, + dps: displayStringValueSchema, +}); + +const itemElementSchema = nameIdKeySchema.extend({ + is_equipped: z.boolean().optional(), +}); + +const playableClassesSchema = z.object({ + display_string: z.string(), + links: z.array(nameIdKeySchema), +}); + +const requirementsSchema = z.object({ + level: displayStringValueSchema, + playable_classes: playableClassesSchema.optional(), +}); + +const setSchema = z.object({ + display_string: z.string(), + effects: z.array(effectSchema), + item_set: nameIdKeySchema, + items: z.array(itemElementSchema), +}); + +const equippedItemSchema = z.object({ + armor: armorSchema.optional(), + binding: nameTypeSchema, + bonus_list: z.array(z.number()).optional(), + context: z.number(), + description: z.string().optional(), + durability: displayStringValueSchema.optional(), + enchantments: z.array(enchantmentSchema).optional(), + inventory_type: nameTypeSchema, + is_subclass_hidden: z.boolean().optional(), + item: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: displayStringValueSchema, + limit_category: z.string().optional(), + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + modified_appearance_id: z.number().optional(), + modified_crafting_stat: z.array(modifiedCraftingStatSchema).optional(), + name: z.string(), + name_description: nameDescriptionSchema, + quality: nameTypeSchema, + quantity: z.number(), + requirements: requirementsSchema.optional(), + sell_price: sellPriceSchema.optional(), + set: setSchema.optional(), + slot: nameTypeSchema, + sockets: z.array(socketSchema).optional(), + spells: z.array(spellSchema).optional(), + stats: z.array(statSchema).optional(), + transmog: transmogSchema.optional(), + unique_equipped: z.string().optional(), + weapon: weaponSchema.optional(), +}); + +export const characterEquipmentSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + equipped_item_sets: z.array(setSchema), + equipped_items: z.array(equippedItemSchema), +}); diff --git a/generated/wow/character-hunter-pets.ts b/generated/wow/character-hunter-pets.ts new file mode 100644 index 00000000..04248b98 --- /dev/null +++ b/generated/wow/character-hunter-pets.ts @@ -0,0 +1,29 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +const hunterPetSchema = z.object({ + creature: nameIdKeySchema, + creature_display: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + is_active: z.boolean().optional(), + is_summoned: z.boolean().optional(), + level: z.number(), + name: z.string(), + slot: z.number(), +}); + +export const characterHunterPetsSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + hunter_pets: z.array(hunterPetSchema), +}); diff --git a/generated/wow/character-media.ts b/generated/wow/character-media.ts new file mode 100644 index 00000000..74f4de5a --- /dev/null +++ b/generated/wow/character-media.ts @@ -0,0 +1,16 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const assetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +export const characterMediaSummaryResponseSchema = responseBaseSchema.extend({ + assets: z.array(assetSchema), + character: characterSchema, +}); diff --git a/generated/wow/character-mythic-keystone-profile.ts b/generated/wow/character-mythic-keystone-profile.ts new file mode 100644 index 00000000..e5c90b50 --- /dev/null +++ b/generated/wow/character-mythic-keystone-profile.ts @@ -0,0 +1,74 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const keyBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const realmSchema = z.any(); + +const colorSchema = z.any(); + +const currentPeriodSchema = z.object({ + period: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), +}); + +const mythicRatingSchema = z.object({ + color: colorSchema, + rating: z.number(), +}); + +const memberSchema = z.object({ + character: nameIdSchema.and( + z.object({ + realm: realmSchema, + }), + ), + equipped_item_level: z.number(), + race: nameIdKeySchema, + specialization: nameIdKeySchema, +}); + +export const characterMythicKeystoneProfileIndexResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + current_period: currentPeriodSchema, + seasons: z.array( + keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + ), +}); + +const bestRunSchema = z.object({ + completed_timestamp: z.number(), + dungeon: nameIdKeySchema, + duration: z.number(), + is_completed_within_time: z.boolean(), + keystone_affixes: z.array(nameIdKeySchema), + keystone_level: z.number(), + members: z.array(memberSchema), + mythic_rating: mythicRatingSchema, +}); + +export const characterMythicKeystoneSeasonDetailsResponseSchema = responseBaseSchema.extend({ + best_runs: z.array(bestRunSchema), + character: nameIdKeySchema, + mythic_rating: mythicRatingSchema, + season: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), +}); diff --git a/generated/wow/character-professions.ts b/generated/wow/character-professions.ts new file mode 100644 index 00000000..2bd09e98 --- /dev/null +++ b/generated/wow/character-professions.ts @@ -0,0 +1,35 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const tierSchema = z.object({ + known_recipes: z.array(nameIdKeySchema).optional(), + max_skill_points: z.number(), + skill_points: z.number(), + tier: nameIdSchema, +}); + +const secondarySchema = z.object({ + max_skill_points: z.number().optional(), + profession: nameIdKeySchema, + skill_points: z.number().optional(), + tiers: z.array(tierSchema).optional(), +}); + +const primarySchema = z.object({ + profession: nameIdKeySchema, + tiers: z.array(tierSchema), +}); + +export const characterProfessionsSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + primaries: z.array(primarySchema), + secondaries: z.array(secondarySchema), +}); diff --git a/generated/wow/character-profile.ts b/generated/wow/character-profile.ts new file mode 100644 index 00000000..0b5d0ff3 --- /dev/null +++ b/generated/wow/character-profile.ts @@ -0,0 +1,71 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const hrefSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const factionSchema = z.any(); + +const genderSchema = z.any(); + +const realmSchema = z.any(); + +export const characterProfileStatusResponseSchema = responseBaseSchema.extend({ + id: z.number(), + is_valid: z.boolean(), +}); + +const covenantProgressSchema = z.object({ + chosen_covenant: nameIdKeySchema, + renown_level: z.number(), + soulbinds: hrefSchema, +}); + +const guildSchema = nameIdKeySchema.extend({ + faction: factionSchema, + realm: realmSchema, +}); + +export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ + achievement_points: z.number(), + achievements: hrefSchema, + achievements_statistics: hrefSchema, + active_spec: nameIdKeySchema, + active_title: nameIdKeySchema.and( + z.object({ + display_string: z.string(), + }), + ), + appearance: hrefSchema, + average_item_level: z.number(), + character_class: nameIdKeySchema, + collections: hrefSchema, + covenant_progress: covenantProgressSchema, + encounters: hrefSchema, + equipment: hrefSchema, + equipped_item_level: z.number(), + experience: z.number(), + faction: factionSchema, + gender: genderSchema, + guild: guildSchema, + hunter_pets: hrefSchema, + id: z.number(), + last_login_timestamp: z.number(), + level: z.number(), + media: hrefSchema, + mythic_keystone_profile: hrefSchema, + name: z.string(), + name_search: z.string(), + professions: hrefSchema, + pvp_summary: hrefSchema, + quests: hrefSchema, + race: nameIdKeySchema, + realm: realmSchema, + reputations: hrefSchema, + specializations: hrefSchema, + statistics: hrefSchema, + titles: hrefSchema, +}); diff --git a/generated/wow/character-pvp.ts b/generated/wow/character-pvp.ts new file mode 100644 index 00000000..8b781068 --- /dev/null +++ b/generated/wow/character-pvp.ts @@ -0,0 +1,54 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const bracketSchema = z.object({ + id: z.number(), + type: z.string(), +}); + +const matchStatisticsSchema = z.object({ + lost: z.number(), + played: z.number(), + won: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const factionSchema = z.any(); + +const keyBaseSchema = z.any(); + +const nameIdSchema = z.any(); + +export const characterPvpBracketStatisticsResponseSchema = responseBaseSchema.extend({ + bracket: bracketSchema, + character: characterSchema, + faction: factionSchema, + rating: z.number(), + season: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + season_match_statistics: matchStatisticsSchema, + tier: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + weekly_match_statistics: matchStatisticsSchema, +}); + +const pvpMapStatisticSchema = z.object({ + match_statistics: matchStatisticsSchema, + world_map: nameIdSchema, +}); + +export const characterPvpSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + honor_level: z.number(), + honorable_kills: z.number(), + pvp_map_statistics: z.array(pvpMapStatisticSchema), +}); diff --git a/generated/wow/character-quests.ts b/generated/wow/character-quests.ts new file mode 100644 index 00000000..61a244fb --- /dev/null +++ b/generated/wow/character-quests.ts @@ -0,0 +1,21 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const hrefSchema = z.any(); + +export const characterCompletedQuestsResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + quests: z.array(nameIdKeySchema), +}); + +export const characterQuestsResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + completed: hrefSchema, + in_progress: z.array(nameIdKeySchema), +}); diff --git a/generated/wow/character-reputations.ts b/generated/wow/character-reputations.ts new file mode 100644 index 00000000..c18fd041 --- /dev/null +++ b/generated/wow/character-reputations.ts @@ -0,0 +1,33 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const paragonSchema = z.object({ + max: z.number(), + raw: z.number(), + value: z.number(), +}); + +const standingSchema = z.object({ + max: z.number(), + name: z.string(), + raw: z.number(), + tier: z.number(), + value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const reputationSchema = z.object({ + faction: nameIdKeySchema, + paragon: paragonSchema.optional(), + standing: standingSchema, +}); + +export const characterReputationsSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + reputations: z.array(reputationSchema), +}); diff --git a/generated/wow/character-soulbinds.ts b/generated/wow/character-soulbinds.ts new file mode 100644 index 00000000..33181936 --- /dev/null +++ b/generated/wow/character-soulbinds.ts @@ -0,0 +1,47 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const typeClassSchema = z.object({ + name: z.union([ + z.literal('Endurance Conduit Slot'), + z.literal('Finesse Conduit Slot'), + z.literal('Potency Conduit Slot'), + ]), + type: z.union([z.literal('ENDURANCE'), z.literal('FINESSE'), z.literal('POTENCY')]), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const socketSchema = z.object({ + conduit: nameIdKeySchema, + rank: z.number(), +}); + +const conduitSocketSchema = z.object({ + socket: socketSchema, + type: typeClassSchema, +}); + +const traitSchema = z.object({ + conduit_socket: conduitSocketSchema.optional(), + display_order: z.number(), + tier: z.number(), + trait: nameIdKeySchema.optional(), +}); + +const soulbindSchema = z.object({ + is_active: z.boolean().optional(), + soulbind: nameIdKeySchema, + traits: z.array(traitSchema), +}); + +export const characterSoulbindsResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + chosen_covenant: nameIdKeySchema, + renown_level: z.number(), + soulbinds: z.array(soulbindSchema), +}); diff --git a/generated/wow/character-specializations.ts b/generated/wow/character-specializations.ts new file mode 100644 index 00000000..c70f9f22 --- /dev/null +++ b/generated/wow/character-specializations.ts @@ -0,0 +1,75 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const characterSchema = z.any(); + +const spellTooltipSchema = z.object({ + cast_time: z.union([ + z.literal('1.5 sec cast'), + z.literal('2.5 sec cast'), + z.literal('3 sec cast'), + z.literal('Channeled'), + z.literal('Instant'), + z.literal('Passive'), + ]), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional(), + range: z + .union([ + z.literal('8-30 yd range'), + z.literal('15 yd range'), + z.literal('30 yd range'), + z.literal('40 yd range'), + z.literal('50 yd range'), + z.literal('55 yd range'), + z.literal('100 yd range'), + z.literal('Melee Range'), + ]) + .optional(), + spell: nameIdKeySchema, +}); + +const selectedSchema = z.object({ + spell_tooltip: spellTooltipSchema, + talent: nameIdKeySchema, +}); + +const pvpTalentSlotSchema = z.object({ + selected: selectedSchema, + slot_number: z.number(), +}); + +const selectedTalentSchema = z.object({ + default_points: z.number().optional(), + id: z.number(), + rank: z.number(), + tooltip: selectedSchema, +}); + +const loadoutSchema = z.object({ + is_active: z.boolean(), + selected_class_talent_tree: nameIdKeySchema, + selected_class_talents: z.array(selectedTalentSchema), + selected_spec_talent_tree: nameIdKeySchema, + selected_spec_talents: z.array(selectedTalentSchema).optional(), + talent_loadout_code: z.string(), +}); + +const specializationSchema = z.object({ + glyphs: z.array(nameIdKeySchema).optional(), + loadouts: z.array(loadoutSchema), + pvp_talent_slots: z.array(pvpTalentSlotSchema).optional(), + specialization: nameIdKeySchema, +}); + +export const characterSpecializationsSummaryResponseSchema = responseBaseSchema.extend({ + active_hero_talent: nameIdKeySchema, + active_specialization: nameIdKeySchema, + character: characterSchema, + specializations: z.array(specializationSchema), +}); diff --git a/generated/wow/character-statistics.ts b/generated/wow/character-statistics.ts new file mode 100644 index 00000000..12197f3b --- /dev/null +++ b/generated/wow/character-statistics.ts @@ -0,0 +1,65 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const baseEffectiveStatSchema = z.object({ + base: z.number(), + effective: z.number(), +}); + +const ratingSchema = z.object({ + rating: z.number(), + rating_bonus: z.number(), +}); + +const ratingWithValueSchema = z.object({ + rating: z.number(), + rating_bonus: z.number(), + value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const characterSchema = z.any(); + +export const characterStatisticsSummaryResponseSchema = responseBaseSchema.extend({ + agility: baseEffectiveStatSchema, + armor: baseEffectiveStatSchema, + attack_power: z.number(), + avoidance: ratingSchema, + block: ratingWithValueSchema, + bonus_armor: z.number(), + character: characterSchema, + dodge: ratingWithValueSchema, + health: z.number(), + intellect: baseEffectiveStatSchema, + lifesteal: ratingWithValueSchema, + main_hand_damage_max: z.number(), + main_hand_damage_min: z.number(), + main_hand_dps: z.number(), + main_hand_speed: z.number(), + mana_regen: z.number(), + mana_regen_combat: z.number(), + mastery: ratingWithValueSchema, + melee_crit: ratingWithValueSchema, + melee_haste: ratingWithValueSchema, + off_hand_damage_max: z.number(), + off_hand_damage_min: z.number(), + off_hand_dps: z.number(), + off_hand_speed: z.number(), + parry: ratingWithValueSchema, + power: z.number(), + power_type: characterSchema, + ranged_crit: ratingWithValueSchema, + ranged_haste: ratingWithValueSchema, + speed: ratingSchema, + spell_crit: ratingWithValueSchema, + spell_haste: ratingWithValueSchema, + spell_penetration: z.number(), + spell_power: z.number(), + stamina: baseEffectiveStatSchema, + strength: baseEffectiveStatSchema, + versatility: z.number(), + versatility_damage_done_bonus: z.number(), + versatility_damage_taken_bonus: z.number(), + versatility_healing_done_bonus: z.number(), +}); diff --git a/generated/wow/character-titles.ts b/generated/wow/character-titles.ts new file mode 100644 index 00000000..170134d8 --- /dev/null +++ b/generated/wow/character-titles.ts @@ -0,0 +1,18 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const characterSchema = z.any(); + +export const characterTitlesSummaryResponseSchema = responseBaseSchema.extend({ + active_title: nameIdKeySchema.and( + z.object({ + display_string: z.string(), + }), + ), + character: characterSchema, + titles: z.array(nameIdKeySchema), +}); diff --git a/generated/wow/connected-realm.ts b/generated/wow/connected-realm.ts new file mode 100644 index 00000000..43f814e0 --- /dev/null +++ b/generated/wow/connected-realm.ts @@ -0,0 +1,98 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const realmPopulationSchema = z.union([ + z.literal('Full'), + z.literal('High'), + z.literal('Low'), + z.literal('Medium'), + z.literal('New Players'), +]); + +const realmPopulationCapitalizedSchema = z.union([ + z.literal('FULL'), + z.literal('HIGH'), + z.literal('LOW'), + z.literal('MEDIUM'), + z.literal('RECOMMENDED'), +]); + +const realmLockedStatusSchema = z.object({ + is_locked_for_new_characters: z.boolean(), + is_locked_for_pct: z.boolean(), +}); + +const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); + +const responseBaseSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const realmTimezoneSchema = z.any(); + +const keyBaseSchema = z.any(); + +const realmCategorySchema = z.any(); + +const realmLocalesSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const realmTypeSchema = z.any(); + +const realmTypeCapitalizedSchema = z.any(); + +const localesSchema = z.any(); + +/** + * Connected Realm Index API response. + * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis + */ +export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ + connected_realms: z.array( + z.object({ + href: z.string(), + }), + ), +}); + +const realmSchema = z.object({ + category: realmCategorySchema, + connected_realm: z.object({ + href: z.string(), + }), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.string(), + region: nameIdKeySchema, + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), +}); + +const searchRealmPopulationSchema = z.object({ + name: z.record(localesSchema, z.string()), + type: realmPopulationCapitalizedSchema, +}); + +const searchRealmSchema = z.object({ + category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + region: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: realmTypeCapitalizedSchema, + }), +}); diff --git a/generated/wow/covenant.ts b/generated/wow/covenant.ts new file mode 100644 index 00000000..adcd4f7e --- /dev/null +++ b/generated/wow/covenant.ts @@ -0,0 +1,140 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const socketTypeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * Interface for a response from the conduit index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const conduitIndexResponseSchema = responseBaseSchema.extend({ + conduits: z.array(nameIdKeySchema), +}); + +const itemSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * Interface for a response from the covenant index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const covenantIndexResponseSchema = responseBaseSchema.extend({ + covenants: z.array(nameIdKeySchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const renownRewardSchema = z.object({ + level: z.number(), + reward: nameIdKeySchema, +}); + +/** + * Interface for a response from the covenant endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const covenantResponseSchema = responseBaseSchema.extend({ + description: z.string(), + id: z.number(), + name: z.string(), + renown_rewards: z.array(renownRewardSchema), +}); + +/** + * Interface for a response from the soulbind index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const soulbindIndexResponseSchema = responseBaseSchema.extend({ + soulbinds: z.array(nameIdKeySchema), +}); + +/** + * Interface for a response from the soulbind endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const soulbindResponseSchema = responseBaseSchema.extend({ + covenant: nameIdKeySchema, + creature: nameIdKeySchema, + follower: nameIdKeySchema, + id: z.number(), + name: z.string(), + talent_tree: nameIdKeySchema, +}); + +const classAbilitySpellTooltipSchema = z.object({ + cast_time: z.string(), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional().nullable(), + range: z.string().optional(), + spell: nameIdKeySchema, +}); + +const spellTooltipSchema = z.object({ + cast_time: z.string(), + description: z.string(), + spell: itemSchema, +}); + +const signatureAbilitySpellTooltipSchema = z.object({ + cast_time: z.string(), + cooldown: z.string(), + description: z.string(), + spell: nameIdKeySchema, +}); + +const rankSchema = z.object({ + id: z.number(), + spell_tooltip: spellTooltipSchema, + tier: z.number(), +}); + +const classAbilitySchema = z.object({ + id: z.number(), + playable_class: nameIdKeySchema, + spell_tooltip: classAbilitySpellTooltipSchema, +}); + +const signatureAbilitySchema = z.object({ + id: z.number(), + spell_tooltip: signatureAbilitySpellTooltipSchema, +}); + +/** + * Interface for a response from the conduit endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const conduitResponseSchema = responseBaseSchema.extend({ + id: z.number(), + item: itemSchema, + name: z.string(), + ranks: z.array(rankSchema), + socket_type: socketTypeSchema, +}); + +/** + * Interface for a response from the covenant media endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const covenantMediaResponseSchema = responseBaseSchema.extend({ + class_abilities: z.array(classAbilitySchema), + description: z.string(), + id: z.number(), + media: mediaSchema, + name: z.string(), + renown_rewards: z.array(renownRewardSchema), + signature_ability: signatureAbilitySchema, + soulbinds: z.array(nameIdKeySchema), +}); diff --git a/generated/wow/creature.ts b/generated/wow/creature.ts new file mode 100644 index 00000000..5c3f719a --- /dev/null +++ b/generated/wow/creature.ts @@ -0,0 +1,132 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const displayMediaAssetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const localesSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for creature display media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(displayMediaAssetSchema), + id: z.number(), +}); + +/** + * The response for a creature family index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureFamilyIndexResponseSchema = responseBaseSchema.extend({ + creature_families: z.array(nameIdKeySchema), +}); + +/** + * The response for creature family media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureFamilyMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The search parameters for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +/** + * The response for a creature search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + creature_displays: z.array( + z.object({ + id: z.number(), + }), + ), + family: z + .object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }) + .optional(), + id: z.number(), + is_tameable: z.boolean(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + }), +}); + +/** + * The response for a creature type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureTypeIndexResponseSchema = responseBaseSchema.extend({ + creature_types: z.array(nameIdKeySchema), +}); + +/** + * The response for a creature type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureTypeResponseSchema = responseBaseSchema.extend({ + id: z.number(), + name: z.string(), +}); + +/** + * The response for a creature family. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureFamilyResponseSchema = responseBaseSchema.extend({ + id: z.number(), + media: mediaSchema, + name: z.string(), + specialization: nameIdKeySchema, +}); + +/** + * The response for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureResponseSchema = responseBaseSchema.extend({ + creature_displays: z.array(creatureDisplaySchema), + family: nameIdKeySchema, + id: z.number(), + is_tameable: z.boolean(), + name: z.string(), + type: nameIdKeySchema, +}); diff --git a/generated/wow/guild-crest.ts b/generated/wow/guild-crest.ts new file mode 100644 index 00000000..91df124b --- /dev/null +++ b/generated/wow/guild-crest.ts @@ -0,0 +1,57 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const guildCrestAssetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +const rgbaSchema = z.object({ + a: z.number(), + b: z.number(), + g: z.number(), + r: z.number(), +}); + +const backgroundSchema = z.object({ + id: z.number(), + rgba: rgbaSchema, +}); + +const responseBaseSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a guild crest border or emblem. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ + assets: z.array(guildCrestAssetSchema), + id: z.number(), +}); + +const colorsSchema = z.object({ + backgrounds: z.array(backgroundSchema), + borders: z.array(backgroundSchema), + emblems: z.array(backgroundSchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const borderSchema = z.object({ + id: z.number(), + media: mediaSchema, +}); + +/** + * The response for the guild crest components index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const guildCrestComponentsIndexResponseSchema = responseBaseSchema.extend({ + borders: z.array(borderSchema), + colors: colorsSchema, + emblems: z.array(borderSchema), +}); diff --git a/generated/wow/guild.ts b/generated/wow/guild.ts new file mode 100644 index 00000000..98a421ba --- /dev/null +++ b/generated/wow/guild.ts @@ -0,0 +1,139 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const childCriterumSchema = z.object({ + amount: z.number(), + id: z.number(), + is_completed: z.boolean(), +}); + +const criteriaSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterumSchema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const responseBaseSchema = z.any(); + +const hrefSchema = z.any(); + +const factionSchema = z.any(); + +const realmSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +const characterSchema = z.any(); + +const colorSchema = z.any(); + +const achievementSchema = z.object({ + achievement: nameIdKeySchema, + completed_timestamp: z.number().optional(), + criteria: criteriaSchema.optional(), + id: z.number(), +}); + +const categoryProgressSchema = z.object({ + category: nameIdKeySchema, + points: z.number(), + quantity: z.number(), +}); + +const guildSchema = nameIdKeySchema.extend({ + faction: factionSchema, + realm: realmSchema, +}); + +const recentEventSchema = z.object({ + achievement: nameIdKeySchema, + timestamp: z.number(), +}); + +const characterAchievementSchema = z.object({ + achievement: nameIdKeySchema, + character: characterSchema, +}); + +const rgbWithIdSchema = z.object({ + id: z.number(), + rgba: colorSchema, +}); + +const borderSchema = z.object({ + color: rgbWithIdSchema, + id: z.number(), + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), +}); + +const playableSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const rosterMemberCharacterSchema = characterSchema.extend({ + level: z.number(), + playable_class: playableSchema, + playable_race: playableSchema, +}); + +export const guildAchievementsResponseSchema = responseBaseSchema.extend({ + achievements: z.array(achievementSchema), + category_progress: z.array(categoryProgressSchema), + guild: guildSchema, + recent_events: z.array(recentEventSchema), + total_points: z.number(), + total_quantity: z.number(), +}); + +const activityElementSchema = z.object({ + activity: z.object({ + type: z.string(), + }), + character_achievement: characterAchievementSchema, + timestamp: z.number(), +}); + +const crestSchema = z.object({ + background: z.object({ + color: rgbWithIdSchema, + }), + border: borderSchema, + emblem: borderSchema, +}); + +const memberSchema = z.object({ + character: rosterMemberCharacterSchema, + rank: z.number(), +}); + +export const guildActivityResponseSchema = responseBaseSchema.extend({ + activities: z.array(activityElementSchema), + guild: guildSchema, +}); + +export const guildResponseSchema = responseBaseSchema.extend({ + achievement_points: z.number(), + achievements: hrefSchema, + activity: hrefSchema, + created_timestamp: z.number(), + crest: crestSchema, + faction: factionSchema, + id: z.number(), + member_count: z.number(), + name: z.string(), + name_search: z.string(), + realm: realmSchema, + roster: hrefSchema, +}); + +export const guildRosterResponseSchema = responseBaseSchema.extend({ + guild: guildSchema, + members: z.array(memberSchema), +}); diff --git a/generated/wow/heirloom.ts b/generated/wow/heirloom.ts new file mode 100644 index 00000000..3085b8cd --- /dev/null +++ b/generated/wow/heirloom.ts @@ -0,0 +1,107 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const attackSpeedClassSchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + +const damageSchema = z.object({ + damage_class: sourceSchema, + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const requirementsLevelSchema = z.object({ + display_string: z.string(), +}); + +const requirementsSchema = z.object({ + level: requirementsLevelSchema, +}); + +const upgradesSchema = z.object({ + display_string: z.string(), + max_value: z.number(), + value: z.number(), +}); + +const weaponSchema = z.object({ + attack_speed: attackSpeedClassSchema, + damage: damageSchema, + dps: attackSpeedClassSchema, +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const colorSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for the heirloom index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const heirloomIndexResponseSchema = responseBaseSchema.extend({ + heirlooms: z.array(nameIdKeySchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const displaySchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + +const statSchema = z.object({ + display: displaySchema, + is_equip_bonus: z.boolean().optional(), + type: sourceSchema, + value: z.number(), +}); + +const upgradeItemSchema = z.object({ + binding: sourceSchema, + bonus_list: z.array(z.number()), + context: z.number(), + inventory_type: sourceSchema, + item: mediaSchema, + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: attackSpeedClassSchema, + media: mediaSchema, + name: z.string(), + quality: sourceSchema, + requirements: requirementsSchema, + stats: z.array(statSchema), + upgrades: upgradesSchema, + weapon: weaponSchema, +}); + +const upgradeSchema = z.object({ + item: upgradeItemSchema, + level: z.number(), +}); + +/** + * The response for a heirloom. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const heirloomResponseSchema = responseBaseSchema.extend({ + id: z.number(), + item: nameIdKeySchema, + media: mediaSchema, + source: sourceSchema, + source_description: z.string(), + upgrades: z.array(upgradeSchema), +}); diff --git a/generated/wow/item.ts b/generated/wow/item.ts new file mode 100644 index 00000000..018dc6a3 --- /dev/null +++ b/generated/wow/item.ts @@ -0,0 +1,335 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const effectSchema = z.object({ + display_string: z.string(), + required_count: z.number(), +}); + +const damageSchema = z.object({ + damage_class: z.object({ + name: z.string(), + type: z.string(), + }), + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const durabilitySchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + +const requirementsSchema = z.object({ + level: durabilitySchema, +}); + +const weaponSchema = z.object({ + attack_speed: durabilitySchema, + damage: damageSchema, + dps: durabilitySchema, +}); + +const recipeItemDisplayStringsSchema = z.object({ + copper: z.string(), + gold: z.string(), + header: z.string(), + silver: z.string(), +}); + +const statTypeSchema = z.union([ + z.literal('Agility'), + z.literal('Critical Strike'), + z.literal('Haste'), + z.literal('Intellect'), + z.literal('Mastery'), + z.literal('Stamina'), + z.literal('Strength'), + z.literal('Versatility'), +]); + +const statTypeCapitalizedSchema = z.union([ + z.literal('AGILITY'), + z.literal('CRIT_RATING'), + z.literal('HASTE_RATING'), + z.literal('INTELLECT'), + z.literal('MASTERY'), + z.literal('STAMINA'), + z.literal('STRENGTH'), + z.literal('VERSATILITY'), +]); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const localesSchema = z.any(); + +const keyBaseSchema = z.any(); + +const colorSchema = z.any(); + +/** + * The response for an item class index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemClassIndexResponseSchema = responseBaseSchema.extend({ + item_classes: z.array(nameIdKeySchema), +}); + +/** + * The response for an item class. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemClassResponseSchema = responseBaseSchema.extend({ + class_id: z.number(), + item_subclasses: z.array(nameIdKeySchema), + name: z.string(), +}); + +/** + * The response for an item media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const inventoryTypeSchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('BACK'), + z.literal('BAG'), + z.literal('CHEST'), + z.literal('FEET'), + z.literal('FINGER'), + z.literal('HANDS'), + z.literal('HEAD'), + z.literal('LEGS'), + z.literal('NECK'), + z.literal('NON_EQUIP'), + z.literal('SHIRT'), + z.literal('SHOULDER'), + z.literal('TABARD'), + z.literal('TRINKET'), + z.literal('TWOHWEAPON'), + z.literal('WAIST'), + z.literal('WRIST'), + ]), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const itemQualitySchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('ARTIFACT'), + z.literal('COMMON'), + z.literal('EPIC'), + z.literal('HEIRLOOM'), + z.literal('LEGENDARY'), + z.literal('POOR'), + z.literal('RARE'), + z.literal('UNCOMMON'), + ]), +}); + +/** + * The parameters for an item search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +/** + * The response for an item search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const itemSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + id: z.number(), + inventory_type: inventoryTypeSchema, + is_equippable: z.boolean(), + is_stackable: z.boolean(), + item_class: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + item_subclass: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + level: z.number(), + max_count: z.number(), + media: z.object({ + id: z.number(), + }), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + purchase_price: z.number(), + purchase_quantity: z.number(), + quality: itemQualitySchema, + required_level: z.number(), + sell_price: z.number(), + }), +}); + +/** + * The response for an item set index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemSetIndexResponseSchema = responseBaseSchema.extend({ + item_sets: z.array(nameIdKeySchema), +}); + +/** + * The response for an item set. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemSetResponseSchema = responseBaseSchema.extend({ + effects: z.array(effectSchema), + id: z.number(), + items: z.array(nameIdKeySchema), + name: z.string(), +}); + +/** + * The response for an item subclass. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemSubClassResponseSchema = responseBaseSchema.extend({ + class_id: z.number(), + display_name: z.string(), + hide_subclass_in_tooltips: z.boolean(), + subclass_id: z.number(), + verbose_name: z.string(), +}); + +const displaySchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + +const armorSchema = z.object({ + display: displaySchema, + value: z.number(), +}); + +const spellSchema = z.object({ + description: z.string(), + spell: nameIdKeySchema, +}); + +const statSchema = z.object({ + display: displaySchema, + is_negated: z.boolean().optional(), + type: z.object({ + name: statTypeSchema, + type: statTypeCapitalizedSchema, + }), + value: z.number(), +}); + +const recipeItemSchema = z.object({ + armor: armorSchema.optional(), + binding: z.object({ + name: z.string(), + type: z.string(), + }), + durability: durabilitySchema, + inventory_type: inventoryTypeSchema, + item: mediaSchema, + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: durabilitySchema, + media: mediaSchema, + name: z.string(), + quality: itemQualitySchema, + requirements: requirementsSchema, + sell_price: z.object({ + display_strings: recipeItemDisplayStringsSchema, + value: z.number(), + }), + stats: z.array(statSchema), + weapon: weaponSchema.optional(), +}); + +const recipeSchema = z.object({ + item: recipeItemSchema, + reagents: z.array( + nameIdKeySchema.and( + z.object({ + quantity: z.number(), + }), + ), + ), + reagents_display_string: z.string(), +}); + +const previewItemSchema = z.object({ + armor: armorSchema.optional(), + binding: z + .object({ + name: z.string(), + type: z.string(), + }) + .optional(), + bonus_list: z.array(z.number()).optional(), + container_slots: durabilitySchema.optional(), + context: z.number().optional(), + crafting_reagent: z.string().optional(), + description: z.string().optional(), + durability: durabilitySchema.optional(), + inventory_type: inventoryTypeSchema, + is_subclass_hidden: z.boolean().optional(), + item: mediaSchema, + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: durabilitySchema.optional(), + media: mediaSchema, + name: z.string(), + quality: itemQualitySchema, + recipe: recipeSchema.optional(), + requirements: requirementsSchema.optional(), + sell_price: z.number().optional(), + shield_block: armorSchema.optional(), + spells: z.array(spellSchema).optional(), + stats: z.array(statSchema).optional(), + unique_equipped: z.literal('Unique').optional(), + weapon: weaponSchema.optional(), +}); + +/** + * The response for an item. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string().optional(), + inventory_type: inventoryTypeSchema, + is_equippable: z.boolean(), + is_stackable: z.boolean(), + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: z.number(), + max_count: z.number(), + media: mediaSchema, + preview_item: previewItemSchema, + purchase_price: z.number(), + purchase_quantity: z.number(), + quality: itemQualitySchema, + required_level: z.number(), + sell_price: z.number(), +}); diff --git a/generated/wow/journal.ts b/generated/wow/journal.ts new file mode 100644 index 00000000..223de54a --- /dev/null +++ b/generated/wow/journal.ts @@ -0,0 +1,254 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); + +const assetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +const encounterCategorySchema = z.union([z.literal('DUNGEON'), z.literal('RAID'), z.literal('WORLD_BOSS')]); + +const modeNameSchema = z.union([ + z.literal('10 Player'), + z.literal('10 Player (Heroic)'), + z.literal('25 Player'), + z.literal('25 Player (Heroic)'), + z.literal('Heroic'), + z.literal('Mythic'), + z.literal('Mythic+ Dungeons'), + z.literal('Normal'), + z.literal('Raid Finder'), +]); + +const modeTypeSchema = z.union([ + z.literal('HEROIC'), + z.literal('LEGACY_10_MAN'), + z.literal('LEGACY_10_MAN_HEROIC'), + z.literal('LEGACY_25_MAN'), + z.literal('LEGACY_25_MAN_HEROIC'), + z.literal('LFR'), + z.literal('MYTHIC'), + z.literal('MYTHIC_KEYSTONE'), + z.literal('NORMAL'), +]); + +const modeSchema = z.object({ + name: modeNameSchema, + type: modeTypeSchema, +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const factionSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const localesSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a journal encounter index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ + encounters: z.array(nameIdKeySchema), +}); + +const categorySchema = z.object({ + type: encounterCategorySchema, +}); + +const itemSchema = z.object({ + id: z.number(), + item: nameIdKeySchema, +}); + +/** + * The parameters for a journal encounter search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const journalEncounterSearchParametersSchema = baseSearchParametersSchema.extend({ + instanceName: z.string(), + locale: localesSchema, +}); + +const journalEncounterSearchCreatureSchema = z.object({ + creature_display: z.object({ + id: z.number(), + }), + id: z.number(), + name: z.record(localesSchema, z.string()), +}); + +const journalEncounterSearchItemSchema = z.object({ + id: z.number(), + item: z.object({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), +}); + +/** + * The response for a journal expansion index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ + tiers: z.array(nameIdKeySchema), +}); + +/** + * The response for a journal expansion. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalExpansionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + dungeons: z.array(nameIdKeySchema), + raids: z.array(nameIdKeySchema), +}); + +/** + * The response for a journal instance index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ + instances: z.array(nameIdKeySchema), +}); + +/** + * The response for journal instance media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalInstanceMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(assetSchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const modeElementSchema = z.object({ + is_tracked: z.boolean(), + mode: modeSchema, + players: z.number(), +}); + +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const journalSubSection4Schema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + +const creatureSchema = nameIdSchema.extend({ + creature_display: creatureDisplaySchema, + description: z.string().optional(), +}); + +/** + * The response for a journal instance. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalInstanceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + area: nameIdSchema, + category: categorySchema, + description: z.string(), + encounters: z.array(nameIdKeySchema), + expansion: nameIdKeySchema, + location: nameIdSchema, + map: nameIdSchema, + media: mediaSchema, + minimum_level: z.number(), + modes: z.array(modeElementSchema), + order_index: z.number(), +}); + +const journalSubSection3Schema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSection4Schema).optional(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + +const journalSubSection2Schema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSection3Schema).optional(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + +const journalSubSectionSchema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSection2Schema).optional(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + +const journalSectionSchema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSectionSchema).optional(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + +/** + * The response for a journal encounter search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + category: categorySchema, + creatures: z.array(journalEncounterSearchCreatureSchema), + id: z.number(), + instance: z.object({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), + items: z.array(journalEncounterSearchItemSchema), + modes: z + .array( + z.object({ + name: z.record(localesSchema, z.string()), + type: encounterModeSchema, + }), + ) + .optional(), + name: z.record(localesSchema, z.string()), + sections: z.array(journalSectionSchema), + }), +}); + +/** + * The response for a journal encounter. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalEncounterResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + category: categorySchema, + creatures: z.array(creatureSchema), + description: z.string(), + faction: factionSchema.optional(), + instance: nameIdKeySchema, + items: z.array(itemSchema), + modes: z.array(modeSchema).optional(), + sections: z.array(journalSectionSchema), +}); diff --git a/generated/wow/media-search.ts b/generated/wow/media-search.ts new file mode 100644 index 00000000..fc6128f5 --- /dev/null +++ b/generated/wow/media-search.ts @@ -0,0 +1,33 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const mediaAssetSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), +}); + +const baseSearchParametersSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The search parameters for media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ + tags: z.string().optional(), +}); + +/** + * The response for a media search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + assets: z.array(mediaAssetSchema), + id: z.number(), + }), +}); diff --git a/generated/wow/modified-crafting.ts b/generated/wow/modified-crafting.ts new file mode 100644 index 00000000..792f0763 --- /dev/null +++ b/generated/wow/modified-crafting.ts @@ -0,0 +1,60 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a modified crafting category index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const modifiedCraftingCategoryIndexResponseSchema = responseBaseSchema.extend({ + categories: z.array(nameIdKeySchema), +}); + +/** + * The response for a modified crafting category. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const modifiedCraftingCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); + +/** + * The response for a modified crafting index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const modifiedCraftingIndexResponseSchema = responseBaseSchema.extend({ + categories: z.object({ + href: z.string(), + }), + slot_types: z.object({ + href: z.string(), + }), +}); + +const slotTypeSchema = keyBaseSchema.extend({ + id: z.number(), + name: z.string().optional(), +}); + +/** + * The response for a modified crafting reagent slot type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const modifiedCraftingReagentSlotTypeResponseSchema = responseBaseSchema.extend({ + compatible_categories: z.array(nameIdKeySchema), + description: z.string(), + id: z.number(), +}); + +/** + * The response for a modified crafting reagent slot type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const modifiedCraftingReagentSlotTypeIndexResponseSchema = responseBaseSchema.extend({ + slot_types: z.array(slotTypeSchema), +}); diff --git a/generated/wow/mount.ts b/generated/wow/mount.ts new file mode 100644 index 00000000..c82fb704 --- /dev/null +++ b/generated/wow/mount.ts @@ -0,0 +1,81 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const localesSchema = z.any(); + +const keyBaseSchema = z.any(); + +const factionsSchema = z.any(); + +/** + * The response for a mount index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mountIndexResponseSchema = responseBaseSchema.extend({ + mounts: z.array(nameIdKeySchema), +}); + +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The search parameters for mounts. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +/** + * The response for a mount search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const mountSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + creature_displays: z.array( + z.object({ + id: z.number(), + }), + ), + faction: z + .object({ + name: z.record(localesSchema, z.string()), + type: factionsSchema, + }) + .optional(), + id: z.number(), + name: z.record(localesSchema, z.string()), + source: z.object({ + name: z.record(localesSchema, z.string()), + type: z.string(), + }), + }), +}); + +/** + * The response for a mount. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mountResponseSchema = responseBaseSchema.extend({ + creature_displays: z.array(creatureDisplaySchema), + description: z.string(), + id: z.number(), + name: z.string(), + should_exclude_if_uncollected: z.boolean(), + source: sourceSchema, +}); diff --git a/generated/wow/mythic-keystone-affix.ts b/generated/wow/mythic-keystone-affix.ts new file mode 100644 index 00000000..6660a855 --- /dev/null +++ b/generated/wow/mythic-keystone-affix.ts @@ -0,0 +1,42 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a Mythic Keystone affix index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneAffixIndexResponseSchema = responseBaseSchema.extend({ + affixes: z.array(nameIdKeySchema), +}); + +/** + * The response for a Mythic Keystone affix media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneAffixMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a Mythic Keystone affix. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneAffixResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string(), + media: mediaSchema, +}); diff --git a/generated/wow/mythic-keystone-dungeon.ts b/generated/wow/mythic-keystone-dungeon.ts new file mode 100644 index 00000000..e1befaa7 --- /dev/null +++ b/generated/wow/mythic-keystone-dungeon.ts @@ -0,0 +1,96 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const keystoneUpgradeSchema = z.object({ + qualifying_duration: z.number(), + upgrade_level: z.number(), +}); + +const zoneSchema = z.object({ + slug: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a Mythic Keystone dungeon index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneDungeonIndexResponseSchema = responseBaseSchema.extend({ + dungeons: z.array(nameIdKeySchema), +}); + +/** + * The response for a Mythic Keystone dungeon. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneDungeonResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + dungeon: nameIdKeySchema, + is_tracked: z.boolean(), + keystone_upgrades: z.array(keystoneUpgradeSchema), + map: nameIdSchema, + zone: zoneSchema, +}); + +/** + * The response for a Mythic Keystone index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneIndexResponseSchema = responseBaseSchema.extend({ + dungeons: z.object({ + href: z.string(), + }), + seasons: z.object({ + href: z.string(), + }), +}); + +const periodSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a Mythic Keystone period. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystonePeriodResponseSchema = responseBaseSchema.extend({ + end_timestamp: z.number(), + id: z.number(), + start_timestamp: z.number(), +}); + +/** + * The response for a Mythic Keystone season index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneSeasonIndexResponseSchema = responseBaseSchema.extend({ + current_season: periodSchema, + seasons: z.array(periodSchema), +}); + +/** + * The response for a Mythic Keystone season. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneSeasonResponseSchema = responseBaseSchema.extend({ + end_timestamp: z.number(), + id: z.number(), + periods: z.array(periodSchema), + season_name: z.string().nullable(), + start_timestamp: z.number(), +}); + +/** + * The response for a Mythic Keystone period index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystonePeriodIndexResponseSchema = responseBaseSchema.extend({ + current_period: periodSchema, + periods: z.array(periodSchema), +}); diff --git a/generated/wow/mythic-keystone-leaderboard.ts b/generated/wow/mythic-keystone-leaderboard.ts new file mode 100644 index 00000000..9b17d322 --- /dev/null +++ b/generated/wow/mythic-keystone-leaderboard.ts @@ -0,0 +1,80 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const factionsSchema = z.any(); + +const colorSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a Mythic Keystone leaderboard index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneLeaderboardIndexResponseSchema = responseBaseSchema.extend({ + current_leaderboards: z.array(nameIdKeySchema), +}); + +const keystoneAffixElementSchema = z.object({ + keystone_affix: nameIdKeySchema, + starting_level: z.number(), +}); + +const mythicRatingSchema = z.object({ + color: colorSchema, + rating: z.number(), +}); + +const specializationSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const realmSchema = keyBaseSchema.extend({ + id: z.number(), + slug: z.string(), +}); + +const profileSchema = nameIdSchema.extend({ + realm: realmSchema, +}); + +const memberSchema = z.object({ + faction: z.object({ + type: factionsSchema, + }), + profile: profileSchema, + specialization: specializationSchema, +}); + +const leadingGroupSchema = z.object({ + completed_timestamp: z.number(), + duration: z.number(), + keystone_level: z.number(), + members: z.array(memberSchema), + mythic_rating: mythicRatingSchema, + ranking: z.number(), +}); + +/** + * The response for a Mythic Keystone leaderboard. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneLeaderboardResponseSchema = responseBaseSchema.extend({ + connected_realm: z.object({ + href: z.string(), + }), + keystone_affixes: z.array(keystoneAffixElementSchema), + leading_groups: z.array(leadingGroupSchema), + map: nameIdSchema, + map_challenge_mode_id: z.number(), + name: z.string(), + period: z.number(), + period_end_timestamp: z.number(), + period_start_timestamp: z.number(), +}); diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/wow/mythic-raid-leaderboard.ts new file mode 100644 index 00000000..690cb87d --- /dev/null +++ b/generated/wow/mythic-raid-leaderboard.ts @@ -0,0 +1,48 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const realmSchema = z.object({ + id: z.number(), + name: z.null(), + slug: z.string(), +}); + +const responseBaseSchema = z.any(); + +const factionsSchema = z.any(); + +const originsSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +const journalInstanceSchema = keyBaseSchema.extend({ + id: z.number(), + name: z.null(), +}); + +const guildSchema = nameIdSchema.extend({ + realm: realmSchema, +}); + +const entrySchema = z.object({ + faction: z.object({ + type: factionsSchema, + }), + guild: guildSchema, + rank: z.number(), + region: z.union([z.literal('cn'), originsSchema]), + timestamp: z.number(), +}); + +/** + * The response for a Mythic Raid leaderboard. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicRaidLeaderboardResponseSchema = responseBaseSchema.extend({ + criteria_type: z.string(), + entries: z.array(entrySchema), + journal_instance: journalInstanceSchema, + slug: z.string(), +}); diff --git a/generated/wow/pet.ts b/generated/wow/pet.ts new file mode 100644 index 00000000..301f650c --- /dev/null +++ b/generated/wow/pet.ts @@ -0,0 +1,96 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a pet ability index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petAbilityIndexResponseSchema = responseBaseSchema.extend({ + abilities: z.array(nameIdKeySchema), +}); + +/** + * The response for a pet ability media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petAbilityMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const battlePetTypeSchema = nameIdSchema.extend({ + type: z.string(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a pet index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petIndexResponseSchema = responseBaseSchema.extend({ + pets: z.array(nameIdKeySchema), +}); + +/** + * The response for a pet search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const abilitySchema = z.object({ + ability: nameIdKeySchema, + required_level: z.number(), + slot: z.number(), +}); + +/** + * The response for a pet ability. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petAbilityResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + battle_pet_type: battlePetTypeSchema, + media: mediaSchema, + rounds: z.number(), +}); + +/** + * The response for a pet. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const petResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + abilities: z.array(abilitySchema), + battle_pet_type: battlePetTypeSchema, + creature: nameIdKeySchema, + description: z.string(), + icon: z.string(), + is_alliance_only: z.boolean(), + is_battlepet: z.boolean(), + is_capturable: z.boolean(), + is_horde_only: z.boolean(), + is_random_creature_display: z.boolean(), + is_tradable: z.boolean(), + media: mediaSchema, + should_exclude_if_uncollected: z.boolean(), + source: sourceSchema, +}); diff --git a/generated/wow/playable-class.ts b/generated/wow/playable-class.ts new file mode 100644 index 00000000..0a301ae3 --- /dev/null +++ b/generated/wow/playable-class.ts @@ -0,0 +1,63 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const talentSlotSchema = z.object({ + slot_number: z.number(), + unlock_player_level: z.number(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const genderNameSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a playable class index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableClassIndexResponseSchema = responseBaseSchema.extend({ + classes: z.array(nameIdKeySchema), +}); + +/** + * The response for playable class media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableClassMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a playable class's PvP talent slots. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTalentSlotsResponseSchema = responseBaseSchema.extend({ + talent_slots: z.array(talentSlotSchema), +}); + +/** + * The response for a playable class. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + gender_name: genderNameSchema, + media: mediaSchema, + playable_races: z.array(nameIdKeySchema), + power_type: nameIdKeySchema, + pvp_talent_slots: z.object({ + href: z.string(), + }), + specializations: z.array(nameIdKeySchema), +}); diff --git a/generated/wow/playable-race.ts b/generated/wow/playable-race.ts new file mode 100644 index 00000000..e13ac914 --- /dev/null +++ b/generated/wow/playable-race.ts @@ -0,0 +1,32 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const factionSchema = z.any(); + +const genderNameSchema = z.any(); + +/** + * The playable race index response. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableRaceIndexResponseSchema = responseBaseSchema.extend({ + races: z.array(nameIdKeySchema), +}); + +/** + * The playable race response. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableRaceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + faction: factionSchema, + gender_name: genderNameSchema, + is_allied_race: z.boolean(), + is_selectable: z.boolean(), + playable_classes: z.array(nameIdKeySchema), +}); diff --git a/generated/wow/playable-specialization.ts b/generated/wow/playable-specialization.ts new file mode 100644 index 00000000..4e238dd5 --- /dev/null +++ b/generated/wow/playable-specialization.ts @@ -0,0 +1,73 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const primaryStatTypeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const spellTooltipSchema = z.object({ + cast_time: z.string(), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional(), + range: z.string().optional(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const genderNameSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a playable specialization index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableSpecializationIndexResponseSchema = responseBaseSchema.extend({ + character_specializations: z.array(nameIdKeySchema), + pet_specializations: z.array(nameIdKeySchema), +}); + +/** + * The response for a playable specialization media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableSpecializationMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const pvpTalentSchema = z.object({ + spell_tooltip: spellTooltipSchema, + talent: nameIdKeySchema, +}); + +const specTalentTreeSchema = keyBaseSchema.extend({ + name: z.string(), +}); + +/** + * The response for a playable specialization. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const playableSpecializationResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + gender_description: genderNameSchema, + media: mediaSchema, + playable_class: nameIdKeySchema, + power_type: nameIdKeySchema, + primary_stat_type: primaryStatTypeSchema, + pvp_talents: z.array(pvpTalentSchema), + role: primaryStatTypeSchema, + spec_talent_tree: specTalentTreeSchema, +}); diff --git a/generated/wow/power-type.ts b/generated/wow/power-type.ts new file mode 100644 index 00000000..f1638bf7 --- /dev/null +++ b/generated/wow/power-type.ts @@ -0,0 +1,22 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +/** + * The response for a power type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const powerTypeIndexResponseSchema = responseBaseSchema.extend({ + power_types: z.array(nameIdKeySchema), +}); + +/** + * The response for a power type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const powerTypeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); diff --git a/generated/wow/profession.ts b/generated/wow/profession.ts new file mode 100644 index 00000000..f9c01fc2 --- /dev/null +++ b/generated/wow/profession.ts @@ -0,0 +1,93 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const typeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const craftedQuantitySchema = z.object({ + value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a profession index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const professionIndexResponseSchema = responseBaseSchema.extend({ + professions: z.array(nameIdKeySchema), +}); + +/** + * The response for a profession media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const professionMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const categorySchema = z.object({ + name: z.string(), + recipes: z.array(nameIdKeySchema), +}); + +/** + * The response for a recipe media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const recipeMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const reagentSchema = z.object({ + quantity: z.number(), + reagent: nameIdKeySchema, +}); + +/** + * The response for a profession. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const professionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string(), + media: mediaSchema, + skill_tiers: z.array(nameIdKeySchema), + type: typeSchema, +}); + +/** + * The response for a profession skill tier. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const professionSkillTierResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + categories: z.array(categorySchema), + maximum_skill_level: z.number(), + minimum_skill_level: z.number(), +}); + +/** + * The response for a recipe. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const recipeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + crafted_item: nameIdKeySchema, + crafted_quantity: craftedQuantitySchema, + media: mediaSchema, + reagents: z.array(reagentSchema), +}); diff --git a/generated/wow/pvp-season.ts b/generated/wow/pvp-season.ts new file mode 100644 index 00000000..963162c1 --- /dev/null +++ b/generated/wow/pvp-season.ts @@ -0,0 +1,111 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const bracketSchema = z.object({ + id: z.number(), + type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('SHUFFLE')]), +}); + +const seasonMatchStatisticsSchema = z.object({ + lost: z.number(), + played: z.number(), + won: z.number(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const factionsSchema = z.any(); + +const keyBaseSchema = z.any(); + +const factionSchema = z.any(); + +const seasonSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const rewardSchema = z.object({ + achievement: nameIdKeySchema, + bracket: bracketSchema, + faction: factionSchema.optional(), + rating_cutoff: z.number(), + specialization: nameIdKeySchema.optional(), +}); + +/** + * The response for a PvP season index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpSeasonIndexResponseSchema = responseBaseSchema.extend({ + current_season: seasonSchema, + seasons: z.array(seasonSchema), +}); + +/** + * The response for a PvP season. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpSeasonResponseSchema = responseBaseSchema.extend({ + id: z.number(), + leaderboards: z.object({ + href: z.string(), + }), + rewards: z.object({ + href: z.string(), + }), + season_name: z.string().optional(), + season_start_timestamp: z.number(), +}); + +const realmSchema = keyBaseSchema.extend({ + id: z.number(), + slug: z.string(), +}); + +const characterSchema = nameIdSchema.extend({ + realm: realmSchema, +}); + +/** + * The response for a PvP leaderboard index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpLeaderboardIndexResponseSchema = responseBaseSchema.extend({ + leaderboards: z.array(nameIdKeySchema), + season: seasonSchema, +}); + +const entrySchema = z.object({ + character: characterSchema, + faction: z.object({ + type: factionsSchema, + }), + rank: z.number(), + rating: z.number(), + season_match_statistics: seasonMatchStatisticsSchema, + tier: seasonSchema, +}); + +/** + * The response for PvP rewards index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpRewardsIndexResponseSchema = responseBaseSchema.extend({ + rewards: z.array(rewardSchema), + season: seasonSchema, +}); + +/** + * The response for a PvP leaderboard. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpLeaderboardResponseSchema = responseBaseSchema.extend({ + bracket: bracketSchema, + entries: z.array(entrySchema), + name: z.string(), + season: seasonSchema, +}); diff --git a/generated/wow/pvp-tier.ts b/generated/wow/pvp-tier.ts new file mode 100644 index 00000000..b9a33397 --- /dev/null +++ b/generated/wow/pvp-tier.ts @@ -0,0 +1,50 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const bracketSchema = z.object({ + id: z.number(), + type: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a PvP tier index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTierIndexResponseSchema = responseBaseSchema.extend({ + tiers: z.array(nameIdKeySchema), +}); + +/** + * The response for a PvP tier media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTierMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a PvP tier. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTierResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + bracket: bracketSchema, + max_rating: z.number(), + media: mediaSchema, + min_rating: z.number(), + rating_type: z.number(), +}); diff --git a/generated/wow/quest.ts b/generated/wow/quest.ts new file mode 100644 index 00000000..0770beee --- /dev/null +++ b/generated/wow/quest.ts @@ -0,0 +1,119 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const unitsSchema = z.object({ + copper: z.number(), + gold: z.number(), + silver: z.number(), +}); + +const moneySchema = z.object({ + units: unitsSchema, + value: z.number(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const factionSchema = z.any(); + +/** + * The response for a quest area index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questAreaIndexResponseSchema = responseBaseSchema.extend({ + areas: z.array(nameIdKeySchema), +}); + +/** + * The response for a quest area. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questAreaResponseSchema = responseBaseSchema.extend({ + area: z.string(), + id: z.number(), + quests: z.array(nameIdKeySchema), +}); + +/** + * The response for a quest category index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questCategoryIndexResponseSchema = responseBaseSchema.extend({ + categories: z.array(nameIdKeySchema), +}); + +/** + * The response for a quest category. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questCategoryResponseSchema = responseBaseSchema.extend({ + category: z.string(), + id: z.number(), + quests: z.array(nameIdKeySchema), +}); + +/** + * The response for a quest index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questIndexResponseSchema = responseBaseSchema.extend({ + areas: z.object({ + href: z.string(), + }), + categories: z.object({ + href: z.string(), + }), + types: z.object({ + href: z.string(), + }), +}); + +const requirementsSchema = z.object({ + faction: factionSchema, + max_character_level: z.number(), + min_character_level: z.number(), +}); + +/** + * The response for a quest type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questTypeIndexResponseSchema = responseBaseSchema.extend({ + types: z.array(nameIdKeySchema), +}); + +/** + * The response for a quest type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questTypeResponseSchema = responseBaseSchema.extend({ + id: z.number(), + quests: z.array(nameIdKeySchema), + type: z.string(), +}); + +const reputationSchema = z.object({ + reward: nameIdKeySchema, + value: z.number(), +}); + +const rewardsSchema = z.object({ + experience: z.number(), + money: moneySchema, + reputations: z.array(reputationSchema), +}); + +/** + * The response for a quest. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const questResponseSchema = responseBaseSchema.extend({ + area: nameIdKeySchema, + description: z.string(), + id: z.number(), + requirements: requirementsSchema, + rewards: rewardsSchema, + title: z.string(), +}); diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts new file mode 100644 index 00000000..501495ce --- /dev/null +++ b/generated/wow/realm.ts @@ -0,0 +1,137 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +/** + * The category of a realm. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const realmCategorySchema = z.union([ + z.literal('Brazil'), + z.literal('English'), + z.literal('French'), + z.literal('German'), + z.literal('Italian'), + z.literal('Latin America'), + z.literal('Oceanic'), + z.literal('PS'), + z.literal('Russian'), + z.literal('Spanish'), + z.literal('United States'), + z.literal('\uD55C\uAD6D'), +]); + +export const realmLocalesSchema = z.union([ + z.literal('deDE'), + z.literal('enGB'), + z.literal('enUS'), + z.literal('esES'), + z.literal('esMX'), + z.literal('frFR'), + z.literal('itIT'), + z.literal('koKR'), + z.literal('ptBR'), + z.literal('ptPT'), + z.literal('ruRU'), + z.literal('zhCN'), + z.literal('zhTW'), +]); + +/** + * The timezone of a realm. + */ +export const realmTimezoneSchema = z.union([ + z.literal('America/Chicago'), + z.literal('America/Denver'), + z.literal('America/Los_Angeles'), + z.literal('America/New_York'), + z.literal('America/Sao_Paulo'), + z.literal('Asia/Seoul'), + z.literal('Australia/Melbourne'), + z.literal('Europe/Paris'), +]); + +/** + * The type of a realm, not capitalized or shortened. + */ +export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplaying')]); + +/** + * The type of a realm, capitalized and shortended). + */ +export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); + +const responseBaseSchema = z.any(); + +const realmSchema = z.any(); + +const nameIdSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const keyBaseSchema = z.any(); + +const localesSchema = z.any(); + +/** + * The response for a realm index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const realmIndexResponseSchema = responseBaseSchema.extend({ + realms: z.array(realmSchema), +}); + +/** + * The response for a realm. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + category: realmCategorySchema, + connected_realm: z.object({ + href: z.string(), + }), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + region: nameIdKeySchema, + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), +}); + +/** + * The search parameters for realms. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ + timezone: realmTimezoneSchema.optional(), +}); + +/** + * The response for a realm search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const realmSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + region: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: realmTypeCapitalizedSchema, + }), + }), +}); diff --git a/generated/wow/region.ts b/generated/wow/region.ts new file mode 100644 index 00000000..050db847 --- /dev/null +++ b/generated/wow/region.ts @@ -0,0 +1,27 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdSchema = z.any(); + +/** + * The response for a region index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const regionIndexResponseSchema = responseBaseSchema.extend({ + regions: z.array( + z.object({ + href: z.string(), + }), + ), +}); + +/** + * The response for a region. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const regionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + patch_string: z.string(), + tag: z.string(), +}); diff --git a/generated/wow/reputations.ts b/generated/wow/reputations.ts new file mode 100644 index 00000000..61bf3895 --- /dev/null +++ b/generated/wow/reputations.ts @@ -0,0 +1,62 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const tierSchema = z.object({ + id: z.number(), + max_value: z.number(), + min_value: z.number(), + name: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a reputation faction index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const reputationFactionIndexResponseSchema = responseBaseSchema.extend({ + factions: z.array(nameIdKeySchema), + root_factions: z.array(nameIdKeySchema), +}); + +const reputationTiersSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const reputationTierSchema = keyBaseSchema.extend({ + id: z.number(), + name: z.string().optional(), +}); + +/** + * The response for a reputation tier. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const reputationTiersResponseSchema = responseBaseSchema.extend({ + faction: nameIdKeySchema.optional(), + id: z.number(), + tiers: z.array(tierSchema), +}); + +/** + * The response for a reputation faction. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const reputationFactionResponseSchema = responseBaseSchema.extend({ + description: z.string(), + id: z.number(), + name: z.string(), + reputation_tiers: reputationTiersSchema, +}); + +/** + * The response for a reputation tier index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const reputationTiersIndexResponseSchema = responseBaseSchema.extend({ + reputation_tiers: z.array(reputationTierSchema), +}); diff --git a/generated/wow/spell.ts b/generated/wow/spell.ts new file mode 100644 index 00000000..cc6c6fb3 --- /dev/null +++ b/generated/wow/spell.ts @@ -0,0 +1,61 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const baseSearchParametersSchema = z.any(); + +const localesSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a spell media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const spellMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The search parameters for spells. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +/** + * The response for a spell search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const spellSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + id: z.number(), + media: z.object({ + id: z.number(), + }), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), +}); + +/** + * The response for a spell. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const spellResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string().nullable(), + media: mediaSchema, +}); diff --git a/generated/wow/talent.ts b/generated/wow/talent.ts new file mode 100644 index 00000000..fd78dd28 --- /dev/null +++ b/generated/wow/talent.ts @@ -0,0 +1,190 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const rankDescriptionSchema = z.object({ + description: z.null(), + rank: z.number(), +}); + +const restrictionLineSchema = z.object({ + is_for_class: z.boolean(), + required_points: z.number(), + restricted_row: z.number(), +}); + +const nodeTypeSchema = z.object({ + id: z.number(), + type: z.union([z.literal('ACTIVE'), z.literal('CHOICE'), z.literal('PASSIVE')]), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a pvp talent index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTalentIndexResponseSchema = responseBaseSchema.extend({ + pvp_talents: z.array(nameIdKeySchema), +}); + +/** + * The response for a pvp talent. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTalentResponseSchema = responseBaseSchema.extend({ + compatible_slots: z.array(z.number()), + description: z.string(), + id: z.number(), + playable_specialization: nameIdKeySchema, + spell: nameIdKeySchema, + unlock_player_level: z.number(), +}); + +/** + * The response for a talent index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const talentIndexResponseSchema = responseBaseSchema.extend({ + talents: z.array(nameIdKeySchema), +}); + +const playableClassSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const talentTreeSchema = keyBaseSchema.extend({ + name: z.string(), +}); + +const specTalentTreeSchema = keyBaseSchema.extend({ + name: z.string(), +}); + +const purpleSpellTooltipSchema = z.object({ + cast_time: z.string(), + description: z.string(), + spell: nameIdKeySchema, +}); + +const choiceOfTooltipSchema = z.object({ + spell_tooltip: purpleSpellTooltipSchema, + talent: nameIdKeySchema, +}); + +const tooltipSpellTooltipSchema = z.object({ + cast_time: z.string(), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional(), + range: z.string().optional(), + spell: nameIdKeySchema, +}); + +/** + * The response for a talent. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const talentResponseSchema = responseBaseSchema.extend({ + id: z.number(), + playable_class: playableClassSchema, + rank_descriptions: z.array(rankDescriptionSchema), + spell: nameIdKeySchema, +}); + +/** + * The response for a talent tree index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const talentTreeIndexResponseSchema = responseBaseSchema.extend({ + class_talent_trees: z.array(talentTreeSchema), + spec_talent_trees: z.array(talentTreeSchema), +}); + +const tooltipSchema = z.object({ + spell_tooltip: tooltipSpellTooltipSchema, + talent: nameIdKeySchema, +}); + +const rankSchema = z.object({ + choice_of_tooltips: z.array(tooltipSchema).optional(), + rank: z.number(), + tooltip: tooltipSchema.optional(), +}); + +const specTalentNodeRankSchema = z.object({ + choice_of_tooltips: z.array(choiceOfTooltipSchema).optional(), + rank: z.number(), + tooltip: tooltipSchema.optional(), +}); + +const talentNodeSchema = z.object({ + display_col: z.number(), + display_row: z.number(), + id: z.number(), + node_type: nodeTypeSchema, + ranks: z.array(rankSchema), + raw_position_x: z.number(), + raw_position_y: z.number(), +}); + +/** + * The response for a talent tree nodes. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const talentTreeNodesResponseSchema = responseBaseSchema.extend({ + id: z.number(), + spec_talent_trees: z.array(specTalentTreeSchema), + talent_nodes: z.array(talentNodeSchema), +}); + +const specTalentNodeSchema = z.object({ + display_col: z.number(), + display_row: z.number(), + id: z.number(), + locked_by: z.array(z.number()).optional(), + node_type: nodeTypeSchema, + ranks: z.array(specTalentNodeRankSchema), + raw_position_x: z.number(), + raw_position_y: z.number(), + unlocks: z.array(z.number()).optional(), +}); + +const classTalentNodeRankSchema = z.object({ + choice_of_tooltips: z.array(tooltipSchema).optional(), + default_points: z.number().optional(), + rank: z.number(), + tooltip: tooltipSchema.optional(), +}); + +const classTalentNodeSchema = z.object({ + display_col: z.number(), + display_row: z.number(), + id: z.number(), + locked_by: z.array(z.number()).optional(), + node_type: nodeTypeSchema, + ranks: z.array(classTalentNodeRankSchema), + raw_position_x: z.number(), + raw_position_y: z.number(), + unlocks: z.array(z.number()).optional(), +}); + +/** + * The response for a talent tree. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const talentTreeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + class_talent_nodes: z.array(classTalentNodeSchema), + media: z.object({ + href: z.string(), + }), + playable_class: nameIdKeySchema, + playable_specialization: nameIdKeySchema, + restriction_lines: z.array(restrictionLineSchema), + spec_talent_nodes: z.array(specTalentNodeSchema), +}); diff --git a/generated/wow/tech-talent.ts b/generated/wow/tech-talent.ts new file mode 100644 index 00000000..3944480e --- /dev/null +++ b/generated/wow/tech-talent.ts @@ -0,0 +1,67 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const mediaAssetSchema = z.any(); + +const nameIdSchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a tech talent index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const techTalentIndexResponseSchema = responseBaseSchema.extend({ + talents: z.array(nameIdKeySchema), +}); + +/** + * The response for a tech talent media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const techTalentMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const talentTreeSchema = keyBaseSchema.extend({ + id: z.number(), + name: z.string().optional(), +}); + +/** + * The response for a tech talent tree. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const techTalentTreeResponseSchema = responseBaseSchema.extend({ + id: z.number(), + max_tiers: z.number(), + playable_class: nameIdKeySchema, + talents: z.array(nameIdKeySchema), +}); + +/** + * The response for a tech talent. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const techTalentResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + display_order: z.number(), + media: mediaSchema, + talent_tree: mediaSchema, + tier: z.number(), +}); + +/** + * The response for a tech talent tree index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const techTalentTreeIndexResponseSchema = responseBaseSchema.extend({ + talent_trees: z.array(talentTreeSchema), +}); diff --git a/generated/wow/title.ts b/generated/wow/title.ts new file mode 100644 index 00000000..d5c0ef84 --- /dev/null +++ b/generated/wow/title.ts @@ -0,0 +1,26 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const nameIdSchema = z.any(); + +const genderNameSchema = z.any(); + +/** + * The response for a title index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const titleIndexResponseSchema = responseBaseSchema.extend({ + titles: z.array(nameIdKeySchema), +}); + +/** + * The response for a title. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const titleResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + gender_name: genderNameSchema, +}); diff --git a/generated/wow/toy.ts b/generated/wow/toy.ts new file mode 100644 index 00000000..a064af11 --- /dev/null +++ b/generated/wow/toy.ts @@ -0,0 +1,37 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const responseBaseSchema = z.any(); + +const nameIdKeySchema = z.any(); + +const keyBaseSchema = z.any(); + +/** + * The response for a toy index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const toyIndexResponseSchema = responseBaseSchema.extend({ + toys: z.array(nameIdKeySchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +/** + * The response for a toy. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const toyResponseSchema = responseBaseSchema.extend({ + id: z.number(), + item: nameIdKeySchema, + media: mediaSchema, + source: sourceSchema, + source_description: z.string(), +}); diff --git a/generated/wow/wow-token.ts b/generated/wow/wow-token.ts new file mode 100644 index 00000000..ea4486a7 --- /dev/null +++ b/generated/wow/wow-token.ts @@ -0,0 +1,13 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +const responseBaseSchema = z.any(); + +/** + * The response for a WoW token. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const wowTokenResponseSchema = responseBaseSchema.extend({ + last_updated_timestamp: z.number(), + price: z.number(), +}); diff --git a/package.json b/package.json index eebee5b3..ab30c117 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,8 @@ "lint-staged": "16.2.7", "npm-run-all2": "8.0.4", "prettier": "3.7.1", + "ts-to-zod": "5.1.0", + "tsx": "4.20.6", "tsdown": "0.16.8", "turbo": "2.6.1", "typedoc": "0.28.14", @@ -69,7 +71,8 @@ "test:coverage": "pnpm run test --coverage", "test:ui": "vitest --ui --coverage", "test:watch": "vitest watch", - "typecheck": "tsc" + "typecheck": "tsc", + "generate:zod:classic:ts": "tsx ./scripts/generate-zod.ts" }, "lint-staged": { "*.{ts,tsx,js,jsx,mjs,md,mdx,yaml,yml,json}": [ diff --git a/packages/d3/src/profile/profile.ts b/packages/d3/src/profile/profile.ts index b2fe83f4..38aae17e 100644 --- a/packages/d3/src/profile/profile.ts +++ b/packages/d3/src/profile/profile.ts @@ -9,7 +9,7 @@ import type { AccountHeroFollowerItemsResponse, AccountHeroResponse, AccountResp */ export function account(battleTag: string): Resource { return { - path: `${profileBase}/${battleTag}`, + path: `${profileBase}/${encodeURIComponent(battleTag)}`, }; } @@ -21,7 +21,7 @@ export function account(battleTag: string): Resource { */ export function accountHero(battleTag: string, heroId: number): Resource { return { - path: `${profileBase}/${battleTag}/hero/${heroId}`, + path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}`, }; } @@ -36,7 +36,7 @@ export function accountHeroFollowerItems( heroId: number, ): Resource { return { - path: `${profileBase}/${battleTag}/hero/${heroId}/follower-items`, + path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}/follower-items`, }; } @@ -48,6 +48,6 @@ export function accountHeroFollowerItems( */ export function accountHeroItems(battleTag: string, heroId: number): Resource { return { - path: `${profileBase}/${battleTag}/hero/${heroId}/items`, + path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}/items`, }; } diff --git a/packages/d3/src/profile/types.ts b/packages/d3/src/profile/types.ts index 0acddb3d..9bb2c940 100644 --- a/packages/d3/src/profile/types.ts +++ b/packages/d3/src/profile/types.ts @@ -230,7 +230,7 @@ interface HeroProgression { interface Item { displayColor?: DisplayColor; - dyeColor?: Item; + dyeColor?: Dye; icon: string; id: string; name: string; diff --git a/packages/sc2/src/legacy/types.ts b/packages/sc2/src/legacy/types.ts index b4146594..7fbd0f66 100644 --- a/packages/sc2/src/legacy/types.ts +++ b/packages/sc2/src/legacy/types.ts @@ -82,7 +82,13 @@ interface Career { interface Category { categoryId: string; - children?: Array; + children?: Array; + featuredAchievementId: string; + title: string; +} + +interface CategoryChild { + categoryId: string; featuredAchievementId: string; title: string; } diff --git a/packages/wow/src/base.ts b/packages/wow/src/base.ts index f6229405..7f4509b1 100644 --- a/packages/wow/src/base.ts +++ b/packages/wow/src/base.ts @@ -91,34 +91,31 @@ export const Genders = { } as const; /** - * The gender associated with a character or entity in World of Warcraft. + * The standard structure to represent a World of Warcraft Character. */ -export interface Gender { - name: Capitalize>; - type: keyof typeof Genders; +export interface Character extends NameIdKey { + realm: Realm; } /** - * The playable factions in World of Warcraft. + * The faction associated with a character or entity in World of Warcraft. */ -export const Factions = { - ALLIANCE: 'ALLIANCE', - HORDE: 'HORDE', -} as const; +export interface Faction { + name: Capitalize>; + type: Factions; +} /** - * The standard structure to represent a World of Warcraft Character. + * The playable factions in World of Warcraft. */ -export interface Character extends NameIdKey { - realm: Realm; -} +export type Factions = 'ALLIANCE' | 'HORDE'; /** - * The faction associated with a character or entity in World of Warcraft. + * The gender associated with a character or entity in World of Warcraft. */ -export interface Faction { - name: Capitalize>; - type: keyof typeof Factions; +export interface Gender { + name: Capitalize>; + type: keyof typeof Genders; } /** diff --git a/packages/wow/src/character-achievements/types.ts b/packages/wow/src/character-achievements/types.ts index 6beac988..d0320660 100644 --- a/packages/wow/src/character-achievements/types.ts +++ b/packages/wow/src/character-achievements/types.ts @@ -35,9 +35,29 @@ interface CategoryProgress { quantity: number; } +interface ChildCriterum { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + +interface ChildCriterum2 { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + +interface ChildCriterum3 { + amount?: number; + id: number; + is_completed: boolean; +} + interface Criteria { amount?: number; - child_criteria?: Array; + child_criteria?: Array; id: number; is_completed: boolean; } diff --git a/packages/wow/src/character-encounters/types.ts b/packages/wow/src/character-encounters/types.ts index 2864f204..e74ecfea 100644 --- a/packages/wow/src/character-encounters/types.ts +++ b/packages/wow/src/character-encounters/types.ts @@ -1,7 +1,7 @@ import type { Character, Href, NameIdKey, ResponseBase } from '../base'; export interface CharacterDungeonsResponse extends ResponseBase { - expansions: Array>; + expansions: Array; } export interface CharacterEncountersSummaryResponse extends ResponseBase { @@ -12,7 +12,7 @@ export interface CharacterEncountersSummaryResponse extends ResponseBase { export interface CharacterRaidsResponse extends ResponseBase { character: Character; - expansions: Array>; + expansions: Array; } interface DungeonDifficulties { @@ -20,6 +20,11 @@ interface DungeonDifficulties { type: 'HEROIC' | 'MYTHIC' | 'MYTHIC_KEYSTONE' | 'NORMAL'; } +interface DungeonInstance { + instance: NameIdKey; + modes: Array; +} + interface DungeonMode { difficulty: DungeonDifficulties; progress: Progress; @@ -32,14 +37,14 @@ interface Encounter { last_kill_timestamp: number; } -interface Expansion { +interface ExpansionWithDungeonInstances { expansion: NameIdKey; - instances: Array>; + instances: Array; } -interface Instance { - instance: NameIdKey; - modes: Array; +interface ExpansionWithRaidInstances { + expansion: NameIdKey; + instances: Array; } interface Progress { @@ -69,6 +74,11 @@ interface RaidDifficulties { | 'NORMAL'; } +interface RaidInstance { + instance: NameIdKey; + modes: Array; +} + interface RaidMode { difficulty: RaidDifficulties; progress: Progress; diff --git a/packages/wow/src/connected-realm/types.ts b/packages/wow/src/connected-realm/types.ts index 588990d4..e8f94d11 100644 --- a/packages/wow/src/connected-realm/types.ts +++ b/packages/wow/src/connected-realm/types.ts @@ -1,6 +1,6 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { KeyBase, NameIdKey, ResponseBase } from '../base'; -import type { RealmCategory, RealmTimezone, RealmType, RealmTypeCapitalized, WithoutUnderscore } from '../realm/types'; +import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; /** * Connected Realm Index API response. @@ -53,7 +53,7 @@ interface Realm { connected_realm: { href: string }; id: number; is_tournament: boolean; - locale: WithoutUnderscore; + locale: RealmLocales; name: string; region: NameIdKey; slug: string; @@ -76,7 +76,7 @@ interface SearchRealm { category: Record; id: number; is_tournament: boolean; - locale: WithoutUnderscore; + locale: RealmLocales; name: Record; region: { id: number; name: Record }; slug: string; diff --git a/packages/wow/src/guild/types.ts b/packages/wow/src/guild/types.ts index 07bb7510..e70b94c5 100644 --- a/packages/wow/src/guild/types.ts +++ b/packages/wow/src/guild/types.ts @@ -64,6 +64,12 @@ interface CharacterAchievement { character: Character; } +interface ChildCriterum { + amount: number; + id: number; + is_completed: boolean; +} + interface Crest { background: { color: RgbWithId }; border: Border; @@ -72,7 +78,7 @@ interface Crest { interface Criteria { amount?: number; - child_criteria?: Array; + child_criteria?: Array; id: number; is_completed: boolean; } diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 49c004b5..701c3763 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -144,7 +144,42 @@ interface JournalSection { body_text?: string; creature_display?: CreatureDisplay; id: number; - sections?: Array; + sections?: Array; + spell?: NameIdKey; + title: string; +} + +interface JournalSubSection { + body_text?: string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: NameIdKey; + title: string; +} + +interface JournalSubSection2 { + body_text?: string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: NameIdKey; + title: string; +} + +interface JournalSubSection3 { + body_text?: string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: NameIdKey; + title: string; +} + +interface JournalSubSection4 { + body_text?: string; + creature_display?: CreatureDisplay; + id: number; spell?: NameIdKey; title: string; } diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index b6eab871..c15681e1 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -40,7 +40,7 @@ export interface MountSearchParameters extends BaseSearchParameters { export interface MountSearchResponseItem extends KeyBase { data: { creature_displays: Array<{ id: number }>; - faction?: { name: Record; type: keyof typeof Factions }; + faction?: { name: Record; type: Factions }; id: number; name: Record; source: { name: Record; type: string }; diff --git a/packages/wow/src/mythic-keystone-leaderboard/types.ts b/packages/wow/src/mythic-keystone-leaderboard/types.ts index 1f56636f..b9631a94 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/types.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/types.ts @@ -39,7 +39,7 @@ interface LeadingGroup { } interface Member { - faction: { type: keyof typeof Factions }; + faction: { type: Factions }; profile: Profile; specialization: Specialization; } diff --git a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts index c1c66407..8889c78b 100644 --- a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts +++ b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts @@ -11,7 +11,7 @@ import type { MythicRaidLeaderboardResponse } from './types'; */ export function mythicRaidLeaderboard( raid: string, - faction: Lowercase, + faction: Lowercase, ): Resource { return { namespace: 'dynamic', diff --git a/packages/wow/src/mythic-raid-leaderboard/types.ts b/packages/wow/src/mythic-raid-leaderboard/types.ts index 29632289..8088f006 100644 --- a/packages/wow/src/mythic-raid-leaderboard/types.ts +++ b/packages/wow/src/mythic-raid-leaderboard/types.ts @@ -13,7 +13,7 @@ export interface MythicRaidLeaderboardResponse extends ResponseBase { } interface Entry { - faction: { type: keyof typeof Factions }; + faction: { type: Factions }; guild: Guild; rank: number; region: Origins; diff --git a/packages/wow/src/pvp-season/types.ts b/packages/wow/src/pvp-season/types.ts index 952268e8..647d6ab9 100644 --- a/packages/wow/src/pvp-season/types.ts +++ b/packages/wow/src/pvp-season/types.ts @@ -61,7 +61,7 @@ interface Character extends NameId { interface Entry { character: Character; - faction: { type: keyof typeof Factions }; + faction: { type: Factions }; rank: number; rating: number; season_match_statistics: SeasonMatchStatistics; diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index 91657a59..0a28e199 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -27,6 +27,21 @@ export interface RealmIndexResponse extends ResponseBase { realms: Array; } +export type RealmLocales = + | 'deDE' + | 'enGB' + | 'enUS' + | 'esES' + | 'esMX' + | 'frFR' + | 'itIT' + | 'koKR' + | 'ptBR' + | 'ptPT' + | 'ruRU' + | 'zhCN' + | 'zhTW'; + /** * The response for a realm. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -35,7 +50,7 @@ export interface RealmResponse extends NameId, ResponseBase { category: RealmCategory; connected_realm: { href: string }; is_tournament: boolean; - locale: WithoutUnderscore; + locale: RealmLocales; region: NameIdKey; slug: string; timezone: RealmTimezone; @@ -61,7 +76,7 @@ export interface RealmSearchResponseItem extends KeyBase { category: Record; id: number; is_tournament: boolean; - locale: WithoutUnderscore; + locale: RealmLocales; name: Record; region: { id: number; name: Record }; slug: string; @@ -92,8 +107,3 @@ export type RealmType = 'Normal' | 'Roleplaying'; * The type of a realm, capitalized and shortended). */ export type RealmTypeCapitalized = 'NORMAL' | 'RP'; - -// RealmLocale is the same as Locales but without the _ in the middle, assuming that `multi` cannot be used in this context -export type WithoutUnderscore = T extends `${infer Prefix}_${infer Suffix}` - ? `${Prefix}${Suffix}` - : never; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74765198..01ec3855 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,15 @@ importers: prettier: specifier: 3.7.1 version: 3.7.1 + ts-to-zod: + specifier: 5.1.0 + version: 5.1.0 tsdown: specifier: 0.16.8 version: 0.16.8(typescript@5.9.3) + tsx: + specifier: 4.20.6 + version: 4.20.6 turbo: specifier: 2.6.1 version: 2.6.1 @@ -64,7 +70,7 @@ importers: version: 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: 4.0.14 - version: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(yaml@2.8.1) + version: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) zod: specifier: 4.1.13 version: 4.1.13 @@ -212,6 +218,12 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} + '@clack/core@1.0.0-alpha.4': + resolution: {integrity: sha512-VCtU+vjyKPMSakVrB9q1bOnXN7QW/w4+YQDQCOF59GrzydW+169i0fVx/qzRRXJgt8KGj/pZZ/JxXroFZIDByg==} + + '@clack/prompts@1.0.0-alpha.4': + resolution: {integrity: sha512-KnmtDF2xQGoI5AlBme9akHtvCRV0RKAARUXHBQO2tMwnY8B08/4zPWigT7uLK25UPrMCEqnyQPkKRjNdhPbf8g==} + '@emnapi/core@1.6.0': resolution: {integrity: sha512-zq/ay+9fNIJJtJiZxdTnXS20PllcYMX3OE23ESc4HK/bdYu3cOWYVhsOhVnXALfU/uqJIxn5NBPd9z4v+SfoSg==} @@ -500,6 +512,10 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oclif/core@4.8.0': + resolution: {integrity: sha512-jteNUQKgJHLHFbbz806aGZqf+RJJ7t4gwF4MYa8fCwCxQ8/klJNWc0MvaJiBebk7Mc+J39mdlsB4XraaCKznFw==} + engines: {node: '>=18.0.0'} + '@oxc-project/runtime@0.99.0': resolution: {integrity: sha512-8iE5/4OK0SLHqWzRxSvI1gjFPmIH6718s8iwkuco95rBZsCZIHq+5wy4lYsASxnH+8FOhbGndiUrcwsVG5i2zw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -832,6 +848,11 @@ packages: resolution: {integrity: sha512-T0XJMaRPOH3+LBbAfzR2jalckP1MSG/L9eUtY0DEzUyVaXJ/t6zN0nR7co5kz0Jko/nkSYCBRkz1djvjajVTTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/vfs@1.6.2': + resolution: {integrity: sha512-hoBwJwcbKHmvd2QVebiytN1aELvpk9B74B4L1mFm/XT1Q/VOYAWl2vQ9AWRFtQq8zmz6enTpfTV8WRc4ATjW/g==} + peerDependencies: + typescript: '*' + '@unrs/resolver-binding-android-arm-eabi@1.11.1': resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} cpu: [arm] @@ -987,6 +1008,10 @@ packages: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + ansi-escapes@7.1.1: resolution: {integrity: sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==} engines: {node: '>=18'} @@ -1007,6 +1032,10 @@ packages: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} + ansis@3.17.0: + resolution: {integrity: sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==} + engines: {node: '>=14'} + ansis@4.2.0: resolution: {integrity: sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==} engines: {node: '>=14'} @@ -1036,6 +1065,9 @@ packages: ast-v8-to-istanbul@0.3.8: resolution: {integrity: sha512-szgSZqUxI5T8mLKvS7WTjF9is+MVbOeLADU73IseOcrqhxr/VAvy6wfoVE39KnKzA7JRhjF5eUagNlHwvZPlKQ==} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1102,6 +1134,10 @@ packages: chardet@2.1.0: resolution: {integrity: sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + chokidar@5.0.0: resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} engines: {node: '>= 20.19.0'} @@ -1118,10 +1154,18 @@ packages: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} + clean-stack@3.0.1: + resolution: {integrity: sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==} + engines: {node: '>=10'} + cli-cursor@5.0.0: resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} engines: {node: '>=18'} + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + cli-truncate@5.1.1: resolution: {integrity: sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A==} engines: {node: '>=20'} @@ -1187,12 +1231,20 @@ packages: oxc-resolver: optional: true + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + electron-to-chromium@1.5.240: resolution: {integrity: sha512-OBwbZjWgrCOH+g6uJsA2/7Twpas2OlepS9uvByJjR2datRDuKGYeD+nP8lBBks2qnB7bGJNHDUx7c/YLaT3QMQ==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + empathic@2.0.0: resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} engines: {node: '>=14'} @@ -1388,6 +1440,9 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -1431,6 +1486,10 @@ packages: resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} engines: {node: '>=18'} + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + get-tsconfig@4.13.0: resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} @@ -1502,6 +1561,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + indent-string@5.0.0: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} @@ -1513,10 +1576,19 @@ packages: is-bun-module@2.0.0: resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + is-fullwidth-code-point@5.1.0: resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} engines: {node: '>=18'} @@ -1537,6 +1609,10 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -1560,6 +1636,11 @@ packages: resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} engines: {node: '>=8'} + jake@10.9.4: + resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} + engines: {node: '>=10'} + hasBin: true + jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true @@ -1615,6 +1696,10 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lilconfig@3.1.3: + resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} + engines: {node: '>=14'} + linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} @@ -1688,6 +1773,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -1876,6 +1965,10 @@ packages: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + readdirp@5.0.0: resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} engines: {node: '>= 20.19.0'} @@ -1994,10 +2087,17 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + slice-ansi@7.1.2: resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==} engines: {node: '>=18'} @@ -2035,6 +2135,10 @@ packages: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} @@ -2067,10 +2171,77 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} + text-camel-case@1.2.9: + resolution: {integrity: sha512-wKYs9SgRxYizJE1mneR7BbLNlGw2IYzJAS8XwkWIry0CTbO1gvvPkFsx5Z1/hr+VqUaBqx9q3yKd30HpZLdMsQ==} + + text-capital-case@1.2.9: + resolution: {integrity: sha512-X5zV8U8pxtq2xS2t46lgAWqZdDbgWMKq03MQSNwY2CJdQCsdTNh144E2Q/q9wBxWzSBUXn+jRc9kF+Gs8/pGhA==} + + text-case@1.2.9: + resolution: {integrity: sha512-zZVdA8rMcjx9zhekdUuOPZShc25UTV7W8/ddKbgbPtfCEvIiToPtWiSd2lXLSuiGMovNhJ4+Tw49xll9o9ts+Q==} + + text-constant-case@1.2.9: + resolution: {integrity: sha512-Vosm6nC7Gag+JFakJHwqS9AXRNgl07j5KZ7srU9cYuKRzYwrxzeJ4RpEogRBNHw7CfmOm0j5FGEznblWtu7pIw==} + + text-dot-case@1.2.9: + resolution: {integrity: sha512-N83hsnvGdSO9q9AfNSB9Cy1LFDNN2MCx53LcxtaPoDWPUTk47fv0JlvIY1tgY0wyzCiThF03kVj3jworvAOScA==} + + text-header-case@1.2.9: + resolution: {integrity: sha512-TqryEKcYisQAfWLbtT3xPnZlMZ/mySO1uS+LUg+B0eNuqgETrSzVpXIUj5E6Zf/EyJHgpZf4VndbAXtOMJuT4w==} + + text-is-lower-case@1.2.9: + resolution: {integrity: sha512-cEurrWSnYVYqL8FSwl5cK4mdfqF7qNDCcKJgXI3NnfTesiB8umxAhdlQoErrRYI1xEvYr2WN0MI333EehUhQjg==} + + text-is-upper-case@1.2.9: + resolution: {integrity: sha512-HxsWr3VCsXXiLlhD0c+Ey+mS2lOTCiSJbkepjaXNHl2bp33KiscQaiG0qLwQmmpZQm4SJCg2s9FkndxS0RNDLQ==} + + text-kebab-case@1.2.9: + resolution: {integrity: sha512-nOUyNR5Ej2B9D/wyyXfwUEv26+pQuOb1pEX+ojE37mCIWo8QeOxw5y6nxuqDmG7NrEPzbO6265UMV+EICH13Cw==} + + text-lower-case-first@1.2.9: + resolution: {integrity: sha512-iiphHTV7PVH0MljrEQUA9iBE7jfDpXoi4RQju3WzZU3BRVbS6540cNZgxR19hWa0z6z/7cJTH0Ls9LPBaiUfKg==} + + text-lower-case@1.2.9: + resolution: {integrity: sha512-53AOnDrhPpiAUQkgY1SHleKUXp/u7GsqRX13NcCREZscmtjLLJ099uxMRjkK7q2KwHkFYVPl9ytkQlTkTQLS0w==} + + text-no-case@1.2.9: + resolution: {integrity: sha512-IcCt328KaapimSrytP4ThfC8URmHZb2DgOqCL9BYvGjpxY2lDiqCkIQk9sClZtwcELs2gTnq83a7jNc573FTLA==} + + text-param-case@1.2.9: + resolution: {integrity: sha512-nR/Ju9amY3aQS1en2CUCgqN/ZiZIVdDyjlJ3xX5J92ChBevGuA4o9K10fh3JGMkbzK97Vcb+bWQJ4Q+Svz+GyQ==} + + text-pascal-case@1.2.9: + resolution: {integrity: sha512-o6ZxMGjWDTUW54pcghpXes+C2PqbYRMdU5mHrIhueb6z6nq1NueiIOeCUdrSjN/3wXfhCmnFjK7/d9aRGZNqSg==} + + text-path-case@1.2.9: + resolution: {integrity: sha512-s8cJ6r5TkJp5ticXMgtxd7f12odEN4d1CfX5u4aoz6jcUtBR2lDqzIhVimkqWFMJ4UKPSrmilUha8Xc2BPi+ow==} + + text-sentence-case@1.2.9: + resolution: {integrity: sha512-/G/Yi5kZfUa1edFRV4O3lGZAkbDZTFvlwW8CYfH7szkEGe2k2MYEYbOyAkGRVQEGV6V6JiuUAaP3VS9c1tB6nQ==} + + text-snake-case@1.2.9: + resolution: {integrity: sha512-+ZrqK19ynF/TLQZ7ynqVrL2Dy04uu9syYZwsm8PhzUdsY3XrwPy6QiRqhIEFqhyWbShPcfyfmheer5UEQqFxlw==} + + text-swap-case@1.2.9: + resolution: {integrity: sha512-g5fp12ldktYKK9wdHRMvvtSCQrZYNv/D+ZGLumDsvAY4q9T5bCMO2IWMkIP1F5gVQrysdHH6Xv877P/pjUq1iw==} + + text-title-case@1.2.9: + resolution: {integrity: sha512-RAtC9cdmPp41ns5/HXZBsaQg71BsHT7uZpj2ojTtuFa8o2dNuRYYOrSmy5YdLRIAJQ6WK5hQVpV3jHuq7a+4Tw==} + + text-upper-case-first@1.2.9: + resolution: {integrity: sha512-wEDD1B6XqJmEV+xEnBJd+2sBCHZ+7fvA/8Rv/o8+dAsp05YWjYP/kjB8sPH6zqzW0s6jtehIg4IlcKjcYxk2CQ==} + + text-upper-case@1.2.9: + resolution: {integrity: sha512-K/0DNT7a4z8eah2spARtoJllTZyrNTo6Uc0ujhN/96Ir9uJ/slpahfs13y46H9osL3daaLl3O7iXOkW4xtX6bg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -2111,6 +2282,10 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-to-zod@5.1.0: + resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} + hasBin: true + tsdown@0.16.8: resolution: {integrity: sha512-6ANw9mgU9kk7SvTBKvpDu/DVJeAFECiLUSeL5M7f5Nm5H97E7ybxmXT4PQ23FySYn32y6OzjoAH/lsWCbGzfLA==} engines: {node: '>=20.19.0'} @@ -2136,9 +2311,23 @@ packages: unplugin-unused: optional: true + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsutils@3.21.0: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + + tsx@4.20.6: + resolution: {integrity: sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==} + engines: {node: '>=18.0.0'} + hasBin: true + turbo-darwin-64@2.6.1: resolution: {integrity: sha512-Dm0HwhyZF4J0uLqkhUyCVJvKM9Rw7M03v3J9A7drHDQW0qAbIGBrUijQ8g4Q9Cciw/BXRRd8Uzkc3oue+qn+ZQ==} cpu: [x64] @@ -2177,6 +2366,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + typedoc-github-theme@0.3.1: resolution: {integrity: sha512-j6PmkAGmf/MGCzYjQcUH6jS9djPsNl/IoTXooxC+MoeMkBhbmPyKJlpR6Lw12BLoe2OYpYA2J1KMktUJXp/8Sw==} engines: {node: '>=18.0.0'} @@ -2326,10 +2519,21 @@ packages: engines: {node: '>=8'} hasBin: true + widest-line@3.1.0: + resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} + engines: {node: '>=8'} + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + wrap-ansi@9.0.2: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} @@ -2517,6 +2721,17 @@ snapshots: human-id: 4.1.2 prettier: 2.8.8 + '@clack/core@1.0.0-alpha.4': + dependencies: + picocolors: 1.1.1 + sisteransi: 1.0.5 + + '@clack/prompts@1.0.0-alpha.4': + dependencies: + '@clack/core': 1.0.0-alpha.4 + picocolors: 1.1.1 + sisteransi: 1.0.5 + '@emnapi/core@1.6.0': dependencies: '@emnapi/wasi-threads': 1.1.0 @@ -2633,7 +2848,7 @@ snapshots: '@eslint/config-array@0.21.1': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2649,7 +2864,7 @@ snapshots: '@eslint/eslintrc@3.3.1': dependencies: ajv: 6.12.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -2757,6 +2972,27 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 + '@oclif/core@4.8.0': + dependencies: + ansi-escapes: 4.3.2 + ansis: 3.17.0 + clean-stack: 3.0.1 + cli-spinners: 2.9.2 + debug: 4.4.3(supports-color@8.1.1) + ejs: 3.1.10 + get-package-type: 0.1.0 + indent-string: 4.0.0 + is-wsl: 2.2.0 + lilconfig: 3.1.3 + minimatch: 9.0.5 + semver: 7.7.3 + string-width: 4.2.3 + supports-color: 8.1.1 + tinyglobby: 0.2.15 + widest-line: 3.1.0 + wordwrap: 1.0.0 + wrap-ansi: 7.0.0 + '@oxc-project/runtime@0.99.0': {} '@oxc-project/types@0.99.0': {} @@ -2977,7 +3213,7 @@ snapshots: '@typescript-eslint/types': 8.48.0 '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.48.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.1(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -2987,7 +3223,7 @@ snapshots: dependencies: '@typescript-eslint/tsconfig-utils': 8.48.0(typescript@5.9.3) '@typescript-eslint/types': 8.48.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -3006,7 +3242,7 @@ snapshots: '@typescript-eslint/types': 8.48.0 '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.1(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.9.3) typescript: 5.9.3 @@ -3021,7 +3257,7 @@ snapshots: '@typescript-eslint/tsconfig-utils': 8.48.0(typescript@5.9.3) '@typescript-eslint/types': 8.48.0 '@typescript-eslint/visitor-keys': 8.48.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 tinyglobby: 0.2.15 @@ -3046,6 +3282,13 @@ snapshots: '@typescript-eslint/types': 8.48.0 eslint-visitor-keys: 4.2.1 + '@typescript/vfs@1.6.2(typescript@5.9.3)': + dependencies: + debug: 4.4.3(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + '@unrs/resolver-binding-android-arm-eabi@1.11.1': optional: true @@ -3118,7 +3361,7 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(yaml@2.8.1) + vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -3131,13 +3374,13 @@ snapshots: chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(yaml@2.8.1))': + '@vitest/mocker@4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1))': dependencies: '@vitest/spy': 4.0.14 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) '@vitest/pretty-format@4.0.14': dependencies: @@ -3165,7 +3408,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(yaml@2.8.1) + vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) '@vitest/utils@4.0.14': dependencies: @@ -3187,6 +3430,10 @@ snapshots: ansi-colors@4.1.3: {} + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + ansi-escapes@7.1.1: dependencies: environment: 1.1.0 @@ -3201,6 +3448,8 @@ snapshots: ansi-styles@6.2.3: {} + ansis@3.17.0: {} + ansis@4.2.0: {} are-docs-informative@0.0.2: {} @@ -3226,6 +3475,8 @@ snapshots: estree-walker: 3.0.3 js-tokens: 9.0.1 + async@3.2.6: {} + balanced-match@1.0.2: {} baseline-browser-mapping@2.8.20: {} @@ -3280,6 +3531,10 @@ snapshots: chardet@2.1.0: {} + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + chokidar@5.0.0: dependencies: readdirp: 5.0.0 @@ -3292,10 +3547,16 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + clean-stack@3.0.1: + dependencies: + escape-string-regexp: 4.0.0 + cli-cursor@5.0.0: dependencies: restore-cursor: 5.1.0 + cli-spinners@2.9.2: {} + cli-truncate@5.1.1: dependencies: slice-ansi: 7.1.2 @@ -3325,9 +3586,11 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@4.4.3: + debug@4.4.3(supports-color@8.1.1): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 deep-is@0.1.4: {} @@ -3341,10 +3604,16 @@ snapshots: dts-resolver@2.1.3: {} + ejs@3.1.10: + dependencies: + jake: 10.9.4 + electron-to-chromium@1.5.240: {} emoji-regex@10.6.0: {} + emoji-regex@8.0.0: {} + empathic@2.0.0: {} enquirer@2.4.1: @@ -3402,7 +3671,7 @@ snapshots: eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1)): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.1(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) get-tsconfig: 4.13.0 @@ -3429,7 +3698,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.48.0 comment-parser: 1.4.1 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.1(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 @@ -3448,7 +3717,7 @@ snapshots: '@es-joy/resolve.exports': 1.2.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 9.39.1(jiti@2.6.1) espree: 10.4.0 @@ -3534,7 +3803,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -3616,6 +3885,10 @@ snapshots: dependencies: flat-cache: 4.0.1 + filelist@1.0.4: + dependencies: + minimatch: 5.1.6 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -3658,6 +3931,8 @@ snapshots: get-east-asian-width@1.4.0: {} + get-package-type@0.1.0: {} + get-tsconfig@4.13.0: dependencies: resolve-pkg-maps: 1.0.0 @@ -3714,6 +3989,8 @@ snapshots: imurmurhash@0.1.4: {} + indent-string@4.0.0: {} + indent-string@5.0.0: {} is-builtin-module@5.0.0: @@ -3724,8 +4001,12 @@ snapshots: dependencies: semver: 7.7.3 + is-docker@2.2.1: {} + is-extglob@2.1.1: {} + is-fullwidth-code-point@3.0.0: {} + is-fullwidth-code-point@5.1.0: dependencies: get-east-asian-width: 1.4.0 @@ -3742,6 +4023,10 @@ snapshots: is-windows@1.0.2: {} + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + isexe@2.0.0: {} isexe@3.1.1: {} @@ -3757,7 +4042,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.31 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -3767,6 +4052,12 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + jake@10.9.4: + dependencies: + async: 3.2.6 + filelist: 1.0.4 + picocolors: 1.1.1 + jiti@2.6.1: optional: true @@ -3810,6 +4101,8 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lilconfig@3.1.3: {} + linkify-it@5.0.0: dependencies: uc.micro: 2.1.0 @@ -3899,6 +4192,10 @@ snapshots: dependencies: brace-expansion: 1.1.12 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.2 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -4045,6 +4342,8 @@ snapshots: pify: 4.0.1 strip-bom: 3.0.0 + readdirp@4.1.2: {} + readdirp@5.0.0: {} refa@0.12.1: @@ -4178,8 +4477,12 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 + sisteransi@1.0.5: {} + slash@3.0.0: {} + slash@5.1.0: {} + slice-ansi@7.1.2: dependencies: ansi-styles: 6.2.3 @@ -4211,6 +4514,12 @@ snapshots: string-argv@0.3.2: {} + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + string-width@7.2.0: dependencies: emoji-regex: 10.6.0 @@ -4240,8 +4549,105 @@ snapshots: dependencies: has-flag: 4.0.0 + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + term-size@2.2.1: {} + text-camel-case@1.2.9: + dependencies: + text-pascal-case: 1.2.9 + + text-capital-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + text-upper-case-first: 1.2.9 + + text-case@1.2.9: + dependencies: + text-camel-case: 1.2.9 + text-capital-case: 1.2.9 + text-constant-case: 1.2.9 + text-dot-case: 1.2.9 + text-header-case: 1.2.9 + text-is-lower-case: 1.2.9 + text-is-upper-case: 1.2.9 + text-kebab-case: 1.2.9 + text-lower-case: 1.2.9 + text-lower-case-first: 1.2.9 + text-no-case: 1.2.9 + text-param-case: 1.2.9 + text-pascal-case: 1.2.9 + text-path-case: 1.2.9 + text-sentence-case: 1.2.9 + text-snake-case: 1.2.9 + text-swap-case: 1.2.9 + text-title-case: 1.2.9 + text-upper-case: 1.2.9 + text-upper-case-first: 1.2.9 + + text-constant-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + text-upper-case: 1.2.9 + + text-dot-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + + text-header-case@1.2.9: + dependencies: + text-capital-case: 1.2.9 + + text-is-lower-case@1.2.9: {} + + text-is-upper-case@1.2.9: {} + + text-kebab-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + + text-lower-case-first@1.2.9: {} + + text-lower-case@1.2.9: {} + + text-no-case@1.2.9: + dependencies: + text-lower-case: 1.2.9 + + text-param-case@1.2.9: + dependencies: + text-dot-case: 1.2.9 + + text-pascal-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + + text-path-case@1.2.9: + dependencies: + text-dot-case: 1.2.9 + + text-sentence-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + text-upper-case-first: 1.2.9 + + text-snake-case@1.2.9: + dependencies: + text-dot-case: 1.2.9 + + text-swap-case@1.2.9: {} + + text-title-case@1.2.9: + dependencies: + text-no-case: 1.2.9 + text-upper-case-first: 1.2.9 + + text-upper-case-first@1.2.9: {} + + text-upper-case@1.2.9: {} + tinybench@2.9.0: {} tinyexec@0.3.2: {} @@ -4272,6 +4678,22 @@ snapshots: dependencies: typescript: 5.9.3 + ts-to-zod@5.1.0: + dependencies: + '@clack/prompts': 1.0.0-alpha.4 + '@oclif/core': 4.8.0 + '@typescript/vfs': 1.6.2(typescript@5.9.3) + chokidar: 4.0.3 + listr2: 9.0.5 + slash: 5.1.0 + text-case: 1.2.9 + tslib: 2.8.1 + tsutils: 3.21.0(typescript@5.9.3) + typescript: 5.9.3 + zod: 4.1.13 + transitivePeerDependencies: + - supports-color + tsdown@0.16.8(typescript@5.9.3): dependencies: ansis: 4.2.0 @@ -4298,8 +4720,21 @@ snapshots: - synckit - vue-tsc - tslib@2.8.1: - optional: true + tslib@1.14.1: {} + + tslib@2.8.1: {} + + tsutils@3.21.0(typescript@5.9.3): + dependencies: + tslib: 1.14.1 + typescript: 5.9.3 + + tsx@4.20.6: + dependencies: + esbuild: 0.25.11 + get-tsconfig: 4.13.0 + optionalDependencies: + fsevents: 2.3.3 turbo-darwin-64@2.6.1: optional: true @@ -4332,6 +4767,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@0.21.3: {} + typedoc-github-theme@0.3.1(typedoc@0.28.14(typescript@5.9.3)): dependencies: typedoc: 0.28.14(typescript@5.9.3) @@ -4408,7 +4845,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(yaml@2.8.1): + vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1): dependencies: esbuild: 0.25.11 fdir: 6.5.0(picomatch@4.0.3) @@ -4420,12 +4857,13 @@ snapshots: '@types/node': 24.10.1 fsevents: 2.3.3 jiti: 2.6.1 + tsx: 4.20.6 yaml: 2.8.1 - vitest@4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(yaml@2.8.1): + vitest@4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1): dependencies: '@vitest/expect': 4.0.14 - '@vitest/mocker': 4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(yaml@2.8.1)) + '@vitest/mocker': 4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1)) '@vitest/pretty-format': 4.0.14 '@vitest/runner': 4.0.14 '@vitest/snapshot': 4.0.14 @@ -4442,7 +4880,7 @@ snapshots: tinyexec: 0.3.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.10.1 @@ -4473,8 +4911,20 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + widest-line@3.1.0: + dependencies: + string-width: 4.2.3 + word-wrap@1.2.5: {} + wordwrap@1.0.0: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi@9.0.2: dependencies: ansi-styles: 6.2.3 diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts new file mode 100644 index 00000000..a2b5db61 --- /dev/null +++ b/scripts/generate-zod.ts @@ -0,0 +1,96 @@ +#!/usr/bin/env node +/* eslint-disable sonarjs/cognitive-complexity */ +/* eslint-disable jsdoc/require-jsdoc */ +import { existsSync } from 'node:fs'; +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { generate } from 'ts-to-zod'; + +const root = process.cwd(); +const packagesDirectory = path.join(root, 'packages'); + +// Maintain an explicit whitelist of packages to process. Edit this array +// to add/remove packages. Packages not in this list will be skipped. +// Note: `client` is intentionally omitted. +const PACKAGE_WHITELIST = new Set(['classic-wow', 'core', 'd3', 'hs', 'sc2', 'wow']); + +async function main() { + try { + await run(); + } catch (error) { + console.error(error); + process.exit(1); + } +} + +async function run(): Promise { + // Iterate packages/* and generate for each package that has a `src` folder + const packageEntries = await fs.readdir(packagesDirectory, { withFileTypes: true }); + for (const packageEntry of packageEntries) { + if (!packageEntry.isDirectory()) continue; + const packageName = packageEntry.name; + + // Only process packages listed in the whitelist + if (!PACKAGE_WHITELIST.has(packageName)) continue; + const packageSource = path.join(packagesDirectory, packageName, 'src'); + if (!existsSync(packageSource)) { + // no src for this package — skip + continue; + } + + console.log('Processing package', packageName); + + const allFiles = await walk(packageSource); + // For `core` we want to generate from all `.ts` files (except `.test.ts`). + // For other packages, only convert `types.ts` files. + const tsFiles: Array = + packageName === 'core' + ? allFiles.filter((f) => f.endsWith('.ts') && !f.endsWith('.test.ts') && !f.endsWith('index.ts')) + : allFiles.filter((f) => path.basename(f) === 'types.ts'); + + const packageOut = path.join(root, 'generated', packageName); + // Clean package output + await fs.rm(packageOut, { force: true, recursive: true }); + await fs.mkdir(packageOut, { recursive: true }); + + for (const file of tsFiles) { + try { + console.log('Generating schema for', path.relative(root, file)); + + const content = await fs.readFile(file, 'utf8'); + const generator = generate({ + keepComments: true, + skipParseJSDoc: true, + sourceText: content, + }); + + const schema = generator.getZodSchemasFile(file); + + const parentName = path.basename(path.dirname(file)); + // Special-case `core`: use the original file name (e.g. `blizzard-api.ts`, `resource.ts`) + // to avoid many files named `src.ts` overwriting each other. + const outName = packageName === 'core' ? path.basename(file) : `${parentName}.ts`; + const outPath = path.join(packageOut, outName); + await fs.writeFile(outPath, schema, 'utf8'); + console.log('Wrote', path.relative(root, outPath)); + } catch (error) { + console.error('Failed to generate for', file, (error as Error)?.message ?? error); + } + } + } +} + +async function walk(directory: string, filelist: Array = []): Promise> { + const entries = await fs.readdir(directory, { withFileTypes: true }); + for (const entry of entries) { + const full = path.join(directory, entry.name); + if (entry.isDirectory()) { + await walk(full, filelist); + } else { + filelist.push(full); + } + } + return filelist; +} + +await main(); diff --git a/tsconfig.json b/tsconfig.json index e5d99de5..f303bd88 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -47,5 +47,5 @@ //"composite": true, //"declarationMap": true, }, - "include": ["*.*ts", "*.*js", "packages/**/*"] + "include": ["*.*ts", "*.*js", "packages/**/*", "scripts/*", "generated/**/*"] } From 4c85d895f2ce3498a1ae8453df4353fc6b64e713 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 22:05:22 +0100 Subject: [PATCH 02/52] Begin adding input/output mappings --- generated/classic-wow/auction-house.ts | 4 +- generated/core/base.ts | 10 ++ generated/hs/card-backs.ts | 20 ++-- generated/hs/cards.ts | 52 ++++----- generated/wow/azerite-essence.ts | 24 ++--- generated/wow/connected-realm.ts | 16 ++- generated/wow/creature.ts | 26 +++-- generated/wow/item.ts | 100 +++++++++--------- generated/wow/journal.ts | 58 +++++----- generated/wow/media-search.ts | 18 ++-- generated/wow/mount.ts | 26 +++-- generated/wow/mythic-raid-leaderboard.ts | 4 +- generated/wow/realm.ts | 24 ++--- generated/wow/spell.ts | 26 +++-- .../classic-wow/src/auction-house/types.ts | 3 +- packages/core/src/base.ts | 7 ++ packages/core/src/index.ts | 3 + scripts/generate-zod.ts | 2 + scripts/input-output-mapping.ts | 9 ++ 19 files changed, 224 insertions(+), 208 deletions(-) create mode 100644 generated/core/base.ts create mode 100644 packages/core/src/base.ts create mode 100644 scripts/input-output-mapping.ts diff --git a/generated/classic-wow/auction-house.ts b/generated/classic-wow/auction-house.ts index 9a55e4c0..2297d1fb 100644 --- a/generated/classic-wow/auction-house.ts +++ b/generated/classic-wow/auction-house.ts @@ -1,6 +1,8 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { nameIdSchema } from '../core/base'; + const auctionSchema = z.object({ bid: z.number(), buyout: z.number(), @@ -18,8 +20,6 @@ const responseBaseSchema = z.any(); const nameIdKeySchema = z.any(); -const nameIdSchema = z.any(); - export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ auctions: z.array(nameIdKeySchema), }); diff --git a/generated/core/base.ts b/generated/core/base.ts new file mode 100644 index 00000000..dbb499f8 --- /dev/null +++ b/generated/core/base.ts @@ -0,0 +1,10 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +/** + * Base record interface containing name and id properties that often appear together in Blizzard API responses. + */ +export const nameIdSchema = z.object({ + id: z.number(), + name: z.string(), +}); diff --git a/generated/hs/card-backs.ts b/generated/hs/card-backs.ts index cabccd42..a545a6cd 100644 --- a/generated/hs/card-backs.ts +++ b/generated/hs/card-backs.ts @@ -1,7 +1,16 @@ // Generated by ts-to-zod import { z } from 'zod'; -const localesSchema = z.any(); +import { localesSchema } from '../core/base'; + +export const singleCardBackSearchResponseSchema = z.object({ + id: z.number(), + image: z.string(), + name: z.union([z.record(localesSchema, z.string()), z.string()]), + slug: z.string(), + sortCategory: z.number(), + text: z.union([z.record(localesSchema, z.string()), z.string()]), +}); const searchSortOptionSchema = z.any(); @@ -30,15 +39,6 @@ export const cardBackSearchParametersSchema = z.object({ textFilter: z.string().optional(), }); -export const singleCardBackSearchResponseSchema = z.object({ - id: z.number(), - image: z.string(), - name: z.union([z.record(localesSchema, z.string()), z.string()]), - slug: z.string(), - sortCategory: z.number(), - text: z.union([z.record(localesSchema, z.string()), z.string()]), -}); - export const cardBackSearchResponseSchema = z.object({ cardBacks: z.array(singleCardBackSearchResponseSchema), cardCount: z.number(), diff --git a/generated/hs/cards.ts b/generated/hs/cards.ts index cc0191df..9334e36c 100644 --- a/generated/hs/cards.ts +++ b/generated/hs/cards.ts @@ -1,12 +1,36 @@ // Generated by ts-to-zod import { z } from 'zod'; -const statsByLevelSchema = z.object({ +import { localesSchema } from '../core/base'; + +export const fetchOneCardResponseSchema = z.object({ + artistName: z.string(), attack: z.number(), + cardSetId: z.number(), + cardTypeId: z.number(), + classId: z.number(), + collectible: z.number(), + cropImage: z.string(), + flavorText: z.union([z.record(localesSchema, z.string()), z.string()]), health: z.number(), + id: z.number(), + image: z.union([z.record(localesSchema, z.string()), z.string()]), + imageGold: z.union([z.record(localesSchema, z.string()), z.string()]), + isZilliaxCosmeticModule: z.boolean(), + isZilliaxFunctionalModule: z.boolean(), + keywordIds: z.array(z.number()), + manaCost: z.number(), + multiClassIds: z.array(z.number()), + name: z.union([z.record(localesSchema, z.string()), z.string()]), + rarityId: z.number(), + slug: z.string(), + text: z.union([z.record(localesSchema, z.string()), z.string()]), }); -const localesSchema = z.any(); +const statsByLevelSchema = z.object({ + attack: z.number(), + health: z.number(), +}); const gameModeSchema = z.any(); @@ -42,30 +66,6 @@ export const cardSearchParametersSchema = baseSearchParametersSchema.extend({ mercenaryId: z.union([z.array(z.number()), z.number()]).optional(), }); -export const fetchOneCardResponseSchema = z.object({ - artistName: z.string(), - attack: z.number(), - cardSetId: z.number(), - cardTypeId: z.number(), - classId: z.number(), - collectible: z.number(), - cropImage: z.string(), - flavorText: z.union([z.record(localesSchema, z.string()), z.string()]), - health: z.number(), - id: z.number(), - image: z.union([z.record(localesSchema, z.string()), z.string()]), - imageGold: z.union([z.record(localesSchema, z.string()), z.string()]), - isZilliaxCosmeticModule: z.boolean(), - isZilliaxFunctionalModule: z.boolean(), - keywordIds: z.array(z.number()), - manaCost: z.number(), - multiClassIds: z.array(z.number()), - name: z.union([z.record(localesSchema, z.string()), z.string()]), - rarityId: z.number(), - slug: z.string(), - text: z.union([z.record(localesSchema, z.string()), z.string()]), -}); - const mercenaryHeroSchema = z.object({ collectible: z.number(), craftingCost: z.number(), diff --git a/generated/wow/azerite-essence.ts b/generated/wow/azerite-essence.ts index 5b73fdb7..21233d50 100644 --- a/generated/wow/azerite-essence.ts +++ b/generated/wow/azerite-essence.ts @@ -1,6 +1,17 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + +/** + * Interface for search parameters for azerite essences. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ + 'allowed_specializations.id': z.number().optional(), +}); + const responseBaseSchema = z.any(); const nameIdKeySchema = z.any(); @@ -9,12 +20,8 @@ const mediaAssetSchema = z.any(); const nameIdSchema = z.any(); -const baseSearchParametersSchema = z.any(); - const keyBaseSchema = z.any(); -const localesSchema = z.any(); - /** * Interface for a response from the azerite essence index endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -43,15 +50,6 @@ const powerSchema = z.object({ rank: z.number(), }); -/** - * Interface for search parameters for azerite essences. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ - 'allowed_specializations.id': z.number().optional(), -}); - /** * Interface for a response item from the azerite essence search endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/connected-realm.ts b/generated/wow/connected-realm.ts index 43f814e0..8d3e1a59 100644 --- a/generated/wow/connected-realm.ts +++ b/generated/wow/connected-realm.ts @@ -1,6 +1,8 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + const realmPopulationSchema = z.union([ z.literal('Full'), z.literal('High'), @@ -24,9 +26,12 @@ const realmLockedStatusSchema = z.object({ const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); -const responseBaseSchema = z.any(); +const searchRealmPopulationSchema = z.object({ + name: z.record(localesSchema, z.string()), + type: realmPopulationCapitalizedSchema, +}); -const baseSearchParametersSchema = z.any(); +const responseBaseSchema = z.any(); const realmTimezoneSchema = z.any(); @@ -42,8 +47,6 @@ const realmTypeSchema = z.any(); const realmTypeCapitalizedSchema = z.any(); -const localesSchema = z.any(); - /** * Connected Realm Index API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis @@ -74,11 +77,6 @@ const realmSchema = z.object({ }), }); -const searchRealmPopulationSchema = z.object({ - name: z.record(localesSchema, z.string()), - type: realmPopulationCapitalizedSchema, -}); - const searchRealmSchema = z.object({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), diff --git a/generated/wow/creature.ts b/generated/wow/creature.ts index 5c3f719a..741d7a93 100644 --- a/generated/wow/creature.ts +++ b/generated/wow/creature.ts @@ -1,21 +1,29 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + const displayMediaAssetSchema = z.object({ key: z.string(), value: z.string(), }); +/** + * The search parameters for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + const responseBaseSchema = z.any(); const nameIdKeySchema = z.any(); const mediaAssetSchema = z.any(); -const baseSearchParametersSchema = z.any(); - -const localesSchema = z.any(); - const keyBaseSchema = z.any(); /** @@ -52,16 +60,6 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The search parameters for a creature. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - /** * The response for a creature search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/item.ts b/generated/wow/item.ts index 018dc6a3..442b8ca1 100644 --- a/generated/wow/item.ts +++ b/generated/wow/item.ts @@ -1,6 +1,55 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + +const inventoryTypeSchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('BACK'), + z.literal('BAG'), + z.literal('CHEST'), + z.literal('FEET'), + z.literal('FINGER'), + z.literal('HANDS'), + z.literal('HEAD'), + z.literal('LEGS'), + z.literal('NECK'), + z.literal('NON_EQUIP'), + z.literal('SHIRT'), + z.literal('SHOULDER'), + z.literal('TABARD'), + z.literal('TRINKET'), + z.literal('TWOHWEAPON'), + z.literal('WAIST'), + z.literal('WRIST'), + ]), +}); + +const itemQualitySchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('ARTIFACT'), + z.literal('COMMON'), + z.literal('EPIC'), + z.literal('HEIRLOOM'), + z.literal('LEGENDARY'), + z.literal('POOR'), + z.literal('RARE'), + z.literal('UNCOMMON'), + ]), +}); + +/** + * The parameters for an item search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + const effectSchema = z.object({ display_string: z.string(), required_count: z.number(), @@ -68,10 +117,6 @@ const mediaAssetSchema = z.any(); const nameIdSchema = z.any(); -const baseSearchParametersSchema = z.any(); - -const localesSchema = z.any(); - const keyBaseSchema = z.any(); const colorSchema = z.any(); @@ -103,57 +148,10 @@ export const itemMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const inventoryTypeSchema = z.object({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.union([ - z.literal('BACK'), - z.literal('BAG'), - z.literal('CHEST'), - z.literal('FEET'), - z.literal('FINGER'), - z.literal('HANDS'), - z.literal('HEAD'), - z.literal('LEGS'), - z.literal('NECK'), - z.literal('NON_EQUIP'), - z.literal('SHIRT'), - z.literal('SHOULDER'), - z.literal('TABARD'), - z.literal('TRINKET'), - z.literal('TWOHWEAPON'), - z.literal('WAIST'), - z.literal('WRIST'), - ]), -}); - const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const itemQualitySchema = z.object({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.union([ - z.literal('ARTIFACT'), - z.literal('COMMON'), - z.literal('EPIC'), - z.literal('HEIRLOOM'), - z.literal('LEGENDARY'), - z.literal('POOR'), - z.literal('RARE'), - z.literal('UNCOMMON'), - ]), -}); - -/** - * The parameters for an item search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - /** * The response for an item search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/journal.ts b/generated/wow/journal.ts index 223de54a..13eda0a0 100644 --- a/generated/wow/journal.ts +++ b/generated/wow/journal.ts @@ -1,6 +1,34 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + +/** + * The parameters for a journal encounter search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const journalEncounterSearchParametersSchema = baseSearchParametersSchema.extend({ + instanceName: z.string(), + locale: localesSchema, +}); + +const journalEncounterSearchCreatureSchema = z.object({ + creature_display: z.object({ + id: z.number(), + }), + id: z.number(), + name: z.record(localesSchema, z.string()), +}); + +const journalEncounterSearchItemSchema = z.object({ + id: z.number(), + item: z.object({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), +}); + const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); const assetSchema = z.object({ @@ -47,10 +75,6 @@ const nameIdSchema = z.any(); const factionSchema = z.any(); -const baseSearchParametersSchema = z.any(); - -const localesSchema = z.any(); - const keyBaseSchema = z.any(); /** @@ -70,32 +94,6 @@ const itemSchema = z.object({ item: nameIdKeySchema, }); -/** - * The parameters for a journal encounter search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const journalEncounterSearchParametersSchema = baseSearchParametersSchema.extend({ - instanceName: z.string(), - locale: localesSchema, -}); - -const journalEncounterSearchCreatureSchema = z.object({ - creature_display: z.object({ - id: z.number(), - }), - id: z.number(), - name: z.record(localesSchema, z.string()), -}); - -const journalEncounterSearchItemSchema = z.object({ - id: z.number(), - item: z.object({ - id: z.number(), - name: z.record(localesSchema, z.string()), - }), -}); - /** * The response for a journal expansion index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/media-search.ts b/generated/wow/media-search.ts index fc6128f5..d5365fb4 100644 --- a/generated/wow/media-search.ts +++ b/generated/wow/media-search.ts @@ -1,15 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -const mediaAssetSchema = z.object({ - file_data_id: z.number(), - key: z.string(), - value: z.string(), -}); - -const baseSearchParametersSchema = z.any(); - -const keyBaseSchema = z.any(); +import { baseSearchParametersSchema } from '../core/base'; /** * The search parameters for media. @@ -20,6 +12,14 @@ export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); +const mediaAssetSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), +}); + +const keyBaseSchema = z.any(); + /** * The response for a media search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/mount.ts b/generated/wow/mount.ts index c82fb704..09812047 100644 --- a/generated/wow/mount.ts +++ b/generated/wow/mount.ts @@ -1,19 +1,27 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + const sourceSchema = z.object({ name: z.string(), type: z.string(), }); +/** + * The search parameters for mounts. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + const responseBaseSchema = z.any(); const nameIdKeySchema = z.any(); -const baseSearchParametersSchema = z.any(); - -const localesSchema = z.any(); - const keyBaseSchema = z.any(); const factionsSchema = z.any(); @@ -30,16 +38,6 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The search parameters for mounts. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - /** * The response for a mount search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/wow/mythic-raid-leaderboard.ts index 690cb87d..c65079f8 100644 --- a/generated/wow/mythic-raid-leaderboard.ts +++ b/generated/wow/mythic-raid-leaderboard.ts @@ -1,6 +1,8 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { originsSchema } from '../core/base'; + const realmSchema = z.object({ id: z.number(), name: z.null(), @@ -11,8 +13,6 @@ const responseBaseSchema = z.any(); const factionsSchema = z.any(); -const originsSchema = z.any(); - const nameIdSchema = z.any(); const keyBaseSchema = z.any(); diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts index 501495ce..e065f6ce 100644 --- a/generated/wow/realm.ts +++ b/generated/wow/realm.ts @@ -1,6 +1,8 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + /** * The category of a realm. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -60,6 +62,15 @@ export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplay */ export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); +/** + * The search parameters for realms. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ + timezone: realmTimezoneSchema.optional(), +}); + const responseBaseSchema = z.any(); const realmSchema = z.any(); @@ -68,12 +79,8 @@ const nameIdSchema = z.any(); const nameIdKeySchema = z.any(); -const baseSearchParametersSchema = z.any(); - const keyBaseSchema = z.any(); -const localesSchema = z.any(); - /** * The response for a realm index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -102,15 +109,6 @@ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) }), }); -/** - * The search parameters for realms. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ - timezone: realmTimezoneSchema.optional(), -}); - /** * The response for a realm search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/spell.ts b/generated/wow/spell.ts index cc6c6fb3..c47115ad 100644 --- a/generated/wow/spell.ts +++ b/generated/wow/spell.ts @@ -1,16 +1,24 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, localesSchema } from '../core/base'; + +/** + * The search parameters for spells. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + const responseBaseSchema = z.any(); const mediaAssetSchema = z.any(); const nameIdSchema = z.any(); -const baseSearchParametersSchema = z.any(); - -const localesSchema = z.any(); - const keyBaseSchema = z.any(); /** @@ -26,16 +34,6 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The search parameters for spells. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - /** * The response for a spell search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/packages/classic-wow/src/auction-house/types.ts b/packages/classic-wow/src/auction-house/types.ts index 0db8c7d7..79f0c6d3 100644 --- a/packages/classic-wow/src/auction-house/types.ts +++ b/packages/classic-wow/src/auction-house/types.ts @@ -1,4 +1,5 @@ -import type { NameId, NameIdKey, ResponseBase } from '../../../wow/src/base'; +import type { NameId } from '@blizzard-api/core'; +import type { NameIdKey, ResponseBase } from '../../../wow/src/base'; export interface AuctionHouseIndexResponse extends ResponseBase { auctions: Array; diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts new file mode 100644 index 00000000..2b6af91e --- /dev/null +++ b/packages/core/src/base.ts @@ -0,0 +1,7 @@ +/** + * Base record interface containing name and id properties that often appear together in Blizzard API responses. + */ +export interface NameId { + id: number; + name: string; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index d7e6ef29..9b14d5a2 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -9,3 +9,6 @@ export type * from './resource'; //Search export type * from './search'; + +//Base +export type * from './base'; diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index a2b5db61..53d55ca2 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -5,6 +5,7 @@ import { existsSync } from 'node:fs'; import fs from 'node:fs/promises'; import path from 'node:path'; import { generate } from 'ts-to-zod'; +import { inputOutputMappings } from './input-output-mapping'; const root = process.cwd(); const packagesDirectory = path.join(root, 'packages'); @@ -59,6 +60,7 @@ async function run(): Promise { const content = await fs.readFile(file, 'utf8'); const generator = generate({ + inputOutputMappings, keepComments: true, skipParseJSDoc: true, sourceText: content, diff --git a/scripts/input-output-mapping.ts b/scripts/input-output-mapping.ts new file mode 100644 index 00000000..8e0fbd09 --- /dev/null +++ b/scripts/input-output-mapping.ts @@ -0,0 +1,9 @@ +import type { InputOutputMapping } from 'ts-to-zod/lib/config'; + +export const inputOutputMappings: Array = [ + //Core + { + input: '@blizzard-api/core', + output: '../core/base', + }, +]; From 403740bac3fc644a6ed86a7ffc0caf860761f23e Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 22:18:33 +0100 Subject: [PATCH 03/52] More minor fixes and added a package.json script to run --- generated/classic-wow/auction-house.ts | 3 +- generated/classic-wow/index.ts | 20 +++++++++ generated/core/index.ts | 2 + generated/d3/index.ts | 8 ++++ generated/hs/card-backs.ts | 3 +- generated/hs/cards.ts | 3 +- generated/hs/index.ts | 4 ++ generated/sc2/index.ts | 4 ++ generated/wow/azerite-essence.ts | 3 +- generated/wow/connected-realm.ts | 3 +- generated/wow/creature.ts | 3 +- generated/wow/index.ts | 54 ++++++++++++++++++++++++ generated/wow/item.ts | 3 +- generated/wow/journal.ts | 3 +- generated/wow/media-search.ts | 3 +- generated/wow/mount.ts | 3 +- generated/wow/mythic-raid-leaderboard.ts | 3 +- generated/wow/realm.ts | 3 +- generated/wow/spell.ts | 3 +- package.json | 12 +++--- scripts/generate-zod.ts | 38 ++++++++++++----- scripts/input-output-mapping.ts | 2 +- 22 files changed, 140 insertions(+), 43 deletions(-) create mode 100644 generated/classic-wow/index.ts create mode 100644 generated/core/index.ts create mode 100644 generated/d3/index.ts create mode 100644 generated/hs/index.ts create mode 100644 generated/sc2/index.ts create mode 100644 generated/wow/index.ts diff --git a/generated/classic-wow/auction-house.ts b/generated/classic-wow/auction-house.ts index 2297d1fb..d32120ec 100644 --- a/generated/classic-wow/auction-house.ts +++ b/generated/classic-wow/auction-house.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { nameIdSchema } from '../core/base'; +import { nameIdSchema } from '../core'; const auctionSchema = z.object({ bid: z.number(), diff --git a/generated/classic-wow/index.ts b/generated/classic-wow/index.ts new file mode 100644 index 00000000..ff8c154f --- /dev/null +++ b/generated/classic-wow/index.ts @@ -0,0 +1,20 @@ +export * from './auction-house'; +export * from './character-achievements'; +export type * from './character-equipment'; +export type * from './character-hunter-pets'; +export type * from './character-media'; +export * from './character-profile'; +export * from './character-specialization'; +export * from './character-statistics'; +export type * from './connected-realm'; +export type * from './creature'; +export * from './guild'; +export type * from './guild-crest'; +export type * from './item'; +export type * from './media-search'; +export * from './playable-class'; +export type * from './playable-race'; +export type * from './power-type'; +export type * from './pvp-season'; +export type * from './realm'; +export type * from './region'; diff --git a/generated/core/index.ts b/generated/core/index.ts new file mode 100644 index 00000000..0a3c673a --- /dev/null +++ b/generated/core/index.ts @@ -0,0 +1,2 @@ +export * from './base'; +export * from './namespace'; diff --git a/generated/d3/index.ts b/generated/d3/index.ts new file mode 100644 index 00000000..45535ef0 --- /dev/null +++ b/generated/d3/index.ts @@ -0,0 +1,8 @@ +export * from './act'; +export * from './artisan-and-recipe'; +export * from './character-class-and-skill'; +export * from './follower'; +export * from './game-data'; +export * from './item'; +export * from './item-type'; +export * from './profile'; diff --git a/generated/hs/card-backs.ts b/generated/hs/card-backs.ts index a545a6cd..6c6c241f 100644 --- a/generated/hs/card-backs.ts +++ b/generated/hs/card-backs.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { localesSchema } from '../core/base'; +import { localesSchema } from '../core'; export const singleCardBackSearchResponseSchema = z.object({ id: z.number(), diff --git a/generated/hs/cards.ts b/generated/hs/cards.ts index 9334e36c..e351eb1d 100644 --- a/generated/hs/cards.ts +++ b/generated/hs/cards.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { localesSchema } from '../core/base'; +import { localesSchema } from '../core'; export const fetchOneCardResponseSchema = z.object({ artistName: z.string(), diff --git a/generated/hs/index.ts b/generated/hs/index.ts new file mode 100644 index 00000000..5551c026 --- /dev/null +++ b/generated/hs/index.ts @@ -0,0 +1,4 @@ +export * from './card-backs'; +export * from './cards'; +export * from './decks'; +export * from './metadata'; diff --git a/generated/sc2/index.ts b/generated/sc2/index.ts new file mode 100644 index 00000000..10cdd261 --- /dev/null +++ b/generated/sc2/index.ts @@ -0,0 +1,4 @@ +export * from './ladder'; +export * from './league'; +export * from './legacy'; +export * from './profile'; diff --git a/generated/wow/azerite-essence.ts b/generated/wow/azerite-essence.ts index 21233d50..2222dfb9 100644 --- a/generated/wow/azerite-essence.ts +++ b/generated/wow/azerite-essence.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; /** * Interface for search parameters for azerite essences. diff --git a/generated/wow/connected-realm.ts b/generated/wow/connected-realm.ts index 8d3e1a59..490e91f4 100644 --- a/generated/wow/connected-realm.ts +++ b/generated/wow/connected-realm.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; const realmPopulationSchema = z.union([ z.literal('Full'), diff --git a/generated/wow/creature.ts b/generated/wow/creature.ts index 741d7a93..b21bbdda 100644 --- a/generated/wow/creature.ts +++ b/generated/wow/creature.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; const displayMediaAssetSchema = z.object({ key: z.string(), diff --git a/generated/wow/index.ts b/generated/wow/index.ts new file mode 100644 index 00000000..4b5f923b --- /dev/null +++ b/generated/wow/index.ts @@ -0,0 +1,54 @@ +export * from './account-profile'; +export * from './achievements'; +export * from './auction-house'; +export * from './azerite-essence'; +export * from './character-achievements'; +export * from './character-appearance'; +export * from './character-collections'; +export * from './character-encounters'; +export * from './character-equipment'; +export * from './character-hunter-pets'; +export * from './character-media'; +export * from './character-mythic-keystone-profile'; +export * from './character-professions'; +export * from './character-profile'; +export * from './character-pvp'; +export * from './character-quests'; +export * from './character-reputations'; +export * from './character-soulbinds'; +export * from './character-specializations'; +export * from './character-statistics'; +export * from './character-titles'; +export * from './connected-realm'; +export * from './covenant'; +export * from './creature'; +export * from './guild'; +export * from './guild-crest'; +export * from './heirloom'; +export * from './item'; +export * from './journal'; +export * from './media-search'; +export * from './modified-crafting'; +export * from './mount'; +export * from './mythic-keystone-affix'; +export * from './mythic-keystone-dungeon'; +export * from './mythic-keystone-leaderboard'; +export * from './mythic-raid-leaderboard'; +export * from './pet'; +export * from './playable-class'; +export * from './playable-race'; +export * from './playable-specialization'; +export * from './power-type'; +export * from './profession'; +export * from './pvp-season'; +export * from './pvp-tier'; +export * from './quest'; +export * from './realm'; +export * from './region'; +export * from './reputations'; +export * from './spell'; +export * from './talent'; +export * from './tech-talent'; +export * from './title'; +export * from './toy'; +export * from './wow-token'; diff --git a/generated/wow/item.ts b/generated/wow/item.ts index 442b8ca1..304b4ee9 100644 --- a/generated/wow/item.ts +++ b/generated/wow/item.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; const inventoryTypeSchema = z.object({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), diff --git a/generated/wow/journal.ts b/generated/wow/journal.ts index 13eda0a0..c8bd9627 100644 --- a/generated/wow/journal.ts +++ b/generated/wow/journal.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; /** * The parameters for a journal encounter search. diff --git a/generated/wow/media-search.ts b/generated/wow/media-search.ts index d5365fb4..c6f009c7 100644 --- a/generated/wow/media-search.ts +++ b/generated/wow/media-search.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema } from '../core/base'; +import { baseSearchParametersSchema } from '../core'; /** * The search parameters for media. diff --git a/generated/wow/mount.ts b/generated/wow/mount.ts index 09812047..c15af6b8 100644 --- a/generated/wow/mount.ts +++ b/generated/wow/mount.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; const sourceSchema = z.object({ name: z.string(), diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/wow/mythic-raid-leaderboard.ts index c65079f8..b2d45784 100644 --- a/generated/wow/mythic-raid-leaderboard.ts +++ b/generated/wow/mythic-raid-leaderboard.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { originsSchema } from '../core/base'; +import { originsSchema } from '../core'; const realmSchema = z.object({ id: z.number(), diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts index e065f6ce..e20b2bc3 100644 --- a/generated/wow/realm.ts +++ b/generated/wow/realm.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; /** * The category of a realm. diff --git a/generated/wow/spell.ts b/generated/wow/spell.ts index c47115ad..78fb0510 100644 --- a/generated/wow/spell.ts +++ b/generated/wow/spell.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -import { baseSearchParametersSchema, localesSchema } from '../core/base'; +import { baseSearchParametersSchema, localesSchema } from '../core'; /** * The search parameters for spells. diff --git a/package.json b/package.json index ab30c117..63b82601 100644 --- a/package.json +++ b/package.json @@ -59,20 +59,22 @@ ] }, "scripts": { - "build": "turbo build", "build:docs": "typedoc", - "lint": "eslint --format stylish --max-warnings 0 --cache", + "build": "turbo build", + "generate:zod": "tsx ./scripts/generate-zod.ts", + "generate": "npm-run-all -l generate:zod \"prettier:write ./generated\" \"lint:fix ./generated\"", "lint:ci": "npm-run-all -p -l typecheck stylecheck \"lint .\"", "lint:fix": "pnpm lint --fix", + "lint": "eslint --format stylish --max-warnings 0 --cache", "prepare": "husky", + "prettier:write": "prettier --write", "release": "changeset publish", "stylecheck": "prettier --check .", - "test": "vitest run", "test:coverage": "pnpm run test --coverage", "test:ui": "vitest --ui --coverage", "test:watch": "vitest watch", - "typecheck": "tsc", - "generate:zod:classic:ts": "tsx ./scripts/generate-zod.ts" + "test": "vitest run", + "typecheck": "tsc" }, "lint-staged": { "*.{ts,tsx,js,jsx,mjs,md,mdx,yaml,yml,json}": [ diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index 53d55ca2..0ccb3532 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -10,10 +10,9 @@ import { inputOutputMappings } from './input-output-mapping'; const root = process.cwd(); const packagesDirectory = path.join(root, 'packages'); -// Maintain an explicit whitelist of packages to process. Edit this array -// to add/remove packages. Packages not in this list will be skipped. -// Note: `client` is intentionally omitted. +// Maintain an explicit whitelist of packages to process. const PACKAGE_WHITELIST = new Set(['classic-wow', 'core', 'd3', 'hs', 'sc2', 'wow']); +const HANDLE_ALL_FILE_FOLDERS = new Set(['core']); async function main() { try { @@ -42,12 +41,11 @@ async function run(): Promise { console.log('Processing package', packageName); const allFiles = await walk(packageSource); - // For `core` we want to generate from all `.ts` files (except `.test.ts`). + // For some packages, such as `core`, we want to generate from all `.ts` files (except `.test.ts`). // For other packages, only convert `types.ts` files. - const tsFiles: Array = - packageName === 'core' - ? allFiles.filter((f) => f.endsWith('.ts') && !f.endsWith('.test.ts') && !f.endsWith('index.ts')) - : allFiles.filter((f) => path.basename(f) === 'types.ts'); + const tsFiles: Array = HANDLE_ALL_FILE_FOLDERS.has(packageName) + ? allFiles.filter((f) => f.endsWith('.ts') && !f.endsWith('.test.ts') && !f.endsWith('index.ts')) + : allFiles.filter((f) => path.basename(f) === 'types.ts'); const packageOut = path.join(root, 'generated', packageName); // Clean package output @@ -69,9 +67,10 @@ async function run(): Promise { const schema = generator.getZodSchemasFile(file); const parentName = path.basename(path.dirname(file)); - // Special-case `core`: use the original file name (e.g. `blizzard-api.ts`, `resource.ts`) - // to avoid many files named `src.ts` overwriting each other. - const outName = packageName === 'core' ? path.basename(file) : `${parentName}.ts`; + // For the packages where we only handle `types.ts`, use the parent folder name as output file name. + // E.g. `packages/wow/src/character-hunter-pets/types.ts` -> `generated/wow/character-hunter-pets.ts` + // For other packages (like `core`), we use the original file name. + const outName = HANDLE_ALL_FILE_FOLDERS.has(packageName) ? path.basename(file) : `${parentName}.ts`; const outPath = path.join(packageOut, outName); await fs.writeFile(outPath, schema, 'utf8'); console.log('Wrote', path.relative(root, outPath)); @@ -79,6 +78,23 @@ async function run(): Promise { console.error('Failed to generate for', file, (error as Error)?.message ?? error); } } + + // After generating all files for the package, write an `index.ts` that + // re-exports everything in the package output directory. + try { + const generatedFiles = await fs.readdir(packageOut); + const exportLines = generatedFiles + .filter((f) => f.endsWith('.ts') && f !== 'index.ts') + .map((f) => `export * from './${path.basename(f, '.ts')}';`); + + if (exportLines.length > 0) { + const indexContent = exportLines.join('\n') + '\n'; + await fs.writeFile(path.join(packageOut, 'index.ts'), indexContent, 'utf8'); + console.log('Wrote', path.relative(root, path.join(packageOut, 'index.ts'))); + } + } catch (error) { + console.error('Failed to write index.ts for', packageName, (error as Error)?.message ?? error); + } } } diff --git a/scripts/input-output-mapping.ts b/scripts/input-output-mapping.ts index 8e0fbd09..acab126e 100644 --- a/scripts/input-output-mapping.ts +++ b/scripts/input-output-mapping.ts @@ -4,6 +4,6 @@ export const inputOutputMappings: Array = [ //Core { input: '@blizzard-api/core', - output: '../core/base', + output: '../core', }, ]; From 98cbf9343d151e338529c6a2271f7300105861d9 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 23:32:58 +0100 Subject: [PATCH 04/52] Move base parameters into the core package to improve zod generation and reusability across packages --- .changeset/violet-bats-build.md | 9 + .changeset/witty-bears-return.md | 5 + generated/classic-wow/auction-house.ts | 14 +- generated/classic-wow/character-profile.ts | 13 +- .../classic-wow/character-specialization.ts | 7 +- generated/classic-wow/character-statistics.ts | 5 +- generated/classic-wow/guild.ts | 36 ++- generated/classic-wow/playable-class.ts | 11 +- generated/core/base.ts | 102 ++++++++ generated/core/index.ts | 1 + generated/core/locales.ts | 33 +++ generated/d3/game-data.ts | 51 ++-- generated/hs/card-backs.ts | 29 ++- generated/hs/cards.ts | 34 +-- generated/hs/metadata.ts | 57 +++-- generated/sc2/league.ts | 3 +- generated/wow/account-profile.ts | 133 +++++------ generated/wow/achievements.ts | 35 ++- generated/wow/auction-house.ts | 3 +- generated/wow/azerite-essence.ts | 38 ++- generated/wow/character-achievements.ts | 31 +-- generated/wow/character-appearance.ts | 36 ++- generated/wow/character-collections.ts | 75 +++--- generated/wow/character-encounters.ts | 45 ++-- generated/wow/character-equipment.ts | 67 +++--- generated/wow/character-hunter-pets.ts | 9 +- generated/wow/character-media.ts | 5 +- .../wow/character-mythic-keystone-profile.ts | 23 +- generated/wow/character-professions.ts | 9 +- generated/wow/character-profile.ts | 13 +- generated/wow/character-pvp.ts | 19 +- generated/wow/character-quests.ts | 9 +- generated/wow/character-reputations.ts | 7 +- generated/wow/character-soulbinds.ts | 17 +- generated/wow/character-specializations.ts | 7 +- generated/wow/character-statistics.ts | 5 +- generated/wow/character-titles.ts | 7 +- generated/wow/connected-realm.ts | 101 +++++--- generated/wow/covenant.ts | 17 +- generated/wow/creature.ts | 55 +++-- generated/wow/guild-crest.ts | 23 +- generated/wow/guild.ts | 80 +++---- generated/wow/heirloom.ts | 57 ++--- generated/wow/item.ts | 221 +++++++++--------- generated/wow/journal.ts | 138 ++++++----- generated/wow/media-search.ts | 4 +- generated/wow/modified-crafting.ts | 9 +- generated/wow/mount.ts | 41 ++-- generated/wow/mythic-keystone-affix.ts | 11 +- generated/wow/mythic-keystone-dungeon.ts | 47 ++-- generated/wow/mythic-keystone-leaderboard.ts | 13 +- generated/wow/mythic-raid-leaderboard.ts | 16 +- generated/wow/pet.ts | 21 +- generated/wow/playable-class.ts | 42 ++-- generated/wow/playable-race.ts | 11 +- generated/wow/playable-specialization.ts | 52 ++--- generated/wow/power-type.ts | 7 +- generated/wow/profession.ts | 29 +-- generated/wow/pvp-season.ts | 38 ++- generated/wow/pvp-tier.ts | 21 +- generated/wow/quest.ts | 29 +-- generated/wow/realm.ts | 76 +++--- generated/wow/region.ts | 5 +- generated/wow/reputations.ts | 35 ++- generated/wow/spell.ts | 37 ++- generated/wow/talent.ts | 41 ++-- generated/wow/tech-talent.ts | 11 +- generated/wow/title.ts | 9 +- generated/wow/toy.ts | 17 +- generated/wow/wow-token.ts | 3 +- .../src/auction-house/auction-house.ts | 6 +- .../classic-wow/src/auction-house/types.ts | 3 +- packages/classic-wow/src/base.ts | 4 - .../character-achievements.test.ts | 6 +- .../character-achievements.ts | 6 +- .../character-equipment.test.ts | 6 +- .../character-equipment.ts | 4 +- .../character-hunter-pets.test.ts | 6 +- .../character-hunter-pets.ts | 4 +- .../character-media/character-media.test.ts | 6 +- .../src/character-media/character-media.ts | 4 +- .../character-profile.test.ts | 6 +- .../character-profile/character-profile.ts | 6 +- .../src/character-profile/types.ts | 3 +- .../character-specialization.test.ts | 6 +- .../character-specialization.ts | 4 +- .../src/character-specialization/types.ts | 2 +- .../character-statistics.test.ts | 6 +- .../character-statistics.ts | 4 +- .../src/character-statistics/types.ts | 2 +- .../src/connected-realm/connected-realm.ts | 8 +- .../classic-wow/src/creature/creature.test.ts | 20 +- packages/classic-wow/src/creature/creature.ts | 18 +- .../src/guild-crest/guild-crest.test.ts | 8 +- .../src/guild-crest/guild-crest.ts | 8 +- packages/classic-wow/src/guild/types.ts | 2 +- packages/classic-wow/src/item/item.test.ts | 16 +- packages/classic-wow/src/item/item.ts | 14 +- .../src/media-search/media-search.test.ts | 8 +- .../src/media-search/media-search.ts | 4 +- .../src/playable-class/playable-class.test.ts | 8 +- .../src/playable-class/playable-class.ts | 8 +- .../classic-wow/src/playable-class/types.ts | 2 +- .../src/playable-race/playable-race.test.ts | 6 +- .../src/playable-race/playable-race.ts | 6 +- .../src/power-type/power-type.test.ts | 8 +- .../classic-wow/src/power-type/power-type.ts | 8 +- .../src/pvp-season/pvp-season.test.ts | 22 +- .../classic-wow/src/pvp-season/pvp-season.ts | 20 +- packages/classic-wow/src/realm/realm.test.ts | 10 +- packages/classic-wow/src/realm/realm.ts | 16 +- .../classic-wow/src/region/region.test.ts | 6 +- packages/classic-wow/src/region/region.ts | 8 +- packages/core/src/base.ts | 136 +++++++++++ packages/core/src/blizzard-api.ts | 23 +- packages/core/src/index.ts | 9 +- packages/core/src/locales.ts | 22 ++ packages/core/src/search.ts | 15 -- packages/d3/src/act/act.test.ts | 6 +- packages/d3/src/act/act.ts | 6 +- .../artisan-and-recipe.test.ts | 6 +- .../artisan-and-recipe/artisan-and-recipe.ts | 6 +- packages/d3/src/base.ts | 17 -- .../character-class-and-skill.test.ts | 6 +- .../character-class-and-skill.ts | 6 +- packages/d3/src/follower/follower.test.ts | 4 +- packages/d3/src/follower/follower.ts | 4 +- packages/d3/src/game-data/game-data.test.ts | 14 +- packages/d3/src/game-data/game-data.ts | 16 +- packages/d3/src/game-data/types.ts | 2 +- packages/d3/src/item-type/item-type.test.ts | 6 +- packages/d3/src/item-type/item-type.ts | 6 +- packages/d3/src/item/item.test.ts | 4 +- packages/d3/src/item/item.ts | 4 +- packages/d3/src/profile/profile.test.ts | 10 +- packages/d3/src/profile/profile.ts | 12 +- packages/hs/src/base.ts | 7 - packages/hs/src/card-backs/types.ts | 5 +- packages/hs/src/cards/cards.test.ts | 7 +- packages/hs/src/cards/cards.ts | 2 +- packages/hs/src/cards/types.ts | 3 +- packages/hs/src/metadata/types.ts | 2 +- packages/sc2/src/ladder/ladder.test.ts | 2 +- packages/sc2/src/ladder/ladder.ts | 4 +- packages/sc2/src/league/types.ts | 2 +- packages/sc2/src/legacy/legacy.ts | 4 +- packages/sc2/src/profile/profile.test.ts | 4 +- packages/sc2/src/profile/profile.ts | 4 +- packages/sc2/src/{base.ts => regions.ts} | 31 +-- packages/wow/src/account-profile/types.ts | 2 +- .../wow/src/achievements/achievements.test.ts | 12 +- packages/wow/src/achievements/achievements.ts | 8 +- packages/wow/src/achievements/types.ts | 2 +- .../wow/src/auction-house/auction-house.ts | 6 +- packages/wow/src/auction-house/types.ts | 2 +- .../azerite-essence/azerite-essence.test.ts | 14 +- .../src/azerite-essence/azerite-essence.ts | 10 +- packages/wow/src/azerite-essence/types.ts | 4 +- packages/wow/src/base.ts | 126 ---------- .../wow/src/character-achievements/types.ts | 2 +- .../wow/src/character-appearance/types.ts | 2 +- .../wow/src/character-collections/types.ts | 2 +- .../wow/src/character-encounters/types.ts | 2 +- packages/wow/src/character-equipment/types.ts | 2 +- .../wow/src/character-hunter-pets/types.ts | 2 +- packages/wow/src/character-media/types.ts | 2 +- .../types.ts | 2 +- .../wow/src/character-professions/types.ts | 2 +- packages/wow/src/character-profile/types.ts | 2 +- packages/wow/src/character-pvp/types.ts | 2 +- packages/wow/src/character-quests/types.ts | 2 +- .../wow/src/character-reputations/types.ts | 2 +- packages/wow/src/character-soulbinds/types.ts | 2 +- .../src/character-specializations/types.ts | 2 +- .../wow/src/character-statistics/types.ts | 2 +- packages/wow/src/character-titles/types.ts | 2 +- .../connected-realm/connected-realm.test.ts | 6 +- .../src/connected-realm/connected-realm.ts | 8 +- packages/wow/src/connected-realm/types.ts | 15 +- packages/wow/src/covenant/covenant.test.ts | 16 +- packages/wow/src/covenant/covenant.ts | 16 +- packages/wow/src/covenant/types.ts | 2 +- packages/wow/src/creature/creature.test.ts | 20 +- packages/wow/src/creature/creature.ts | 18 +- packages/wow/src/creature/types.ts | 4 +- .../wow/src/guild-crest/guild-crest.test.ts | 8 +- packages/wow/src/guild-crest/guild-crest.ts | 8 +- packages/wow/src/guild-crest/types.ts | 2 +- packages/wow/src/guild/types.ts | 2 +- packages/wow/src/heirloom/heirloom.test.ts | 6 +- packages/wow/src/heirloom/heirloom.ts | 6 +- packages/wow/src/heirloom/types.ts | 2 +- packages/wow/src/item/item.test.ts | 20 +- packages/wow/src/item/item.ts | 18 +- packages/wow/src/item/types.ts | 6 +- packages/wow/src/journal/journal.test.ts | 20 +- packages/wow/src/journal/journal.ts | 18 +- packages/wow/src/journal/types.ts | 4 +- .../wow/src/media-search/media-search.test.ts | 8 +- packages/wow/src/media-search/media-search.ts | 4 +- packages/wow/src/media-search/types.ts | 4 +- .../modified-crafting.test.ts | 12 +- .../modified-crafting/modified-crafting.ts | 12 +- packages/wow/src/modified-crafting/types.ts | 2 +- packages/wow/src/mount/mount.test.ts | 10 +- packages/wow/src/mount/mount.ts | 8 +- packages/wow/src/mount/types.ts | 4 +- .../mythic-keystone-affix.test.ts | 8 +- .../mythic-keystone-affix.ts | 8 +- .../wow/src/mythic-keystone-affix/types.ts | 2 +- .../mythic-keystone-dungeon.test.ts | 16 +- .../mythic-keystone-dungeon.ts | 16 +- .../wow/src/mythic-keystone-dungeon/types.ts | 2 +- .../mythic-keystone-leaderboard.test.ts | 6 +- .../mythic-keystone-leaderboard.ts | 6 +- .../src/mythic-keystone-leaderboard/types.ts | 2 +- .../mythic-raid-leaderboard.test.ts | 6 +- .../mythic-raid-leaderboard.ts | 7 +- .../wow/src/mythic-raid-leaderboard/types.ts | 4 +- packages/wow/src/pet/pet.test.ts | 14 +- packages/wow/src/pet/pet.ts | 14 +- packages/wow/src/pet/types.ts | 2 +- .../src/playable-class/playable-class.test.ts | 10 +- .../wow/src/playable-class/playable-class.ts | 10 +- packages/wow/src/playable-class/types.ts | 2 +- .../src/playable-race/playable-race.test.ts | 6 +- .../wow/src/playable-race/playable-race.ts | 6 +- packages/wow/src/playable-race/types.ts | 2 +- .../playable-specialization.test.ts | 8 +- .../playable-specialization.ts | 8 +- .../wow/src/playable-specialization/types.ts | 2 +- .../wow/src/power-type/power-type.test.ts | 6 +- packages/wow/src/power-type/power-type.ts | 6 +- packages/wow/src/power-type/types.ts | 2 +- .../wow/src/profession/profession.test.ts | 14 +- packages/wow/src/profession/profession.ts | 14 +- packages/wow/src/profession/types.ts | 2 +- .../wow/src/pvp-season/pvp-season.test.ts | 12 +- packages/wow/src/pvp-season/pvp-season.ts | 12 +- packages/wow/src/pvp-season/types.ts | 2 +- packages/wow/src/pvp-tier/pvp-tier.test.ts | 8 +- packages/wow/src/pvp-tier/pvp-tier.ts | 8 +- packages/wow/src/pvp-tier/types.ts | 2 +- packages/wow/src/quest/quest.test.ts | 18 +- packages/wow/src/quest/quest.ts | 18 +- packages/wow/src/quest/types.ts | 2 +- packages/wow/src/realm/realm.test.ts | 10 +- packages/wow/src/realm/realm.ts | 8 +- packages/wow/src/realm/types.ts | 4 +- packages/wow/src/region/region.test.ts | 6 +- packages/wow/src/region/region.ts | 6 +- packages/wow/src/region/types.ts | 2 +- .../wow/src/reputations/reputations.test.ts | 10 +- packages/wow/src/reputations/reputations.ts | 10 +- packages/wow/src/reputations/types.ts | 2 +- packages/wow/src/spell/spell.test.ts | 10 +- packages/wow/src/spell/spell.ts | 8 +- packages/wow/src/spell/types.ts | 4 +- packages/wow/src/talent/talent.test.ts | 16 +- packages/wow/src/talent/talent.ts | 16 +- packages/wow/src/talent/types.ts | 2 +- .../wow/src/tech-talent/tech-talent.test.ts | 12 +- packages/wow/src/tech-talent/tech-talent.ts | 12 +- packages/wow/src/tech-talent/types.ts | 2 +- packages/wow/src/title/title.test.ts | 6 +- packages/wow/src/title/title.ts | 6 +- packages/wow/src/title/types.ts | 2 +- packages/wow/src/toy/toy.test.ts | 6 +- packages/wow/src/toy/toy.ts | 6 +- packages/wow/src/toy/types.ts | 2 +- packages/wow/src/wow-token/types.ts | 2 +- packages/wow/src/wow-token/wow-token.test.ts | 4 +- packages/wow/src/wow-token/wow-token.ts | 4 +- scripts/generate-zod.ts | 12 +- 274 files changed, 1965 insertions(+), 2092 deletions(-) create mode 100644 .changeset/violet-bats-build.md create mode 100644 .changeset/witty-bears-return.md create mode 100644 generated/core/locales.ts delete mode 100644 packages/classic-wow/src/base.ts create mode 100644 packages/core/src/locales.ts delete mode 100644 packages/d3/src/base.ts delete mode 100644 packages/hs/src/base.ts rename packages/sc2/src/{base.ts => regions.ts} (57%) delete mode 100644 packages/wow/src/base.ts diff --git a/.changeset/violet-bats-build.md b/.changeset/violet-bats-build.md new file mode 100644 index 00000000..132fc12e --- /dev/null +++ b/.changeset/violet-bats-build.md @@ -0,0 +1,9 @@ +--- +'@blizzard-api/classic-wow': major +'@blizzard-api/sc2': major +'@blizzard-api/wow': major +'@blizzard-api/d3': major +'@blizzard-api/hs': major +--- + +Moved a series of base parameters and generic types/interfaces into @blizzard-api/core to better share types between packages. If you can't access a type or interface anymore, it should now be available in @blizzard-api/core. diff --git a/.changeset/witty-bears-return.md b/.changeset/witty-bears-return.md new file mode 100644 index 00000000..e1c05bbc --- /dev/null +++ b/.changeset/witty-bears-return.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/core': minor +--- + +Add a series of base parameters that can be used when dealing with Blizzard API. These are used throughout the game packages. diff --git a/generated/classic-wow/auction-house.ts b/generated/classic-wow/auction-house.ts index d32120ec..3d3734b5 100644 --- a/generated/classic-wow/auction-house.ts +++ b/generated/classic-wow/auction-house.ts @@ -1,6 +1,10 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { nameIdSchema } from '../core'; +import { nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; + +export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ + auctions: z.array(nameIdKeySchema), +}); const auctionSchema = z.object({ bid: z.number(), @@ -15,14 +19,6 @@ const auctionSchema = z.object({ time_left: z.union([z.literal('LONG'), z.literal('MEDIUM'), z.literal('SHORT'), z.literal('VERY_LONG')]), }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ - auctions: z.array(nameIdKeySchema), -}); - export const auctionsResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ auctions: z.array(auctionSchema), connected_realm: z.object({ diff --git a/generated/classic-wow/character-profile.ts b/generated/classic-wow/character-profile.ts index 0c7c6c44..9994b86c 100644 --- a/generated/classic-wow/character-profile.ts +++ b/generated/classic-wow/character-profile.ts @@ -1,17 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const factionSchema = z.any(); - -const genderSchema = z.any(); - -const realmSchema = z.any(); +import { factionSchema, genderSchema, hrefSchema, nameIdKeySchema, realmSchema, responseBaseSchema } from '../core'; const guildSchema = nameIdKeySchema.extend({ faction: factionSchema, diff --git a/generated/classic-wow/character-specialization.ts b/generated/classic-wow/character-specialization.ts index 1645b167..f1e92114 100644 --- a/generated/classic-wow/character-specialization.ts +++ b/generated/classic-wow/character-specialization.ts @@ -1,11 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdSchema = z.any(); +import { characterSchema, nameIdSchema, responseBaseSchema } from '../core'; const spellTooltipSchema = z.object({ cast_time: z.union([z.literal('Channeled'), z.literal('Instant'), z.literal('Instant cast'), z.literal('Passive')]), diff --git a/generated/classic-wow/character-statistics.ts b/generated/classic-wow/character-statistics.ts index 91b04968..ab7639bf 100644 --- a/generated/classic-wow/character-statistics.ts +++ b/generated/classic-wow/character-statistics.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, responseBaseSchema } from '../core'; const baseEffectiveStatSchema = z.object({ base: z.number(), @@ -12,10 +13,6 @@ const ratingWithValueSchema = z.object({ value: z.number(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - export const characterStatisticsSummaryResponseSchema = responseBaseSchema.extend({ agility: baseEffectiveStatSchema, arcane_resistance: baseEffectiveStatSchema, diff --git a/generated/classic-wow/guild.ts b/generated/classic-wow/guild.ts index 22c7d3f0..71403214 100644 --- a/generated/classic-wow/guild.ts +++ b/generated/classic-wow/guild.ts @@ -1,31 +1,19 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const guildRetailResponseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const characterSchema = z.any(); - -const factionSchema = z.any(); - -const realmSchema = z.any(); - -const keyBaseSchema = z.any(); +import { + characterSchema, + factionSchema, + keyBaseSchema, + nameIdKeySchema, + realmSchema, + responseBaseSchema, +} from '../core'; const guildSchema = nameIdKeySchema.extend({ faction: factionSchema, realm: realmSchema, }); -export const guildResponseSchema = guildRetailResponseSchema.omit({ crest: true }).and( - z.object({ - crest: guildRetailResponseSchema.shape.crest.optional(), - }), -); - const characterAchievementSchema = z.object({ achievement: nameIdKeySchema, character: characterSchema, @@ -41,6 +29,8 @@ const rosterMemberCharacterSchema = characterSchema.extend({ playable_race: playableSchema, }); +const guildRetailResponseSchema = z.any(); + export const guildAchievementsClassicEraResponseSchema = responseBaseSchema.extend({ guild: guildSchema, }); @@ -53,6 +43,12 @@ const activityElementSchema = z.object({ timestamp: z.number(), }); +export const guildResponseSchema = guildRetailResponseSchema.omit({ crest: true }).and( + z.object({ + crest: guildRetailResponseSchema.shape.crest.optional(), + }), +); + const memberSchema = z.object({ character: rosterMemberCharacterSchema, rank: z.number(), diff --git a/generated/classic-wow/playable-class.ts b/generated/classic-wow/playable-class.ts index 9dbe8e01..55e770df 100644 --- a/generated/classic-wow/playable-class.ts +++ b/generated/classic-wow/playable-class.ts @@ -1,15 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const nameIdSchema = z.any(); - -const responseBaseSchema = z.any(); - -const genderNameSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { genderNameSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; const mediaSchema = keyBaseSchema.extend({ id: z.number(), diff --git a/generated/core/base.ts b/generated/core/base.ts index dbb499f8..8eccad5a 100644 --- a/generated/core/base.ts +++ b/generated/core/base.ts @@ -1,6 +1,72 @@ // Generated by ts-to-zod import { z } from 'zod'; +/** + * Base search parameters + * orderby The field to order results by. + * _page The page number to return. + * @example + * const params: BaseSearchParameters = { + * orderby: 'name', + * _page: 1, + * }; + */ +export const baseSearchParametersSchema = z.object({ + _page: z.number().optional(), + orderby: z.union([z.array(z.string()), z.string()]).optional(), +}); + +/** + * A record containing the RGBA values of a color. + */ +export const colorSchema = z.object({ + a: z.number(), + b: z.number(), + g: z.number(), + r: z.number(), +}); + +/** + * The playable factions in World of Warcraft. + */ +export const factionsSchema = z.union([z.literal('ALLIANCE'), z.literal('HORDE')]); + +/** + * The gender associated with a character or entity in World of Warcraft. + */ +export const genderSchema = z.object({ + name: z.union([z.literal('Female'), z.literal('Male')]), + type: z.union([z.literal('FEMALE'), z.literal('MALE')]), +}); + +/** + * The playable gender names/descriptions in World of Warcraft. + */ +export const genderNameSchema = z.object({ + female: z.string(), + male: z.string(), +}); + +export const hrefSchema = z.object({ + href: z.string(), +}); + +/** + * Base record interface containing key.href property that often appear in Blizzard API responses. + */ +export const keyBaseSchema = z.object({ + key: hrefSchema, +}); + +/** + * The media asset associated with a character or entity in World of Warcraft. + */ +export const mediaAssetSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), +}); + /** * Base record interface containing name and id properties that often appear together in Blizzard API responses. */ @@ -8,3 +74,39 @@ export const nameIdSchema = z.object({ id: z.number(), name: z.string(), }); + +/** + * Base record containing both {@link KeyBase} and {@link NameId} interfaces. + */ +export const nameIdKeySchema = keyBaseSchema.extend(nameIdSchema.shape); + +/** + * The standard structure to represent a World of Warcraft Realm. + */ +export const realmSchema = nameIdKeySchema.extend({ + slug: z.string(), +}); + +/** + * Base interface for Blizzard API responses. + */ +export const responseBaseSchema = z.object({ + _links: z.object({ + self: hrefSchema, + }), +}); + +/** + * The standard structure to represent a World of Warcraft Character. + */ +export const characterSchema = nameIdKeySchema.extend({ + realm: realmSchema, +}); + +/** + * The faction associated with a character or entity in World of Warcraft. + */ +export const factionSchema = z.object({ + name: z.union([z.literal('Alliance'), z.literal('Horde')]), + type: factionsSchema, +}); diff --git a/generated/core/index.ts b/generated/core/index.ts index 0a3c673a..558aeeb7 100644 --- a/generated/core/index.ts +++ b/generated/core/index.ts @@ -1,2 +1,3 @@ export * from './base'; +export * from './locales'; export * from './namespace'; diff --git a/generated/core/locales.ts b/generated/core/locales.ts new file mode 100644 index 00000000..847ddb50 --- /dev/null +++ b/generated/core/locales.ts @@ -0,0 +1,33 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +/** + * Possible locales for use within the Blizzard API. + */ +export const localesSchema = z.union([ + z.literal('de_DE'), + z.literal('en_GB'), + z.literal('en_US'), + z.literal('es_ES'), + z.literal('es_MX'), + z.literal('fr_FR'), + z.literal('it_IT'), + z.literal('ko_KR'), + z.literal('multi'), + z.literal('pt_BR'), + z.literal('pt_PT'), + z.literal('ru_RU'), + z.literal('zh_CN'), + z.literal('zh_TW'), +]); + +/** + * Possible regions for use within the Blizzard API. + */ +export const originsSchema = z.union([ + z.literal('cn'), + z.literal('eu'), + z.literal('kr'), + z.literal('tw'), + z.literal('us'), +]); diff --git a/generated/d3/game-data.ts b/generated/d3/game-data.ts index 138bd06c..ead52e8b 100644 --- a/generated/d3/game-data.ts +++ b/generated/d3/game-data.ts @@ -1,5 +1,30 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { responseBaseSchema } from '../core'; + +export const eraIndexResponseSchema = responseBaseSchema.extend({ + current_era: z.number(), + era: z.array( + z.object({ + href: z.string(), + }), + ), + generated_by: z.string(), + last_update_time: z.string(), +}); + +export const seasonIndexResponseSchema = responseBaseSchema.extend({ + current_season: z.number(), + generated_by: z.string(), + last_update_time: z.string(), + season: z.array( + z.object({ + href: z.string(), + }), + ), + service_current_season: z.number(), + service_season_state: z.string(), +}); const leaderboardSchema = z.object({ hardcore: z.boolean().optional(), @@ -46,19 +71,6 @@ const playerSchema = z.object({ key: z.string(), }); -const responseBaseSchema = z.any(); - -export const eraIndexResponseSchema = responseBaseSchema.extend({ - current_era: z.number(), - era: z.array( - z.object({ - href: z.string(), - }), - ), - generated_by: z.string(), - last_update_time: z.string(), -}); - const columnSchema = z.object({ hidden: z.boolean(), id: leaderboardIdSchema, @@ -80,19 +92,6 @@ const eraLeaderboardSchema = z.object({ team_size: z.number(), }); -export const seasonIndexResponseSchema = responseBaseSchema.extend({ - current_season: z.number(), - generated_by: z.string(), - last_update_time: z.string(), - season: z.array( - z.object({ - href: z.string(), - }), - ), - service_current_season: z.number(), - service_season_state: z.string(), -}); - export const seasonLeaderboardResponseSchema = responseBaseSchema.extend({ achievement_points: z.boolean(), column: z.array(columnSchema), diff --git a/generated/hs/card-backs.ts b/generated/hs/card-backs.ts index 6c6c241f..5b33eff7 100644 --- a/generated/hs/card-backs.ts +++ b/generated/hs/card-backs.ts @@ -2,6 +2,23 @@ import { z } from 'zod'; import { localesSchema } from '../core'; +const searchSortOptionSchema = z.union([ + z.literal('attack:asc'), + z.literal('attack:desc'), + z.literal('class:asc'), + z.literal('class:desc'), + z.literal('dataAdded:asc'), + z.literal('dataAdded:desc'), + z.literal('groupByClass:asc'), + z.literal('groupByClass:desc'), + z.literal('health:asc'), + z.literal('health:desc'), + z.literal('manaCost:asc'), + z.literal('manaCost:desc'), + z.literal('name:asc'), + z.literal('name:desc'), +]); + export const singleCardBackSearchResponseSchema = z.object({ id: z.number(), image: z.string(), @@ -11,7 +28,17 @@ export const singleCardBackSearchResponseSchema = z.object({ text: z.union([z.record(localesSchema, z.string()), z.string()]), }); -const searchSortOptionSchema = z.any(); +const searchOptionsSchema = z.union([ + z.literal('attack'), + z.literal('class'), + z.literal('dataAdded'), + z.literal('groupByClass'), + z.literal('health'), + z.literal('manaCost'), + z.literal('name'), +]); + +const sortOptionsSchema = z.union([z.literal('asc'), z.literal('desc')]); export const cardBackSearchParametersSchema = z.object({ cardBackCategory: z diff --git a/generated/hs/cards.ts b/generated/hs/cards.ts index e351eb1d..d09e16bc 100644 --- a/generated/hs/cards.ts +++ b/generated/hs/cards.ts @@ -26,12 +26,15 @@ export const fetchOneCardResponseSchema = z.object({ text: z.union([z.record(localesSchema, z.string()), z.string()]), }); -const statsByLevelSchema = z.object({ - attack: z.number(), - health: z.number(), -}); - -const gameModeSchema = z.any(); +export const gameModeSchema = z.union([ + z.literal('arena'), + z.literal('battlegrounds'), + z.literal('classic'), + z.literal('constructed'), + z.literal('duels'), + z.literal('mercenaries'), + z.literal('standard'), +]); const baseSearchParametersSchema = z.object({ gameMode: gameModeSchema.optional(), @@ -58,6 +61,18 @@ const baseSearchParametersSchema = z.object({ .optional(), }); +const statsByLevelSchema = z.object({ + attack: z.number(), + health: z.number(), +}); + +export const blizzardCardSearchParametersSchema = baseSearchParametersSchema.extend({ + attack: z.string().optional(), + defaultMercenary: z.string().optional(), + health: z.string().optional(), + mercenaryId: z.string().optional(), +}); + export const cardSearchParametersSchema = baseSearchParametersSchema.extend({ attack: z.union([z.array(z.number()), z.number()]).optional(), defaultMercenary: z.union([z.array(z.number()), z.number()]).optional(), @@ -76,13 +91,6 @@ const mercenaryHeroSchema = z.object({ statsByLevel: z.record(z.string(), statsByLevelSchema), }); -export const blizzardCardSearchParametersSchema = baseSearchParametersSchema.extend({ - attack: z.string().optional(), - defaultMercenary: z.string().optional(), - health: z.string().optional(), - mercenaryId: z.string().optional(), -}); - const cardSchema = z.object({ artistName: z.string().nullable(), attack: z.number(), diff --git a/generated/hs/metadata.ts b/generated/hs/metadata.ts index bb074b16..8e13b3c1 100644 --- a/generated/hs/metadata.ts +++ b/generated/hs/metadata.ts @@ -1,5 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { nameIdSchema } from '../core'; + +const gameModeSchema = nameIdSchema.extend({ + gameModes: z.array(z.number()).optional(), + slug: z.string(), +}); const classSchema = z.object({ alternateHeroCardIds: z.array(z.number()).optional(), @@ -10,26 +16,6 @@ const classSchema = z.object({ slug: z.string(), }); -const setGroupSchema = z.object({ - cardSets: z.array(z.string()), - icon: z.string().optional(), - name: z.string(), - slug: z.string(), - standard: z.boolean().optional(), - svg: z.string().optional().nullable(), - year: z.number().optional(), - yearRange: z.string().optional(), -}); - -const setTypeSchema = z.union([z.literal(''), z.literal('adventure'), z.literal('base'), z.literal('expansion')]); - -const nameIdSchema = z.any(); - -const gameModeSchema = nameIdSchema.extend({ - gameModes: z.array(z.number()).optional(), - slug: z.string(), -}); - const keywordSchema = nameIdSchema.extend({ gameModes: z.array(z.number()), refText: z.string(), @@ -43,18 +29,20 @@ const raritySchema = nameIdSchema.extend({ slug: z.string(), }); -const setSchema = nameIdSchema.extend({ - aliasSetIds: z.array(z.number()).optional(), - collectibleCount: z.number(), - collectibleRevealedCount: z.number(), - hyped: z.boolean(), - nonCollectibleCount: z.number(), - nonCollectibleRevealedCount: z.number(), +const setGroupSchema = z.object({ + cardSets: z.array(z.string()), + icon: z.string().optional(), + name: z.string(), slug: z.string(), - type: setTypeSchema, + standard: z.boolean().optional(), + svg: z.string().optional().nullable(), + year: z.number().optional(), + yearRange: z.string().optional(), }); -export const specificMetadataResponseSchema = nameIdSchema.extend({ +const setTypeSchema = z.union([z.literal(''), z.literal('adventure'), z.literal('base'), z.literal('expansion')]); + +const setSchema = nameIdSchema.extend({ aliasSetIds: z.array(z.number()).optional(), collectibleCount: z.number(), collectibleRevealedCount: z.number(), @@ -83,3 +71,14 @@ export const allMetadataResponseSchema = z.object({ spellSchools: z.array(gameModeSchema), types: z.array(gameModeSchema), }); + +export const specificMetadataResponseSchema = nameIdSchema.extend({ + aliasSetIds: z.array(z.number()).optional(), + collectibleCount: z.number(), + collectibleRevealedCount: z.number(), + hyped: z.boolean(), + nonCollectibleCount: z.number(), + nonCollectibleRevealedCount: z.number(), + slug: z.string(), + type: setTypeSchema, +}); diff --git a/generated/sc2/league.ts b/generated/sc2/league.ts index b456e4b6..5dddbc86 100644 --- a/generated/sc2/league.ts +++ b/generated/sc2/league.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { responseBaseSchema } from '../core'; const keySchema = z.object({ league_id: z.number(), @@ -47,8 +48,6 @@ const tierSchema = z.object({ id: z.number(), }); -const responseBaseSchema = z.any(); - export const leagueDataResponseSchema = responseBaseSchema.extend({ key: keySchema, tier: z.array(tierSchema), diff --git a/generated/wow/account-profile.ts b/generated/wow/account-profile.ts index b22b9102..bdf68c53 100644 --- a/generated/wow/account-profile.ts +++ b/generated/wow/account-profile.ts @@ -1,47 +1,14 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const slotSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const protectedStatsSchema = z.object({ - level_gold_gained: z.number(), - level_gold_lost: z.number(), - level_item_value_gained: z.number(), - level_number_deaths: z.number(), - total_gold_gained: z.number(), - total_gold_lost: z.number(), - total_item_value_gained: z.number(), - total_number_deaths: z.number(), -}); - -const qualitySchema = z.object({ - name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), - type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), -}); - -const statsSchema = z.object({ - breed_id: z.number(), - health: z.number(), - power: z.number(), - speed: z.number(), -}); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const realmSchema = z.any(); - -const factionSchema = z.any(); - -const genderSchema = z.any(); - -const keyBaseSchema = z.any(); - -const nameIdSchema = z.any(); +import { + factionSchema, + genderSchema, + hrefSchema, + keyBaseSchema, + nameIdKeySchema, + nameIdSchema, + realmSchema, +} from '../core'; const linksSchema = z.object({ profile: hrefSchema, @@ -61,34 +28,14 @@ const mountSchema = z.object({ mount: nameIdKeySchema, }); -const petSchema = z.object({ - active_slot: z.number().optional(), - creature_display: keyBaseSchema - .and( - z.object({ - id: z.number(), - }), - ) - .optional(), - id: z.number(), - is_active: z.boolean().optional(), - is_favorite: z.boolean().optional(), - level: z.number(), - name: z.string().optional(), - quality: qualitySchema, - species: nameIdKeySchema, - stats: statsSchema, -}); - const toySchema = z.object({ is_favorite: z.boolean().optional(), toy: nameIdKeySchema, }); -export const accountTransmogsCollectionSummaryResponseSchema = z.object({ - _links: linksSchema, - appearance_sets: z.array(nameIdKeySchema), - slots: z.array(slotSchema), +const slotSchema = z.object({ + name: z.string(), + type: z.string(), }); const positionSchema = z.object({ @@ -100,6 +47,17 @@ const positionSchema = z.object({ zone: nameIdSchema, }); +const protectedStatsSchema = z.object({ + level_gold_gained: z.number(), + level_gold_lost: z.number(), + level_item_value_gained: z.number(), + level_number_deaths: z.number(), + total_gold_gained: z.number(), + total_gold_lost: z.number(), + total_item_value_gained: z.number(), + total_number_deaths: z.number(), +}); + const characterSchema = z.object({ character: hrefSchema, faction: factionSchema, @@ -113,6 +71,18 @@ const characterSchema = z.object({ realm: realmSchema, }); +const qualitySchema = z.object({ + name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), +}); + +const statsSchema = z.object({ + breed_id: z.number(), + health: z.number(), + power: z.number(), + speed: z.number(), +}); + const wowAccountSchema = z.object({ characters: z.array(characterSchema), id: z.number(), @@ -137,10 +107,23 @@ export const accountMountsCollectionSummaryResponseSchema = z.object({ mounts: z.array(mountSchema), }); -export const accountPetsCollectionSummaryResponseSchema = z.object({ - _links: linksSchema, - pets: z.array(petSchema), - unlocked_battle_pet_slots: z.number(), +const petSchema = z.object({ + active_slot: z.number().optional(), + creature_display: keyBaseSchema + .and( + z.object({ + id: z.number(), + }), + ) + .optional(), + id: z.number(), + is_active: z.boolean().optional(), + is_favorite: z.boolean().optional(), + level: z.number(), + name: z.string().optional(), + quality: qualitySchema, + species: nameIdKeySchema, + stats: statsSchema, }); export const accountProfileSummaryResponseSchema = z.object({ @@ -155,6 +138,12 @@ export const accountToysCollectionSummaryResponseSchema = z.object({ toys: z.array(toySchema), }); +export const accountTransmogsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + appearance_sets: z.array(nameIdKeySchema), + slots: z.array(slotSchema), +}); + export const protectedCharacterProfileSummaryResponseSchema = z.object({ _links: linksSchema, bind_position: positionSchema, @@ -166,3 +155,9 @@ export const protectedCharacterProfileSummaryResponseSchema = z.object({ protected_stats: protectedStatsSchema, wow_account: z.number(), }); + +export const accountPetsCollectionSummaryResponseSchema = z.object({ + _links: linksSchema, + pets: z.array(petSchema), + unlocked_battle_pet_slots: z.number(), +}); diff --git a/generated/wow/achievements.ts b/generated/wow/achievements.ts index 46d384a3..0a834e53 100644 --- a/generated/wow/achievements.ts +++ b/generated/wow/achievements.ts @@ -1,19 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const achievementMediaItemSchema = z.object({ - file_data_id: z.number(), - key: z.string(), - value: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * Interface for a response from the achievement category index endpoint. @@ -54,13 +41,10 @@ export const achievementIndexResponseSchema = responseBaseSchema.extend({ achievements: z.array(nameIdKeySchema), }); -/** - * Interface for a response from the achievement media endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const achievementMediaResponseSchema = responseBaseSchema.extend({ - assets: z.array(achievementMediaItemSchema), - id: z.number(), +const achievementMediaItemSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), }); /** @@ -80,3 +64,12 @@ export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema. media: keyBaseSchema, points: z.number(), }); + +/** + * Interface for a response from the achievement media endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const achievementMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(achievementMediaItemSchema), + id: z.number(), +}); diff --git a/generated/wow/auction-house.ts b/generated/wow/auction-house.ts index 119306c4..144c189c 100644 --- a/generated/wow/auction-house.ts +++ b/generated/wow/auction-house.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { responseBaseSchema } from '../core'; const auctionHouseTimeLeftSchema = z.union([ z.literal('LONG'), @@ -27,8 +28,6 @@ const auctionHousePostingSchema = z.object({ time_left: auctionHouseTimeLeftSchema, }); -const responseBaseSchema = z.any(); - const auctionHouseCommoditySchema = z.object({ id: z.number(), item: z.object({ diff --git a/generated/wow/azerite-essence.ts b/generated/wow/azerite-essence.ts index 2222dfb9..8421a045 100644 --- a/generated/wow/azerite-essence.ts +++ b/generated/wow/azerite-essence.ts @@ -1,25 +1,14 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; - -/** - * Interface for search parameters for azerite essences. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ - 'allowed_specializations.id': z.number().optional(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; /** * Interface for a response from the azerite essence index endpoint. @@ -49,6 +38,15 @@ const powerSchema = z.object({ rank: z.number(), }); +/** + * Interface for search parameters for azerite essences. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ + 'allowed_specializations.id': z.number().optional(), +}); + /** * Interface for a response item from the azerite essence search endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/character-achievements.ts b/generated/wow/character-achievements.ts index 88e7b78f..fb0f15e6 100644 --- a/generated/wow/character-achievements.ts +++ b/generated/wow/character-achievements.ts @@ -1,5 +1,17 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, hrefSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +const categoryProgressSchema = z.object({ + category: nameIdKeySchema, + points: z.number(), + quantity: z.number(), +}); + +const recentEventSchema = z.object({ + achievement: nameIdKeySchema, + timestamp: z.number(), +}); const statisticSchema = z.object({ description: z.string().optional().nullable(), @@ -21,25 +33,6 @@ const childCriterum3Schema = z.object({ is_completed: z.boolean(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const categoryProgressSchema = z.object({ - category: nameIdKeySchema, - points: z.number(), - quantity: z.number(), -}); - -const recentEventSchema = z.object({ - achievement: nameIdKeySchema, - timestamp: z.number(), -}); - const categorySchema = z.object({ id: z.number(), name: z.string(), diff --git a/generated/wow/character-appearance.ts b/generated/wow/character-appearance.ts index 6f876929..1d845a4b 100644 --- a/generated/wow/character-appearance.ts +++ b/generated/wow/character-appearance.ts @@ -1,5 +1,15 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { + characterSchema, + colorSchema, + factionSchema, + genderSchema, + keyBaseSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; const itemSchema = z.object({ enchant: z.number(), @@ -13,38 +23,22 @@ const itemSchema = z.object({ subclass: z.number(), }); +const rgbWithIdSchema = z.object({ + id: z.number(), + rgba: colorSchema, +}); + const choiceSchema = z.object({ display_order: z.number(), id: z.number(), name: z.string().optional(), }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const characterSchema = z.any(); - -const factionSchema = z.any(); - -const genderSchema = z.any(); - -const keyBaseSchema = z.any(); - -const nameIdSchema = z.any(); - -const colorSchema = z.any(); - const customizationSchema = z.object({ choice: choiceSchema, option: nameIdSchema, }); -const rgbWithIdSchema = z.object({ - id: z.number(), - rgba: colorSchema, -}); - const borderEmblemSchema = z.object({ color: rgbWithIdSchema, id: z.number(), diff --git a/generated/wow/character-collections.ts b/generated/wow/character-collections.ts index ca6a6fbe..7440933f 100644 --- a/generated/wow/character-collections.ts +++ b/generated/wow/character-collections.ts @@ -1,32 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const slotSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const qualitySchema = z.object({ - name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), - type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), -}); - -const statsSchema = z.object({ - breed_id: z.number(), - health: z.number(), - power: z.number(), - speed: z.number(), -}); - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { characterSchema, hrefSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const characterCollectionsIndexResponseSchema = responseBaseSchema.extend({ character: characterSchema, @@ -51,6 +25,36 @@ const mountSchema = z.object({ mount: nameIdKeySchema, }); +const toySchema = z.object({ + is_favorite: z.boolean().optional(), + toy: nameIdKeySchema, +}); + +const slotSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const qualitySchema = z.object({ + name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), +}); + +const statsSchema = z.object({ + breed_id: z.number(), + health: z.number(), + power: z.number(), + speed: z.number(), +}); + +export const characterHeirloomsCollectionSummaryResponseSchema = responseBaseSchema.extend({ + heirlooms: z.array(heirloomSchema), +}); + +export const characterMountsCollectionSummaryResponseSchema = responseBaseSchema.extend({ + mounts: z.array(mountSchema), +}); + const petSchema = z.object({ active_slot: z.number().optional(), creature_display: keyBaseSchema @@ -70,9 +74,8 @@ const petSchema = z.object({ stats: statsSchema, }); -const toySchema = z.object({ - is_favorite: z.boolean().optional(), - toy: nameIdKeySchema, +export const characterToysCollectionSummaryResponseSchema = responseBaseSchema.extend({ + toys: z.array(toySchema), }); export const characterTransmogCollectionSummaryResponseSchema = responseBaseSchema.extend({ @@ -80,19 +83,7 @@ export const characterTransmogCollectionSummaryResponseSchema = responseBaseSche slots: z.array(slotSchema), }); -export const characterHeirloomsCollectionSummaryResponseSchema = responseBaseSchema.extend({ - heirlooms: z.array(heirloomSchema), -}); - -export const characterMountsCollectionSummaryResponseSchema = responseBaseSchema.extend({ - mounts: z.array(mountSchema), -}); - export const characterPetsCollectionSummaryResponseSchema = responseBaseSchema.extend({ pets: z.array(petSchema), unlocked_battle_pet_slots: z.number(), }); - -export const characterToysCollectionSummaryResponseSchema = responseBaseSchema.extend({ - toys: z.array(toySchema), -}); diff --git a/generated/wow/character-encounters.ts b/generated/wow/character-encounters.ts index 62d536dc..558ed308 100644 --- a/generated/wow/character-encounters.ts +++ b/generated/wow/character-encounters.ts @@ -1,5 +1,12 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, hrefSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +export const characterEncountersSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + dungeons: hrefSchema, + raids: hrefSchema, +}); const dungeonDifficultiesSchema = z.object({ name: z.union([z.literal('Heroic'), z.literal('Mythic'), z.literal('Mythic+ Dungeons'), z.literal('Normal')]), @@ -11,6 +18,18 @@ const statusSchema = z.object({ type: z.union([z.literal('COMPLETE'), z.literal('IN_PROGRESS')]), }); +const encounterSchema = z.object({ + completed_count: z.number(), + encounter: nameIdKeySchema, + last_kill_timestamp: z.number(), +}); + +const progressSchema = z.object({ + completed_count: z.number(), + encounters: z.array(encounterSchema), + total_count: z.number(), +}); + const raidDifficultiesSchema = z.object({ name: z.union([ z.literal('10 Player'), @@ -34,32 +53,6 @@ const raidDifficultiesSchema = z.object({ ]), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -export const characterEncountersSummaryResponseSchema = responseBaseSchema.extend({ - character: characterSchema, - dungeons: hrefSchema, - raids: hrefSchema, -}); - -const encounterSchema = z.object({ - completed_count: z.number(), - encounter: nameIdKeySchema, - last_kill_timestamp: z.number(), -}); - -const progressSchema = z.object({ - completed_count: z.number(), - encounters: z.array(encounterSchema), - total_count: z.number(), -}); - const raidModeSchema = z.object({ difficulty: raidDifficultiesSchema, progress: progressSchema, diff --git a/generated/wow/character-equipment.ts b/generated/wow/character-equipment.ts index 7f65d589..e57b2ab7 100644 --- a/generated/wow/character-equipment.ts +++ b/generated/wow/character-equipment.ts @@ -1,5 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +const nameDescriptionSchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); const nameTypeSchema = z.object({ name: z.string(), @@ -29,39 +35,11 @@ const enchantmentSlotSchema = z.object({ type: z.string(), }); -const modifiedCraftingStatSchema = z.object({ - id: z.number(), - name: z.string(), - type: z.string(), -}); - -const sellPriceSchema = z.object({ - display_strings: displayStringsSchema, +const armorSchema = z.object({ + display: nameDescriptionSchema, value: z.number(), }); -const damageSchema = z.object({ - damage_class: nameTypeSchema, - display_string: z.string(), - max_value: z.number(), - min_value: z.number(), -}); - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); - -const colorSchema = z.any(); - -const nameDescriptionSchema = z.object({ - color: colorSchema, - display_string: z.string(), -}); - const enchantmentSchema = z.object({ display_string: z.string(), enchantment_id: z.number(), @@ -69,8 +47,14 @@ const enchantmentSchema = z.object({ source_item: nameIdKeySchema.optional(), }); -const armorSchema = z.object({ - display: nameDescriptionSchema, +const modifiedCraftingStatSchema = z.object({ + id: z.number(), + name: z.string(), + type: z.string(), +}); + +const sellPriceSchema = z.object({ + display_strings: displayStringsSchema, value: z.number(), }); @@ -104,12 +88,6 @@ const transmogSchema = z.object({ item_modified_appearance_id: z.number(), }); -const weaponSchema = z.object({ - attack_speed: displayStringValueSchema, - damage: damageSchema, - dps: displayStringValueSchema, -}); - const itemElementSchema = nameIdKeySchema.extend({ is_equipped: z.boolean().optional(), }); @@ -131,6 +109,19 @@ const setSchema = z.object({ items: z.array(itemElementSchema), }); +const damageSchema = z.object({ + damage_class: nameTypeSchema, + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const weaponSchema = z.object({ + attack_speed: displayStringValueSchema, + damage: damageSchema, + dps: displayStringValueSchema, +}); + const equippedItemSchema = z.object({ armor: armorSchema.optional(), binding: nameTypeSchema, diff --git a/generated/wow/character-hunter-pets.ts b/generated/wow/character-hunter-pets.ts index 04248b98..e2658d8d 100644 --- a/generated/wow/character-hunter-pets.ts +++ b/generated/wow/character-hunter-pets.ts @@ -1,13 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { characterSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const hunterPetSchema = z.object({ creature: nameIdKeySchema, diff --git a/generated/wow/character-media.ts b/generated/wow/character-media.ts index 74f4de5a..2d78e329 100644 --- a/generated/wow/character-media.ts +++ b/generated/wow/character-media.ts @@ -1,15 +1,12 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, responseBaseSchema } from '../core'; const assetSchema = z.object({ key: z.string(), value: z.string(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - export const characterMediaSummaryResponseSchema = responseBaseSchema.extend({ assets: z.array(assetSchema), character: characterSchema, diff --git a/generated/wow/character-mythic-keystone-profile.ts b/generated/wow/character-mythic-keystone-profile.ts index e5c90b50..b306ec30 100644 --- a/generated/wow/character-mythic-keystone-profile.ts +++ b/generated/wow/character-mythic-keystone-profile.ts @@ -1,19 +1,14 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const keyBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const realmSchema = z.any(); - -const colorSchema = z.any(); +import { + characterSchema, + colorSchema, + keyBaseSchema, + nameIdKeySchema, + nameIdSchema, + realmSchema, + responseBaseSchema, +} from '../core'; const currentPeriodSchema = z.object({ period: keyBaseSchema.and( diff --git a/generated/wow/character-professions.ts b/generated/wow/character-professions.ts index 2bd09e98..8d3cdb83 100644 --- a/generated/wow/character-professions.ts +++ b/generated/wow/character-professions.ts @@ -1,13 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); +import { characterSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; const tierSchema = z.object({ known_recipes: z.array(nameIdKeySchema).optional(), diff --git a/generated/wow/character-profile.ts b/generated/wow/character-profile.ts index 0b5d0ff3..2573dc99 100644 --- a/generated/wow/character-profile.ts +++ b/generated/wow/character-profile.ts @@ -1,17 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const hrefSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const factionSchema = z.any(); - -const genderSchema = z.any(); - -const realmSchema = z.any(); +import { factionSchema, genderSchema, hrefSchema, nameIdKeySchema, realmSchema, responseBaseSchema } from '../core'; export const characterProfileStatusResponseSchema = responseBaseSchema.extend({ id: z.number(), diff --git a/generated/wow/character-pvp.ts b/generated/wow/character-pvp.ts index 8b781068..aff9f9fa 100644 --- a/generated/wow/character-pvp.ts +++ b/generated/wow/character-pvp.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, factionSchema, keyBaseSchema, nameIdSchema, responseBaseSchema } from '../core'; const bracketSchema = z.object({ id: z.number(), @@ -12,15 +13,10 @@ const matchStatisticsSchema = z.object({ won: z.number(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const factionSchema = z.any(); - -const keyBaseSchema = z.any(); - -const nameIdSchema = z.any(); +const pvpMapStatisticSchema = z.object({ + match_statistics: matchStatisticsSchema, + world_map: nameIdSchema, +}); export const characterPvpBracketStatisticsResponseSchema = responseBaseSchema.extend({ bracket: bracketSchema, @@ -41,11 +37,6 @@ export const characterPvpBracketStatisticsResponseSchema = responseBaseSchema.ex weekly_match_statistics: matchStatisticsSchema, }); -const pvpMapStatisticSchema = z.object({ - match_statistics: matchStatisticsSchema, - world_map: nameIdSchema, -}); - export const characterPvpSummaryResponseSchema = responseBaseSchema.extend({ character: characterSchema, honor_level: z.number(), diff --git a/generated/wow/character-quests.ts b/generated/wow/character-quests.ts index 61a244fb..7881ddce 100644 --- a/generated/wow/character-quests.ts +++ b/generated/wow/character-quests.ts @@ -1,13 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const hrefSchema = z.any(); +import { characterSchema, hrefSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const characterCompletedQuestsResponseSchema = responseBaseSchema.extend({ character: characterSchema, diff --git a/generated/wow/character-reputations.ts b/generated/wow/character-reputations.ts index c18fd041..355832b1 100644 --- a/generated/wow/character-reputations.ts +++ b/generated/wow/character-reputations.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const paragonSchema = z.object({ max: z.number(), @@ -15,12 +16,6 @@ const standingSchema = z.object({ value: z.number(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - const reputationSchema = z.object({ faction: nameIdKeySchema, paragon: paragonSchema.optional(), diff --git a/generated/wow/character-soulbinds.ts b/generated/wow/character-soulbinds.ts index 33181936..730dfbdb 100644 --- a/generated/wow/character-soulbinds.ts +++ b/generated/wow/character-soulbinds.ts @@ -1,5 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +const socketSchema = z.object({ + conduit: nameIdKeySchema, + rank: z.number(), +}); const typeClassSchema = z.object({ name: z.union([ @@ -10,17 +16,6 @@ const typeClassSchema = z.object({ type: z.union([z.literal('ENDURANCE'), z.literal('FINESSE'), z.literal('POTENCY')]), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const socketSchema = z.object({ - conduit: nameIdKeySchema, - rank: z.number(), -}); - const conduitSocketSchema = z.object({ socket: socketSchema, type: typeClassSchema, diff --git a/generated/wow/character-specializations.ts b/generated/wow/character-specializations.ts index c70f9f22..44d7d232 100644 --- a/generated/wow/character-specializations.ts +++ b/generated/wow/character-specializations.ts @@ -1,11 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const characterSchema = z.any(); +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const spellTooltipSchema = z.object({ cast_time: z.union([ diff --git a/generated/wow/character-statistics.ts b/generated/wow/character-statistics.ts index 12197f3b..68b873fa 100644 --- a/generated/wow/character-statistics.ts +++ b/generated/wow/character-statistics.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, responseBaseSchema } from '../core'; const baseEffectiveStatSchema = z.object({ base: z.number(), @@ -17,10 +18,6 @@ const ratingWithValueSchema = z.object({ value: z.number(), }); -const responseBaseSchema = z.any(); - -const characterSchema = z.any(); - export const characterStatisticsSummaryResponseSchema = responseBaseSchema.extend({ agility: baseEffectiveStatSchema, armor: baseEffectiveStatSchema, diff --git a/generated/wow/character-titles.ts b/generated/wow/character-titles.ts index 170134d8..4d8f3ec8 100644 --- a/generated/wow/character-titles.ts +++ b/generated/wow/character-titles.ts @@ -1,11 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const characterSchema = z.any(); +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const characterTitlesSummaryResponseSchema = responseBaseSchema.extend({ active_title: nameIdKeySchema.and( diff --git a/generated/wow/connected-realm.ts b/generated/wow/connected-realm.ts index 490e91f4..ef40a7ae 100644 --- a/generated/wow/connected-realm.ts +++ b/generated/wow/connected-realm.ts @@ -1,14 +1,18 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; - -const realmPopulationSchema = z.union([ - z.literal('Full'), - z.literal('High'), - z.literal('Low'), - z.literal('Medium'), - z.literal('New Players'), -]); +import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +/** + * Connected Realm Index API response. + * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis + */ +export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ + connected_realms: z.array( + z.object({ + href: z.string(), + }), + ), +}); const realmPopulationCapitalizedSchema = z.union([ z.literal('FULL'), @@ -25,39 +29,28 @@ const realmLockedStatusSchema = z.object({ const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); +const realmStatusCapitalizedSchema = z.union([z.literal('DOWN'), z.literal('UP')]); + const searchRealmPopulationSchema = z.object({ name: z.record(localesSchema, z.string()), type: realmPopulationCapitalizedSchema, }); -const responseBaseSchema = z.any(); +const searchRealmStatusSchema = z.object({ + name: z.record(localesSchema, z.string()), + type: realmStatusCapitalizedSchema, +}); const realmTimezoneSchema = z.any(); -const keyBaseSchema = z.any(); - const realmCategorySchema = z.any(); const realmLocalesSchema = z.any(); -const nameIdKeySchema = z.any(); - const realmTypeSchema = z.any(); const realmTypeCapitalizedSchema = z.any(); -/** - * Connected Realm Index API response. - * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis - */ -export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ - connected_realms: z.array( - z.object({ - href: z.string(), - }), - ), -}); - const realmSchema = z.object({ category: realmCategorySchema, connected_realm: z.object({ @@ -76,6 +69,16 @@ const realmSchema = z.object({ }), }); +/** + * Connected Realm Search API parameters. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.extend({ + 'realms.timezone': realmTimezoneSchema.optional(), + 'status.type': realmStatusCapitalizedSchema.optional(), +}); + const searchRealmSchema = z.object({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), @@ -93,3 +96,49 @@ const searchRealmSchema = z.object({ type: realmTypeCapitalizedSchema, }), }); + +/** + * Connected Realm API response. + * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis + */ +export const connectedRealmResponseSchema = responseBaseSchema.extend({ + auctions: z.object({ + href: z.string(), + }), + has_queue: z.boolean(), + id: z.number(), + mythic_leaderboards: z.object({ + href: z.string(), + }), + population: z.object({ + name: z.union([ + z.literal('Full'), + z.literal('High'), + z.literal('Low'), + z.literal('Medium'), + z.literal('New Players'), + ]), + type: realmPopulationCapitalizedSchema, + }), + realm_locked_status: realmLockedStatusSchema.optional(), + realms: z.array(realmSchema), + status: z.object({ + name: realmStatusSchema, + type: realmStatusCapitalizedSchema, + }), +}); + +/** + * Connected Realm Search API response item. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + has_queue: z.boolean(), + id: z.number(), + population: searchRealmPopulationSchema, + realms: z.array(searchRealmSchema), + status: searchRealmStatusSchema, + }), +}); diff --git a/generated/wow/covenant.ts b/generated/wow/covenant.ts index adcd4f7e..ed61524e 100644 --- a/generated/wow/covenant.ts +++ b/generated/wow/covenant.ts @@ -1,16 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const socketTypeSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; /** * Interface for a response from the conduit index endpoint. @@ -24,6 +14,11 @@ const itemSchema = keyBaseSchema.extend({ id: z.number(), }); +const socketTypeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + /** * Interface for a response from the covenant index endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/creature.ts b/generated/wow/creature.ts index b21bbdda..abff31b2 100644 --- a/generated/wow/creature.ts +++ b/generated/wow/creature.ts @@ -1,39 +1,19 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdKeySchema, + responseBaseSchema, +} from '../core'; const displayMediaAssetSchema = z.object({ key: z.string(), value: z.string(), }); -/** - * The search parameters for a creature. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const keyBaseSchema = z.any(); - -/** - * The response for creature display media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ - assets: z.array(displayMediaAssetSchema), - id: z.number(), -}); - /** * The response for a creature family index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -59,6 +39,16 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); +/** + * The search parameters for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + /** * The response for a creature search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -104,6 +94,15 @@ export const creatureTypeResponseSchema = responseBaseSchema.extend({ name: z.string(), }); +/** + * The response for creature display media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(displayMediaAssetSchema), + id: z.number(), +}); + /** * The response for a creature family. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/guild-crest.ts b/generated/wow/guild-crest.ts index 91df124b..d740e8cb 100644 --- a/generated/wow/guild-crest.ts +++ b/generated/wow/guild-crest.ts @@ -1,5 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { keyBaseSchema, responseBaseSchema } from '../core'; const guildCrestAssetSchema = z.object({ key: z.string(), @@ -13,15 +14,15 @@ const rgbaSchema = z.object({ r: z.number(), }); +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + const backgroundSchema = z.object({ id: z.number(), rgba: rgbaSchema, }); -const responseBaseSchema = z.any(); - -const keyBaseSchema = z.any(); - /** * The response for a guild crest border or emblem. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -31,21 +32,17 @@ export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ id: z.number(), }); +const borderSchema = z.object({ + id: z.number(), + media: mediaSchema, +}); + const colorsSchema = z.object({ backgrounds: z.array(backgroundSchema), borders: z.array(backgroundSchema), emblems: z.array(backgroundSchema), }); -const mediaSchema = keyBaseSchema.extend({ - id: z.number(), -}); - -const borderSchema = z.object({ - id: z.number(), - media: mediaSchema, -}); - /** * The response for the guild crest components index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/guild.ts b/generated/wow/guild.ts index 98a421ba..2869937e 100644 --- a/generated/wow/guild.ts +++ b/generated/wow/guild.ts @@ -1,41 +1,15 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const childCriterumSchema = z.object({ - amount: z.number(), - id: z.number(), - is_completed: z.boolean(), -}); - -const criteriaSchema = z.object({ - amount: z.number().optional(), - child_criteria: z.array(childCriterumSchema).optional(), - id: z.number(), - is_completed: z.boolean(), -}); - -const responseBaseSchema = z.any(); - -const hrefSchema = z.any(); - -const factionSchema = z.any(); - -const realmSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); - -const characterSchema = z.any(); - -const colorSchema = z.any(); - -const achievementSchema = z.object({ - achievement: nameIdKeySchema, - completed_timestamp: z.number().optional(), - criteria: criteriaSchema.optional(), - id: z.number(), -}); +import { + characterSchema, + colorSchema, + factionSchema, + hrefSchema, + keyBaseSchema, + nameIdKeySchema, + realmSchema, + responseBaseSchema, +} from '../core'; const categoryProgressSchema = z.object({ category: nameIdKeySchema, @@ -63,6 +37,12 @@ const rgbWithIdSchema = z.object({ rgba: colorSchema, }); +const childCriterumSchema = z.object({ + amount: z.number(), + id: z.number(), + is_completed: z.boolean(), +}); + const borderSchema = z.object({ color: rgbWithIdSchema, id: z.number(), @@ -73,6 +53,13 @@ const borderSchema = z.object({ ), }); +const criteriaSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterumSchema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + const playableSchema = keyBaseSchema.extend({ id: z.number(), }); @@ -83,13 +70,11 @@ const rosterMemberCharacterSchema = characterSchema.extend({ playable_race: playableSchema, }); -export const guildAchievementsResponseSchema = responseBaseSchema.extend({ - achievements: z.array(achievementSchema), - category_progress: z.array(categoryProgressSchema), - guild: guildSchema, - recent_events: z.array(recentEventSchema), - total_points: z.number(), - total_quantity: z.number(), +const achievementSchema = z.object({ + achievement: nameIdKeySchema, + completed_timestamp: z.number().optional(), + criteria: criteriaSchema.optional(), + id: z.number(), }); const activityElementSchema = z.object({ @@ -113,6 +98,15 @@ const memberSchema = z.object({ rank: z.number(), }); +export const guildAchievementsResponseSchema = responseBaseSchema.extend({ + achievements: z.array(achievementSchema), + category_progress: z.array(categoryProgressSchema), + guild: guildSchema, + recent_events: z.array(recentEventSchema), + total_points: z.number(), + total_quantity: z.number(), +}); + export const guildActivityResponseSchema = responseBaseSchema.extend({ activities: z.array(activityElementSchema), guild: guildSchema, diff --git a/generated/wow/heirloom.ts b/generated/wow/heirloom.ts index 3085b8cd..5301ce74 100644 --- a/generated/wow/heirloom.ts +++ b/generated/wow/heirloom.ts @@ -1,5 +1,18 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +/** + * The response for the heirloom index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const heirloomIndexResponseSchema = responseBaseSchema.extend({ + heirlooms: z.array(nameIdKeySchema), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); const sourceSchema = z.object({ name: z.string(), @@ -18,10 +31,22 @@ const damageSchema = z.object({ min_value: z.number(), }); +const displaySchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + const requirementsLevelSchema = z.object({ display_string: z.string(), }); +const statSchema = z.object({ + display: displaySchema, + is_equip_bonus: z.boolean().optional(), + type: sourceSchema, + value: z.number(), +}); + const requirementsSchema = z.object({ level: requirementsLevelSchema, }); @@ -38,38 +63,6 @@ const weaponSchema = z.object({ dps: attackSpeedClassSchema, }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const colorSchema = z.any(); - -const keyBaseSchema = z.any(); - -/** - * The response for the heirloom index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const heirloomIndexResponseSchema = responseBaseSchema.extend({ - heirlooms: z.array(nameIdKeySchema), -}); - -const mediaSchema = keyBaseSchema.extend({ - id: z.number(), -}); - -const displaySchema = z.object({ - color: colorSchema, - display_string: z.string(), -}); - -const statSchema = z.object({ - display: displaySchema, - is_equip_bonus: z.boolean().optional(), - type: sourceSchema, - value: z.number(), -}); - const upgradeItemSchema = z.object({ binding: sourceSchema, bonus_list: z.array(z.number()), diff --git a/generated/wow/item.ts b/generated/wow/item.ts index 304b4ee9..b06a80d3 100644 --- a/generated/wow/item.ts +++ b/generated/wow/item.ts @@ -1,6 +1,42 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; +import { + baseSearchParametersSchema, + colorSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; + +/** + * The response for an item class index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemClassIndexResponseSchema = responseBaseSchema.extend({ + item_classes: z.array(nameIdKeySchema), +}); + +/** + * The response for an item class. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemClassResponseSchema = responseBaseSchema.extend({ + class_id: z.number(), + item_subclasses: z.array(nameIdKeySchema), + name: z.string(), +}); + +/** + * The response for an item media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); const inventoryTypeSchema = z.object({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), @@ -25,6 +61,10 @@ const inventoryTypeSchema = z.object({ ]), }); +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + const itemQualitySchema = z.object({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.union([ @@ -49,108 +89,6 @@ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -const effectSchema = z.object({ - display_string: z.string(), - required_count: z.number(), -}); - -const damageSchema = z.object({ - damage_class: z.object({ - name: z.string(), - type: z.string(), - }), - display_string: z.string(), - max_value: z.number(), - min_value: z.number(), -}); - -const durabilitySchema = z.object({ - display_string: z.string(), - value: z.number(), -}); - -const requirementsSchema = z.object({ - level: durabilitySchema, -}); - -const weaponSchema = z.object({ - attack_speed: durabilitySchema, - damage: damageSchema, - dps: durabilitySchema, -}); - -const recipeItemDisplayStringsSchema = z.object({ - copper: z.string(), - gold: z.string(), - header: z.string(), - silver: z.string(), -}); - -const statTypeSchema = z.union([ - z.literal('Agility'), - z.literal('Critical Strike'), - z.literal('Haste'), - z.literal('Intellect'), - z.literal('Mastery'), - z.literal('Stamina'), - z.literal('Strength'), - z.literal('Versatility'), -]); - -const statTypeCapitalizedSchema = z.union([ - z.literal('AGILITY'), - z.literal('CRIT_RATING'), - z.literal('HASTE_RATING'), - z.literal('INTELLECT'), - z.literal('MASTERY'), - z.literal('STAMINA'), - z.literal('STRENGTH'), - z.literal('VERSATILITY'), -]); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); - -const colorSchema = z.any(); - -/** - * The response for an item class index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const itemClassIndexResponseSchema = responseBaseSchema.extend({ - item_classes: z.array(nameIdKeySchema), -}); - -/** - * The response for an item class. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const itemClassResponseSchema = responseBaseSchema.extend({ - class_id: z.number(), - item_subclasses: z.array(nameIdKeySchema), - name: z.string(), -}); - -/** - * The response for an item media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const itemMediaResponseSchema = responseBaseSchema.extend({ - assets: z.array(mediaAssetSchema), - id: z.number(), -}); - -const mediaSchema = keyBaseSchema.extend({ - id: z.number(), -}); - /** * The response for an item search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -192,15 +130,9 @@ export const itemSetIndexResponseSchema = responseBaseSchema.extend({ item_sets: z.array(nameIdKeySchema), }); -/** - * The response for an item set. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const itemSetResponseSchema = responseBaseSchema.extend({ - effects: z.array(effectSchema), - id: z.number(), - items: z.array(nameIdKeySchema), - name: z.string(), +const effectSchema = z.object({ + display_string: z.string(), + required_count: z.number(), }); /** @@ -220,16 +152,81 @@ const displaySchema = z.object({ display_string: z.string(), }); +const damageSchema = z.object({ + damage_class: z.object({ + name: z.string(), + type: z.string(), + }), + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const durabilitySchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + const armorSchema = z.object({ display: displaySchema, value: z.number(), }); +const requirementsSchema = z.object({ + level: durabilitySchema, +}); + const spellSchema = z.object({ description: z.string(), spell: nameIdKeySchema, }); +const weaponSchema = z.object({ + attack_speed: durabilitySchema, + damage: damageSchema, + dps: durabilitySchema, +}); + +const recipeItemDisplayStringsSchema = z.object({ + copper: z.string(), + gold: z.string(), + header: z.string(), + silver: z.string(), +}); + +const statTypeSchema = z.union([ + z.literal('Agility'), + z.literal('Critical Strike'), + z.literal('Haste'), + z.literal('Intellect'), + z.literal('Mastery'), + z.literal('Stamina'), + z.literal('Strength'), + z.literal('Versatility'), +]); + +const statTypeCapitalizedSchema = z.union([ + z.literal('AGILITY'), + z.literal('CRIT_RATING'), + z.literal('HASTE_RATING'), + z.literal('INTELLECT'), + z.literal('MASTERY'), + z.literal('STAMINA'), + z.literal('STRENGTH'), + z.literal('VERSATILITY'), +]); + +/** + * The response for an item set. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const itemSetResponseSchema = responseBaseSchema.extend({ + effects: z.array(effectSchema), + id: z.number(), + items: z.array(nameIdKeySchema), + name: z.string(), +}); + const statSchema = z.object({ display: displaySchema, is_negated: z.boolean().optional(), diff --git a/generated/wow/journal.ts b/generated/wow/journal.ts index c8bd9627..24fc284b 100644 --- a/generated/wow/journal.ts +++ b/generated/wow/journal.ts @@ -1,6 +1,27 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; +import { + baseSearchParametersSchema, + factionSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; + +/** + * The response for a journal encounter index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ + encounters: z.array(nameIdKeySchema), +}); + +const itemSchema = z.object({ + id: z.number(), + item: nameIdKeySchema, +}); /** * The parameters for a journal encounter search. @@ -30,13 +51,54 @@ const journalEncounterSearchItemSchema = z.object({ const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); +/** + * The response for a journal expansion index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ + tiers: z.array(nameIdKeySchema), +}); + +/** + * The response for a journal expansion. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalExpansionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + dungeons: z.array(nameIdKeySchema), + raids: z.array(nameIdKeySchema), +}); + +/** + * The response for a journal instance index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ + instances: z.array(nameIdKeySchema), +}); + const assetSchema = z.object({ key: z.string(), value: z.string(), }); +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + const encounterCategorySchema = z.union([z.literal('DUNGEON'), z.literal('RAID'), z.literal('WORLD_BOSS')]); +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const journalSubSection4Schema = z.object({ + body_text: z.string().optional(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + spell: nameIdKeySchema.optional(), + title: z.string(), +}); + const modeNameSchema = z.union([ z.literal('10 Player'), z.literal('10 Player (Heroic)'), @@ -66,56 +128,13 @@ const modeSchema = z.object({ type: modeTypeSchema, }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const factionSchema = z.any(); - -const keyBaseSchema = z.any(); - -/** - * The response for a journal encounter index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ - encounters: z.array(nameIdKeySchema), -}); - const categorySchema = z.object({ type: encounterCategorySchema, }); -const itemSchema = z.object({ - id: z.number(), - item: nameIdKeySchema, -}); - -/** - * The response for a journal expansion index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ - tiers: z.array(nameIdKeySchema), -}); - -/** - * The response for a journal expansion. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const journalExpansionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - dungeons: z.array(nameIdKeySchema), - raids: z.array(nameIdKeySchema), -}); - -/** - * The response for a journal instance index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ - instances: z.array(nameIdKeySchema), +const creatureSchema = nameIdSchema.extend({ + creature_display: creatureDisplaySchema, + description: z.string().optional(), }); /** @@ -126,33 +145,21 @@ export const journalInstanceMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(assetSchema), }); -const mediaSchema = keyBaseSchema.extend({ - id: z.number(), -}); - const modeElementSchema = z.object({ is_tracked: z.boolean(), mode: modeSchema, players: z.number(), }); -const creatureDisplaySchema = keyBaseSchema.extend({ - id: z.number(), -}); - -const journalSubSection4Schema = z.object({ +const journalSubSection3Schema = z.object({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), + sections: z.array(journalSubSection4Schema).optional(), spell: nameIdKeySchema.optional(), title: z.string(), }); -const creatureSchema = nameIdSchema.extend({ - creature_display: creatureDisplaySchema, - description: z.string().optional(), -}); - /** * The response for a journal instance. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -171,15 +178,6 @@ export const journalInstanceResponseSchema = nameIdSchema.extend(responseBaseSch order_index: z.number(), }); -const journalSubSection3Schema = z.object({ - body_text: z.string().optional(), - creature_display: creatureDisplaySchema.optional(), - id: z.number(), - sections: z.array(journalSubSection4Schema).optional(), - spell: nameIdKeySchema.optional(), - title: z.string(), -}); - const journalSubSection2Schema = z.object({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), diff --git a/generated/wow/media-search.ts b/generated/wow/media-search.ts index c6f009c7..2c40e301 100644 --- a/generated/wow/media-search.ts +++ b/generated/wow/media-search.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema } from '../core'; +import { baseSearchParametersSchema, keyBaseSchema } from '../core'; /** * The search parameters for media. @@ -17,8 +17,6 @@ const mediaAssetSchema = z.object({ value: z.string(), }); -const keyBaseSchema = z.any(); - /** * The response for a media search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/modified-crafting.ts b/generated/wow/modified-crafting.ts index 792f0763..604bdc4e 100644 --- a/generated/wow/modified-crafting.ts +++ b/generated/wow/modified-crafting.ts @@ -1,13 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a modified crafting category index. diff --git a/generated/wow/mount.ts b/generated/wow/mount.ts index c15af6b8..adbea505 100644 --- a/generated/wow/mount.ts +++ b/generated/wow/mount.ts @@ -1,6 +1,25 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; +import { + baseSearchParametersSchema, + factionsSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + responseBaseSchema, +} from '../core'; + +/** + * The response for a mount index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mountIndexResponseSchema = responseBaseSchema.extend({ + mounts: z.array(nameIdKeySchema), +}); + +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); const sourceSchema = z.object({ name: z.string(), @@ -17,26 +36,6 @@ export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); - -const factionsSchema = z.any(); - -/** - * The response for a mount index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const mountIndexResponseSchema = responseBaseSchema.extend({ - mounts: z.array(nameIdKeySchema), -}); - -const creatureDisplaySchema = keyBaseSchema.extend({ - id: z.number(), -}); - /** * The response for a mount search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/mythic-keystone-affix.ts b/generated/wow/mythic-keystone-affix.ts index 6660a855..47b7e309 100644 --- a/generated/wow/mythic-keystone-affix.ts +++ b/generated/wow/mythic-keystone-affix.ts @@ -1,15 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a Mythic Keystone affix index. diff --git a/generated/wow/mythic-keystone-dungeon.ts b/generated/wow/mythic-keystone-dungeon.ts index e1befaa7..a99b3c52 100644 --- a/generated/wow/mythic-keystone-dungeon.ts +++ b/generated/wow/mythic-keystone-dungeon.ts @@ -1,22 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const keystoneUpgradeSchema = z.object({ - qualifying_duration: z.number(), - upgrade_level: z.number(), -}); - -const zoneSchema = z.object({ - slug: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a Mythic Keystone dungeon index. @@ -26,16 +10,13 @@ export const mythicKeystoneDungeonIndexResponseSchema = responseBaseSchema.exten dungeons: z.array(nameIdKeySchema), }); -/** - * The response for a Mythic Keystone dungeon. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const mythicKeystoneDungeonResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - dungeon: nameIdKeySchema, - is_tracked: z.boolean(), - keystone_upgrades: z.array(keystoneUpgradeSchema), - map: nameIdSchema, - zone: zoneSchema, +const keystoneUpgradeSchema = z.object({ + qualifying_duration: z.number(), + upgrade_level: z.number(), +}); + +const zoneSchema = z.object({ + slug: z.string(), }); /** @@ -86,6 +67,18 @@ export const mythicKeystoneSeasonResponseSchema = responseBaseSchema.extend({ start_timestamp: z.number(), }); +/** + * The response for a Mythic Keystone dungeon. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const mythicKeystoneDungeonResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + dungeon: nameIdKeySchema, + is_tracked: z.boolean(), + keystone_upgrades: z.array(keystoneUpgradeSchema), + map: nameIdSchema, + zone: zoneSchema, +}); + /** * The response for a Mythic Keystone period index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/mythic-keystone-leaderboard.ts b/generated/wow/mythic-keystone-leaderboard.ts index 9b17d322..9ce5d972 100644 --- a/generated/wow/mythic-keystone-leaderboard.ts +++ b/generated/wow/mythic-keystone-leaderboard.ts @@ -1,17 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const factionsSchema = z.any(); - -const colorSchema = z.any(); - -const keyBaseSchema = z.any(); +import { colorSchema, factionsSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a Mythic Keystone leaderboard index. diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/wow/mythic-raid-leaderboard.ts index b2d45784..abf4b448 100644 --- a/generated/wow/mythic-raid-leaderboard.ts +++ b/generated/wow/mythic-raid-leaderboard.ts @@ -1,24 +1,16 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { originsSchema } from '../core'; +import { factionsSchema, keyBaseSchema, nameIdSchema, originsSchema, responseBaseSchema } from '../core'; -const realmSchema = z.object({ +const journalInstanceSchema = keyBaseSchema.extend({ id: z.number(), name: z.null(), - slug: z.string(), }); -const responseBaseSchema = z.any(); - -const factionsSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); - -const journalInstanceSchema = keyBaseSchema.extend({ +const realmSchema = z.object({ id: z.number(), name: z.null(), + slug: z.string(), }); const guildSchema = nameIdSchema.extend({ diff --git a/generated/wow/pet.ts b/generated/wow/pet.ts index 301f650c..109ada3d 100644 --- a/generated/wow/pet.ts +++ b/generated/wow/pet.ts @@ -1,20 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const sourceSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a pet ability index. @@ -64,6 +50,11 @@ const abilitySchema = z.object({ slot: z.number(), }); +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + /** * The response for a pet ability. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/playable-class.ts b/generated/wow/playable-class.ts index 0a301ae3..771f9753 100644 --- a/generated/wow/playable-class.ts +++ b/generated/wow/playable-class.ts @@ -1,22 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const talentSlotSchema = z.object({ - slot_number: z.number(), - unlock_player_level: z.number(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const genderNameSchema = z.any(); - -const keyBaseSchema = z.any(); +import { + genderNameSchema, + keyBaseSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; /** * The response for a playable class index. @@ -39,12 +30,9 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a playable class's PvP talent slots. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const pvpTalentSlotsResponseSchema = responseBaseSchema.extend({ - talent_slots: z.array(talentSlotSchema), +const talentSlotSchema = z.object({ + slot_number: z.number(), + unlock_player_level: z.number(), }); /** @@ -61,3 +49,11 @@ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchem }), specializations: z.array(nameIdKeySchema), }); + +/** + * The response for a playable class's PvP talent slots. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const pvpTalentSlotsResponseSchema = responseBaseSchema.extend({ + talent_slots: z.array(talentSlotSchema), +}); diff --git a/generated/wow/playable-race.ts b/generated/wow/playable-race.ts index e13ac914..cd0fe608 100644 --- a/generated/wow/playable-race.ts +++ b/generated/wow/playable-race.ts @@ -1,15 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const factionSchema = z.any(); - -const genderNameSchema = z.any(); +import { factionSchema, genderNameSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The playable race index response. diff --git a/generated/wow/playable-specialization.ts b/generated/wow/playable-specialization.ts index 4e238dd5..0b96e33d 100644 --- a/generated/wow/playable-specialization.ts +++ b/generated/wow/playable-specialization.ts @@ -1,30 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const primaryStatTypeSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const spellTooltipSchema = z.object({ - cast_time: z.string(), - cooldown: z.string().optional(), - description: z.string(), - power_cost: z.string().optional(), - range: z.string().optional(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const genderNameSchema = z.any(); - -const keyBaseSchema = z.any(); +import { + genderNameSchema, + keyBaseSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; /** * The response for a playable specialization index. @@ -48,15 +31,28 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const pvpTalentSchema = z.object({ - spell_tooltip: spellTooltipSchema, - talent: nameIdKeySchema, +const primaryStatTypeSchema = z.object({ + name: z.string(), + type: z.string(), }); const specTalentTreeSchema = keyBaseSchema.extend({ name: z.string(), }); +const spellTooltipSchema = z.object({ + cast_time: z.string(), + cooldown: z.string().optional(), + description: z.string(), + power_cost: z.string().optional(), + range: z.string().optional(), +}); + +const pvpTalentSchema = z.object({ + spell_tooltip: spellTooltipSchema, + talent: nameIdKeySchema, +}); + /** * The response for a playable specialization. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/power-type.ts b/generated/wow/power-type.ts index f1638bf7..1292be49 100644 --- a/generated/wow/power-type.ts +++ b/generated/wow/power-type.ts @@ -1,11 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); +import { nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a power type index. diff --git a/generated/wow/profession.ts b/generated/wow/profession.ts index f9c01fc2..4529231b 100644 --- a/generated/wow/profession.ts +++ b/generated/wow/profession.ts @@ -1,24 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const typeSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const craftedQuantitySchema = z.object({ - value: z.number(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a profession index. @@ -41,6 +23,11 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); +const typeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + const categorySchema = z.object({ name: z.string(), recipes: z.array(nameIdKeySchema), @@ -55,6 +42,10 @@ export const recipeMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); +const craftedQuantitySchema = z.object({ + value: z.number(), +}); + const reagentSchema = z.object({ quantity: z.number(), reagent: nameIdKeySchema, diff --git a/generated/wow/pvp-season.ts b/generated/wow/pvp-season.ts index 963162c1..08d8a031 100644 --- a/generated/wow/pvp-season.ts +++ b/generated/wow/pvp-season.ts @@ -1,31 +1,21 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { + factionSchema, + factionsSchema, + keyBaseSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; -const bracketSchema = z.object({ +const seasonSchema = keyBaseSchema.extend({ id: z.number(), - type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('SHUFFLE')]), -}); - -const seasonMatchStatisticsSchema = z.object({ - lost: z.number(), - played: z.number(), - won: z.number(), }); -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const factionsSchema = z.any(); - -const keyBaseSchema = z.any(); - -const factionSchema = z.any(); - -const seasonSchema = keyBaseSchema.extend({ +const bracketSchema = z.object({ id: z.number(), + type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('SHUFFLE')]), }); const rewardSchema = z.object({ @@ -70,6 +60,12 @@ const characterSchema = nameIdSchema.extend({ realm: realmSchema, }); +const seasonMatchStatisticsSchema = z.object({ + lost: z.number(), + played: z.number(), + won: z.number(), +}); + /** * The response for a PvP leaderboard index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/pvp-tier.ts b/generated/wow/pvp-tier.ts index b9a33397..600a5fc8 100644 --- a/generated/wow/pvp-tier.ts +++ b/generated/wow/pvp-tier.ts @@ -1,20 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const bracketSchema = z.object({ - id: z.number(), - type: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a PvP tier index. @@ -33,6 +19,11 @@ export const pvpTierMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); +const bracketSchema = z.object({ + id: z.number(), + type: z.string(), +}); + const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); diff --git a/generated/wow/quest.ts b/generated/wow/quest.ts index 0770beee..6d0ac64e 100644 --- a/generated/wow/quest.ts +++ b/generated/wow/quest.ts @@ -1,22 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const unitsSchema = z.object({ - copper: z.number(), - gold: z.number(), - silver: z.number(), -}); - -const moneySchema = z.object({ - units: unitsSchema, - value: z.number(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const factionSchema = z.any(); +import { factionSchema, nameIdKeySchema, responseBaseSchema } from '../core'; /** * The response for a quest area index. @@ -94,11 +78,22 @@ export const questTypeResponseSchema = responseBaseSchema.extend({ type: z.string(), }); +const unitsSchema = z.object({ + copper: z.number(), + gold: z.number(), + silver: z.number(), +}); + const reputationSchema = z.object({ reward: nameIdKeySchema, value: z.number(), }); +const moneySchema = z.object({ + units: unitsSchema, + value: z.number(), +}); + const rewardsSchema = z.object({ experience: z.number(), money: moneySchema, diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts index e20b2bc3..7e34574b 100644 --- a/generated/wow/realm.ts +++ b/generated/wow/realm.ts @@ -1,6 +1,14 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + nameIdSchema, + realmSchema, + responseBaseSchema, +} from '../core'; /** * The category of a realm. @@ -21,6 +29,14 @@ export const realmCategorySchema = z.union([ z.literal('\uD55C\uAD6D'), ]); +/** + * The response for a realm index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const realmIndexResponseSchema = responseBaseSchema.extend({ + realms: z.array(realmSchema), +}); + export const realmLocalesSchema = z.union([ z.literal('deDE'), z.literal('enGB'), @@ -70,44 +86,6 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ timezone: realmTimezoneSchema.optional(), }); -const responseBaseSchema = z.any(); - -const realmSchema = z.any(); - -const nameIdSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); - -/** - * The response for a realm index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const realmIndexResponseSchema = responseBaseSchema.extend({ - realms: z.array(realmSchema), -}); - -/** - * The response for a realm. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - category: realmCategorySchema, - connected_realm: z.object({ - href: z.string(), - }), - is_tournament: z.boolean(), - locale: realmLocalesSchema, - region: nameIdKeySchema, - slug: z.string(), - timezone: realmTimezoneSchema, - type: z.object({ - name: realmTypeSchema, - type: realmTypeCapitalizedSchema, - }), -}); - /** * The response for a realm search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -132,3 +110,23 @@ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ }), }), }); + +/** + * The response for a realm. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + category: realmCategorySchema, + connected_realm: z.object({ + href: z.string(), + }), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + region: nameIdKeySchema, + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), +}); diff --git a/generated/wow/region.ts b/generated/wow/region.ts index 050db847..f778b96e 100644 --- a/generated/wow/region.ts +++ b/generated/wow/region.ts @@ -1,9 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdSchema = z.any(); +import { nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a region index. diff --git a/generated/wow/reputations.ts b/generated/wow/reputations.ts index 61bf3895..17d2195f 100644 --- a/generated/wow/reputations.ts +++ b/generated/wow/reputations.ts @@ -1,18 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const tierSchema = z.object({ - id: z.number(), - max_value: z.number(), - min_value: z.number(), - name: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; /** * The response for a reputation faction index. @@ -32,14 +20,11 @@ const reputationTierSchema = keyBaseSchema.extend({ name: z.string().optional(), }); -/** - * The response for a reputation tier. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export const reputationTiersResponseSchema = responseBaseSchema.extend({ - faction: nameIdKeySchema.optional(), +const tierSchema = z.object({ id: z.number(), - tiers: z.array(tierSchema), + max_value: z.number(), + min_value: z.number(), + name: z.string(), }); /** @@ -60,3 +45,13 @@ export const reputationFactionResponseSchema = responseBaseSchema.extend({ export const reputationTiersIndexResponseSchema = responseBaseSchema.extend({ reputation_tiers: z.array(reputationTierSchema), }); + +/** + * The response for a reputation tier. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export const reputationTiersResponseSchema = responseBaseSchema.extend({ + faction: nameIdKeySchema.optional(), + id: z.number(), + tiers: z.array(tierSchema), +}); diff --git a/generated/wow/spell.ts b/generated/wow/spell.ts index 78fb0510..8fdf6cf9 100644 --- a/generated/wow/spell.ts +++ b/generated/wow/spell.ts @@ -1,24 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, localesSchema } from '../core'; - -/** - * The search parameters for spells. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ -export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ - locale: localesSchema, - name: z.string(), -}); - -const responseBaseSchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; /** * The response for a spell media. @@ -33,6 +22,16 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); +/** + * The search parameters for spells. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + /** * The response for a spell search. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/talent.ts b/generated/wow/talent.ts index fd78dd28..6cc2ea5e 100644 --- a/generated/wow/talent.ts +++ b/generated/wow/talent.ts @@ -1,29 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const rankDescriptionSchema = z.object({ - description: z.null(), - rank: z.number(), -}); - -const restrictionLineSchema = z.object({ - is_for_class: z.boolean(), - required_points: z.number(), - restricted_row: z.number(), -}); - -const nodeTypeSchema = z.object({ - id: z.number(), - type: z.union([z.literal('ACTIVE'), z.literal('CHOICE'), z.literal('PASSIVE')]), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a pvp talent index. @@ -58,6 +35,11 @@ const playableClassSchema = keyBaseSchema.extend({ id: z.number(), }); +const rankDescriptionSchema = z.object({ + description: z.null(), + rank: z.number(), +}); + const talentTreeSchema = keyBaseSchema.extend({ name: z.string(), }); @@ -66,12 +48,23 @@ const specTalentTreeSchema = keyBaseSchema.extend({ name: z.string(), }); +const restrictionLineSchema = z.object({ + is_for_class: z.boolean(), + required_points: z.number(), + restricted_row: z.number(), +}); + const purpleSpellTooltipSchema = z.object({ cast_time: z.string(), description: z.string(), spell: nameIdKeySchema, }); +const nodeTypeSchema = z.object({ + id: z.number(), + type: z.union([z.literal('ACTIVE'), z.literal('CHOICE'), z.literal('PASSIVE')]), +}); + const choiceOfTooltipSchema = z.object({ spell_tooltip: purpleSpellTooltipSchema, talent: nameIdKeySchema, diff --git a/generated/wow/tech-talent.ts b/generated/wow/tech-talent.ts index 3944480e..c02c2c5b 100644 --- a/generated/wow/tech-talent.ts +++ b/generated/wow/tech-talent.ts @@ -1,15 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const mediaAssetSchema = z.any(); - -const nameIdSchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a tech talent index. diff --git a/generated/wow/title.ts b/generated/wow/title.ts index d5c0ef84..9c360da7 100644 --- a/generated/wow/title.ts +++ b/generated/wow/title.ts @@ -1,13 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const nameIdSchema = z.any(); - -const genderNameSchema = z.any(); +import { genderNameSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; /** * The response for a title index. diff --git a/generated/wow/toy.ts b/generated/wow/toy.ts index a064af11..d0599fd2 100644 --- a/generated/wow/toy.ts +++ b/generated/wow/toy.ts @@ -1,16 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const sourceSchema = z.object({ - name: z.string(), - type: z.string(), -}); - -const responseBaseSchema = z.any(); - -const nameIdKeySchema = z.any(); - -const keyBaseSchema = z.any(); +import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; /** * The response for a toy index. @@ -24,6 +14,11 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); +const sourceSchema = z.object({ + name: z.string(), + type: z.string(), +}); + /** * The response for a toy. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} diff --git a/generated/wow/wow-token.ts b/generated/wow/wow-token.ts index ea4486a7..0b7787e8 100644 --- a/generated/wow/wow-token.ts +++ b/generated/wow/wow-token.ts @@ -1,7 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; - -const responseBaseSchema = z.any(); +import { responseBaseSchema } from '../core'; /** * The response for a WoW token. diff --git a/packages/classic-wow/src/auction-house/auction-house.ts b/packages/classic-wow/src/auction-house/auction-house.ts index 9a712548..b6d5e309 100644 --- a/packages/classic-wow/src/auction-house/auction-house.ts +++ b/packages/classic-wow/src/auction-house/auction-house.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; import type { AuctionHouseIndexResponse, AuctionsResponse } from './types'; /** @@ -14,7 +14,7 @@ export function auctionHouseIndex( ): Resource { return { namespace, - path: `${base}/connected-realm/${connectedRealmId}/auctions/index`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}/auctions/index`, }; } /** @@ -35,6 +35,6 @@ export function auctions( ): Resource { return { namespace, - path: `${base}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`, }; } diff --git a/packages/classic-wow/src/auction-house/types.ts b/packages/classic-wow/src/auction-house/types.ts index 79f0c6d3..79cae1b7 100644 --- a/packages/classic-wow/src/auction-house/types.ts +++ b/packages/classic-wow/src/auction-house/types.ts @@ -1,5 +1,4 @@ -import type { NameId } from '@blizzard-api/core'; -import type { NameIdKey, ResponseBase } from '../../../wow/src/base'; +import type { NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface AuctionHouseIndexResponse extends ResponseBase { auctions: Array; diff --git a/packages/classic-wow/src/base.ts b/packages/classic-wow/src/base.ts deleted file mode 100644 index b81e4d39..00000000 --- a/packages/classic-wow/src/base.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * The base request path for the character API for Classic World of Warcraft. - */ -export const characterBase = 'profile/wow/character'; diff --git a/packages/classic-wow/src/character-achievements/character-achievements.test.ts b/packages/classic-wow/src/character-achievements/character-achievements.test.ts index 85e94bb7..91fecc77 100644 --- a/packages/classic-wow/src/character-achievements/character-achievements.test.ts +++ b/packages/classic-wow/src/character-achievements/character-achievements.test.ts @@ -1,6 +1,6 @@ +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterAchievementsSummary, characterAchievementStatistics } from './character-achievements'; describe('characterAchievementsSummary', () => { @@ -12,7 +12,7 @@ describe('characterAchievementsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements`, }); }); }); @@ -26,7 +26,7 @@ describe('characterAchievementStatistics', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`, }); }); }); diff --git a/packages/classic-wow/src/character-achievements/character-achievements.ts b/packages/classic-wow/src/character-achievements/character-achievements.ts index ed2fe9d1..ff675191 100644 --- a/packages/classic-wow/src/character-achievements/character-achievements.ts +++ b/packages/classic-wow/src/character-achievements/character-achievements.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterAchievementsSummaryResponse, CharacterAchievementStatisticsResponse } from './types'; /** @@ -15,7 +15,7 @@ export function characterAchievementsSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements`, }; } @@ -32,6 +32,6 @@ export function characterAchievementStatistics( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`, }; } diff --git a/packages/classic-wow/src/character-equipment/character-equipment.test.ts b/packages/classic-wow/src/character-equipment/character-equipment.test.ts index 9b5477c6..2b614d5d 100644 --- a/packages/classic-wow/src/character-equipment/character-equipment.test.ts +++ b/packages/classic-wow/src/character-equipment/character-equipment.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterEquipmentSummary } from './character-equipment'; describe('characterEquipmentSummary', () => { @@ -13,7 +13,7 @@ describe('characterEquipmentSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/equipment`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/equipment`, }); }); @@ -26,7 +26,7 @@ describe('characterEquipmentSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/equipment`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/equipment`, }); }); }); diff --git a/packages/classic-wow/src/character-equipment/character-equipment.ts b/packages/classic-wow/src/character-equipment/character-equipment.ts index ced7384b..041a15fe 100644 --- a/packages/classic-wow/src/character-equipment/character-equipment.ts +++ b/packages/classic-wow/src/character-equipment/character-equipment.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterEquipmentSummaryResponse } from './types'; /** @@ -16,6 +16,6 @@ export function characterEquipmentSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName}/equipment`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/equipment`, }; } diff --git a/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.test.ts b/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.test.ts index 64d2c4a4..31ed76b8 100644 --- a/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.test.ts +++ b/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterHunterPetsSummary } from './character-hunter-pets'; describe('characterHunterPetsSummary', () => { @@ -12,7 +12,7 @@ describe('characterHunterPetsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/hunter-pets`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/hunter-pets`, }); }); @@ -24,7 +24,7 @@ describe('characterHunterPetsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/hunter-pets`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/hunter-pets`, }); }); }); diff --git a/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.ts b/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.ts index 385692bf..f192e764 100644 --- a/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.ts +++ b/packages/classic-wow/src/character-hunter-pets/character-hunter-pets.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterHunterPetsSummaryResponse } from './types'; /** @@ -16,6 +16,6 @@ export function characterHunterPetsSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName}/hunter-pets`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/hunter-pets`, }; } diff --git a/packages/classic-wow/src/character-media/character-media.test.ts b/packages/classic-wow/src/character-media/character-media.test.ts index cc4c4deb..517e4f73 100644 --- a/packages/classic-wow/src/character-media/character-media.test.ts +++ b/packages/classic-wow/src/character-media/character-media.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterMediaSummary } from './character-media'; import type { CharacterMediaSummaryResponse } from './types'; @@ -14,7 +14,7 @@ describe('characterMediaSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/character-media`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/character-media`, }); }); @@ -27,7 +27,7 @@ describe('characterMediaSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/character-media`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/character-media`, }); }); }); diff --git a/packages/classic-wow/src/character-media/character-media.ts b/packages/classic-wow/src/character-media/character-media.ts index 0163a028..184ee0f3 100644 --- a/packages/classic-wow/src/character-media/character-media.ts +++ b/packages/classic-wow/src/character-media/character-media.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterMediaSummaryResponse } from './types'; /** @@ -15,6 +15,6 @@ export function characterMediaSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName}/character-media`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/character-media`, }; } diff --git a/packages/classic-wow/src/character-profile/character-profile.test.ts b/packages/classic-wow/src/character-profile/character-profile.test.ts index f4fce5b3..30cf38ed 100644 --- a/packages/classic-wow/src/character-profile/character-profile.test.ts +++ b/packages/classic-wow/src/character-profile/character-profile.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterProfileStatus, characterProfileSummary } from './character-profile'; describe('characterProfileStatus', () => { @@ -13,7 +13,7 @@ describe('characterProfileStatus', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/status`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/status`, }); }); }); @@ -28,7 +28,7 @@ describe('characterProfileSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}`, }); }); }); diff --git a/packages/classic-wow/src/character-profile/character-profile.ts b/packages/classic-wow/src/character-profile/character-profile.ts index b73f3c56..616808e9 100644 --- a/packages/classic-wow/src/character-profile/character-profile.ts +++ b/packages/classic-wow/src/character-profile/character-profile.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterProfileStatusResponse, CharacterProfileSummaryResponse } from './types'; /** @@ -26,7 +26,7 @@ export function characterProfileStatus( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/status`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/status`, }; } @@ -44,6 +44,6 @@ export function characterProfileSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}`, }; } diff --git a/packages/classic-wow/src/character-profile/types.ts b/packages/classic-wow/src/character-profile/types.ts index 98af6c6f..bd8f9024 100644 --- a/packages/classic-wow/src/character-profile/types.ts +++ b/packages/classic-wow/src/character-profile/types.ts @@ -1,4 +1,5 @@ -import type { Faction, Gender, Href, NameIdKey, Realm, ResponseBase } from '../../../wow/src/base'; +import type { Faction, Gender, Href, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; + export type { CharacterProfileStatusResponse } from '../../../wow/src/character-profile/types'; export interface CharacterProfileSummaryResponse extends ResponseBase { diff --git a/packages/classic-wow/src/character-specialization/character-specialization.test.ts b/packages/classic-wow/src/character-specialization/character-specialization.test.ts index c65d07e7..1c383103 100644 --- a/packages/classic-wow/src/character-specialization/character-specialization.test.ts +++ b/packages/classic-wow/src/character-specialization/character-specialization.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterSpecializationsSummary } from './character-specialization'; import type { CharacterSpecializationsSummaryResponse } from './types'; @@ -18,7 +18,7 @@ describe('characterSpecializationsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/specializations`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/specializations`, }); }); @@ -35,7 +35,7 @@ describe('characterSpecializationsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/specializations`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/specializations`, }); }); }); diff --git a/packages/classic-wow/src/character-specialization/character-specialization.ts b/packages/classic-wow/src/character-specialization/character-specialization.ts index 0b7381d0..022ffac7 100644 --- a/packages/classic-wow/src/character-specialization/character-specialization.ts +++ b/packages/classic-wow/src/character-specialization/character-specialization.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterSpecializationsSummaryResponse } from './types'; /** @@ -15,6 +15,6 @@ export function characterSpecializationsSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName}/specializations`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/specializations`, }; } diff --git a/packages/classic-wow/src/character-specialization/types.ts b/packages/classic-wow/src/character-specialization/types.ts index d0bda288..5a2de238 100644 --- a/packages/classic-wow/src/character-specialization/types.ts +++ b/packages/classic-wow/src/character-specialization/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameId, ResponseBase } from '../../../wow/src/base'; +import type { Character, NameId, ResponseBase } from '@blizzard-api/core'; export interface CharacterSpecializationsSummaryResponse extends ResponseBase { character: Character; diff --git a/packages/classic-wow/src/character-statistics/character-statistics.test.ts b/packages/classic-wow/src/character-statistics/character-statistics.test.ts index 14b523d6..71e61913 100644 --- a/packages/classic-wow/src/character-statistics/character-statistics.test.ts +++ b/packages/classic-wow/src/character-statistics/character-statistics.test.ts @@ -1,6 +1,6 @@ import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { characterBase } from '../base'; import { characterStatisticsSummary } from './character-statistics'; describe('characterStatisticsSummary', () => { @@ -13,7 +13,7 @@ describe('characterStatisticsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/statistics`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/statistics`, }); }); @@ -26,7 +26,7 @@ describe('characterStatisticsSummary', () => { expect(result).toEqual({ namespace, - path: `${characterBase}/${realmSlug}/${characterName}/statistics`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/statistics`, }); }); }); diff --git a/packages/classic-wow/src/character-statistics/character-statistics.ts b/packages/classic-wow/src/character-statistics/character-statistics.ts index fccb9bd2..7ccc850f 100644 --- a/packages/classic-wow/src/character-statistics/character-statistics.ts +++ b/packages/classic-wow/src/character-statistics/character-statistics.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { characterBase } from '../base'; +import { wowCharacterBasePath } from '@blizzard-api/core'; import type { CharacterStatisticsSummaryResponse } from './types'; /** @@ -15,6 +15,6 @@ export function characterStatisticsSummary( ): Resource { return { namespace, - path: `${characterBase}/${realmSlug}/${characterName}/statistics`, + path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/statistics`, }; } diff --git a/packages/classic-wow/src/character-statistics/types.ts b/packages/classic-wow/src/character-statistics/types.ts index c8593a94..f5a51a0c 100644 --- a/packages/classic-wow/src/character-statistics/types.ts +++ b/packages/classic-wow/src/character-statistics/types.ts @@ -1,4 +1,4 @@ -import type { Character, ResponseBase } from '../../../wow/src/base'; +import type { Character, ResponseBase } from '@blizzard-api/core'; export interface CharacterStatisticsSummaryResponse extends ResponseBase { agility: BaseEffectiveStat; diff --git a/packages/classic-wow/src/connected-realm/connected-realm.ts b/packages/classic-wow/src/connected-realm/connected-realm.ts index c10b114d..85326ef8 100644 --- a/packages/classic-wow/src/connected-realm/connected-realm.ts +++ b/packages/classic-wow/src/connected-realm/connected-realm.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; import type { ConnectedRealmIndexResponse, ConnectedRealmResponse, @@ -19,7 +19,7 @@ export function connectedRealm( ): Resource { return { namespace, - path: `${base}/connected-realm/${connectedRealmId}`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}`, }; } /** @@ -32,7 +32,7 @@ export function connectedRealmIndex( ): Resource { return { namespace, - path: `${base}/connected-realm/index`, + path: `${wowBasePath}/connected-realm/index`, }; } /** @@ -53,6 +53,6 @@ export function connectedRealmSearch( 'realms.timezone': options['realms.timezone'], 'status.type': options['status.type'], }, - path: `${base}/search/connected-realm`, + path: `${wowBasePath}/search/connected-realm`, }; } diff --git a/packages/classic-wow/src/creature/creature.test.ts b/packages/classic-wow/src/creature/creature.test.ts index 339aec72..89d24873 100644 --- a/packages/classic-wow/src/creature/creature.test.ts +++ b/packages/classic-wow/src/creature/creature.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../../../wow/src/base'; import { creature, creatureDisplayMedia, @@ -22,7 +22,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creature(namespace, creatureId); expect(resource).toEqual({ namespace, - path: `${base}/creature/123`, + path: `${wowBasePath}/creature/123`, }); }); @@ -30,7 +30,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureDisplayMedia(namespace, creatureDisplayId); expect(resource).toEqual({ namespace, - path: `${mediaBase}/creature-display/456`, + path: `${wowMediaBasePath}/creature-display/456`, }); }); @@ -38,7 +38,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureFamily(namespace, creatureFamilyId); expect(resource).toEqual({ namespace, - path: `${base}/creature-family/789`, + path: `${wowBasePath}/creature-family/789`, }); }); @@ -46,7 +46,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureFamilyIndex(namespace); expect(resource).toEqual({ namespace, - path: `${base}/creature-family/index`, + path: `${wowBasePath}/creature-family/index`, }); }); @@ -54,7 +54,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureFamilyMedia(namespace, creatureFamilyId); expect(resource).toEqual({ namespace, - path: `${mediaBase}/creature-family/789`, + path: `${wowMediaBasePath}/creature-family/789`, }); }); @@ -62,7 +62,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureType(namespace, creatureTypeId); expect(resource).toEqual({ namespace, - path: `${base}/creature-type/987`, + path: `${wowBasePath}/creature-type/987`, }); }); @@ -70,7 +70,7 @@ describe.concurrent('classicCreatureApi', () => { const resource = creatureTypeIndex(namespace); expect(resource).toEqual({ namespace, - path: `${base}/creature-type/index`, + path: `${wowBasePath}/creature-type/index`, }); }); @@ -88,7 +88,7 @@ describe.concurrent('classicCreatureApi', () => { 'name.en_US': 'creatureName', orderby: 'name', }, - path: `${searchBase}/creature`, + path: `${wowSearchBasePath}/creature`, }); }); @@ -106,7 +106,7 @@ describe.concurrent('classicCreatureApi', () => { 'name.en_US': 'creatureName', orderby: 'name,id', }, - path: `${searchBase}/creature`, + path: `${wowSearchBasePath}/creature`, }); }); }); diff --git a/packages/classic-wow/src/creature/creature.ts b/packages/classic-wow/src/creature/creature.ts index ac5b14a5..f9f2eeba 100644 --- a/packages/classic-wow/src/creature/creature.ts +++ b/packages/classic-wow/src/creature/creature.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../../../wow/src/base'; import type { CreatureDisplayMediaResponse, CreatureFamilyIndexResponse, @@ -24,7 +24,7 @@ export function creature( ): Resource { return { namespace, - path: `${base}/creature/${creatureId}`, + path: `${wowBasePath}/creature/${creatureId}`, }; } /** @@ -39,7 +39,7 @@ export function creatureDisplayMedia( ): Resource { return { namespace, - path: `${mediaBase}/creature-display/${creatureDisplayId}`, + path: `${wowMediaBasePath}/creature-display/${creatureDisplayId}`, }; } /** @@ -54,7 +54,7 @@ export function creatureFamily( ): Resource { return { namespace, - path: `${base}/creature-family/${creatureFamilyId}`, + path: `${wowBasePath}/creature-family/${creatureFamilyId}`, }; } /** @@ -67,7 +67,7 @@ export function creatureFamilyIndex( ): Resource { return { namespace, - path: `${base}/creature-family/index`, + path: `${wowBasePath}/creature-family/index`, }; } /** @@ -82,7 +82,7 @@ export function creatureFamilyMedia( ): Resource { return { namespace, - path: `${mediaBase}/creature-family/${creatureFamilyId}`, + path: `${wowMediaBasePath}/creature-family/${creatureFamilyId}`, }; } /** @@ -102,7 +102,7 @@ export function creatureSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/creature`, + path: `${wowSearchBasePath}/creature`, }; } /** @@ -117,7 +117,7 @@ export function creatureType( ): Resource { return { namespace, - path: `${base}/creature-type/${creatureTypeId}`, + path: `${wowBasePath}/creature-type/${creatureTypeId}`, }; } /** @@ -130,6 +130,6 @@ export function creatureTypeIndex( ): Resource { return { namespace, - path: `${base}/creature-type/index`, + path: `${wowBasePath}/creature-type/index`, }; } diff --git a/packages/classic-wow/src/guild-crest/guild-crest.test.ts b/packages/classic-wow/src/guild-crest/guild-crest.test.ts index 0e8223ba..25d2d415 100644 --- a/packages/classic-wow/src/guild-crest/guild-crest.test.ts +++ b/packages/classic-wow/src/guild-crest/guild-crest.test.ts @@ -1,26 +1,26 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../../../wow/src/base'; import { guildCrestBorder, guildCrestComponentsIndex, guildCrestEmblem } from './guild-crest'; const namespace = 'static-classic'; describe.concurrent('classicGuildCrestApi', () => { it('should return the guild crest components index resource', ({ expect }) => { const resource = guildCrestComponentsIndex(namespace); - expect(resource.path).toBe(`${base}/guild-crest/index`); + expect(resource.path).toBe(`${wowBasePath}/guild-crest/index`); expect(resource.namespace).toBe(namespace); }); it('should return the guild crest border resource for a given borderId', ({ expect }) => { const borderId = 123; const resource = guildCrestBorder(namespace, borderId); - expect(resource.path).toBe(`${mediaBase}/guild-crest/border/123`); + expect(resource.path).toBe(`${wowMediaBasePath}/guild-crest/border/123`); expect(resource.namespace).toBe(namespace); }); it('should return the guild crest emblem resource for a given emblemId', ({ expect }) => { const emblemId = 456; const resource = guildCrestEmblem(namespace, emblemId); - expect(resource.path).toBe(`${mediaBase}/guild-crest/emblem/456`); + expect(resource.path).toBe(`${wowMediaBasePath}/guild-crest/emblem/456`); expect(resource.namespace).toBe(namespace); }); }); diff --git a/packages/classic-wow/src/guild-crest/guild-crest.ts b/packages/classic-wow/src/guild-crest/guild-crest.ts index 7c259a76..8b2e2661 100644 --- a/packages/classic-wow/src/guild-crest/guild-crest.ts +++ b/packages/classic-wow/src/guild-crest/guild-crest.ts @@ -1,5 +1,5 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../../../wow/src/base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types'; /** @@ -14,7 +14,7 @@ export function guildCrestBorder( ): Resource { return { namespace, - path: `${mediaBase}/guild-crest/border/${borderId}`, + path: `${wowMediaBasePath}/guild-crest/border/${borderId}`, }; } /** @@ -27,7 +27,7 @@ export function guildCrestComponentsIndex( ): Resource { return { namespace, - path: `${base}/guild-crest/index`, + path: `${wowBasePath}/guild-crest/index`, }; } /** @@ -42,6 +42,6 @@ export function guildCrestEmblem( ): Resource { return { namespace, - path: `${mediaBase}/guild-crest/emblem/${emblemId}`, + path: `${wowMediaBasePath}/guild-crest/emblem/${emblemId}`, }; } diff --git a/packages/classic-wow/src/guild/types.ts b/packages/classic-wow/src/guild/types.ts index 37ce6e03..37cdffbe 100644 --- a/packages/classic-wow/src/guild/types.ts +++ b/packages/classic-wow/src/guild/types.ts @@ -1,4 +1,4 @@ -import type { Character, Faction, KeyBase, NameIdKey, Realm, ResponseBase } from '../../../wow/src/base'; +import type { Character, Faction, KeyBase, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; import type { GuildResponse as GuildRetailResponse } from '../../../wow/src/guild/types'; export type { GuildAchievementsResponse } from '../../../wow/src/guild/types'; diff --git a/packages/classic-wow/src/item/item.test.ts b/packages/classic-wow/src/item/item.test.ts index 6cdde191..a9fdc995 100644 --- a/packages/classic-wow/src/item/item.test.ts +++ b/packages/classic-wow/src/item/item.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../../../wow/src/base'; import { item, itemClass, itemClassIndex, itemMedia, itemSearch, itemSubClass } from './item'; import type { ItemSearchParameters } from './types'; @@ -8,14 +8,14 @@ const namespace = 'static-classic'; describe.concurrent('classicItemApi', () => { it('should return the item class index resource', ({ expect }) => { const resource = itemClassIndex(namespace); - expect(resource.path).toBe(`${base}/item-class/index`); + expect(resource.path).toBe(`${wowBasePath}/item-class/index`); expect(resource.namespace).toBe(namespace); }); it('should return the item class resource for a given itemClassId', ({ expect }) => { const itemClassId = 123; const resource = itemClass(namespace, itemClassId); - expect(resource.path).toBe(`${base}/item-class/${itemClassId}`); + expect(resource.path).toBe(`${wowBasePath}/item-class/${itemClassId}`); expect(resource.namespace).toBe(namespace); }); @@ -23,21 +23,21 @@ describe.concurrent('classicItemApi', () => { const itemClassId = 123; const itemSubClassId = 456; const resource = itemSubClass(namespace, itemClassId, itemSubClassId); - expect(resource.path).toBe(`${base}/item-class/${itemClassId}/item-subclass/${itemSubClassId}`); + expect(resource.path).toBe(`${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubClassId}`); expect(resource.namespace).toBe(namespace); }); it('should return the item resource for a given itemId', ({ expect }) => { const itemId = 123; const resource = item(namespace, itemId); - expect(resource.path).toBe(`${base}/item/${itemId}`); + expect(resource.path).toBe(`${wowBasePath}/item/${itemId}`); expect(resource.namespace).toBe(namespace); }); it('should return the item media resource for a given itemId', ({ expect }) => { const itemId = 123; const resource = itemMedia(namespace, itemId); - expect(resource.path).toBe(`${mediaBase}/item/${itemId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/item/${itemId}`); expect(resource.namespace).toBe(namespace); }); @@ -49,7 +49,7 @@ describe.concurrent('classicItemApi', () => { orderby: 'name', } satisfies ItemSearchParameters; const resource = itemSearch(namespace, options); - expect(resource.path).toBe(`${searchBase}/item`); + expect(resource.path).toBe(`${wowSearchBasePath}/item`); expect(resource.namespace).toBe(namespace); expect(resource.parameters).toEqual({ _page: 1, @@ -66,7 +66,7 @@ describe.concurrent('classicItemApi', () => { orderby: ['name', 'id'], } satisfies ItemSearchParameters; const resource = itemSearch(namespace, options); - expect(resource.path).toBe(`${searchBase}/item`); + expect(resource.path).toBe(`${wowSearchBasePath}/item`); expect(resource.namespace).toBe(namespace); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/classic-wow/src/item/item.ts b/packages/classic-wow/src/item/item.ts index 13051151..c979c1b4 100644 --- a/packages/classic-wow/src/item/item.ts +++ b/packages/classic-wow/src/item/item.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../../../wow/src/base'; import type { ItemClassIndexResponse, ItemClassResponse, @@ -22,7 +22,7 @@ export function item( ): Resource { return { namespace, - path: `${base}/item/${itemId}`, + path: `${wowBasePath}/item/${itemId}`, }; } /** @@ -37,7 +37,7 @@ export function itemClass( ): Resource { return { namespace, - path: `${base}/item-class/${itemClassId}`, + path: `${wowBasePath}/item-class/${itemClassId}`, }; } /** @@ -50,7 +50,7 @@ export function itemClassIndex( ): Resource { return { namespace, - path: `${base}/item-class/index`, + path: `${wowBasePath}/item-class/index`, }; } /** @@ -65,7 +65,7 @@ export function itemMedia( ): Resource { return { namespace, - path: `${mediaBase}/item/${itemId}`, + path: `${wowMediaBasePath}/item/${itemId}`, }; } /** @@ -85,7 +85,7 @@ export function itemSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/item`, + path: `${wowSearchBasePath}/item`, }; } /** @@ -102,6 +102,6 @@ export function itemSubClass( ): Resource { return { namespace, - path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, + path: `${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, }; } diff --git a/packages/classic-wow/src/media-search/media-search.test.ts b/packages/classic-wow/src/media-search/media-search.test.ts index 38e51c08..e87d4c87 100644 --- a/packages/classic-wow/src/media-search/media-search.test.ts +++ b/packages/classic-wow/src/media-search/media-search.test.ts @@ -1,5 +1,5 @@ +import { wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { searchBase } from '../../../wow/src/base'; import { mediaSearch } from './media-search'; const namespace = 'static-classic'; @@ -7,7 +7,7 @@ const namespace = 'static-classic'; describe.concurrent('mediaSearchApi', () => { it('should return the media search resource', ({ expect }) => { const resource = mediaSearch(namespace, {}); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe(namespace); expect(resource.parameters).toEqual({}); }); @@ -18,7 +18,7 @@ describe.concurrent('mediaSearchApi', () => { orderby: 'name', tags: 'tag', }); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe(namespace); expect(resource.parameters).toEqual({ _page: 1, @@ -33,7 +33,7 @@ describe.concurrent('mediaSearchApi', () => { orderby: ['name', 'id'], tags: 'tag', }); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe(namespace); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/classic-wow/src/media-search/media-search.ts b/packages/classic-wow/src/media-search/media-search.ts index c1205fa7..dfb986e0 100644 --- a/packages/classic-wow/src/media-search/media-search.ts +++ b/packages/classic-wow/src/media-search/media-search.ts @@ -1,5 +1,5 @@ +import { wowSearchBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import { searchBase } from '../../../wow/src/base'; import type { MediaSearchParameters, MediaSearchResponseItem } from './types'; /** @@ -19,6 +19,6 @@ export function mediaSearch( orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, tags: options.tags, }, - path: `${searchBase}/media`, + path: `${wowSearchBasePath}/media`, }; } diff --git a/packages/classic-wow/src/playable-class/playable-class.test.ts b/packages/classic-wow/src/playable-class/playable-class.test.ts index 2e960b2b..5d188e12 100644 --- a/packages/classic-wow/src/playable-class/playable-class.test.ts +++ b/packages/classic-wow/src/playable-class/playable-class.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../../../wow/src/base'; import { playableClass, playableClassIndex, playableClassMedia } from './playable-class'; const namespace = 'static-classic'; @@ -11,14 +11,14 @@ describe.concurrent('classicPlayableClassApi', () => { const resource = playableClass(namespace, playableClassId); expect(resource.namespace).toBe(namespace); - expect(resource.path).toBe(`${base}/playable-class/1`); + expect(resource.path).toBe(`${wowBasePath}/playable-class/1`); }); it('should return a playable class index resource', ({ expect }) => { const resource = playableClassIndex(namespace); expect(resource.namespace).toBe(namespace); - expect(resource.path).toBe(`${base}/playable-class/index`); + expect(resource.path).toBe(`${wowBasePath}/playable-class/index`); }); it('should return a playable class media resource', ({ expect }) => { @@ -27,6 +27,6 @@ describe.concurrent('classicPlayableClassApi', () => { const resource = playableClassMedia(namespace, playableClassId); expect(resource.namespace).toBe(namespace); - expect(resource.path).toBe(`${mediaBase}/playable-class/1`); + expect(resource.path).toBe(`${wowMediaBasePath}/playable-class/1`); }); }); diff --git a/packages/classic-wow/src/playable-class/playable-class.ts b/packages/classic-wow/src/playable-class/playable-class.ts index 73b79932..9861dc0b 100644 --- a/packages/classic-wow/src/playable-class/playable-class.ts +++ b/packages/classic-wow/src/playable-class/playable-class.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../../../wow/src/base'; import type { PlayableClassIndexResponse, PlayableClassMediaResponse, PlayableClassResponse } from './types'; /** @@ -14,7 +14,7 @@ export function playableClass( ): Resource { return { namespace, - path: `${base}/playable-class/${playableClassId}`, + path: `${wowBasePath}/playable-class/${playableClassId}`, }; } /** @@ -27,7 +27,7 @@ export function playableClassIndex( ): Resource { return { namespace, - path: `${base}/playable-class/index`, + path: `${wowBasePath}/playable-class/index`, }; } /** @@ -42,6 +42,6 @@ export function playableClassMedia( ): Resource { return { namespace, - path: `${mediaBase}/playable-class/${playableClassId}`, + path: `${wowMediaBasePath}/playable-class/${playableClassId}`, }; } diff --git a/packages/classic-wow/src/playable-class/types.ts b/packages/classic-wow/src/playable-class/types.ts index 5dc38bb0..0e5a4320 100644 --- a/packages/classic-wow/src/playable-class/types.ts +++ b/packages/classic-wow/src/playable-class/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, KeyBase, NameId, NameIdKey, ResponseBase } from '../../../wow/src/base'; +import type { GenderName, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export type { PlayableClassIndexResponse, PlayableClassMediaResponse } from '../../../wow/src/playable-class/types'; diff --git a/packages/classic-wow/src/playable-race/playable-race.test.ts b/packages/classic-wow/src/playable-race/playable-race.test.ts index ddac8cd5..2e43ed29 100644 --- a/packages/classic-wow/src/playable-race/playable-race.test.ts +++ b/packages/classic-wow/src/playable-race/playable-race.test.ts @@ -1,6 +1,6 @@ +import { wowBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../../../wow/src/base'; import { playableRace, playableRaceIndex } from './playable-race'; const namespace: BlizzardNamespaces = 'static-classic1x'; @@ -9,14 +9,14 @@ describe.concurrent('playableRaceApi', () => { const playableRaceId = 456; const resource = playableRace(namespace, playableRaceId); - expect(resource.path).toBe(`${base}/playable-race/${playableRaceId}`); + expect(resource.path).toBe(`${wowBasePath}/playable-race/${playableRaceId}`); expect(resource.namespace).toBe(namespace); }); it('playableRaceIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = playableRaceIndex(namespace); - expect(resource.path).toBe(`${base}/playable-race/index`); + expect(resource.path).toBe(`${wowBasePath}/playable-race/index`); expect(resource.namespace).toBe(namespace); }); }); diff --git a/packages/classic-wow/src/playable-race/playable-race.ts b/packages/classic-wow/src/playable-race/playable-race.ts index 251dea0a..a38af5f2 100644 --- a/packages/classic-wow/src/playable-race/playable-race.ts +++ b/packages/classic-wow/src/playable-race/playable-race.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; import type { PlayableRaceIndexResponse, PlayableRaceResponse } from './types'; /** @@ -14,7 +14,7 @@ export function playableRace( ): Resource { return { namespace, - path: `${base}/playable-race/${playableRaceId}`, + path: `${wowBasePath}/playable-race/${playableRaceId}`, }; } /** @@ -27,6 +27,6 @@ export function playableRaceIndex( ): Resource { return { namespace, - path: `${base}/playable-race/index`, + path: `${wowBasePath}/playable-race/index`, }; } diff --git a/packages/classic-wow/src/power-type/power-type.test.ts b/packages/classic-wow/src/power-type/power-type.test.ts index 3614d29d..630d5b7a 100644 --- a/packages/classic-wow/src/power-type/power-type.test.ts +++ b/packages/classic-wow/src/power-type/power-type.test.ts @@ -1,6 +1,6 @@ -import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type {BlizzardNamespaces} from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../../../wow/src/base'; import { powerType, powerTypeIndex } from './power-type'; const namespace: BlizzardNamespaces = 'static-classic1x'; @@ -10,14 +10,14 @@ describe.concurrent('powerTypeApi', () => { const powerTypeId = 123; const resource = powerType(namespace, powerTypeId); - expect(resource.path).toBe(`${base}/power-type/${powerTypeId}`); + expect(resource.path).toBe(`${wowBasePath}/power-type/${powerTypeId}`); expect(resource.namespace).toBe(namespace); }); it('powerTypeIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = powerTypeIndex(namespace); - expect(resource.path).toBe(`${base}/power-type/index`); + expect(resource.path).toBe(`${wowBasePath}/power-type/index`); expect(resource.namespace).toBe(namespace); }); }); diff --git a/packages/classic-wow/src/power-type/power-type.ts b/packages/classic-wow/src/power-type/power-type.ts index 5a162db3..8088ff04 100644 --- a/packages/classic-wow/src/power-type/power-type.ts +++ b/packages/classic-wow/src/power-type/power-type.ts @@ -1,5 +1,5 @@ -import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; +import { wowBasePath } from '@blizzard-api/core'; +import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; import type { PowerTypeIndexResponse, PowerTypeResponse } from './types'; /** @@ -14,7 +14,7 @@ export function powerType( ): Resource { return { namespace, - path: `${base}/power-type/${powerTypeId}`, + path: `${wowBasePath}/power-type/${powerTypeId}`, }; } /** @@ -27,6 +27,6 @@ export function powerTypeIndex( ): Resource { return { namespace, - path: `${base}/power-type/index`, + path: `${wowBasePath}/power-type/index`, }; } diff --git a/packages/classic-wow/src/pvp-season/pvp-season.test.ts b/packages/classic-wow/src/pvp-season/pvp-season.test.ts index 5c433f69..bcb357eb 100644 --- a/packages/classic-wow/src/pvp-season/pvp-season.test.ts +++ b/packages/classic-wow/src/pvp-season/pvp-season.test.ts @@ -1,6 +1,6 @@ -import type { BlizzardNamespaces } from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type {BlizzardNamespaces} from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../../../wow/src/base'; import { pvpLeaderboard, pvpLeaderboardIndex, @@ -18,27 +18,27 @@ describe('classicPvpSeasonApi', () => { it('should return the PvP season index', ({ expect }) => { const result = pvpSeasonIndex(namespace); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-season/index`); + expect(result.path).toBe(`${wowBasePath}/pvp-season/index`); }); it('should return the PvP season by ID', ({ expect }) => { const pvpSeasonId = 123; const result = pvpSeason(namespace, pvpSeasonId); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-season/${pvpSeasonId}`); + expect(result.path).toBe(`${wowBasePath}/pvp-season/${pvpSeasonId}`); }); it('should return the PvP region index', ({ expect }) => { const result = pvpRegionIndex(namespace); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-region/index`); + expect(result.path).toBe(`${wowBasePath}/pvp-region/index`); }); it('should return the PvP season index in a PvP region', ({ expect }) => { const pvpRegionId = 456; const result = pvpRegionalSeasonIndex(namespace, pvpRegionId); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-region/${pvpRegionId}/pvp-season/index`); + expect(result.path).toBe(`${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/index`); }); it('should return a PvP season by region ID and season ID', ({ expect }) => { @@ -46,7 +46,7 @@ describe('classicPvpSeasonApi', () => { const pvpSeasonId = 123; const result = pvpRegionalSeason(namespace, pvpRegionId, pvpSeasonId); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`); + expect(result.path).toBe(`${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`); }); it('should return the PvP leaderboards for a PvP season in a given PvP region', ({ expect }) => { @@ -54,7 +54,9 @@ describe('classicPvpSeasonApi', () => { const pvpSeasonId = 123; const result = pvpLeaderboardIndex(namespace, pvpRegionId, pvpSeasonId); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`); + expect(result.path).toBe( + `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, + ); }); it('should return a PvP leaderboard by PvP season ID and bracket', ({ expect }) => { @@ -64,7 +66,7 @@ describe('classicPvpSeasonApi', () => { const result = pvpLeaderboard(namespace, pvpRegionId, pvpSeasonId, pvpBracket); expect(result.namespace).toBe(namespace); expect(result.path).toBe( - `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, + `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, ); }); @@ -73,6 +75,6 @@ describe('classicPvpSeasonApi', () => { const pvpSeasonId = 123; const result = pvpRewardsIndex(namespace, pvpRegionId, pvpSeasonId); expect(result.namespace).toBe(namespace); - expect(result.path).toBe(`${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`); + expect(result.path).toBe(`${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`); }); }); diff --git a/packages/classic-wow/src/pvp-season/pvp-season.ts b/packages/classic-wow/src/pvp-season/pvp-season.ts index ee92d1b9..57d0cb95 100644 --- a/packages/classic-wow/src/pvp-season/pvp-season.ts +++ b/packages/classic-wow/src/pvp-season/pvp-season.ts @@ -1,5 +1,5 @@ -import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; +import { wowBasePath } from '@blizzard-api/core'; +import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; import type { PvpSeasonIndexResponse, PvpSeasonResponse } from './types'; /** @@ -18,7 +18,7 @@ export function pvpLeaderboard( ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, + path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, }; } /** @@ -35,7 +35,7 @@ export function pvpLeaderboardIndex( ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, + path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, }; } /** @@ -52,7 +52,7 @@ export function pvpRegionalSeason( ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`, + path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`, }; } /** @@ -67,7 +67,7 @@ export function pvpRegionalSeasonIndex( ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/index`, + path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/index`, }; } /** @@ -80,7 +80,7 @@ export function pvpRegionIndex( ): Resource { return { namespace, - path: `${base}/pvp-region/index`, + path: `${wowBasePath}/pvp-region/index`, }; } /** @@ -97,7 +97,7 @@ export function pvpRewardsIndex( ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`, + path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`, }; } /** @@ -112,7 +112,7 @@ export function pvpSeason( ): Resource { return { namespace, - path: `${base}/pvp-season/${pvpSeasonId}`, + path: `${wowBasePath}/pvp-season/${pvpSeasonId}`, }; } /** @@ -125,6 +125,6 @@ export function pvpSeasonIndex( ): Resource { return { namespace, - path: `${base}/pvp-season/index`, + path: `${wowBasePath}/pvp-season/index`, }; } diff --git a/packages/classic-wow/src/realm/realm.test.ts b/packages/classic-wow/src/realm/realm.test.ts index bb88ff48..29b2d1b4 100644 --- a/packages/classic-wow/src/realm/realm.test.ts +++ b/packages/classic-wow/src/realm/realm.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, searchBase } from '../../../wow/src/base'; import { realm, realmIndex, realmSearch } from './realm'; import type { RealmSearchParameters } from './types'; @@ -13,7 +13,7 @@ describe.concurrent('classicRealmApi', () => { expect(result).toEqual({ namespace, - path: `${base}/realm/test-realm`, + path: `${wowBasePath}/realm/test-realm`, }); }); @@ -22,7 +22,7 @@ describe.concurrent('classicRealmApi', () => { expect(result).toEqual({ namespace, - path: `${base}/realm/index`, + path: `${wowBasePath}/realm/index`, }); }); @@ -42,7 +42,7 @@ describe.concurrent('classicRealmApi', () => { orderby: 'name', timezone: options.timezone, }, - path: `${searchBase}/realm`, + path: `${wowSearchBasePath}/realm`, }); }); @@ -62,7 +62,7 @@ describe.concurrent('classicRealmApi', () => { orderby: 'name,population', timezone: options.timezone, }, - path: `${searchBase}/realm`, + path: `${wowSearchBasePath}/realm`, }); }); }); diff --git a/packages/classic-wow/src/realm/realm.ts b/packages/classic-wow/src/realm/realm.ts index 868cb216..82032601 100644 --- a/packages/classic-wow/src/realm/realm.ts +++ b/packages/classic-wow/src/realm/realm.ts @@ -1,5 +1,11 @@ -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import { base, searchBase } from '../../../wow/src/base'; +import { + + + + wowBasePath, + wowSearchBasePath +} from '@blizzard-api/core'; +import type {BlizzardNamespaces, Resource, SearchResponse} from '@blizzard-api/core'; import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponseItem } from './types'; /** @@ -14,7 +20,7 @@ export function realm( ): Resource { return { namespace, - path: `${base}/realm/${realmSlug}`, + path: `${wowBasePath}/realm/${realmSlug}`, }; } /** @@ -27,7 +33,7 @@ export function realmIndex( ): Resource { return { namespace, - path: `${base}/realm/index`, + path: `${wowBasePath}/realm/index`, }; } /** @@ -47,6 +53,6 @@ export function realmSearch( orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, timezone: options.timezone, }, - path: `${searchBase}/realm`, + path: `${wowSearchBasePath}/realm`, }; } diff --git a/packages/classic-wow/src/region/region.test.ts b/packages/classic-wow/src/region/region.test.ts index 903b481d..5a6c3555 100644 --- a/packages/classic-wow/src/region/region.test.ts +++ b/packages/classic-wow/src/region/region.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../../../wow/src/base'; import { region, regionIndex } from './region'; describe.concurrent('classicRegionApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('classicRegionApi', () => { const namespace = 'dynamic-classic'; const regionId = 1; const resource = region(namespace, regionId); - expect(resource.path).toBe(`${base}/region/1`); + expect(resource.path).toBe(`${wowBasePath}/region/1`); expect(resource.namespace).toBe(namespace); }); it('should return the region index resource', ({ expect }) => { const namespace = 'dynamic-classic'; const resource = regionIndex(namespace); - expect(resource.path).toBe(`${base}/region/index`); + expect(resource.path).toBe(`${wowBasePath}/region/index`); expect(resource.namespace).toBe(namespace); }); }); diff --git a/packages/classic-wow/src/region/region.ts b/packages/classic-wow/src/region/region.ts index f397bd76..02d2fc26 100644 --- a/packages/classic-wow/src/region/region.ts +++ b/packages/classic-wow/src/region/region.ts @@ -1,5 +1,5 @@ -import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; -import { base } from '../../../wow/src/base'; +import { wowBasePath } from '@blizzard-api/core'; +import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; import type { RegionIndexResponse, RegionResponse } from './types'; /** @@ -14,7 +14,7 @@ export function region( ): Resource { return { namespace, - path: `${base}/region/${regionId}`, + path: `${wowBasePath}/region/${regionId}`, }; } /** @@ -27,6 +27,6 @@ export function regionIndex( ): Resource { return { namespace, - path: `${base}/region/index`, + path: `${wowBasePath}/region/index`, }; } diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts index 2b6af91e..8bfd3326 100644 --- a/packages/core/src/base.ts +++ b/packages/core/src/base.ts @@ -1,3 +1,118 @@ +/** + * The base request path for the D3 API in the Blizzard API. + */ +export const d3BasePath = 'd3/data'; + +/** + * The base request path for profile APIs in the D3 API. + */ +export const d3ProfileBasePath = `d3/profile`; + +/** + * The base request path for game data APIs in the D3 API. + */ +export const d3GameDataBasePath = `data/d3`; + +/** + * The base request path for the Blizzard API for world of warcraft. + */ +export const wowBasePath = '/data/wow'; + +/** + * The base request path for the character API for Classic World of Warcraft. + */ +export const wowCharacterBasePath = 'profile/wow/character'; + +/** + * The base request path for media in the Blizzard API for world of warcraft. + */ +export const wowMediaBasePath = `${wowBasePath}/media` as const; + +/** + * The base request path for search in the Blizzard API for world of warcraft. + */ +export const wowSearchBasePath = `${wowBasePath}/search` as const; + +/** + * Base search parameters + * orderby The field to order results by. + * _page The page number to return. + * @example + * const params: BaseSearchParameters = { + * orderby: 'name', + * _page: 1, + * }; + */ +export interface BaseSearchParameters { + _page?: number; + orderby?: Array | string; +} +/** + * The standard structure to represent a World of Warcraft Character. + */ +export interface Character extends NameIdKey { + realm: Realm; +} + +/** + * A record containing the RGBA values of a color. + */ +export interface Color { + a: number; + b: number; + g: number; + r: number; +} + +/** + * The faction associated with a character or entity in World of Warcraft. + */ +export interface Faction { + name: 'Alliance' | 'Horde'; + type: Factions; +} + +/** + * The playable factions in World of Warcraft. + */ +export type Factions = 'ALLIANCE' | 'HORDE'; + +/** + * The gender associated with a character or entity in World of Warcraft. + */ +export interface Gender { + name: 'Female' | 'Male'; + type: 'FEMALE' | 'MALE'; +} + +/** + * The playable gender names/descriptions in World of Warcraft. + */ +export interface GenderName { + female: string; + male: string; +} + +export interface Href { + href: string; +} + +/** + * Base record interface containing key.href property that often appear in Blizzard API responses. + */ +export interface KeyBase { + key: Href; +} + +/** + * The media asset associated with a character or entity in World of Warcraft. + */ +export interface MediaAsset { + file_data_id: number; + key: string; + value: string; +} + /** * Base record interface containing name and id properties that often appear together in Blizzard API responses. */ @@ -5,3 +120,24 @@ export interface NameId { id: number; name: string; } + +/** + * Base record containing both {@link KeyBase} and {@link NameId} interfaces. + */ +export interface NameIdKey extends KeyBase, NameId {} + +/** + * The standard structure to represent a World of Warcraft Realm. + */ +export interface Realm extends NameIdKey { + slug: string; +} + +/** + * Base interface for Blizzard API responses. + */ +export interface ResponseBase { + _links: { + self: Href; + }; +} diff --git a/packages/core/src/blizzard-api.ts b/packages/core/src/blizzard-api.ts index e54bbaed..cd61668b 100644 --- a/packages/core/src/blizzard-api.ts +++ b/packages/core/src/blizzard-api.ts @@ -1,25 +1,4 @@ -/** - * Possible locales for use within the Blizzard API. - */ -export type Locales = - | 'de_DE' - | 'en_GB' - | 'en_US' - | 'es_ES' - | 'es_MX' - | 'fr_FR' - | 'it_IT' - | 'ko_KR' - | 'multi' - | 'pt_BR' - | 'pt_PT' - | 'ru_RU' - | 'zh_CN' - | 'zh_TW'; -/** - * Possible regions for use within the Blizzard API. - */ -export type Origins = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; +import type { Locales, Origins } from './locales'; /** * A record of regions and their supported locales. diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9b14d5a2..1ac6bfc4 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,14 +1,17 @@ +//Base +export * from './base'; + //Blizzard API export * from './blizzard-api'; //Namespace export type * from './namespace'; +//Locales +export type * from './locales'; + //Resource export type * from './resource'; //Search export type * from './search'; - -//Base -export type * from './base'; diff --git a/packages/core/src/locales.ts b/packages/core/src/locales.ts new file mode 100644 index 00000000..f8b37429 --- /dev/null +++ b/packages/core/src/locales.ts @@ -0,0 +1,22 @@ +/** + * Possible locales for use within the Blizzard API. + */ +export type Locales = + | 'de_DE' + | 'en_GB' + | 'en_US' + | 'es_ES' + | 'es_MX' + | 'fr_FR' + | 'it_IT' + | 'ko_KR' + | 'multi' + | 'pt_BR' + | 'pt_PT' + | 'ru_RU' + | 'zh_CN' + | 'zh_TW'; +/** + * Possible regions for use within the Blizzard API. + */ +export type Origins = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; diff --git a/packages/core/src/search.ts b/packages/core/src/search.ts index 9152e401..28d97e29 100644 --- a/packages/core/src/search.ts +++ b/packages/core/src/search.ts @@ -1,18 +1,3 @@ -/** - * Base search parameters - * orderby The field to order results by. - * _page The page number to return. - * @example - * const params: BaseSearchParameters = { - * orderby: 'name', - * _page: 1, - * }; - */ -export interface BaseSearchParameters { - _page?: number; - orderby?: Array | string; -} - /** * Search response * page The current page number. diff --git a/packages/d3/src/act/act.test.ts b/packages/d3/src/act/act.test.ts index d27a7782..321518e8 100644 --- a/packages/d3/src/act/act.test.ts +++ b/packages/d3/src/act/act.test.ts @@ -1,14 +1,14 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { act, actIndex } from './act'; describe.concurrent('act', () => { it('should return the act resource', ({ expect }) => { const resource = act(1); - expect(resource.path).toBe(`${base}/act/1`); + expect(resource.path).toBe(`${d3BasePath}/act/1`); }); it('should return the act index resource', ({ expect }) => { const resource = actIndex(); - expect(resource.path).toBe(`${base}/act`); + expect(resource.path).toBe(`${d3BasePath}/act`); }); }); diff --git a/packages/d3/src/act/act.ts b/packages/d3/src/act/act.ts index 12f69604..d09540b4 100644 --- a/packages/d3/src/act/act.ts +++ b/packages/d3/src/act/act.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { ActIndexResponse, ActResponse } from './types'; /** @@ -9,7 +9,7 @@ import type { ActIndexResponse, ActResponse } from './types'; */ export function act(actId: number): Resource { return { - path: `${base}/act/${actId}`, + path: `${d3BasePath}/act/${actId}`, }; } @@ -19,6 +19,6 @@ export function act(actId: number): Resource { */ export function actIndex(): Resource { return { - path: `${base}/act`, + path: `${d3BasePath}/act`, }; } diff --git a/packages/d3/src/artisan-and-recipe/artisan-and-recipe.test.ts b/packages/d3/src/artisan-and-recipe/artisan-and-recipe.test.ts index 1efc2345..f77bdf11 100644 --- a/packages/d3/src/artisan-and-recipe/artisan-and-recipe.test.ts +++ b/packages/d3/src/artisan-and-recipe/artisan-and-recipe.test.ts @@ -1,11 +1,11 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { artisan, recipe } from './artisan-and-recipe'; describe.concurrent('artisan and recipe', () => { it('should return the correct resource path', ({ expect }) => { const artisanSlug = 'blacksmith'; - const expectedPath = `${base}/artisan/blacksmith`; + const expectedPath = `${d3BasePath}/artisan/blacksmith`; const resource = artisan(artisanSlug); @@ -15,7 +15,7 @@ describe.concurrent('artisan and recipe', () => { const artisanSlug = 'blacksmith'; const recipeSlug = 'sword'; - const expectedPath = `${base}/artisan/blacksmith/recipe/sword`; + const expectedPath = `${d3BasePath}/artisan/blacksmith/recipe/sword`; const resource = recipe(artisanSlug, recipeSlug); diff --git a/packages/d3/src/artisan-and-recipe/artisan-and-recipe.ts b/packages/d3/src/artisan-and-recipe/artisan-and-recipe.ts index d1c41659..9435d8c2 100644 --- a/packages/d3/src/artisan-and-recipe/artisan-and-recipe.ts +++ b/packages/d3/src/artisan-and-recipe/artisan-and-recipe.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { ArtisanResponse, RecipeResponse } from './types'; /** @@ -9,7 +9,7 @@ import type { ArtisanResponse, RecipeResponse } from './types'; */ export function artisan(artisanSlug: string): Resource { return { - path: `${base}/artisan/${artisanSlug}`, + path: `${d3BasePath}/artisan/${artisanSlug}`, }; } @@ -21,6 +21,6 @@ export function artisan(artisanSlug: string): Resource { */ export function recipe(artisanSlug: string, recipeSlug: string): Resource { return { - path: `${base}/artisan/${artisanSlug}/recipe/${recipeSlug}`, + path: `${d3BasePath}/artisan/${artisanSlug}/recipe/${recipeSlug}`, }; } diff --git a/packages/d3/src/base.ts b/packages/d3/src/base.ts deleted file mode 100644 index 7cca90c1..00000000 --- a/packages/d3/src/base.ts +++ /dev/null @@ -1,17 +0,0 @@ -export const base = 'd3/data'; - -export const profileBase = `d3/profile`; - -//Why is the game data APIs base root the reverse of the regular base? -export const gameDataBase = `data/d3`; - -/** - * Base interface for Blizzard API responses. - */ -export interface ResponseBase { - _links: { - self: { - href: string; - }; - }; -} diff --git a/packages/d3/src/character-class-and-skill/character-class-and-skill.test.ts b/packages/d3/src/character-class-and-skill/character-class-and-skill.test.ts index ee9cf431..3df59b25 100644 --- a/packages/d3/src/character-class-and-skill/character-class-and-skill.test.ts +++ b/packages/d3/src/character-class-and-skill/character-class-and-skill.test.ts @@ -1,11 +1,11 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { characterClass, skill } from './character-class-and-skill'; describe.concurrent('characterClass', () => { it('returns the correct resource path', ({ expect }) => { const characterClassSlug = 'warrior'; - const expectedPath = `${base}/character-class/warrior`; + const expectedPath = `${d3BasePath}/character-class/warrior`; const resource = characterClass(characterClassSlug); @@ -14,7 +14,7 @@ describe.concurrent('characterClass', () => { it('returns the correct resource path', ({ expect }) => { const characterClassSlug = 'warrior'; const skillSlug = 'charge'; - const expectedPath = `${base}/hero/warrior/skill/charge`; + const expectedPath = `${d3BasePath}/hero/warrior/skill/charge`; const resource = skill(characterClassSlug, skillSlug); diff --git a/packages/d3/src/character-class-and-skill/character-class-and-skill.ts b/packages/d3/src/character-class-and-skill/character-class-and-skill.ts index 4046dd38..98439774 100644 --- a/packages/d3/src/character-class-and-skill/character-class-and-skill.ts +++ b/packages/d3/src/character-class-and-skill/character-class-and-skill.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { CharacterClassResponse, SkillResponse } from './types'; /** @@ -9,7 +9,7 @@ import type { CharacterClassResponse, SkillResponse } from './types'; */ export function characterClass(characterClassSlug: string): Resource { return { - path: `${base}/character-class/${characterClassSlug}`, + path: `${d3BasePath}/character-class/${characterClassSlug}`, }; } @@ -21,6 +21,6 @@ export function characterClass(characterClassSlug: string): Resource { return { - path: `${base}/hero/${characterClassSlug}/skill/${skillSlug}`, + path: `${d3BasePath}/hero/${characterClassSlug}/skill/${skillSlug}`, }; } diff --git a/packages/d3/src/follower/follower.test.ts b/packages/d3/src/follower/follower.test.ts index c7514563..5f7ac22a 100644 --- a/packages/d3/src/follower/follower.test.ts +++ b/packages/d3/src/follower/follower.test.ts @@ -1,11 +1,11 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { follower } from './follower'; describe.concurrent('follower', () => { it('should return the correct resource path', ({ expect }) => { const followerSlug = 'some-follower-slug'; - const expectedPath = `${base}/follower/some-follower-slug`; + const expectedPath = `${d3BasePath}/follower/some-follower-slug`; const resource = follower(followerSlug); diff --git a/packages/d3/src/follower/follower.ts b/packages/d3/src/follower/follower.ts index 60609a8f..7a8aa143 100644 --- a/packages/d3/src/follower/follower.ts +++ b/packages/d3/src/follower/follower.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { FollowerResponse } from './types'; /** @@ -9,6 +9,6 @@ import type { FollowerResponse } from './types'; */ export function follower(followerSlug: string): Resource { return { - path: `${base}/follower/${followerSlug}`, + path: `${d3BasePath}/follower/${followerSlug}`, }; } diff --git a/packages/d3/src/game-data/game-data.test.ts b/packages/d3/src/game-data/game-data.test.ts index 8028d715..0f9d95e3 100644 --- a/packages/d3/src/game-data/game-data.test.ts +++ b/packages/d3/src/game-data/game-data.test.ts @@ -1,41 +1,41 @@ +import { d3GameDataBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { gameDataBase } from '../base'; import { era, eraIndex, eraLeaderboard, season, seasonIndex, seasonLeaderboard } from '../game-data/game-data'; describe.concurrent('game-data', () => { it('seasonIndex should return the correct resource path', ({ expect }) => { const resource = seasonIndex(); - expect(resource.path).toBe(`${gameDataBase}/season`); + expect(resource.path).toBe(`${d3GameDataBasePath}/season`); }); it('season should return the correct resource path', ({ expect }) => { const id = 123; const resource = season(id); - expect(resource.path).toBe(`${gameDataBase}/season/${id}`); + expect(resource.path).toBe(`${d3GameDataBasePath}/season/${id}`); }); it('seasonLeaderboard should return the correct resource path', ({ expect }) => { const id = 123; const leaderboard = 'leaderboard1'; const resource = seasonLeaderboard(id, leaderboard); - expect(resource.path).toBe(`${gameDataBase}/season/${id}/leaderboard/${leaderboard}`); + expect(resource.path).toBe(`${d3GameDataBasePath}/season/${id}/leaderboard/${leaderboard}`); }); it('eraIndex should return the correct resource path', ({ expect }) => { const resource = eraIndex(); - expect(resource.path).toBe(`${gameDataBase}/era`); + expect(resource.path).toBe(`${d3GameDataBasePath}/era`); }); it('era should return the correct resource path', ({ expect }) => { const id = 123; const resource = era(id); - expect(resource.path).toBe(`${gameDataBase}/era/${id}`); + expect(resource.path).toBe(`${d3GameDataBasePath}/era/${id}`); }); it('eraLeaderboard should return the correct resource path', ({ expect }) => { const id = 123; const leaderboard = 'leaderboard1'; const resource = eraLeaderboard(id, leaderboard); - expect(resource.path).toBe(`${gameDataBase}/era/${id}/leaderboard/${leaderboard}`); + expect(resource.path).toBe(`${d3GameDataBasePath}/era/${id}/leaderboard/${leaderboard}`); }); }); diff --git a/packages/d3/src/game-data/game-data.ts b/packages/d3/src/game-data/game-data.ts index 7f9518cc..b71adc5c 100644 --- a/packages/d3/src/game-data/game-data.ts +++ b/packages/d3/src/game-data/game-data.ts @@ -1,5 +1,5 @@ -import type { Resource } from '@blizzard-api/core'; -import { gameDataBase } from '../base'; +import { d3GameDataBasePath } from '@blizzard-api/core'; +import type {Resource} from '@blizzard-api/core'; import type { EraIndexResponse, EraLeaderboardResponse, @@ -16,7 +16,7 @@ import type { */ export function era(id: number): Resource { return { - path: `${gameDataBase}/era/${id}`, + path: `${d3GameDataBasePath}/era/${id}`, }; } @@ -26,7 +26,7 @@ export function era(id: number): Resource { */ export function eraIndex(): Resource { return { - path: `${gameDataBase}/era`, + path: `${d3GameDataBasePath}/era`, }; } @@ -38,7 +38,7 @@ export function eraIndex(): Resource { */ export function eraLeaderboard(id: number, leaderboard: string): Resource { return { - path: `${gameDataBase}/era/${id}/leaderboard/${leaderboard}`, + path: `${d3GameDataBasePath}/era/${id}/leaderboard/${leaderboard}`, }; } @@ -49,7 +49,7 @@ export function eraLeaderboard(id: number, leaderboard: string): Resource { return { - path: `${gameDataBase}/season/${id}`, + path: `${d3GameDataBasePath}/season/${id}`, }; } @@ -59,7 +59,7 @@ export function season(id: number): Resource { */ export function seasonIndex(): Resource { return { - path: `${gameDataBase}/season`, + path: `${d3GameDataBasePath}/season`, }; } @@ -71,6 +71,6 @@ export function seasonIndex(): Resource { */ export function seasonLeaderboard(id: number, leaderboard: string): Resource { return { - path: `${gameDataBase}/season/${id}/leaderboard/${leaderboard}`, + path: `${d3GameDataBasePath}/season/${id}/leaderboard/${leaderboard}`, }; } diff --git a/packages/d3/src/game-data/types.ts b/packages/d3/src/game-data/types.ts index e0fcf069..1f039893 100644 --- a/packages/d3/src/game-data/types.ts +++ b/packages/d3/src/game-data/types.ts @@ -1,4 +1,4 @@ -import type { ResponseBase } from '../base'; +import type { ResponseBase } from '@blizzard-api/core'; export interface EraIndexResponse extends ResponseBase { current_era: number; diff --git a/packages/d3/src/item-type/item-type.test.ts b/packages/d3/src/item-type/item-type.test.ts index 1f235ff6..6adfad83 100644 --- a/packages/d3/src/item-type/item-type.test.ts +++ b/packages/d3/src/item-type/item-type.test.ts @@ -1,15 +1,15 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { itemType, itemTypeIndex } from './item-type'; describe.concurrent('itemTypeIndex', () => { it('should return the correct resource path', ({ expect }) => { const resource = itemTypeIndex(); - expect(resource.path).toBe(`${base}/item-type`); + expect(resource.path).toBe(`${d3BasePath}/item-type`); }); it('should return the correct resource path', ({ expect }) => { const itemTypeSlug = 'some-item-type-slug'; const resource = itemType(itemTypeSlug); - expect(resource.path).toBe(`${base}/item-type/${itemTypeSlug}`); + expect(resource.path).toBe(`${d3BasePath}/item-type/${itemTypeSlug}`); }); }); diff --git a/packages/d3/src/item-type/item-type.ts b/packages/d3/src/item-type/item-type.ts index 03a62126..bbf24a16 100644 --- a/packages/d3/src/item-type/item-type.ts +++ b/packages/d3/src/item-type/item-type.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { ItemTypeIndexResponse, ItemTypeResponse } from './types'; /** @@ -9,7 +9,7 @@ import type { ItemTypeIndexResponse, ItemTypeResponse } from './types'; */ export function itemType(itemTypeSlug: string): Resource> { return { - path: `${base}/item-type/${itemTypeSlug}`, + path: `${d3BasePath}/item-type/${itemTypeSlug}`, }; } @@ -19,6 +19,6 @@ export function itemType(itemTypeSlug: string): Resource */ export function itemTypeIndex(): Resource> { return { - path: `${base}/item-type`, + path: `${d3BasePath}/item-type`, }; } diff --git a/packages/d3/src/item/item.test.ts b/packages/d3/src/item/item.test.ts index 6ed7f471..df3e7d53 100644 --- a/packages/d3/src/item/item.test.ts +++ b/packages/d3/src/item/item.test.ts @@ -1,11 +1,11 @@ +import { d3BasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { item } from './item'; describe.concurrent('item', () => { it('should return the correct resource path', ({ expect }) => { const itemSlugAndId = '12345'; - const expectedPath = `${base}/item/12345`; + const expectedPath = `${d3BasePath}/item/12345`; const resource = item(itemSlugAndId); diff --git a/packages/d3/src/item/item.ts b/packages/d3/src/item/item.ts index 9732f090..0403cd5d 100644 --- a/packages/d3/src/item/item.ts +++ b/packages/d3/src/item/item.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { d3BasePath } from '@blizzard-api/core'; import type { ItemResponse } from './types'; /** @@ -9,6 +9,6 @@ import type { ItemResponse } from './types'; */ export function item(itemSlugAndId: string): Resource { return { - path: `${base}/item/${itemSlugAndId}`, + path: `${d3BasePath}/item/${itemSlugAndId}`, }; } diff --git a/packages/d3/src/profile/profile.test.ts b/packages/d3/src/profile/profile.test.ts index 9a598f01..b86bc66e 100644 --- a/packages/d3/src/profile/profile.test.ts +++ b/packages/d3/src/profile/profile.test.ts @@ -1,5 +1,5 @@ +import { d3ProfileBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { profileBase } from '../base'; import { account, accountHero, accountHeroFollowerItems, accountHeroItems } from './profile'; const battleTag = 'example#1234'; @@ -7,7 +7,7 @@ const heroId = 42; describe.concurrent('profile', () => { it('account should return the correct resource', ({ expect }) => { - const expectedPath = `${profileBase}/example#1234`; + const expectedPath = `${d3ProfileBasePath}/example#1234`; const resource = account(battleTag); @@ -15,7 +15,7 @@ describe.concurrent('profile', () => { }); it('should return the correct resource path', ({ expect }) => { - const expectedPath = `${profileBase}/example#1234/hero/42`; + const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42`; const resource = accountHero(battleTag, heroId); @@ -23,7 +23,7 @@ describe.concurrent('profile', () => { }); it('should return the correct resource path', ({ expect }) => { - const expectedPath = `${profileBase}/example#1234/hero/42/items`; + const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42/items`; const resource = accountHeroItems(battleTag, heroId); @@ -31,7 +31,7 @@ describe.concurrent('profile', () => { }); it('accountHeroFollowerItems should return the correct resource', ({ expect }) => { - const expectedPath = `${profileBase}/example#1234/hero/42/follower-items`; + const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42/follower-items`; const resource = accountHeroFollowerItems(battleTag, heroId); diff --git a/packages/d3/src/profile/profile.ts b/packages/d3/src/profile/profile.ts index 38aae17e..330ab70e 100644 --- a/packages/d3/src/profile/profile.ts +++ b/packages/d3/src/profile/profile.ts @@ -1,5 +1,5 @@ -import type { Resource } from '@blizzard-api/core'; -import { profileBase } from '../base'; +import { d3ProfileBasePath } from '@blizzard-api/core'; +import type {Resource} from '@blizzard-api/core'; import type { AccountHeroFollowerItemsResponse, AccountHeroResponse, AccountResponse } from './types'; /** @@ -9,7 +9,7 @@ import type { AccountHeroFollowerItemsResponse, AccountHeroResponse, AccountResp */ export function account(battleTag: string): Resource { return { - path: `${profileBase}/${encodeURIComponent(battleTag)}`, + path: `${d3ProfileBasePath}/${encodeURIComponent(battleTag)}`, }; } @@ -21,7 +21,7 @@ export function account(battleTag: string): Resource { */ export function accountHero(battleTag: string, heroId: number): Resource { return { - path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}`, + path: `${d3ProfileBasePath}/${encodeURIComponent(battleTag)}/hero/${heroId}`, }; } @@ -36,7 +36,7 @@ export function accountHeroFollowerItems( heroId: number, ): Resource { return { - path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}/follower-items`, + path: `${d3ProfileBasePath}/${encodeURIComponent(battleTag)}/hero/${heroId}/follower-items`, }; } @@ -48,6 +48,6 @@ export function accountHeroFollowerItems( */ export function accountHeroItems(battleTag: string, heroId: number): Resource { return { - path: `${profileBase}/${encodeURIComponent(battleTag)}/hero/${heroId}/items`, + path: `${d3ProfileBasePath}/${encodeURIComponent(battleTag)}/hero/${heroId}/items`, }; } diff --git a/packages/hs/src/base.ts b/packages/hs/src/base.ts deleted file mode 100644 index accd862e..00000000 --- a/packages/hs/src/base.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type GameMode = 'arena' | 'battlegrounds' | 'classic' | 'constructed' | 'duels' | 'mercenaries' | 'standard'; - -export type SearchSortOption = `${SortOptions}:${SortDirection}`; - -type SortDirection = 'asc' | 'desc'; - -type SortOptions = 'attack' | 'class' | 'dataAdded' | 'groupByClass' | 'health' | 'manaCost' | 'name'; diff --git a/packages/hs/src/card-backs/types.ts b/packages/hs/src/card-backs/types.ts index efe943a2..5216eea1 100644 --- a/packages/hs/src/card-backs/types.ts +++ b/packages/hs/src/card-backs/types.ts @@ -1,5 +1,4 @@ import type { Locales } from '@blizzard-api/core'; -import type { SearchSortOption } from '../base'; export interface CardBackSearchParameters { cardBackCategory?: @@ -38,3 +37,7 @@ export interface SingleCardBackSearchResponse { sortCategory: number; text: Record | string; } + +type SearchOptions = 'attack' | 'class' | 'dataAdded' | 'groupByClass' | 'health' | 'manaCost' | 'name'; +type SearchSortOption = `${SearchOptions}:${SortOptions}`; +type SortOptions = 'asc' | 'desc'; diff --git a/packages/hs/src/cards/cards.test.ts b/packages/hs/src/cards/cards.test.ts index 1158c628..4062d941 100644 --- a/packages/hs/src/cards/cards.test.ts +++ b/packages/hs/src/cards/cards.test.ts @@ -1,6 +1,5 @@ import type { Locales } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import type { GameMode } from '../base'; import { cardSearch, fetchOneCard } from './cards'; import type { CardSearchParameters } from './types'; @@ -69,8 +68,7 @@ describe('fetchOneCard', () => { it('should return correct parameters with specified gameMode', () => { const id = 'card123'; - const options = { gameMode: 'battlegrounds' as GameMode, locale: 'en_US' as Locales }; - const result = fetchOneCard(id, options); + const result = fetchOneCard(id, { gameMode: 'battlegrounds', locale: 'en_US' }); expect(result.parameters).toEqual({ gameMode: 'battlegrounds', locale: 'en_US', @@ -80,8 +78,7 @@ describe('fetchOneCard', () => { it('should handle undefined locale correctly', () => { const id = 'card123'; - const options = { gameMode: 'battlegrounds' as GameMode }; - const result = fetchOneCard(id, options); + const result = fetchOneCard(id, { gameMode: 'battlegrounds' }); expect(result.parameters).toEqual({ gameMode: 'battlegrounds', locale: undefined, diff --git a/packages/hs/src/cards/cards.ts b/packages/hs/src/cards/cards.ts index b2eada41..85985069 100644 --- a/packages/hs/src/cards/cards.ts +++ b/packages/hs/src/cards/cards.ts @@ -1,10 +1,10 @@ import type { Locales, Resource } from '@blizzard-api/core'; -import type { GameMode } from '../base'; import type { BlizzardCardSearchParameters, CardSearchParameters, CardSearchResponse, FetchOneCardResponse, + GameMode, } from './types'; /** diff --git a/packages/hs/src/cards/types.ts b/packages/hs/src/cards/types.ts index 90b1f732..0ca0c056 100644 --- a/packages/hs/src/cards/types.ts +++ b/packages/hs/src/cards/types.ts @@ -1,5 +1,4 @@ import type { Locales } from '@blizzard-api/core'; -import type { GameMode } from '../base'; export interface BlizzardCardSearchParameters extends BaseSearchParameters { attack?: string; @@ -46,6 +45,8 @@ export interface FetchOneCardResponse { text: Record | string; } +export type GameMode = 'arena' | 'battlegrounds' | 'classic' | 'constructed' | 'duels' | 'mercenaries' | 'standard'; + interface BaseSearchParameters { gameMode?: GameMode; locale?: Locales; diff --git a/packages/hs/src/metadata/types.ts b/packages/hs/src/metadata/types.ts index f72dbc2e..07c8bb01 100644 --- a/packages/hs/src/metadata/types.ts +++ b/packages/hs/src/metadata/types.ts @@ -1,4 +1,4 @@ -import type { NameId } from '../../../wow/src/base'; +import type { NameId } from '@blizzard-api/core'; export interface AllMetadataResponse { arenaIds: Array; diff --git a/packages/sc2/src/ladder/ladder.test.ts b/packages/sc2/src/ladder/ladder.test.ts index 6d337b4f..ed526bdf 100644 --- a/packages/sc2/src/ladder/ladder.test.ts +++ b/packages/sc2/src/ladder/ladder.test.ts @@ -1,6 +1,6 @@ import type { Resource } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import type { StarcraftRegion } from '../base'; +import type { StarcraftRegion } from '../regions'; import { grandmasterLeaderboard, season } from './ladder'; import type { GrandmasterLeaderboardResponse, SeasonResponse } from './types'; diff --git a/packages/sc2/src/ladder/ladder.ts b/packages/sc2/src/ladder/ladder.ts index a47fcb53..6f110cc2 100644 --- a/packages/sc2/src/ladder/ladder.ts +++ b/packages/sc2/src/ladder/ladder.ts @@ -1,6 +1,6 @@ import type { Resource } from '@blizzard-api/core'; -import { starcraftRegion } from '../base'; -import type { StarcraftRegion } from '../base'; +import { starcraftRegion } from '../regions'; +import type { StarcraftRegion } from '../regions'; import type { GrandmasterLeaderboardResponse, SeasonResponse } from './types'; /** diff --git a/packages/sc2/src/league/types.ts b/packages/sc2/src/league/types.ts index f9277aa0..4ae3f599 100644 --- a/packages/sc2/src/league/types.ts +++ b/packages/sc2/src/league/types.ts @@ -1,4 +1,4 @@ -import type { ResponseBase } from '../base'; +import type { ResponseBase } from '@blizzard-api/core'; export interface LeagueDataResponse extends ResponseBase { key: Key; diff --git a/packages/sc2/src/legacy/legacy.ts b/packages/sc2/src/legacy/legacy.ts index bed052e7..17e4f09b 100644 --- a/packages/sc2/src/legacy/legacy.ts +++ b/packages/sc2/src/legacy/legacy.ts @@ -1,6 +1,6 @@ import type { Resource } from '@blizzard-api/core'; -import { starcraftRegion } from '../base'; -import type { StarcraftRegion } from '../base'; +import { starcraftRegion } from '../regions'; +import type { StarcraftRegion } from '../regions'; import type { LegacyAchievementsResponse, LegacyLaddersResponse, diff --git a/packages/sc2/src/profile/profile.test.ts b/packages/sc2/src/profile/profile.test.ts index 8b4d17f5..9cc3876d 100644 --- a/packages/sc2/src/profile/profile.test.ts +++ b/packages/sc2/src/profile/profile.test.ts @@ -1,7 +1,7 @@ import type { Resource } from '@blizzard-api/core'; import { describe, expect, it } from 'vitest'; -import { starcraftRegion } from '../base'; -import type { StarcraftRegion } from '../base'; +import { starcraftRegion } from '../regions'; +import type { StarcraftRegion } from '../regions'; import { ladder, ladderSummary, metadata, profile, staticProfile } from './profile'; import type { LadderResponse, LadderSummaryResponse, MetadataResponse, StaticProfileResponse } from './types'; diff --git a/packages/sc2/src/profile/profile.ts b/packages/sc2/src/profile/profile.ts index b5d91267..e5514596 100644 --- a/packages/sc2/src/profile/profile.ts +++ b/packages/sc2/src/profile/profile.ts @@ -1,6 +1,6 @@ import type { Resource } from '@blizzard-api/core'; -import { starcraftRegion } from '../base'; -import type { StarcraftRegion } from '../base'; +import { starcraftRegion } from '../regions'; +import type { StarcraftRegion } from '../regions'; import type { LadderResponse, LadderSummaryResponse, MetadataResponse, StaticProfileResponse } from './types'; /** diff --git a/packages/sc2/src/base.ts b/packages/sc2/src/regions.ts similarity index 57% rename from packages/sc2/src/base.ts rename to packages/sc2/src/regions.ts index d67d25d9..2b83362a 100644 --- a/packages/sc2/src/base.ts +++ b/packages/sc2/src/regions.ts @@ -1,21 +1,10 @@ -/** - * Base interface for Blizzard API responses. - */ -export interface ResponseBase { - _links: { - self: { - href: string; - }; - }; -} - -//The region (1=US, 2=EU, 3=KO and TW, 5=CN). -export type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; - -export const starcraftRegion: Record = { - cn: 5, - eu: 2, - kr: 3, - tw: 3, - us: 1, -}; +//The region (1=US, 2=EU, 3=KO and TW, 5=CN). +export type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; + +export const starcraftRegion: Record = { + cn: 5, + eu: 2, + kr: 3, + tw: 3, + us: 1, +}; diff --git a/packages/wow/src/account-profile/types.ts b/packages/wow/src/account-profile/types.ts index 98e56bf8..6cbe0753 100644 --- a/packages/wow/src/account-profile/types.ts +++ b/packages/wow/src/account-profile/types.ts @@ -1,4 +1,4 @@ -import type { Faction, Gender, Href, KeyBase, NameId, NameIdKey, Realm } from '../base'; +import type { Faction, Gender, Href, KeyBase, NameId, NameIdKey, Realm } from '@blizzard-api/core'; export interface AccountCollectionsIndexResponse { _links: Links; diff --git a/packages/wow/src/achievements/achievements.test.ts b/packages/wow/src/achievements/achievements.test.ts index 2cb0c9fb..d1e204a8 100644 --- a/packages/wow/src/achievements/achievements.test.ts +++ b/packages/wow/src/achievements/achievements.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { achievement, achievementCategory, @@ -11,31 +11,31 @@ import { describe.concurrent('Achievements', () => { it('should return correct path and namespace for achievementCategory', ({ expect }) => { const resource = achievementCategory(1); - expect(resource.path).toBe(`${base}/achievement-category/1`); + expect(resource.path).toBe(`${wowBasePath}/achievement-category/1`); expect(resource.namespace).toBe('static'); }); it('should return correct path and namespace for achievementCategoryIndex', ({ expect }) => { const resource = achievementCategoryIndex(); - expect(resource.path).toBe(`${base}/achievement-category/index`); + expect(resource.path).toBe(`${wowBasePath}/achievement-category/index`); expect(resource.namespace).toBe('static'); }); it('should return correct path and namespace for achievement', ({ expect }) => { const resource = achievement(1); - expect(resource.path).toBe(`${base}/achievement/1`); + expect(resource.path).toBe(`${wowBasePath}/achievement/1`); expect(resource.namespace).toBe('static'); }); it('should return correct path and namespace for achievementIndex', ({ expect }) => { const resource = achievementIndex(); - expect(resource.path).toBe(`${base}/achievement/index`); + expect(resource.path).toBe(`${wowBasePath}/achievement/index`); expect(resource.namespace).toBe('static'); }); it('should return correct path and namespace for achievementMedia', ({ expect }) => { const resource = achievementMedia(1); - expect(resource.path).toBe(`${mediaBase}/achievement/1`); + expect(resource.path).toBe(`${wowMediaBasePath}/achievement/1`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/achievements/achievements.ts b/packages/wow/src/achievements/achievements.ts index e8c97510..751610a3 100644 --- a/packages/wow/src/achievements/achievements.ts +++ b/packages/wow/src/achievements/achievements.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; import type { AchievementCategoryIndexResponse, AchievementCategoryResponse, @@ -8,8 +8,8 @@ import type { AchievementResponse, } from './types'; -const achievementBase = `${base}/achievement`; -const achievementCategoryBase = `${base}/achievement-category`; +const achievementBase = `${wowBasePath}/achievement`; +const achievementCategoryBase = `${wowBasePath}/achievement-category`; /** * Get an achievement by ID. @@ -59,5 +59,5 @@ export function achievementIndex(): Resource { * @returns The achievement media. See {@link AchievementMediaResponse}. */ export function achievementMedia(achievementId: number): Resource { - return { namespace: 'static', path: `${mediaBase}/achievement/${achievementId}` }; + return { namespace: 'static', path: `${wowMediaBasePath}/achievement/${achievementId}` }; } diff --git a/packages/wow/src/achievements/types.ts b/packages/wow/src/achievements/types.ts index 8b15f3f0..1886487b 100644 --- a/packages/wow/src/achievements/types.ts +++ b/packages/wow/src/achievements/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the achievement category index endpoint. diff --git a/packages/wow/src/auction-house/auction-house.ts b/packages/wow/src/auction-house/auction-house.ts index 117c7d34..726ac25c 100644 --- a/packages/wow/src/auction-house/auction-house.ts +++ b/packages/wow/src/auction-house/auction-house.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; import type { AuctionHouseCommoditiesResponse, AuctionHouseResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { AuctionHouseCommoditiesResponse, AuctionHouseResponse } from './ty export function auctions(connectedRealmId: number): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/${connectedRealmId}/auctions`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}/auctions`, }; } /** @@ -20,6 +20,6 @@ export function auctions(connectedRealmId: number): Resource { return { namespace: 'dynamic', - path: `${base}/auctions/commodities`, + path: `${wowBasePath}/auctions/commodities`, }; } diff --git a/packages/wow/src/auction-house/types.ts b/packages/wow/src/auction-house/types.ts index bba9f8d2..3a05fed0 100644 --- a/packages/wow/src/auction-house/types.ts +++ b/packages/wow/src/auction-house/types.ts @@ -1,4 +1,4 @@ -import type { ResponseBase } from '../base'; +import type { ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the auction house commodities endpoint. diff --git a/packages/wow/src/azerite-essence/azerite-essence.test.ts b/packages/wow/src/azerite-essence/azerite-essence.test.ts index 14a8ee0b..aa0e6659 100644 --- a/packages/wow/src/azerite-essence/azerite-essence.test.ts +++ b/packages/wow/src/azerite-essence/azerite-essence.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../base'; import { azeriteEssence, azeriteEssenceIndex, azeriteEssenceMedia, azeriteEssenceSearch } from './azerite-essence'; describe.concurrent('azeriteEssenceApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('azeriteEssenceApi', () => { const azeriteEssenceId = 123; const resource = azeriteEssence(azeriteEssenceId); - expect(resource.path).toBe(`${base}/azerite-essence/123`); + expect(resource.path).toBe(`${wowBasePath}/azerite-essence/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for azeriteEssenceIndex', ({ expect }) => { const resource = azeriteEssenceIndex(); - expect(resource.path).toBe(`${base}/azerite-essence/index`); + expect(resource.path).toBe(`${wowBasePath}/azerite-essence/index`); expect(resource.namespace).toBe('static'); }); @@ -22,14 +22,14 @@ describe.concurrent('azeriteEssenceApi', () => { const azeriteEssenceId = 123; const resource = azeriteEssenceMedia(azeriteEssenceId); - expect(resource.path).toBe(`${mediaBase}/azerite-essence/123`); + expect(resource.path).toBe(`${wowMediaBasePath}/azerite-essence/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for azeriteEssenceSearch', ({ expect }) => { const resource = azeriteEssenceSearch({ _page: 1 }); - expect(resource.path).toBe(`${searchBase}/azerite-essence`); + expect(resource.path).toBe(`${wowSearchBasePath}/azerite-essence`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1 }); }); @@ -40,7 +40,7 @@ describe.concurrent('azeriteEssenceApi', () => { orderby: 'name', }); - expect(resource.path).toBe(`${searchBase}/azerite-essence`); + expect(resource.path).toBe(`${wowSearchBasePath}/azerite-essence`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -56,7 +56,7 @@ describe.concurrent('azeriteEssenceApi', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/azerite-essence`); + expect(resource.path).toBe(`${wowSearchBasePath}/azerite-essence`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/azerite-essence/azerite-essence.ts b/packages/wow/src/azerite-essence/azerite-essence.ts index 65fdd674..7346eb9a 100644 --- a/packages/wow/src/azerite-essence/azerite-essence.ts +++ b/packages/wow/src/azerite-essence/azerite-essence.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../base'; +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { AzeriteEssenceIndexResponse, AzeriteEssenceMediaResponse, @@ -16,7 +16,7 @@ import type { export function azeriteEssence(azeriteEssenceId: number): Resource { return { namespace: 'static', - path: `${base}/azerite-essence/${azeriteEssenceId}`, + path: `${wowBasePath}/azerite-essence/${azeriteEssenceId}`, }; } /** @@ -26,7 +26,7 @@ export function azeriteEssence(azeriteEssenceId: number): Resource { return { namespace: 'static', - path: `${base}/azerite-essence/index`, + path: `${wowBasePath}/azerite-essence/index`, }; } /** @@ -35,7 +35,7 @@ export function azeriteEssenceIndex(): Resource { * @returns The azerite essence media. See {@link AzeriteEssenceMediaResponse}. */ export function azeriteEssenceMedia(azeriteEssenceId: number): Resource { - return { namespace: 'static', path: `${mediaBase}/azerite-essence/${azeriteEssenceId}` }; + return { namespace: 'static', path: `${wowMediaBasePath}/azerite-essence/${azeriteEssenceId}` }; } /** * Search for azerite essences. @@ -52,6 +52,6 @@ export function azeriteEssenceSearch( 'allowed_specializations.id': options['allowed_specializations.id'], orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/azerite-essence`, + path: `${wowSearchBasePath}/azerite-essence`, }; } diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index e1d3e01d..da84ffcf 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; + /** * Interface for a response from the azerite essence index endpoint. diff --git a/packages/wow/src/base.ts b/packages/wow/src/base.ts deleted file mode 100644 index 7f4509b1..00000000 --- a/packages/wow/src/base.ts +++ /dev/null @@ -1,126 +0,0 @@ -/** - * @file base.ts - * @module base - * @description Contains base constants and interfaces for the Blizzard API. - */ - -/** - * The base request path for the Blizzard API for world of warcraft. - */ -export const base = '/data/wow'; - -/** - * The base request path for media in the Blizzard API for world of warcraft. - */ -export const mediaBase = `${base}/media` as const; - -/** - * The base request path for search in the Blizzard API for world of warcraft. - */ -export const searchBase = `${base}/search` as const; - -/** - * - */ - -/** - * A record containing the RGBA values of a color. - */ -export interface Color { - a: number; - b: number; - g: number; - r: number; -} -/** - * The playable gender names/descriptions in World of Warcraft. - */ -export interface GenderName { - female: string; - male: string; -} - -export interface Href { - href: string; -} - -/** - * Base record interface containing key.href property that often appear in Blizzard API responses. - */ -export interface KeyBase { - key: Href; -} - -/** - * The media asset associated with a character or entity in World of Warcraft. - */ -export interface MediaAsset { - file_data_id: number; - key: string; - value: string; -} - -/** - * Base record interface containing name and id properties that often appear together in Blizzard API responses. - */ -export interface NameId { - id: number; - name: string; -} - -/** - * Base record containing both {@link KeyBase} and {@link NameId} interfaces. - */ -export interface NameIdKey extends KeyBase, NameId {} - -/** - * Base interface for Blizzard API responses. - */ -export interface ResponseBase { - _links: { - self: Href; - }; -} - -/** - * The playable genders in World of Warcraft. - */ -export const Genders = { - FEMALE: 'FEMALE', - MALE: 'MALE', -} as const; - -/** - * The standard structure to represent a World of Warcraft Character. - */ -export interface Character extends NameIdKey { - realm: Realm; -} - -/** - * The faction associated with a character or entity in World of Warcraft. - */ -export interface Faction { - name: Capitalize>; - type: Factions; -} - -/** - * The playable factions in World of Warcraft. - */ -export type Factions = 'ALLIANCE' | 'HORDE'; - -/** - * The gender associated with a character or entity in World of Warcraft. - */ -export interface Gender { - name: Capitalize>; - type: keyof typeof Genders; -} - -/** - * The standard structure to represent a World of Warcraft Realm. - */ -export interface Realm extends NameIdKey { - slug: string; -} diff --git a/packages/wow/src/character-achievements/types.ts b/packages/wow/src/character-achievements/types.ts index d0320660..79ea25e2 100644 --- a/packages/wow/src/character-achievements/types.ts +++ b/packages/wow/src/character-achievements/types.ts @@ -1,4 +1,4 @@ -import type { Character, Href, NameIdKey, ResponseBase } from '../base'; +import type { Character, Href, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterAchievementsSummaryResponse extends ResponseBase { achievements: Array; diff --git a/packages/wow/src/character-appearance/types.ts b/packages/wow/src/character-appearance/types.ts index f73ee5c9..a6da4bb0 100644 --- a/packages/wow/src/character-appearance/types.ts +++ b/packages/wow/src/character-appearance/types.ts @@ -1,4 +1,4 @@ -import type { Character, Color, Faction, Gender, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { Character, Color, Faction, Gender, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterAppearanceResponse extends ResponseBase { active_spec: NameIdKey; diff --git a/packages/wow/src/character-collections/types.ts b/packages/wow/src/character-collections/types.ts index d0bbd032..27ef99d3 100644 --- a/packages/wow/src/character-collections/types.ts +++ b/packages/wow/src/character-collections/types.ts @@ -1,4 +1,4 @@ -import type { Character, Href, KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { Character, Href, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterCollectionsIndexResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-encounters/types.ts b/packages/wow/src/character-encounters/types.ts index e74ecfea..4d528d35 100644 --- a/packages/wow/src/character-encounters/types.ts +++ b/packages/wow/src/character-encounters/types.ts @@ -1,4 +1,4 @@ -import type { Character, Href, NameIdKey, ResponseBase } from '../base'; +import type { Character, Href, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterDungeonsResponse extends ResponseBase { expansions: Array; diff --git a/packages/wow/src/character-equipment/types.ts b/packages/wow/src/character-equipment/types.ts index 16769044..9fabd038 100644 --- a/packages/wow/src/character-equipment/types.ts +++ b/packages/wow/src/character-equipment/types.ts @@ -1,4 +1,4 @@ -import type { Character, Color, KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { Character, Color, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterEquipmentSummaryResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-hunter-pets/types.ts b/packages/wow/src/character-hunter-pets/types.ts index 30d673d7..87c9914a 100644 --- a/packages/wow/src/character-hunter-pets/types.ts +++ b/packages/wow/src/character-hunter-pets/types.ts @@ -1,4 +1,4 @@ -import type { Character, KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { Character, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterHunterPetsSummaryResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-media/types.ts b/packages/wow/src/character-media/types.ts index e7af6970..fca9b71c 100644 --- a/packages/wow/src/character-media/types.ts +++ b/packages/wow/src/character-media/types.ts @@ -1,4 +1,4 @@ -import type { Character, ResponseBase } from '../base'; +import type { Character, ResponseBase } from '@blizzard-api/core'; export interface CharacterMediaSummaryResponse extends ResponseBase { assets: Array; diff --git a/packages/wow/src/character-mythic-keystone-profile/types.ts b/packages/wow/src/character-mythic-keystone-profile/types.ts index 59824ac4..cd737681 100644 --- a/packages/wow/src/character-mythic-keystone-profile/types.ts +++ b/packages/wow/src/character-mythic-keystone-profile/types.ts @@ -1,4 +1,4 @@ -import type { Character, Color, KeyBase, NameId, NameIdKey, Realm, ResponseBase } from '../base'; +import type { Character, Color, KeyBase, NameId, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; export interface CharacterMythicKeystoneProfileIndexResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-professions/types.ts b/packages/wow/src/character-professions/types.ts index 5b5f6847..d1a92a40 100644 --- a/packages/wow/src/character-professions/types.ts +++ b/packages/wow/src/character-professions/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameId, NameIdKey, ResponseBase } from '../base'; +import type { Character, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterProfessionsSummaryResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-profile/types.ts b/packages/wow/src/character-profile/types.ts index c0227ee7..4a5f4852 100644 --- a/packages/wow/src/character-profile/types.ts +++ b/packages/wow/src/character-profile/types.ts @@ -1,4 +1,4 @@ -import type { Faction, Gender, Href, NameIdKey, Realm, ResponseBase } from '../base'; +import type { Faction, Gender, Href, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; export interface CharacterProfileStatusResponse extends ResponseBase { id: number; diff --git a/packages/wow/src/character-pvp/types.ts b/packages/wow/src/character-pvp/types.ts index 0340e538..d6c94227 100644 --- a/packages/wow/src/character-pvp/types.ts +++ b/packages/wow/src/character-pvp/types.ts @@ -1,4 +1,4 @@ -import type { Character, Faction, KeyBase, NameId, ResponseBase } from '../base'; +import type { Character, Faction, KeyBase, NameId, ResponseBase } from '@blizzard-api/core'; export interface CharacterPvpBracketStatisticsResponse extends ResponseBase { bracket: Bracket; diff --git a/packages/wow/src/character-quests/types.ts b/packages/wow/src/character-quests/types.ts index 8d53315e..3437d39b 100644 --- a/packages/wow/src/character-quests/types.ts +++ b/packages/wow/src/character-quests/types.ts @@ -1,4 +1,4 @@ -import type { Character, Href, NameIdKey, ResponseBase } from '../base'; +import type { Character, Href, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterCompletedQuestsResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-reputations/types.ts b/packages/wow/src/character-reputations/types.ts index 1eb3b892..f51ba031 100644 --- a/packages/wow/src/character-reputations/types.ts +++ b/packages/wow/src/character-reputations/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameIdKey, ResponseBase } from '../base'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterReputationsSummaryResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-soulbinds/types.ts b/packages/wow/src/character-soulbinds/types.ts index d5232bf7..34eda19d 100644 --- a/packages/wow/src/character-soulbinds/types.ts +++ b/packages/wow/src/character-soulbinds/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameIdKey, ResponseBase } from '../base'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterSoulbindsResponse extends ResponseBase { character: Character; diff --git a/packages/wow/src/character-specializations/types.ts b/packages/wow/src/character-specializations/types.ts index d24369b7..e75609b9 100644 --- a/packages/wow/src/character-specializations/types.ts +++ b/packages/wow/src/character-specializations/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameIdKey, ResponseBase } from '../base'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterSpecializationsSummaryResponse extends ResponseBase { active_hero_talent: NameIdKey; diff --git a/packages/wow/src/character-statistics/types.ts b/packages/wow/src/character-statistics/types.ts index 25481820..b5ae6276 100644 --- a/packages/wow/src/character-statistics/types.ts +++ b/packages/wow/src/character-statistics/types.ts @@ -1,4 +1,4 @@ -import type { Character, ResponseBase } from '../base'; +import type { Character, ResponseBase } from '@blizzard-api/core'; export interface CharacterStatisticsSummaryResponse extends ResponseBase { agility: BaseEffectiveStat; diff --git a/packages/wow/src/character-titles/types.ts b/packages/wow/src/character-titles/types.ts index 432cea7d..ff30ee05 100644 --- a/packages/wow/src/character-titles/types.ts +++ b/packages/wow/src/character-titles/types.ts @@ -1,4 +1,4 @@ -import type { Character, NameIdKey, ResponseBase } from '../base'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterTitlesSummaryResponse extends ResponseBase { active_title: NameIdKey & { display_string: string }; diff --git a/packages/wow/src/connected-realm/connected-realm.test.ts b/packages/wow/src/connected-realm/connected-realm.test.ts index baf7bb71..062cbf49 100644 --- a/packages/wow/src/connected-realm/connected-realm.test.ts +++ b/packages/wow/src/connected-realm/connected-realm.test.ts @@ -1,5 +1,5 @@ +import { wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { searchBase } from '../base'; import { connectedRealm, connectedRealmIndex, connectedRealmSearch } from './connected-realm'; describe.concurrent('connectedRealm', () => { @@ -21,7 +21,7 @@ describe.concurrent('connectedRealm', () => { it('should return the correct resource for connected realm search', ({ expect }) => { const resource = connectedRealmSearch({ _page: 1 }); - expect(resource.path).toBe(`${searchBase}/connected-realm`); + expect(resource.path).toBe(`${wowSearchBasePath}/connected-realm`); expect(resource.namespace).toBe('dynamic'); expect(resource.parameters).toEqual({ _page: 1 }); }); @@ -32,7 +32,7 @@ describe.concurrent('connectedRealm', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/connected-realm`); + expect(resource.path).toBe(`${wowSearchBasePath}/connected-realm`); expect(resource.namespace).toBe('dynamic'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/connected-realm/connected-realm.ts b/packages/wow/src/connected-realm/connected-realm.ts index 5318d000..331c3df4 100644 --- a/packages/wow/src/connected-realm/connected-realm.ts +++ b/packages/wow/src/connected-realm/connected-realm.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { ConnectedRealmIndexResponse, ConnectedRealmResponse, @@ -15,7 +15,7 @@ import type { export function connectedRealm(connectedRealmId: number): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/${connectedRealmId}`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}`, }; } /** @@ -25,7 +25,7 @@ export function connectedRealm(connectedRealmId: number): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/index`, + path: `${wowBasePath}/connected-realm/index`, }; } /** @@ -44,6 +44,6 @@ export function connectedRealmSearch( 'realms.timezone': options['realms.timezone'], 'status.type': options['status.type'], }, - path: `${base}/search/connected-realm`, + path: `${wowBasePath}/search/connected-realm`, }; } diff --git a/packages/wow/src/connected-realm/types.ts b/packages/wow/src/connected-realm/types.ts index e8f94d11..806ce540 100644 --- a/packages/wow/src/connected-realm/types.ts +++ b/packages/wow/src/connected-realm/types.ts @@ -1,5 +1,4 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; /** @@ -18,10 +17,10 @@ export interface ConnectedRealmResponse extends ResponseBase { has_queue: boolean; id: number; mythic_leaderboards: { href: string }; - population: { name: RealmPopulation; type: RealmPopulationCapitalized }; + population: { name: 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; type: RealmPopulationCapitalized }; realm_locked_status?: RealmLockedStatus; realms: Array; - status: { name: RealmStatus; type: Uppercase }; + status: { name: RealmStatus; type: RealmStatusCapitalized }; } /** * Connected Realm Search API parameters. @@ -30,7 +29,7 @@ export interface ConnectedRealmResponse extends ResponseBase { */ export interface ConnectedRealmSearchParameters extends BaseSearchParameters { 'realms.timezone'?: RealmTimezone; - 'status.type'?: Uppercase; + 'status.type'?: RealmStatusCapitalized; } /** @@ -66,12 +65,12 @@ interface RealmLockedStatus { is_locked_for_pct: boolean; } -type RealmPopulation = 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; - type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; type RealmStatus = 'Down' | 'Up'; +type RealmStatusCapitalized = 'DOWN' | 'UP'; + interface SearchRealm { category: Record; id: number; @@ -91,5 +90,5 @@ interface SearchRealmPopulation { interface SearchRealmStatus { name: Record; - type: Uppercase; + type: RealmStatusCapitalized; } diff --git a/packages/wow/src/covenant/covenant.test.ts b/packages/wow/src/covenant/covenant.test.ts index e9a05259..75928136 100644 --- a/packages/wow/src/covenant/covenant.test.ts +++ b/packages/wow/src/covenant/covenant.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { conduit, conduitIndex, covenant, covenantIndex, covenantMedia, soulbind, soulbindIndex } from './covenant'; describe.concurrent('covenantApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('covenantApi', () => { const conduitId = 123; const resource = conduit(conduitId); - expect(resource.path).toBe(`${base}/covenant/conduit/123`); + expect(resource.path).toBe(`${wowBasePath}/covenant/conduit/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for conduitIndex', ({ expect }) => { const resource = conduitIndex(); - expect(resource.path).toBe(`${base}/covenant/conduit/index`); + expect(resource.path).toBe(`${wowBasePath}/covenant/conduit/index`); expect(resource.namespace).toBe('static'); }); @@ -22,14 +22,14 @@ describe.concurrent('covenantApi', () => { const covenantId = 123; const resource = covenant(covenantId); - expect(resource.path).toBe(`${base}/covenant/123`); + expect(resource.path).toBe(`${wowBasePath}/covenant/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for covenantIndex', ({ expect }) => { const resource = covenantIndex(); - expect(resource.path).toBe(`${base}/covenant/index`); + expect(resource.path).toBe(`${wowBasePath}/covenant/index`); expect(resource.namespace).toBe('static'); }); @@ -37,7 +37,7 @@ describe.concurrent('covenantApi', () => { const covenantId = 123; const resource = covenantMedia(covenantId); - expect(resource.path).toBe(`${mediaBase}/covenant/123`); + expect(resource.path).toBe(`${wowMediaBasePath}/covenant/123`); expect(resource.namespace).toBe('static'); }); @@ -45,14 +45,14 @@ describe.concurrent('covenantApi', () => { const soulbindId = 123; const resource = soulbind(soulbindId); - expect(resource.path).toBe(`${base}/covenant/soulbind/123`); + expect(resource.path).toBe(`${wowBasePath}/covenant/soulbind/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for soulbindIndex', ({ expect }) => { const resource = soulbindIndex(); - expect(resource.path).toBe(`${base}/covenant/soulbind/index`); + expect(resource.path).toBe(`${wowBasePath}/covenant/soulbind/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/covenant/covenant.ts b/packages/wow/src/covenant/covenant.ts index 055d036c..8765d1f8 100644 --- a/packages/wow/src/covenant/covenant.ts +++ b/packages/wow/src/covenant/covenant.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { ConduitIndexResponse, ConduitResponse, @@ -18,7 +18,7 @@ import type { export function conduit(conduitId: number): Resource { return { namespace: 'static', - path: `${base}/covenant/conduit/${conduitId}`, + path: `${wowBasePath}/covenant/conduit/${conduitId}`, }; } /** @@ -28,7 +28,7 @@ export function conduit(conduitId: number): Resource { export function conduitIndex(): Resource { return { namespace: 'static', - path: `${base}/covenant/conduit/index`, + path: `${wowBasePath}/covenant/conduit/index`, }; } /** @@ -39,7 +39,7 @@ export function conduitIndex(): Resource { export function covenant(covenantId: number): Resource { return { namespace: 'static', - path: `${base}/covenant/${covenantId}`, + path: `${wowBasePath}/covenant/${covenantId}`, }; } /** @@ -49,7 +49,7 @@ export function covenant(covenantId: number): Resource { export function covenantIndex(): Resource { return { namespace: 'static', - path: `${base}/covenant/index`, + path: `${wowBasePath}/covenant/index`, }; } /** @@ -60,7 +60,7 @@ export function covenantIndex(): Resource { export function covenantMedia(covenantId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/covenant/${covenantId}`, + path: `${wowMediaBasePath}/covenant/${covenantId}`, }; } /** @@ -71,7 +71,7 @@ export function covenantMedia(covenantId: number): Resource { return { namespace: 'static', - path: `${base}/covenant/soulbind/${soulbindId}`, + path: `${wowBasePath}/covenant/soulbind/${soulbindId}`, }; } /** @@ -81,6 +81,6 @@ export function soulbind(soulbindId: number): Resource { export function soulbindIndex(): Resource { return { namespace: 'static', - path: `${base}/covenant/soulbind/index`, + path: `${wowBasePath}/covenant/soulbind/index`, }; } diff --git a/packages/wow/src/covenant/types.ts b/packages/wow/src/covenant/types.ts index 683a127e..662dc670 100644 --- a/packages/wow/src/covenant/types.ts +++ b/packages/wow/src/covenant/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the conduit index endpoint. diff --git a/packages/wow/src/creature/creature.test.ts b/packages/wow/src/creature/creature.test.ts index 575ed4f3..cb2cd383 100644 --- a/packages/wow/src/creature/creature.test.ts +++ b/packages/wow/src/creature/creature.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../base'; import { creature, creatureDisplayMedia, @@ -16,7 +16,7 @@ describe.concurrent('creatureApi', () => { const creatureId = 123; const resource = creature(creatureId); - expect(resource.path).toBe(`${base}/creature/${creatureId}`); + expect(resource.path).toBe(`${wowBasePath}/creature/${creatureId}`); expect(resource.namespace).toBe('static'); }); @@ -24,7 +24,7 @@ describe.concurrent('creatureApi', () => { const creatureDisplayId = 123; const resource = creatureDisplayMedia(creatureDisplayId); - expect(resource.path).toBe(`${mediaBase}/creature-display/${creatureDisplayId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/creature-display/${creatureDisplayId}`); expect(resource.namespace).toBe('static'); }); @@ -32,14 +32,14 @@ describe.concurrent('creatureApi', () => { const creatureFamilyId = 123; const resource = creatureFamily(creatureFamilyId); - expect(resource.path).toBe(`${base}/creature-family/${creatureFamilyId}`); + expect(resource.path).toBe(`${wowBasePath}/creature-family/${creatureFamilyId}`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for creatureFamilyIndex', ({ expect }) => { const resource = creatureFamilyIndex(); - expect(resource.path).toBe(`${base}/creature-family/index`); + expect(resource.path).toBe(`${wowBasePath}/creature-family/index`); expect(resource.namespace).toBe('static'); }); @@ -47,7 +47,7 @@ describe.concurrent('creatureApi', () => { const creatureFamilyId = 123; const resource = creatureFamilyMedia(creatureFamilyId); - expect(resource.path).toBe(`${mediaBase}/creature-family/${creatureFamilyId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/creature-family/${creatureFamilyId}`); expect(resource.namespace).toBe('static'); }); @@ -55,14 +55,14 @@ describe.concurrent('creatureApi', () => { const creatureTypeId = 123; const resource = creatureType(creatureTypeId); - expect(resource.path).toBe(`${base}/creature-type/${creatureTypeId}`); + expect(resource.path).toBe(`${wowBasePath}/creature-type/${creatureTypeId}`); expect(resource.namespace).toBe('static'); }); it('should return the correct path and namespace for creatureTypeIndex', ({ expect }) => { const resource = creatureTypeIndex(); - expect(resource.path).toBe(`${base}/creature-type/index`); + expect(resource.path).toBe(`${wowBasePath}/creature-type/index`); expect(resource.namespace).toBe('static'); }); @@ -73,7 +73,7 @@ describe.concurrent('creatureApi', () => { name: 'test', }); - expect(resource.path).toBe(`${searchBase}/creature`); + expect(resource.path).toBe(`${wowSearchBasePath}/creature`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -89,7 +89,7 @@ describe.concurrent('creatureApi', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/creature`); + expect(resource.path).toBe(`${wowSearchBasePath}/creature`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/creature/creature.ts b/packages/wow/src/creature/creature.ts index f80161d4..02a7ff25 100644 --- a/packages/wow/src/creature/creature.ts +++ b/packages/wow/src/creature/creature.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../base'; +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { CreatureDisplayMediaResponse, CreatureFamilyIndexResponse, @@ -20,7 +20,7 @@ import type { export function creature(creatureId: number): Resource { return { namespace: 'static', - path: `${base}/creature/${creatureId}`, + path: `${wowBasePath}/creature/${creatureId}`, }; } /** @@ -31,7 +31,7 @@ export function creature(creatureId: number): Resource { export function creatureDisplayMedia(creatureDisplayId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/creature-display/${creatureDisplayId}`, + path: `${wowMediaBasePath}/creature-display/${creatureDisplayId}`, }; } /** @@ -42,7 +42,7 @@ export function creatureDisplayMedia(creatureDisplayId: number): Resource { return { namespace: 'static', - path: `${base}/creature-family/${creatureFamilyId}`, + path: `${wowBasePath}/creature-family/${creatureFamilyId}`, }; } /** @@ -52,7 +52,7 @@ export function creatureFamily(creatureFamilyId: number): Resource { return { namespace: 'static', - path: `${base}/creature-family/index`, + path: `${wowBasePath}/creature-family/index`, }; } /** @@ -63,7 +63,7 @@ export function creatureFamilyIndex(): Resource { export function creatureFamilyMedia(creatureFamilyId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/creature-family/${creatureFamilyId}`, + path: `${wowMediaBasePath}/creature-family/${creatureFamilyId}`, }; } /** @@ -81,7 +81,7 @@ export function creatureSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/creature`, + path: `${wowSearchBasePath}/creature`, }; } /** @@ -92,7 +92,7 @@ export function creatureSearch( export function creatureType(creatureTypeId: number): Resource { return { namespace: 'static', - path: `${base}/creature-type/${creatureTypeId}`, + path: `${wowBasePath}/creature-type/${creatureTypeId}`, }; } /** @@ -102,6 +102,6 @@ export function creatureType(creatureTypeId: number): Resource { return { namespace: 'static', - path: `${base}/creature-type/index`, + path: `${wowBasePath}/creature-type/index`, }; } diff --git a/packages/wow/src/creature/types.ts b/packages/wow/src/creature/types.ts index 3049ce95..dca44add 100644 --- a/packages/wow/src/creature/types.ts +++ b/packages/wow/src/creature/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { KeyBase, MediaAsset, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; + /** * The response for creature display media. diff --git a/packages/wow/src/guild-crest/guild-crest.test.ts b/packages/wow/src/guild-crest/guild-crest.test.ts index 6b5093d6..16fcb1ff 100644 --- a/packages/wow/src/guild-crest/guild-crest.test.ts +++ b/packages/wow/src/guild-crest/guild-crest.test.ts @@ -1,25 +1,25 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { guildCrestBorder, guildCrestComponentsIndex, guildCrestEmblem } from './guild-crest'; describe.concurrent('guildCrestApi', () => { it('should return the guild crest components index resource', ({ expect }) => { const resource = guildCrestComponentsIndex(); - expect(resource.path).toBe(`${base}/guild-crest/index`); + expect(resource.path).toBe(`${wowBasePath}/guild-crest/index`); expect(resource.namespace).toBe('static'); }); it('should return the guild crest border resource for a given borderId', ({ expect }) => { const borderId = 123; const resource = guildCrestBorder(borderId); - expect(resource.path).toBe(`${mediaBase}/guild-crest/border/123`); + expect(resource.path).toBe(`${wowMediaBasePath}/guild-crest/border/123`); expect(resource.namespace).toBe('static'); }); it('should return the guild crest emblem resource for a given emblemId', ({ expect }) => { const emblemId = 456; const resource = guildCrestEmblem(emblemId); - expect(resource.path).toBe(`${mediaBase}/guild-crest/emblem/456`); + expect(resource.path).toBe(`${wowMediaBasePath}/guild-crest/emblem/456`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/guild-crest/guild-crest.ts b/packages/wow/src/guild-crest/guild-crest.ts index ec9f3c13..959f44ab 100644 --- a/packages/wow/src/guild-crest/guild-crest.ts +++ b/packages/wow/src/guild-crest/guild-crest.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse export function guildCrestBorder(borderId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/guild-crest/border/${borderId}`, + path: `${wowMediaBasePath}/guild-crest/border/${borderId}`, }; } /** @@ -20,7 +20,7 @@ export function guildCrestBorder(borderId: number): Resource { return { namespace: 'static', - path: `${base}/guild-crest/index`, + path: `${wowBasePath}/guild-crest/index`, }; } /** @@ -31,6 +31,6 @@ export function guildCrestComponentsIndex(): Resource { return { namespace: 'static', - path: `${mediaBase}/guild-crest/emblem/${emblemId}`, + path: `${wowMediaBasePath}/guild-crest/emblem/${emblemId}`, }; } diff --git a/packages/wow/src/guild-crest/types.ts b/packages/wow/src/guild-crest/types.ts index 6e0c2b2e..5748eee4 100644 --- a/packages/wow/src/guild-crest/types.ts +++ b/packages/wow/src/guild-crest/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, ResponseBase } from '../base'; +import type { KeyBase, ResponseBase } from '@blizzard-api/core'; /** * The response for a guild crest border or emblem. diff --git a/packages/wow/src/guild/types.ts b/packages/wow/src/guild/types.ts index e70b94c5..5edf2f6a 100644 --- a/packages/wow/src/guild/types.ts +++ b/packages/wow/src/guild/types.ts @@ -1,4 +1,4 @@ -import type { Character, Color, Faction, Href, KeyBase, NameIdKey, Realm, ResponseBase } from '../base'; +import type { Character, Color, Faction, Href, KeyBase, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; export interface GuildAchievementsResponse extends ResponseBase { achievements: Array; diff --git a/packages/wow/src/heirloom/heirloom.test.ts b/packages/wow/src/heirloom/heirloom.test.ts index 265bed64..f4eefaac 100644 --- a/packages/wow/src/heirloom/heirloom.test.ts +++ b/packages/wow/src/heirloom/heirloom.test.ts @@ -1,18 +1,18 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { heirloom, heirloomIndex } from './heirloom'; describe.concurrent('heirloomApi', () => { it('should return the heirloom resource for a given heirloomId', ({ expect }) => { const heirloomId = 123; const resource = heirloom(heirloomId); - expect(resource.path).toBe(`${base}/heirloom/${heirloomId}`); + expect(resource.path).toBe(`${wowBasePath}/heirloom/${heirloomId}`); expect(resource.namespace).toBe('static'); }); it('should return the heirloom index resource', ({ expect }) => { const resource = heirloomIndex(); - expect(resource.path).toBe(`${base}/heirloom/index`); + expect(resource.path).toBe(`${wowBasePath}/heirloom/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/heirloom/heirloom.ts b/packages/wow/src/heirloom/heirloom.ts index 55eb6291..7789a896 100644 --- a/packages/wow/src/heirloom/heirloom.ts +++ b/packages/wow/src/heirloom/heirloom.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { HeirloomIndexResponse, HeirloomResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { HeirloomIndexResponse, HeirloomResponse } from './types'; export function heirloom(heirloomId: number): Resource { return { namespace: 'static', - path: `${base}/heirloom/${heirloomId}`, + path: `${wowBasePath}/heirloom/${heirloomId}`, }; } /** @@ -20,6 +20,6 @@ export function heirloom(heirloomId: number): Resource { export function heirloomIndex(): Resource { return { namespace: 'static', - path: `${base}/heirloom/index`, + path: `${wowBasePath}/heirloom/index`, }; } diff --git a/packages/wow/src/heirloom/types.ts b/packages/wow/src/heirloom/types.ts index 1ca4d932..7b87dda6 100644 --- a/packages/wow/src/heirloom/types.ts +++ b/packages/wow/src/heirloom/types.ts @@ -1,4 +1,4 @@ -import type { Color, KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { Color, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for the heirloom index. diff --git a/packages/wow/src/item/item.test.ts b/packages/wow/src/item/item.test.ts index 7acbaab5..cd67bffb 100644 --- a/packages/wow/src/item/item.test.ts +++ b/packages/wow/src/item/item.test.ts @@ -1,19 +1,19 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../base'; import { item, itemClass, itemClassIndex, itemMedia, itemSearch, itemSet, itemSetIndex, itemSubClass } from './item'; describe.concurrent('itemApi', () => { it('should return the item resource for a given itemId', ({ expect }) => { const itemId = 123; const resource = item(itemId); - expect(resource.path).toBe(`${base}/item/${itemId}`); + expect(resource.path).toBe(`${wowBasePath}/item/${itemId}`); expect(resource.namespace).toBe('static'); }); it('should return the item class resource for a given itemClassId', ({ expect }) => { const itemClassId = 456; const resource = itemClass(itemClassId); - expect(resource.path).toBe(`${base}/item-class/${itemClassId}`); + expect(resource.path).toBe(`${wowBasePath}/item-class/${itemClassId}`); expect(resource.namespace).toBe('static'); }); @@ -21,33 +21,33 @@ describe.concurrent('itemApi', () => { const itemClassId = 456; const itemSubClassId = 789; const resource = itemSubClass(itemClassId, itemSubClassId); - expect(resource.path).toBe(`${base}/item-class/${itemClassId}/item-subclass/${itemSubClassId}`); + expect(resource.path).toBe(`${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubClassId}`); expect(resource.namespace).toBe('static'); }); it('should return the item class index resource', ({ expect }) => { const resource = itemClassIndex(); - expect(resource.path).toBe(`${base}/item-class/index`); + expect(resource.path).toBe(`${wowBasePath}/item-class/index`); expect(resource.namespace).toBe('static'); }); it('should return the item media resource for a given itemId', ({ expect }) => { const itemId = 789; const resource = itemMedia(itemId); - expect(resource.path).toBe(`${mediaBase}/item/${itemId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/item/${itemId}`); expect(resource.namespace).toBe('static'); }); it('should return the item set resource for a given itemSetId', ({ expect }) => { const itemSetId = 987; const resource = itemSet(itemSetId); - expect(resource.path).toBe(`${base}/item-set/${itemSetId}`); + expect(resource.path).toBe(`${wowBasePath}/item-set/${itemSetId}`); expect(resource.namespace).toBe('static'); }); it('should return the item set index resource', ({ expect }) => { const resource = itemSetIndex(); - expect(resource.path).toBe(`${base}/item-set/index`); + expect(resource.path).toBe(`${wowBasePath}/item-set/index`); expect(resource.namespace).toBe('static'); }); @@ -59,7 +59,7 @@ describe.concurrent('itemApi', () => { orderby: 'name', }); - expect(resource.path).toBe(`${searchBase}/item`); + expect(resource.path).toBe(`${wowSearchBasePath}/item`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -76,7 +76,7 @@ describe.concurrent('itemApi', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/item`); + expect(resource.path).toBe(`${wowSearchBasePath}/item`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/item/item.ts b/packages/wow/src/item/item.ts index 20ec0772..cb390a52 100644 --- a/packages/wow/src/item/item.ts +++ b/packages/wow/src/item/item.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../base'; +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { ItemClassIndexResponse, ItemClassResponse, @@ -20,7 +20,7 @@ import type { export function item(itemId: number): Resource { return { namespace: 'static', - path: `${base}/item/${itemId}`, + path: `${wowBasePath}/item/${itemId}`, }; } /** @@ -31,7 +31,7 @@ export function item(itemId: number): Resource { export function itemClass(itemClassId: number): Resource { return { namespace: 'static', - path: `${base}/item-class/${itemClassId}`, + path: `${wowBasePath}/item-class/${itemClassId}`, }; } /** @@ -41,7 +41,7 @@ export function itemClass(itemClassId: number): Resource { export function itemClassIndex(): Resource { return { namespace: 'static', - path: `${base}/item-class/index`, + path: `${wowBasePath}/item-class/index`, }; } /** @@ -52,7 +52,7 @@ export function itemClassIndex(): Resource { export function itemMedia(itemId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/item/${itemId}`, + path: `${wowMediaBasePath}/item/${itemId}`, }; } /** @@ -70,7 +70,7 @@ export function itemSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/item`, + path: `${wowSearchBasePath}/item`, }; } /** @@ -81,7 +81,7 @@ export function itemSearch( export function itemSet(itemSetId: number): Resource { return { namespace: 'static', - path: `${base}/item-set/${itemSetId}`, + path: `${wowBasePath}/item-set/${itemSetId}`, }; } /** @@ -91,7 +91,7 @@ export function itemSet(itemSetId: number): Resource { export function itemSetIndex(): Resource { return { namespace: 'static', - path: `${base}/item-set/index`, + path: `${wowBasePath}/item-set/index`, }; } /** @@ -103,6 +103,6 @@ export function itemSetIndex(): Resource { export function itemSubClass(itemClassId: number, itemSubclassId: number): Resource { return { namespace: 'static', - path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, + path: `${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, }; } diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index a2a45db2..c2ae6454 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { Color, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, Color, KeyBase, Locales, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; + /** * The response for an item class index. @@ -149,7 +149,7 @@ interface Effect { interface InventoryType { name: Record; type: //Armor - | 'BACK' + | 'BACK' | 'BAG' | 'CHEST' | 'FEET' diff --git a/packages/wow/src/journal/journal.test.ts b/packages/wow/src/journal/journal.test.ts index cbb61099..b7a4e24c 100644 --- a/packages/wow/src/journal/journal.test.ts +++ b/packages/wow/src/journal/journal.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../base'; import { journalEncounter, journalEncounterIndex, @@ -15,46 +15,46 @@ describe.concurrent('journalApi', () => { it('should return the journal encounter resource for a given journalEncounterId', ({ expect }) => { const journalEncounterId = 123; const resource = journalEncounter(journalEncounterId); - expect(resource.path).toBe(`${base}/journal-encounter/123`); + expect(resource.path).toBe(`${wowBasePath}/journal-encounter/123`); expect(resource.namespace).toBe('static'); }); it('should return the journal encounter index resource', ({ expect }) => { const resource = journalEncounterIndex(); - expect(resource.path).toBe(`${base}/journal-encounter/index`); + expect(resource.path).toBe(`${wowBasePath}/journal-encounter/index`); expect(resource.namespace).toBe('static'); }); it('should return the journal expansion resource for a given journalExpansionId', ({ expect }) => { const journalExpansionId = 456; const resource = journalExpansion(journalExpansionId); - expect(resource.path).toBe(`${base}/journal-expansion/456`); + expect(resource.path).toBe(`${wowBasePath}/journal-expansion/456`); expect(resource.namespace).toBe('static'); }); it('should return the journal expansion index resource', ({ expect }) => { const resource = journalExpansionIndex(); - expect(resource.path).toBe(`${base}/journal-expansion/index`); + expect(resource.path).toBe(`${wowBasePath}/journal-expansion/index`); expect(resource.namespace).toBe('static'); }); it('should return the journal instance resource for a given journalInstanceId', ({ expect }) => { const journalInstanceId = 789; const resource = journalInstance(journalInstanceId); - expect(resource.path).toBe(`${base}/journal-instance/789`); + expect(resource.path).toBe(`${wowBasePath}/journal-instance/789`); expect(resource.namespace).toBe('static'); }); it('should return the journal instance index resource', ({ expect }) => { const resource = journalInstanceIndex(); - expect(resource.path).toBe(`${base}/journal-instance/index`); + expect(resource.path).toBe(`${wowBasePath}/journal-instance/index`); expect(resource.namespace).toBe('static'); }); it('should return the journal instance media resource for a given journalInstanceId', ({ expect }) => { const journalInstanceId = 789; const resource = journalInstanceMedia(journalInstanceId); - expect(resource.path).toBe(`${mediaBase}/journal-instance/789`); + expect(resource.path).toBe(`${wowMediaBasePath}/journal-instance/789`); expect(resource.namespace).toBe('static'); }); @@ -65,7 +65,7 @@ describe.concurrent('journalApi', () => { locale: 'en_US', orderby: 'name', }); - expect(resource.path).toBe(`${searchBase}/journal-encounter`); + expect(resource.path).toBe(`${wowSearchBasePath}/journal-encounter`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -81,7 +81,7 @@ describe.concurrent('journalApi', () => { locale: 'en_US', orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/journal-encounter`); + expect(resource.path).toBe(`${wowSearchBasePath}/journal-encounter`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/journal/journal.ts b/packages/wow/src/journal/journal.ts index 3442d57d..21a849db 100644 --- a/packages/wow/src/journal/journal.ts +++ b/packages/wow/src/journal/journal.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../base'; +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { JournalEncounterIndexResponse, JournalEncounterResponse, @@ -20,7 +20,7 @@ import type { export function journalEncounter(journalEncounterId: number): Resource { return { namespace: 'static', - path: `${base}/journal-encounter/${journalEncounterId}`, + path: `${wowBasePath}/journal-encounter/${journalEncounterId}`, }; } /** @@ -30,7 +30,7 @@ export function journalEncounter(journalEncounterId: number): Resource { return { namespace: 'static', - path: `${base}/journal-encounter/index`, + path: `${wowBasePath}/journal-encounter/index`, }; } /** @@ -51,7 +51,7 @@ export function journalEncounterSearch( [`instance.name.${options.locale}`]: options.instanceName, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/journal-encounter`, + path: `${wowSearchBasePath}/journal-encounter`, }; } /** @@ -62,7 +62,7 @@ export function journalEncounterSearch( export function journalExpansion(journalExpansionId: number): Resource { return { namespace: 'static', - path: `${base}/journal-expansion/${journalExpansionId}`, + path: `${wowBasePath}/journal-expansion/${journalExpansionId}`, }; } /** @@ -72,7 +72,7 @@ export function journalExpansion(journalExpansionId: number): Resource { return { namespace: 'static', - path: `${base}/journal-expansion/index`, + path: `${wowBasePath}/journal-expansion/index`, }; } /** @@ -83,7 +83,7 @@ export function journalExpansionIndex(): Resource export function journalInstance(journalInstanceId: number): Resource { return { namespace: 'static', - path: `${base}/journal-instance/${journalInstanceId}`, + path: `${wowBasePath}/journal-instance/${journalInstanceId}`, }; } /** @@ -93,7 +93,7 @@ export function journalInstance(journalInstanceId: number): Resource { return { namespace: 'static', - path: `${base}/journal-instance/index`, + path: `${wowBasePath}/journal-instance/index`, }; } /** @@ -104,6 +104,6 @@ export function journalInstanceIndex(): Resource { export function journalInstanceMedia(journalInstanceId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/journal-instance/${journalInstanceId}`, + path: `${wowMediaBasePath}/journal-instance/${journalInstanceId}`, }; } diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 701c3763..45784395 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { Faction, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, Faction, KeyBase, Locales, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; + /** * The response for a journal encounter index. diff --git a/packages/wow/src/media-search/media-search.test.ts b/packages/wow/src/media-search/media-search.test.ts index ce16daf3..b397f855 100644 --- a/packages/wow/src/media-search/media-search.test.ts +++ b/packages/wow/src/media-search/media-search.test.ts @@ -1,11 +1,11 @@ +import { wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { searchBase } from '../base'; import { mediaSearch } from './media-search'; describe.concurrent('mediaSearchApi', () => { it('should return the media search resource', ({ expect }) => { const resource = mediaSearch({}); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({}); }); @@ -16,7 +16,7 @@ describe.concurrent('mediaSearchApi', () => { orderby: 'name', tags: 'tag', }); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -31,7 +31,7 @@ describe.concurrent('mediaSearchApi', () => { orderby: ['name', 'id'], tags: 'tag', }); - expect(resource.path).toBe(`${searchBase}/media`); + expect(resource.path).toBe(`${wowSearchBasePath}/media`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/media-search/media-search.ts b/packages/wow/src/media-search/media-search.ts index 92e37680..2bb4976c 100644 --- a/packages/wow/src/media-search/media-search.ts +++ b/packages/wow/src/media-search/media-search.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { searchBase } from '../base'; +import { wowSearchBasePath } from '@blizzard-api/core'; import type { MediaSearchParameters, MediaSearchResponseItem } from './types'; /** @@ -17,6 +17,6 @@ export function mediaSearch( orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, tags: options.tags, }, - path: `${searchBase}/media`, + path: `${wowSearchBasePath}/media`, }; } diff --git a/packages/wow/src/media-search/types.ts b/packages/wow/src/media-search/types.ts index 14c4f861..ec34a908 100644 --- a/packages/wow/src/media-search/types.ts +++ b/packages/wow/src/media-search/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters } from '@blizzard-api/core'; -import type { KeyBase } from '../base'; +import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; + /** * The search parameters for media. diff --git a/packages/wow/src/modified-crafting/modified-crafting.test.ts b/packages/wow/src/modified-crafting/modified-crafting.test.ts index 7599aa03..5b7b6ce0 100644 --- a/packages/wow/src/modified-crafting/modified-crafting.test.ts +++ b/packages/wow/src/modified-crafting/modified-crafting.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { modifiedCraftingCategory, modifiedCraftingCategoryIndex, @@ -12,32 +12,32 @@ describe.concurrent('modifiedCraftingApi', () => { it('should return the correct path for modifiedCraftingCategory', ({ expect }) => { const modifiedCraftingCategoryId = 123; const resource = modifiedCraftingCategory(modifiedCraftingCategoryId); - expect(resource.path).toBe(`${base}/modified-crafting/category/123`); + expect(resource.path).toBe(`${wowBasePath}/modified-crafting/category/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for modifiedCraftingCategoryIndex', ({ expect }) => { const resource = modifiedCraftingCategoryIndex(); - expect(resource.path).toBe(`${base}/modified-crafting/category/index`); + expect(resource.path).toBe(`${wowBasePath}/modified-crafting/category/index`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for modifiedCraftingIndex', ({ expect }) => { const resource = modifiedCraftingIndex(); - expect(resource.path).toBe(`${base}/modified-crafting/index`); + expect(resource.path).toBe(`${wowBasePath}/modified-crafting/index`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for modifiedCraftingReagentSlotType', ({ expect }) => { const modifiedCraftingReagentSlotTypeId = 456; const resource = modifiedCraftingReagentSlotType(modifiedCraftingReagentSlotTypeId); - expect(resource.path).toBe(`${base}/modified-crafting/reagent-slot-type/456`); + expect(resource.path).toBe(`${wowBasePath}/modified-crafting/reagent-slot-type/456`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for modifiedCraftingReagentSlotTypeIndex', ({ expect }) => { const resource = modifiedCraftingReagentSlotTypeIndex(); - expect(resource.path).toBe(`${base}/modified-crafting/reagent-slot-type/index`); + expect(resource.path).toBe(`${wowBasePath}/modified-crafting/reagent-slot-type/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/modified-crafting/modified-crafting.ts b/packages/wow/src/modified-crafting/modified-crafting.ts index ea2818b4..a5fb971d 100644 --- a/packages/wow/src/modified-crafting/modified-crafting.ts +++ b/packages/wow/src/modified-crafting/modified-crafting.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { ModifiedCraftingCategoryIndexResponse, ModifiedCraftingCategoryResponse, @@ -18,7 +18,7 @@ export function modifiedCraftingCategory( ): Resource { return { namespace: 'static', - path: `${base}/modified-crafting/category/${modifiedCraftingCategoryId}`, + path: `${wowBasePath}/modified-crafting/category/${modifiedCraftingCategoryId}`, }; } /** @@ -28,7 +28,7 @@ export function modifiedCraftingCategory( export function modifiedCraftingCategoryIndex(): Resource { return { namespace: 'static', - path: `${base}/modified-crafting/category/index`, + path: `${wowBasePath}/modified-crafting/category/index`, }; } /** @@ -38,7 +38,7 @@ export function modifiedCraftingCategoryIndex(): Resource { return { namespace: 'static', - path: `${base}/modified-crafting/index`, + path: `${wowBasePath}/modified-crafting/index`, }; } /** @@ -51,7 +51,7 @@ export function modifiedCraftingReagentSlotType( ): Resource { return { namespace: 'static', - path: `${base}/modified-crafting/reagent-slot-type/${modifiedCraftingReagentSlotTypeId}`, + path: `${wowBasePath}/modified-crafting/reagent-slot-type/${modifiedCraftingReagentSlotTypeId}`, }; } /** @@ -61,6 +61,6 @@ export function modifiedCraftingReagentSlotType( export function modifiedCraftingReagentSlotTypeIndex(): Resource { return { namespace: 'static', - path: `${base}/modified-crafting/reagent-slot-type/index`, + path: `${wowBasePath}/modified-crafting/reagent-slot-type/index`, }; } diff --git a/packages/wow/src/modified-crafting/types.ts b/packages/wow/src/modified-crafting/types.ts index 4729978b..498f16fc 100644 --- a/packages/wow/src/modified-crafting/types.ts +++ b/packages/wow/src/modified-crafting/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a modified crafting category index. diff --git a/packages/wow/src/mount/mount.test.ts b/packages/wow/src/mount/mount.test.ts index da5fcbdb..b31ae0a1 100644 --- a/packages/wow/src/mount/mount.test.ts +++ b/packages/wow/src/mount/mount.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, searchBase } from '../base'; import { mount, mountIndex, mountSearch } from './mount'; describe.concurrent('mountApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('mountApi', () => { const mountId = 123; const resource = mount(mountId); - expect(resource.path).toBe(`${base}/mount/123`); + expect(resource.path).toBe(`${wowBasePath}/mount/123`); expect(resource.namespace).toBe('static'); }); it('mountIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mountIndex(); - expect(resource.path).toBe(`${base}/mount/index`); + expect(resource.path).toBe(`${wowBasePath}/mount/index`); expect(resource.namespace).toBe('static'); }); @@ -26,7 +26,7 @@ describe.concurrent('mountApi', () => { orderby: 'name', }); - expect(resource.path).toBe(`${searchBase}/mount`); + expect(resource.path).toBe(`${wowSearchBasePath}/mount`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -43,7 +43,7 @@ describe.concurrent('mountApi', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/mount`); + expect(resource.path).toBe(`${wowSearchBasePath}/mount`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/mount/mount.ts b/packages/wow/src/mount/mount.ts index d86ef8c6..b1844aac 100644 --- a/packages/wow/src/mount/mount.ts +++ b/packages/wow/src/mount/mount.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, searchBase } from '../base'; +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { MountIndexResponse, MountResponse, MountSearchParameters, MountSearchResponseItem } from './types'; /** @@ -10,7 +10,7 @@ import type { MountIndexResponse, MountResponse, MountSearchParameters, MountSea export function mount(mountId: number): Resource { return { namespace: 'static', - path: `${base}/mount/${mountId}`, + path: `${wowBasePath}/mount/${mountId}`, }; } /** @@ -20,7 +20,7 @@ export function mount(mountId: number): Resource { export function mountIndex(): Resource { return { namespace: 'static', - path: `${base}/mount/index`, + path: `${wowBasePath}/mount/index`, }; } /** @@ -38,6 +38,6 @@ export function mountSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/mount`, + path: `${wowSearchBasePath}/mount`, }; } diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index c15681e1..85db39cf 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { Factions, KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { BaseSearchParameters, Factions, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; + /** * The response for a mount index. diff --git a/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.test.ts b/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.test.ts index ef360b6f..50efbc5f 100644 --- a/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.test.ts +++ b/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { mythicKeystoneAffix, mythicKeystoneAffixIndex, mythicKeystoneAffixMedia } from './mythic-keystone-affix'; describe.concurrent('mythicKeystoneAffixApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('mythicKeystoneAffixApi', () => { const mythicKeystoneAffixId = 123; const resource = mythicKeystoneAffix(mythicKeystoneAffixId); - expect(resource.path).toBe(`${base}/keystone-affix/${mythicKeystoneAffixId}`); + expect(resource.path).toBe(`${wowBasePath}/keystone-affix/${mythicKeystoneAffixId}`); expect(resource.namespace).toBe('static'); }); it('mythicKeystoneAffixIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mythicKeystoneAffixIndex(); - expect(resource.path).toBe(`${base}/keystone-affix/index`); + expect(resource.path).toBe(`${wowBasePath}/keystone-affix/index`); expect(resource.namespace).toBe('static'); }); @@ -22,7 +22,7 @@ describe.concurrent('mythicKeystoneAffixApi', () => { const mythicKeystoneAffixId = 123; const resource = mythicKeystoneAffixMedia(mythicKeystoneAffixId); - expect(resource.path).toBe(`${mediaBase}/keystone-affix/${mythicKeystoneAffixId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/keystone-affix/${mythicKeystoneAffixId}`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.ts b/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.ts index 902ec3c9..dad11746 100644 --- a/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.ts +++ b/packages/wow/src/mythic-keystone-affix/mythic-keystone-affix.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { MythicKeystoneAffixIndexResponse, MythicKeystoneAffixMediaResponse, @@ -14,7 +14,7 @@ import type { export function mythicKeystoneAffix(mythicKeystoneAffixId: number): Resource { return { namespace: 'static', - path: `${base}/keystone-affix/${mythicKeystoneAffixId}`, + path: `${wowBasePath}/keystone-affix/${mythicKeystoneAffixId}`, }; } /** @@ -24,7 +24,7 @@ export function mythicKeystoneAffix(mythicKeystoneAffixId: number): Resource { return { namespace: 'static', - path: `${base}/keystone-affix/index`, + path: `${wowBasePath}/keystone-affix/index`, }; } /** @@ -35,6 +35,6 @@ export function mythicKeystoneAffixIndex(): Resource { return { namespace: 'static', - path: `${mediaBase}/keystone-affix/${mythicKeystoneAffixId}`, + path: `${wowMediaBasePath}/keystone-affix/${mythicKeystoneAffixId}`, }; } diff --git a/packages/wow/src/mythic-keystone-affix/types.ts b/packages/wow/src/mythic-keystone-affix/types.ts index 2aaefb64..671d7ff7 100644 --- a/packages/wow/src/mythic-keystone-affix/types.ts +++ b/packages/wow/src/mythic-keystone-affix/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone affix index. diff --git a/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.test.ts b/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.test.ts index 25d74496..3641ab20 100644 --- a/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.test.ts +++ b/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { mythicKeystoneDungeon, mythicKeystoneDungeonIndex, @@ -15,21 +15,21 @@ describe.concurrent('mythicKeystoneDungeonApi', () => { const mythicKeystoneDungeonId = 123; const resource = mythicKeystoneDungeon(mythicKeystoneDungeonId); - expect(resource.path).toBe(`${base}/mythic-keystone/dungeon/${mythicKeystoneDungeonId}`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/dungeon/${mythicKeystoneDungeonId}`); expect(resource.namespace).toBe('dynamic'); }); it('mythicKeystoneDungeonIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mythicKeystoneDungeonIndex(); - expect(resource.path).toBe(`${base}/mythic-keystone/dungeon/index`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/dungeon/index`); expect(resource.namespace).toBe('dynamic'); }); it('mythicKeystoneIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mythicKeystoneIndex(); - expect(resource.path).toBe(`${base}/mythic-keystone/index`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/index`); expect(resource.namespace).toBe('dynamic'); }); @@ -37,14 +37,14 @@ describe.concurrent('mythicKeystoneDungeonApi', () => { const mythicKeystonePeriodId = 456; const resource = mythicKeystonePeriod(mythicKeystonePeriodId); - expect(resource.path).toBe(`${base}/mythic-keystone/period/${mythicKeystonePeriodId}`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/period/${mythicKeystonePeriodId}`); expect(resource.namespace).toBe('dynamic'); }); it('mythicKeystonePeriodIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mythicKeystonePeriodIndex(); - expect(resource.path).toBe(`${base}/mythic-keystone/period/index`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/period/index`); expect(resource.namespace).toBe('dynamic'); }); @@ -52,14 +52,14 @@ describe.concurrent('mythicKeystoneDungeonApi', () => { const mythicKeystoneSeasonId = 789; const resource = mythicKeystoneSeason(mythicKeystoneSeasonId); - expect(resource.path).toBe(`${base}/mythic-keystone/season/${mythicKeystoneSeasonId}`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/season/${mythicKeystoneSeasonId}`); expect(resource.namespace).toBe('dynamic'); }); it('mythicKeystoneSeasonIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = mythicKeystoneSeasonIndex(); - expect(resource.path).toBe(`${base}/mythic-keystone/season/index`); + expect(resource.path).toBe(`${wowBasePath}/mythic-keystone/season/index`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.ts b/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.ts index fcc205f9..1f68af07 100644 --- a/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.ts +++ b/packages/wow/src/mythic-keystone-dungeon/mythic-keystone-dungeon.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { MythicKeystoneDungeonIndexResponse, MythicKeystoneDungeonResponse, @@ -18,7 +18,7 @@ import type { export function mythicKeystoneDungeon(mythicKeystoneDungeonId: number): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/dungeon/${mythicKeystoneDungeonId}`, + path: `${wowBasePath}/mythic-keystone/dungeon/${mythicKeystoneDungeonId}`, }; } /** @@ -28,7 +28,7 @@ export function mythicKeystoneDungeon(mythicKeystoneDungeonId: number): Resource export function mythicKeystoneDungeonIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/dungeon/index`, + path: `${wowBasePath}/mythic-keystone/dungeon/index`, }; } /** @@ -38,7 +38,7 @@ export function mythicKeystoneDungeonIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/index`, + path: `${wowBasePath}/mythic-keystone/index`, }; } /** @@ -49,7 +49,7 @@ export function mythicKeystoneIndex(): Resource { export function mythicKeystonePeriod(mythicKeystonePeriodId: number): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/period/${mythicKeystonePeriodId}`, + path: `${wowBasePath}/mythic-keystone/period/${mythicKeystonePeriodId}`, }; } /** @@ -59,7 +59,7 @@ export function mythicKeystonePeriod(mythicKeystonePeriodId: number): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/period/index`, + path: `${wowBasePath}/mythic-keystone/period/index`, }; } /** @@ -70,7 +70,7 @@ export function mythicKeystonePeriodIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/season/${mythicKeystoneSeasonId}`, + path: `${wowBasePath}/mythic-keystone/season/${mythicKeystoneSeasonId}`, }; } /** @@ -80,6 +80,6 @@ export function mythicKeystoneSeason(mythicKeystoneSeasonId: number): Resource { return { namespace: 'dynamic', - path: `${base}/mythic-keystone/season/index`, + path: `${wowBasePath}/mythic-keystone/season/index`, }; } diff --git a/packages/wow/src/mythic-keystone-dungeon/types.ts b/packages/wow/src/mythic-keystone-dungeon/types.ts index 60584d77..abfa78ae 100644 --- a/packages/wow/src/mythic-keystone-dungeon/types.ts +++ b/packages/wow/src/mythic-keystone-dungeon/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone dungeon index. diff --git a/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.test.ts b/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.test.ts index a23c854d..3cc3e75e 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.test.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { mythicKeystoneLeaderboard, mythicKeystoneLeaderboardIndex } from './mythic-keystone-leaderboard'; describe.concurrent('mythicKeystoneLeaderboardApi', () => { @@ -10,7 +10,7 @@ describe.concurrent('mythicKeystoneLeaderboardApi', () => { const resource = mythicKeystoneLeaderboard(connectedRealmId, dungeonId, period); expect(resource.path).toBe( - `${base}/connected-realm/${connectedRealmId}/mythic-leaderboard/${dungeonId}/period/${period}`, + `${wowBasePath}/connected-realm/${connectedRealmId}/mythic-leaderboard/${dungeonId}/period/${period}`, ); expect(resource.namespace).toBe('dynamic'); }); @@ -21,7 +21,7 @@ describe.concurrent('mythicKeystoneLeaderboardApi', () => { const connectedRealmId = 456; const resource = mythicKeystoneLeaderboardIndex(connectedRealmId); - expect(resource.path).toBe(`${base}/connected-realm/${connectedRealmId}/mythic-leaderboard/index`); + expect(resource.path).toBe(`${wowBasePath}/connected-realm/${connectedRealmId}/mythic-leaderboard/index`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.ts b/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.ts index 06ff8937..67ae47ab 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/mythic-keystone-leaderboard.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { MythicKeystoneLeaderboardIndexResponse, MythicKeystoneLeaderboardResponse } from './types'; /** @@ -16,7 +16,7 @@ export function mythicKeystoneLeaderboard( ): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/${connectedRealmId}/mythic-leaderboard/${dungeonId}/period/${period}`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}/mythic-leaderboard/${dungeonId}/period/${period}`, }; } /** @@ -29,6 +29,6 @@ export function mythicKeystoneLeaderboardIndex( ): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/${connectedRealmId}/mythic-leaderboard/index`, + path: `${wowBasePath}/connected-realm/${connectedRealmId}/mythic-leaderboard/index`, }; } diff --git a/packages/wow/src/mythic-keystone-leaderboard/types.ts b/packages/wow/src/mythic-keystone-leaderboard/types.ts index b9631a94..f0a61d29 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/types.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/types.ts @@ -1,4 +1,4 @@ -import type { Color, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { Color, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone leaderboard index. diff --git a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.test.ts b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.test.ts index a8bd6baa..b558f349 100644 --- a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.test.ts +++ b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { mythicRaidLeaderboard } from './mythic-raid-leaderboard'; describe.concurrent('mythicRaidLeaderboardApi', () => { @@ -8,7 +8,7 @@ describe.concurrent('mythicRaidLeaderboardApi', () => { const faction = 'alliance'; const resource = mythicRaidLeaderboard(raid, faction); - expect(resource.path).toBe(`${base}/leaderboard/hall-of-fame/${raid}/${faction}`); + expect(resource.path).toBe(`${wowBasePath}/leaderboard/hall-of-fame/${raid}/${faction}`); expect(resource.namespace).toBe('dynamic'); }); @@ -19,7 +19,7 @@ describe.concurrent('mythicRaidLeaderboardApi', () => { const faction = 'horde'; const resource = mythicRaidLeaderboard(raid, faction); - expect(resource.path).toBe(`${base}/leaderboard/hall-of-fame/${raid}/${faction}`); + expect(resource.path).toBe(`${wowBasePath}/leaderboard/hall-of-fame/${raid}/${faction}`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts index 8889c78b..ebe0b452 100644 --- a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts +++ b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts @@ -1,6 +1,5 @@ -import type { Resource } from '@blizzard-api/core'; -import type { Factions } from '../base'; -import { base } from '../base'; +import type { Factions, Resource } from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; import type { MythicRaidLeaderboardResponse } from './types'; /** @@ -15,6 +14,6 @@ export function mythicRaidLeaderboard( ): Resource { return { namespace: 'dynamic', - path: `${base}/leaderboard/hall-of-fame/${raid}/${faction}`, + path: `${wowBasePath}/leaderboard/hall-of-fame/${raid}/${faction}`, }; } diff --git a/packages/wow/src/mythic-raid-leaderboard/types.ts b/packages/wow/src/mythic-raid-leaderboard/types.ts index 8088f006..f7544531 100644 --- a/packages/wow/src/mythic-raid-leaderboard/types.ts +++ b/packages/wow/src/mythic-raid-leaderboard/types.ts @@ -1,5 +1,5 @@ -import type { Origins } from '@blizzard-api/core'; -import type { Factions, KeyBase, NameId, ResponseBase } from '../base'; +import type { Factions, KeyBase, NameId, Origins, ResponseBase } from '@blizzard-api/core'; + /** * The response for a Mythic Raid leaderboard. diff --git a/packages/wow/src/pet/pet.test.ts b/packages/wow/src/pet/pet.test.ts index b3e8a8b7..78bac02e 100644 --- a/packages/wow/src/pet/pet.test.ts +++ b/packages/wow/src/pet/pet.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { pet, petAbility, petAbilityIndex, petAbilityMedia, petIndex, petMedia } from './pet'; describe.concurrent('petApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('petApi', () => { const petId = 123; const resource = pet(petId); - expect(resource.path).toBe(`${base}/pet/${petId}`); + expect(resource.path).toBe(`${wowBasePath}/pet/${petId}`); expect(resource.namespace).toBe('static'); }); it('petIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = petIndex(); - expect(resource.path).toBe(`${base}/pet/index`); + expect(resource.path).toBe(`${wowBasePath}/pet/index`); expect(resource.namespace).toBe('static'); }); @@ -22,7 +22,7 @@ describe.concurrent('petApi', () => { const petId = 123; const resource = petMedia(petId); - expect(resource.path).toBe(`${mediaBase}/pet/${petId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/pet/${petId}`); expect(resource.namespace).toBe('static'); }); @@ -30,14 +30,14 @@ describe.concurrent('petApi', () => { const petAbilityId = 123; const resource = petAbility(petAbilityId); - expect(resource.path).toBe(`${base}/pet-ability/${petAbilityId}`); + expect(resource.path).toBe(`${wowBasePath}/pet-ability/${petAbilityId}`); expect(resource.namespace).toBe('static'); }); it('petAbilityIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = petAbilityIndex(); - expect(resource.path).toBe(`${base}/pet-ability/index`); + expect(resource.path).toBe(`${wowBasePath}/pet-ability/index`); expect(resource.namespace).toBe('static'); }); @@ -45,7 +45,7 @@ describe.concurrent('petApi', () => { const petAbilityId = 123; const resource = petAbilityMedia(petAbilityId); - expect(resource.path).toBe(`${mediaBase}/pet-ability/${petAbilityId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/pet-ability/${petAbilityId}`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/pet/pet.ts b/packages/wow/src/pet/pet.ts index f8430f47..a6fad05a 100644 --- a/packages/wow/src/pet/pet.ts +++ b/packages/wow/src/pet/pet.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { PetAbilityIndexResponse, PetAbilityMediaResponse, @@ -17,7 +17,7 @@ import type { export function pet(petId: number): Resource { return { namespace: 'static', - path: `${base}/pet/${petId}`, + path: `${wowBasePath}/pet/${petId}`, }; } /** @@ -28,7 +28,7 @@ export function pet(petId: number): Resource { export function petAbility(petAbilityId: number): Resource { return { namespace: 'static', - path: `${base}/pet-ability/${petAbilityId}`, + path: `${wowBasePath}/pet-ability/${petAbilityId}`, }; } /** @@ -38,7 +38,7 @@ export function petAbility(petAbilityId: number): Resource { export function petAbilityIndex(): Resource { return { namespace: 'static', - path: `${base}/pet-ability/index`, + path: `${wowBasePath}/pet-ability/index`, }; } /** @@ -49,7 +49,7 @@ export function petAbilityIndex(): Resource { export function petAbilityMedia(petAbilityId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/pet-ability/${petAbilityId}`, + path: `${wowMediaBasePath}/pet-ability/${petAbilityId}`, }; } /** @@ -59,7 +59,7 @@ export function petAbilityMedia(petAbilityId: number): Resource { return { namespace: 'static', - path: `${base}/pet/index`, + path: `${wowBasePath}/pet/index`, }; } /** @@ -70,6 +70,6 @@ export function petIndex(): Resource { export function petMedia(petId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/pet/${petId}`, + path: `${wowMediaBasePath}/pet/${petId}`, }; } diff --git a/packages/wow/src/pet/types.ts b/packages/wow/src/pet/types.ts index d290abbf..2de8e62a 100644 --- a/packages/wow/src/pet/types.ts +++ b/packages/wow/src/pet/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a pet ability index. diff --git a/packages/wow/src/playable-class/playable-class.test.ts b/packages/wow/src/playable-class/playable-class.test.ts index 9751ed00..5889f57b 100644 --- a/packages/wow/src/playable-class/playable-class.test.ts +++ b/packages/wow/src/playable-class/playable-class.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { playableClass, playableClassIndex, playableClassMedia, pvpTalentSlots } from './playable-class'; describe.concurrent('playableClassApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('playableClassApi', () => { const playableClassId = 123; const resource = playableClass(playableClassId); - expect(resource.path).toBe(`${base}/playable-class/${playableClassId}`); + expect(resource.path).toBe(`${wowBasePath}/playable-class/${playableClassId}`); expect(resource.namespace).toBe('static'); }); it('playableClassIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = playableClassIndex(); - expect(resource.path).toBe(`${base}/playable-class/index`); + expect(resource.path).toBe(`${wowBasePath}/playable-class/index`); expect(resource.namespace).toBe('static'); }); @@ -22,7 +22,7 @@ describe.concurrent('playableClassApi', () => { const playableClassId = 123; const resource = playableClassMedia(playableClassId); - expect(resource.path).toBe(`${mediaBase}/playable-class/${playableClassId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/playable-class/${playableClassId}`); expect(resource.namespace).toBe('static'); }); @@ -30,7 +30,7 @@ describe.concurrent('playableClassApi', () => { const playableClassId = 123; const resource = pvpTalentSlots(playableClassId); - expect(resource.path).toBe(`${base}/playable-class/${playableClassId}/pvp-talent-slots`); + expect(resource.path).toBe(`${wowBasePath}/playable-class/${playableClassId}/pvp-talent-slots`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/playable-class/playable-class.ts b/packages/wow/src/playable-class/playable-class.ts index 3189d9ef..dabd7da3 100644 --- a/packages/wow/src/playable-class/playable-class.ts +++ b/packages/wow/src/playable-class/playable-class.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { PlayableClassIndexResponse, PlayableClassMediaResponse, @@ -15,7 +15,7 @@ import type { export function playableClass(playableClassId: number): Resource { return { namespace: 'static', - path: `${base}/playable-class/${playableClassId}`, + path: `${wowBasePath}/playable-class/${playableClassId}`, }; } /** @@ -25,7 +25,7 @@ export function playableClass(playableClassId: number): Resource { return { namespace: 'static', - path: `${base}/playable-class/index`, + path: `${wowBasePath}/playable-class/index`, }; } /** @@ -36,7 +36,7 @@ export function playableClassIndex(): Resource { export function playableClassMedia(playableClassId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/playable-class/${playableClassId}`, + path: `${wowMediaBasePath}/playable-class/${playableClassId}`, }; } /** @@ -47,6 +47,6 @@ export function playableClassMedia(playableClassId: number): Resource { return { namespace: 'static', - path: `${base}/playable-class/${playableClassId}/pvp-talent-slots`, + path: `${wowBasePath}/playable-class/${playableClassId}/pvp-talent-slots`, }; } diff --git a/packages/wow/src/playable-class/types.ts b/packages/wow/src/playable-class/types.ts index 6b9092d6..fbc2cb04 100644 --- a/packages/wow/src/playable-class/types.ts +++ b/packages/wow/src/playable-class/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a playable class index. diff --git a/packages/wow/src/playable-race/playable-race.test.ts b/packages/wow/src/playable-race/playable-race.test.ts index 1f811d57..a2814615 100644 --- a/packages/wow/src/playable-race/playable-race.test.ts +++ b/packages/wow/src/playable-race/playable-race.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { playableRace, playableRaceIndex } from './playable-race'; describe.concurrent('playableRaceApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('playableRaceApi', () => { const playableRaceId = 456; const resource = playableRace(playableRaceId); - expect(resource.path).toBe(`${base}/playable-race/${playableRaceId}`); + expect(resource.path).toBe(`${wowBasePath}/playable-race/${playableRaceId}`); expect(resource.namespace).toBe('static'); }); it('playableRaceIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = playableRaceIndex(); - expect(resource.path).toBe(`${base}/playable-race/index`); + expect(resource.path).toBe(`${wowBasePath}/playable-race/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/playable-race/playable-race.ts b/packages/wow/src/playable-race/playable-race.ts index b36f2725..ad2d5267 100644 --- a/packages/wow/src/playable-race/playable-race.ts +++ b/packages/wow/src/playable-race/playable-race.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { PlayableRaceIndexResponse, PlayableRaceResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { PlayableRaceIndexResponse, PlayableRaceResponse } from './types'; export function playableRace(playableRaceId: number): Resource { return { namespace: 'static', - path: `${base}/playable-race/${playableRaceId}`, + path: `${wowBasePath}/playable-race/${playableRaceId}`, }; } /** @@ -20,6 +20,6 @@ export function playableRace(playableRaceId: number): Resource { return { namespace: 'static', - path: `${base}/playable-race/index`, + path: `${wowBasePath}/playable-race/index`, }; } diff --git a/packages/wow/src/playable-race/types.ts b/packages/wow/src/playable-race/types.ts index 50c7634c..d765386e 100644 --- a/packages/wow/src/playable-race/types.ts +++ b/packages/wow/src/playable-race/types.ts @@ -1,4 +1,4 @@ -import type { Faction, GenderName, NameId, NameIdKey, ResponseBase } from '../base'; +import type { Faction, GenderName, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The playable race index response. diff --git a/packages/wow/src/playable-specialization/playable-specialization.test.ts b/packages/wow/src/playable-specialization/playable-specialization.test.ts index e62635e1..2bcbf236 100644 --- a/packages/wow/src/playable-specialization/playable-specialization.test.ts +++ b/packages/wow/src/playable-specialization/playable-specialization.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { playableSpecialization, playableSpecializationIndex, @@ -11,7 +11,7 @@ describe.concurrent('playableSpecializationApi', () => { const specializationId = 123; const resource = playableSpecialization(specializationId); - expect(resource.path).toBe(`${base}/playable-specialization/${specializationId}`); + expect(resource.path).toBe(`${wowBasePath}/playable-specialization/${specializationId}`); expect(resource.namespace).toBe('static'); }); @@ -20,7 +20,7 @@ describe.concurrent('playableSpecializationApi', () => { }) => { const resource = playableSpecializationIndex(); - expect(resource.path).toBe(`${base}/playable-specialization/index`); + expect(resource.path).toBe(`${wowBasePath}/playable-specialization/index`); expect(resource.namespace).toBe('static'); }); @@ -30,7 +30,7 @@ describe.concurrent('playableSpecializationApi', () => { const specializationId = 123; const resource = playableSpecializationMedia(specializationId); - expect(resource.path).toBe(`${mediaBase}/playable-specialization/${specializationId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/playable-specialization/${specializationId}`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/playable-specialization/playable-specialization.ts b/packages/wow/src/playable-specialization/playable-specialization.ts index 37224115..c978fc7a 100644 --- a/packages/wow/src/playable-specialization/playable-specialization.ts +++ b/packages/wow/src/playable-specialization/playable-specialization.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { PlayableSpecializationIndexResponse, PlayableSpecializationMediaResponse, @@ -14,7 +14,7 @@ import type { export function playableSpecialization(specializationId: number): Resource { return { namespace: 'static', - path: `${base}/playable-specialization/${specializationId}`, + path: `${wowBasePath}/playable-specialization/${specializationId}`, }; } /** @@ -24,7 +24,7 @@ export function playableSpecialization(specializationId: number): Resource { return { namespace: 'static', - path: `${base}/playable-specialization/index`, + path: `${wowBasePath}/playable-specialization/index`, }; } /** @@ -35,6 +35,6 @@ export function playableSpecializationIndex(): Resource { return { namespace: 'static', - path: `${mediaBase}/playable-specialization/${specializationId}`, + path: `${wowMediaBasePath}/playable-specialization/${specializationId}`, }; } diff --git a/packages/wow/src/playable-specialization/types.ts b/packages/wow/src/playable-specialization/types.ts index 68aa3dc9..b30de186 100644 --- a/packages/wow/src/playable-specialization/types.ts +++ b/packages/wow/src/playable-specialization/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a playable specialization index. diff --git a/packages/wow/src/power-type/power-type.test.ts b/packages/wow/src/power-type/power-type.test.ts index 1d78bae4..833cc3ef 100644 --- a/packages/wow/src/power-type/power-type.test.ts +++ b/packages/wow/src/power-type/power-type.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { powerType, powerTypeIndex } from './power-type'; describe.concurrent('powerTypeApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('powerTypeApi', () => { const powerTypeId = 123; const resource = powerType(powerTypeId); - expect(resource.path).toBe(`${base}/power-type/${powerTypeId}`); + expect(resource.path).toBe(`${wowBasePath}/power-type/${powerTypeId}`); expect(resource.namespace).toBe('static'); }); it('powerTypeIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = powerTypeIndex(); - expect(resource.path).toBe(`${base}/power-type/index`); + expect(resource.path).toBe(`${wowBasePath}/power-type/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/power-type/power-type.ts b/packages/wow/src/power-type/power-type.ts index a6912146..c9bfce89 100644 --- a/packages/wow/src/power-type/power-type.ts +++ b/packages/wow/src/power-type/power-type.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { PowerTypeIndexResponse, PowerTypeResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { PowerTypeIndexResponse, PowerTypeResponse } from './types'; export function powerType(powerTypeId: number): Resource { return { namespace: 'static', - path: `${base}/power-type/${powerTypeId}`, + path: `${wowBasePath}/power-type/${powerTypeId}`, }; } /** @@ -20,6 +20,6 @@ export function powerType(powerTypeId: number): Resource { export function powerTypeIndex(): Resource { return { namespace: 'static', - path: `${base}/power-type/index`, + path: `${wowBasePath}/power-type/index`, }; } diff --git a/packages/wow/src/power-type/types.ts b/packages/wow/src/power-type/types.ts index baae4a9e..ea0197ed 100644 --- a/packages/wow/src/power-type/types.ts +++ b/packages/wow/src/power-type/types.ts @@ -1,4 +1,4 @@ -import type { NameId, NameIdKey, ResponseBase } from '../base'; +import type { NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a power type index. diff --git a/packages/wow/src/profession/profession.test.ts b/packages/wow/src/profession/profession.test.ts index 7f363123..f1625295 100644 --- a/packages/wow/src/profession/profession.test.ts +++ b/packages/wow/src/profession/profession.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { profession, professionIndex, professionMedia, professionSkillTier, recipe, recipeMedia } from './profession'; describe.concurrent('professionApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('professionApi', () => { const professionId = 123; const resource = profession(professionId); - expect(resource.path).toBe(`${base}/profession/${professionId}`); + expect(resource.path).toBe(`${wowBasePath}/profession/${professionId}`); expect(resource.namespace).toBe('static'); }); it('professionIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = professionIndex(); - expect(resource.path).toBe(`${base}/profession/index`); + expect(resource.path).toBe(`${wowBasePath}/profession/index`); expect(resource.namespace).toBe('static'); }); @@ -22,7 +22,7 @@ describe.concurrent('professionApi', () => { const professionId = 123; const resource = professionMedia(professionId); - expect(resource.path).toBe(`${mediaBase}/profession/${professionId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/profession/${professionId}`); expect(resource.namespace).toBe('static'); }); @@ -31,7 +31,7 @@ describe.concurrent('professionApi', () => { const skillTierId = 456; const resource = professionSkillTier(professionId, skillTierId); - expect(resource.path).toBe(`${base}/profession/${professionId}/skill-tier/${skillTierId}`); + expect(resource.path).toBe(`${wowBasePath}/profession/${professionId}/skill-tier/${skillTierId}`); expect(resource.namespace).toBe('static'); }); @@ -39,7 +39,7 @@ describe.concurrent('professionApi', () => { const recipeId = 123; const resource = recipe(recipeId); - expect(resource.path).toBe(`${base}/recipe/${recipeId}`); + expect(resource.path).toBe(`${wowBasePath}/recipe/${recipeId}`); expect(resource.namespace).toBe('static'); }); @@ -47,7 +47,7 @@ describe.concurrent('professionApi', () => { const recipeId = 123; const resource = recipeMedia(recipeId); - expect(resource.path).toBe(`${mediaBase}/recipe/${recipeId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/recipe/${recipeId}`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/profession/profession.ts b/packages/wow/src/profession/profession.ts index 931cec29..2a7ec74e 100644 --- a/packages/wow/src/profession/profession.ts +++ b/packages/wow/src/profession/profession.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { ProfessionIndexResponse, ProfessionMediaResponse, @@ -17,7 +17,7 @@ import type { export function profession(professionId: number): Resource { return { namespace: 'static', - path: `${base}/profession/${professionId}`, + path: `${wowBasePath}/profession/${professionId}`, }; } /** @@ -27,7 +27,7 @@ export function profession(professionId: number): Resource { export function professionIndex(): Resource { return { namespace: 'static', - path: `${base}/profession/index`, + path: `${wowBasePath}/profession/index`, }; } /** @@ -38,7 +38,7 @@ export function professionIndex(): Resource { export function professionMedia(professionId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/profession/${professionId}`, + path: `${wowMediaBasePath}/profession/${professionId}`, }; } /** @@ -50,7 +50,7 @@ export function professionMedia(professionId: number): Resource { return { namespace: 'static', - path: `${base}/profession/${professionId}/skill-tier/${skillTierId}`, + path: `${wowBasePath}/profession/${professionId}/skill-tier/${skillTierId}`, }; } /** @@ -61,7 +61,7 @@ export function professionSkillTier(professionId: number, skillTierId: number): export function recipe(recipeId: number): Resource { return { namespace: 'static', - path: `${base}/recipe/${recipeId}`, + path: `${wowBasePath}/recipe/${recipeId}`, }; } /** @@ -72,6 +72,6 @@ export function recipe(recipeId: number): Resource { export function recipeMedia(recipeId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/recipe/${recipeId}`, + path: `${wowMediaBasePath}/recipe/${recipeId}`, }; } diff --git a/packages/wow/src/profession/types.ts b/packages/wow/src/profession/types.ts index e0634ec7..f26580ec 100644 --- a/packages/wow/src/profession/types.ts +++ b/packages/wow/src/profession/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a profession index. diff --git a/packages/wow/src/pvp-season/pvp-season.test.ts b/packages/wow/src/pvp-season/pvp-season.test.ts index 20d24e67..2275ae9a 100644 --- a/packages/wow/src/pvp-season/pvp-season.test.ts +++ b/packages/wow/src/pvp-season/pvp-season.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { pvpLeaderboard, pvpLeaderboardIndex, pvpRewardsIndex, pvpSeason, pvpSeasonIndex } from './pvp-season'; describe.concurrent('pvpSeasonApi', () => { @@ -9,35 +9,35 @@ describe.concurrent('pvpSeasonApi', () => { it('pvpLeaderboard should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpLeaderboard(pvpSeasonId, bracket); - expect(resource.path).toBe(`${base}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${bracket}`); + expect(resource.path).toBe(`${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${bracket}`); expect(resource.namespace).toBe('dynamic'); }); it('pvpLeaderboardIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpLeaderboardIndex(pvpSeasonId); - expect(resource.path).toBe(`${base}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`); + expect(resource.path).toBe(`${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`); expect(resource.namespace).toBe('dynamic'); }); it('pvpRewardsIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpRewardsIndex(pvpSeasonId); - expect(resource.path).toBe(`${base}/pvp-season/${pvpSeasonId}/pvp-reward/index`); + expect(resource.path).toBe(`${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-reward/index`); expect(resource.namespace).toBe('dynamic'); }); it('pvpSeason should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpSeason(pvpSeasonId); - expect(resource.path).toBe(`${base}/pvp-season/${pvpSeasonId}`); + expect(resource.path).toBe(`${wowBasePath}/pvp-season/${pvpSeasonId}`); expect(resource.namespace).toBe('dynamic'); }); it('pvpSeasonIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpSeasonIndex(); - expect(resource.path).toBe(`${base}/pvp-season/index`); + expect(resource.path).toBe(`${wowBasePath}/pvp-season/index`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/pvp-season/pvp-season.ts b/packages/wow/src/pvp-season/pvp-season.ts index 2020796b..736eea0c 100644 --- a/packages/wow/src/pvp-season/pvp-season.ts +++ b/packages/wow/src/pvp-season/pvp-season.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { PvpLeaderboardIndexResponse, PvpLeaderboardResponse, @@ -17,7 +17,7 @@ import type { export function pvpLeaderboard(pvpSeasonId: number, bracket: string): Resource { return { namespace: 'dynamic', - path: `${base}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${bracket}`, + path: `${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${bracket}`, }; } /** @@ -28,7 +28,7 @@ export function pvpLeaderboard(pvpSeasonId: number, bracket: string): Resource

{ return { namespace: 'dynamic', - path: `${base}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, + path: `${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, }; } /** @@ -39,7 +39,7 @@ export function pvpLeaderboardIndex(pvpSeasonId: number): Resource { return { namespace: 'dynamic', - path: `${base}/pvp-season/${pvpSeasonId}/pvp-reward/index`, + path: `${wowBasePath}/pvp-season/${pvpSeasonId}/pvp-reward/index`, }; } /** @@ -50,7 +50,7 @@ export function pvpRewardsIndex(pvpSeasonId: number): Resource { return { namespace: 'dynamic', - path: `${base}/pvp-season/${pvpSeasonId}`, + path: `${wowBasePath}/pvp-season/${pvpSeasonId}`, }; } /** @@ -60,6 +60,6 @@ export function pvpSeason(pvpSeasonId: number): Resource { export function pvpSeasonIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/pvp-season/index`, + path: `${wowBasePath}/pvp-season/index`, }; } diff --git a/packages/wow/src/pvp-season/types.ts b/packages/wow/src/pvp-season/types.ts index 647d6ab9..9864e400 100644 --- a/packages/wow/src/pvp-season/types.ts +++ b/packages/wow/src/pvp-season/types.ts @@ -1,4 +1,4 @@ -import type { Faction, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { Faction, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a PvP leaderboard index. diff --git a/packages/wow/src/pvp-tier/pvp-tier.test.ts b/packages/wow/src/pvp-tier/pvp-tier.test.ts index 4c2007de..fcc85e7a 100644 --- a/packages/wow/src/pvp-tier/pvp-tier.test.ts +++ b/packages/wow/src/pvp-tier/pvp-tier.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { pvpTier, pvpTierIndex, pvpTierMedia } from './pvp-tier'; describe.concurrent('pvpTierApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('pvpTierApi', () => { const pvpTierId = 123; const resource = pvpTier(pvpTierId); - expect(resource.path).toBe(`${base}/pvp-tier/${pvpTierId}`); + expect(resource.path).toBe(`${wowBasePath}/pvp-tier/${pvpTierId}`); expect(resource.namespace).toBe('static'); }); it('pvpTierIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = pvpTierIndex(); - expect(resource.path).toBe(`${base}/pvp-tier/index`); + expect(resource.path).toBe(`${wowBasePath}/pvp-tier/index`); expect(resource.namespace).toBe('static'); }); @@ -22,7 +22,7 @@ describe.concurrent('pvpTierApi', () => { const pvpTierId = 123; const resource = pvpTierMedia(pvpTierId); - expect(resource.path).toBe(`${mediaBase}/pvp-tier/${pvpTierId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/pvp-tier/${pvpTierId}`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/pvp-tier/pvp-tier.ts b/packages/wow/src/pvp-tier/pvp-tier.ts index 2b46e331..9d4be394 100644 --- a/packages/wow/src/pvp-tier/pvp-tier.ts +++ b/packages/wow/src/pvp-tier/pvp-tier.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { PvpTierIndexResponse, PvpTierMediaResponse, PvpTierResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { PvpTierIndexResponse, PvpTierMediaResponse, PvpTierResponse } from export function pvpTier(pvpTierId: number): Resource { return { namespace: 'static', - path: `${base}/pvp-tier/${pvpTierId}`, + path: `${wowBasePath}/pvp-tier/${pvpTierId}`, }; } /** @@ -20,7 +20,7 @@ export function pvpTier(pvpTierId: number): Resource { export function pvpTierIndex(): Resource { return { namespace: 'static', - path: `${base}/pvp-tier/index`, + path: `${wowBasePath}/pvp-tier/index`, }; } /** @@ -31,6 +31,6 @@ export function pvpTierIndex(): Resource { export function pvpTierMedia(pvpTierId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/pvp-tier/${pvpTierId}`, + path: `${wowMediaBasePath}/pvp-tier/${pvpTierId}`, }; } diff --git a/packages/wow/src/pvp-tier/types.ts b/packages/wow/src/pvp-tier/types.ts index b09ce7d0..ba0a90bc 100644 --- a/packages/wow/src/pvp-tier/types.ts +++ b/packages/wow/src/pvp-tier/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a PvP tier index. diff --git a/packages/wow/src/quest/quest.test.ts b/packages/wow/src/quest/quest.test.ts index ea8bee84..285c8d50 100644 --- a/packages/wow/src/quest/quest.test.ts +++ b/packages/wow/src/quest/quest.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { quest, questArea, @@ -16,14 +16,14 @@ describe.concurrent('questApi', () => { const questId = 123; const resource = quest(questId); - expect(resource.path).toBe(`${base}/quest/${questId}`); + expect(resource.path).toBe(`${wowBasePath}/quest/${questId}`); expect(resource.namespace).toBe('static'); }); it('questIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = questIndex(); - expect(resource.path).toBe(`${base}/quest/index`); + expect(resource.path).toBe(`${wowBasePath}/quest/index`); expect(resource.namespace).toBe('static'); }); @@ -31,14 +31,14 @@ describe.concurrent('questApi', () => { const questAreaId = 456; const resource = questArea(questAreaId); - expect(resource.path).toBe(`${base}/quest/area/${questAreaId}`); + expect(resource.path).toBe(`${wowBasePath}/quest/area/${questAreaId}`); expect(resource.namespace).toBe('static'); }); it('questAreaIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = questAreaIndex(); - expect(resource.path).toBe(`${base}/quest/area/index`); + expect(resource.path).toBe(`${wowBasePath}/quest/area/index`); expect(resource.namespace).toBe('static'); }); @@ -46,14 +46,14 @@ describe.concurrent('questApi', () => { const questCategoryId = 789; const resource = questCategory(questCategoryId); - expect(resource.path).toBe(`${base}/quest/category/${questCategoryId}`); + expect(resource.path).toBe(`${wowBasePath}/quest/category/${questCategoryId}`); expect(resource.namespace).toBe('static'); }); it('questCategoryIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = questCategoryIndex(); - expect(resource.path).toBe(`${base}/quest/category/index`); + expect(resource.path).toBe(`${wowBasePath}/quest/category/index`); expect(resource.namespace).toBe('static'); }); @@ -61,14 +61,14 @@ describe.concurrent('questApi', () => { const questTypeId = 987; const resource = questType(questTypeId); - expect(resource.path).toBe(`${base}/quest/type/${questTypeId}`); + expect(resource.path).toBe(`${wowBasePath}/quest/type/${questTypeId}`); expect(resource.namespace).toBe('static'); }); it('questTypeIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = questTypeIndex(); - expect(resource.path).toBe(`${base}/quest/type/index`); + expect(resource.path).toBe(`${wowBasePath}/quest/type/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/quest/quest.ts b/packages/wow/src/quest/quest.ts index ddf46f1c..477c1ddb 100644 --- a/packages/wow/src/quest/quest.ts +++ b/packages/wow/src/quest/quest.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { QuestAreaIndexResponse, QuestAreaResponse, @@ -19,7 +19,7 @@ import type { export function quest(questId: number): Resource { return { namespace: 'static', - path: `${base}/quest/${questId}`, + path: `${wowBasePath}/quest/${questId}`, }; } /** @@ -30,7 +30,7 @@ export function quest(questId: number): Resource { export function questArea(questAreaId: number): Resource { return { namespace: 'static', - path: `${base}/quest/area/${questAreaId}`, + path: `${wowBasePath}/quest/area/${questAreaId}`, }; } /** @@ -40,7 +40,7 @@ export function questArea(questAreaId: number): Resource { export function questAreaIndex(): Resource { return { namespace: 'static', - path: `${base}/quest/area/index`, + path: `${wowBasePath}/quest/area/index`, }; } /** @@ -51,7 +51,7 @@ export function questAreaIndex(): Resource { export function questCategory(questCategoryId: number): Resource { return { namespace: 'static', - path: `${base}/quest/category/${questCategoryId}`, + path: `${wowBasePath}/quest/category/${questCategoryId}`, }; } /** @@ -61,7 +61,7 @@ export function questCategory(questCategoryId: number): Resource { return { namespace: 'static', - path: `${base}/quest/category/index`, + path: `${wowBasePath}/quest/category/index`, }; } /** @@ -71,7 +71,7 @@ export function questCategoryIndex(): Resource { export function questIndex(): Resource { return { namespace: 'static', - path: `${base}/quest/index`, + path: `${wowBasePath}/quest/index`, }; } /** @@ -82,7 +82,7 @@ export function questIndex(): Resource { export function questType(questTypeId: number): Resource { return { namespace: 'static', - path: `${base}/quest/type/${questTypeId}`, + path: `${wowBasePath}/quest/type/${questTypeId}`, }; } /** @@ -92,6 +92,6 @@ export function questType(questTypeId: number): Resource { export function questTypeIndex(): Resource { return { namespace: 'static', - path: `${base}/quest/type/index`, + path: `${wowBasePath}/quest/type/index`, }; } diff --git a/packages/wow/src/quest/types.ts b/packages/wow/src/quest/types.ts index cb74b838..c1f9a939 100644 --- a/packages/wow/src/quest/types.ts +++ b/packages/wow/src/quest/types.ts @@ -1,4 +1,4 @@ -import type { Faction, NameIdKey, ResponseBase } from '../base'; +import type { Faction, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a quest area index. diff --git a/packages/wow/src/realm/realm.test.ts b/packages/wow/src/realm/realm.test.ts index 84a6d39c..43f49ad2 100644 --- a/packages/wow/src/realm/realm.test.ts +++ b/packages/wow/src/realm/realm.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, searchBase } from '../base'; import { realm, realmIndex, realmSearch } from './realm'; describe.concurrent('realmApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('realmApi', () => { const realmSlug = 'my-realm'; const resource = realm(realmSlug); - expect(resource.path).toBe(`${base}/realm/${realmSlug}`); + expect(resource.path).toBe(`${wowBasePath}/realm/${realmSlug}`); expect(resource.namespace).toBe('dynamic'); }); it('realmIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = realmIndex(); - expect(resource.path).toBe(`${base}/realm/index`); + expect(resource.path).toBe(`${wowBasePath}/realm/index`); expect(resource.namespace).toBe('dynamic'); }); @@ -25,7 +25,7 @@ describe.concurrent('realmApi', () => { timezone: 'Europe/Paris', }); - expect(resource.path).toBe(`${searchBase}/realm`); + expect(resource.path).toBe(`${wowSearchBasePath}/realm`); expect(resource.namespace).toBe('dynamic'); expect(resource.parameters).toEqual({ _page: 1, @@ -41,7 +41,7 @@ describe.concurrent('realmApi', () => { timezone: 'America/Chicago', }); - expect(resource.path).toBe(`${searchBase}/realm`); + expect(resource.path).toBe(`${wowSearchBasePath}/realm`); expect(resource.namespace).toBe('dynamic'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/realm/realm.ts b/packages/wow/src/realm/realm.ts index 6a39f277..557313ac 100644 --- a/packages/wow/src/realm/realm.ts +++ b/packages/wow/src/realm/realm.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, searchBase } from '../base'; +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponseItem } from './types'; /** @@ -10,7 +10,7 @@ import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSea export function realm(realmSlug: string): Resource { return { namespace: 'dynamic', - path: `${base}/realm/${realmSlug}`, + path: `${wowBasePath}/realm/${realmSlug}`, }; } /** @@ -20,7 +20,7 @@ export function realm(realmSlug: string): Resource { export function realmIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/realm/index`, + path: `${wowBasePath}/realm/index`, }; } /** @@ -38,6 +38,6 @@ export function realmSearch( orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, timezone: options.timezone, }, - path: `${searchBase}/realm`, + path: `${wowSearchBasePath}/realm`, }; } diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index 0a28e199..f9fdd200 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { KeyBase, NameId, NameIdKey, Realm, ResponseBase } from '../base'; +import type { BaseSearchParameters, KeyBase, Locales, NameId, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; + /** * The category of a realm. diff --git a/packages/wow/src/region/region.test.ts b/packages/wow/src/region/region.test.ts index 38fca1b4..68e430d5 100644 --- a/packages/wow/src/region/region.test.ts +++ b/packages/wow/src/region/region.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { region, regionIndex } from './region'; describe.concurrent('regionApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('regionApi', () => { const regionId = 123; const resource = region(regionId); - expect(resource.path).toBe(`${base}/region/123`); + expect(resource.path).toBe(`${wowBasePath}/region/123`); expect(resource.namespace).toBe('dynamic'); }); it('regionIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = regionIndex(); - expect(resource.path).toBe(`${base}/region/index`); + expect(resource.path).toBe(`${wowBasePath}/region/index`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/region/region.ts b/packages/wow/src/region/region.ts index 1ff917eb..0996a5c6 100644 --- a/packages/wow/src/region/region.ts +++ b/packages/wow/src/region/region.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { RegionIndexResponse, RegionResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { RegionIndexResponse, RegionResponse } from './types'; export function region(regionId: number): Resource { return { namespace: 'dynamic', - path: `${base}/region/${regionId}`, + path: `${wowBasePath}/region/${regionId}`, }; } /** @@ -20,6 +20,6 @@ export function region(regionId: number): Resource { export function regionIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/region/index`, + path: `${wowBasePath}/region/index`, }; } diff --git a/packages/wow/src/region/types.ts b/packages/wow/src/region/types.ts index 98f78955..cd2b9006 100644 --- a/packages/wow/src/region/types.ts +++ b/packages/wow/src/region/types.ts @@ -1,4 +1,4 @@ -import type { NameId, ResponseBase } from '../base'; +import type { NameId, ResponseBase } from '@blizzard-api/core'; /** * The response for a region index. diff --git a/packages/wow/src/reputations/reputations.test.ts b/packages/wow/src/reputations/reputations.test.ts index 67f418c8..fbb1c29a 100644 --- a/packages/wow/src/reputations/reputations.test.ts +++ b/packages/wow/src/reputations/reputations.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { reputationFaction, reputationFactionIndex, reputationTiers, reputationTiersIndex } from './reputations'; describe.concurrent('reputationApi', () => { @@ -7,14 +7,14 @@ describe.concurrent('reputationApi', () => { const reputationFactionId = 123; const resource = reputationFaction(reputationFactionId); - expect(resource.path).toBe(`${base}/reputation-faction/${reputationFactionId}`); + expect(resource.path).toBe(`${wowBasePath}/reputation-faction/${reputationFactionId}`); expect(resource.namespace).toBe('static'); }); it('reputationFactionIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = reputationFactionIndex(); - expect(resource.path).toBe(`${base}/reputation-faction/index`); + expect(resource.path).toBe(`${wowBasePath}/reputation-faction/index`); expect(resource.namespace).toBe('static'); }); @@ -22,14 +22,14 @@ describe.concurrent('reputationApi', () => { const reputationTiersId = 456; const resource = reputationTiers(reputationTiersId); - expect(resource.path).toBe(`${base}/reputation-tiers/${reputationTiersId}`); + expect(resource.path).toBe(`${wowBasePath}/reputation-tiers/${reputationTiersId}`); expect(resource.namespace).toBe('static'); }); it('reputationTiersIndex should return a resource object with the correct path and namespace', ({ expect }) => { const resource = reputationTiersIndex(); - expect(resource.path).toBe(`${base}/reputation-tiers/index`); + expect(resource.path).toBe(`${wowBasePath}/reputation-tiers/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/reputations/reputations.ts b/packages/wow/src/reputations/reputations.ts index e0cad51c..2aee7e96 100644 --- a/packages/wow/src/reputations/reputations.ts +++ b/packages/wow/src/reputations/reputations.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { ReputationFactionIndexResponse, ReputationFactionResponse, @@ -15,7 +15,7 @@ import type { export function reputationFaction(reputationFactionId: number): Resource { return { namespace: 'static', - path: `${base}/reputation-faction/${reputationFactionId}`, + path: `${wowBasePath}/reputation-faction/${reputationFactionId}`, }; } /** @@ -25,7 +25,7 @@ export function reputationFaction(reputationFactionId: number): Resource { return { namespace: 'static', - path: `${base}/reputation-faction/index`, + path: `${wowBasePath}/reputation-faction/index`, }; } /** @@ -36,7 +36,7 @@ export function reputationFactionIndex(): Resource { return { namespace: 'static', - path: `${base}/reputation-tiers/${reputationTiersId}`, + path: `${wowBasePath}/reputation-tiers/${reputationTiersId}`, }; } /** @@ -46,6 +46,6 @@ export function reputationTiers(reputationTiersId: number): Resource { return { namespace: 'static', - path: `${base}/reputation-tiers/index`, + path: `${wowBasePath}/reputation-tiers/index`, }; } diff --git a/packages/wow/src/reputations/types.ts b/packages/wow/src/reputations/types.ts index 29730b19..7f037289 100644 --- a/packages/wow/src/reputations/types.ts +++ b/packages/wow/src/reputations/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a reputation faction index. diff --git a/packages/wow/src/spell/spell.test.ts b/packages/wow/src/spell/spell.test.ts index ec8f07f5..1c22ecda 100644 --- a/packages/wow/src/spell/spell.test.ts +++ b/packages/wow/src/spell/spell.test.ts @@ -1,5 +1,5 @@ +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase, searchBase } from '../base'; import { spell, spellMedia, spellSearch } from './spell'; describe.concurrent('spellApi', () => { @@ -7,7 +7,7 @@ describe.concurrent('spellApi', () => { const spellId = 456; const resource = spell(spellId); - expect(resource.path).toBe(`${base}/spell/${spellId}`); + expect(resource.path).toBe(`${wowBasePath}/spell/${spellId}`); expect(resource.namespace).toBe('static'); }); @@ -15,7 +15,7 @@ describe.concurrent('spellApi', () => { const spellId = 789; const resource = spellMedia(spellId); - expect(resource.path).toBe(`${mediaBase}/spell/${spellId}`); + expect(resource.path).toBe(`${wowMediaBasePath}/spell/${spellId}`); expect(resource.namespace).toBe('static'); }); @@ -27,7 +27,7 @@ describe.concurrent('spellApi', () => { orderby: 'name', }); - expect(resource.path).toBe(`${searchBase}/spell`); + expect(resource.path).toBe(`${wowSearchBasePath}/spell`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, @@ -44,7 +44,7 @@ describe.concurrent('spellApi', () => { orderby: ['name', 'id'], }); - expect(resource.path).toBe(`${searchBase}/spell`); + expect(resource.path).toBe(`${wowSearchBasePath}/spell`); expect(resource.namespace).toBe('static'); expect(resource.parameters).toEqual({ _page: 1, diff --git a/packages/wow/src/spell/spell.ts b/packages/wow/src/spell/spell.ts index 99d88b69..ad31a2ed 100644 --- a/packages/wow/src/spell/spell.ts +++ b/packages/wow/src/spell/spell.ts @@ -1,5 +1,5 @@ import type { Resource, SearchResponse } from '@blizzard-api/core'; -import { base, mediaBase, searchBase } from '../base'; +import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { SpellMediaResponse, SpellResponse, SpellSearchParameters, SpellSearchResponseItem } from './types'; /** @@ -10,7 +10,7 @@ import type { SpellMediaResponse, SpellResponse, SpellSearchParameters, SpellSea export function spell(spellId: number): Resource { return { namespace: 'static', - path: `${base}/spell/${spellId}`, + path: `${wowBasePath}/spell/${spellId}`, }; } /** @@ -21,7 +21,7 @@ export function spell(spellId: number): Resource { export function spellMedia(spellId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/spell/${spellId}`, + path: `${wowMediaBasePath}/spell/${spellId}`, }; } /** @@ -39,6 +39,6 @@ export function spellSearch( [`name.${options.locale}`]: options.name, orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, }, - path: `${searchBase}/spell`, + path: `${wowSearchBasePath}/spell`, }; } diff --git a/packages/wow/src/spell/types.ts b/packages/wow/src/spell/types.ts index 79c66d5c..00f5bf73 100644 --- a/packages/wow/src/spell/types.ts +++ b/packages/wow/src/spell/types.ts @@ -1,5 +1,5 @@ -import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; -import type { KeyBase, MediaAsset, NameId, ResponseBase } from '../base'; +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, ResponseBase } from '@blizzard-api/core'; + /** * The response for a spell media. diff --git a/packages/wow/src/talent/talent.test.ts b/packages/wow/src/talent/talent.test.ts index 54d57d35..3cf5fad5 100644 --- a/packages/wow/src/talent/talent.test.ts +++ b/packages/wow/src/talent/talent.test.ts @@ -1,31 +1,31 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { pvpTalent, pvpTalentIndex, talent, talentIndex, talentTree, talentTreeIndex, talentTreeNodes } from './talent'; describe.concurrent('talentApi', () => { it('should return the correct path for pvpTalent', ({ expect }) => { const pvpTalentId = 123; const resource = pvpTalent(pvpTalentId); - expect(resource.path).toBe(`${base}/pvp-talent/123`); + expect(resource.path).toBe(`${wowBasePath}/pvp-talent/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for pvpTalentIndex', ({ expect }) => { const resource = pvpTalentIndex(); - expect(resource.path).toBe(`${base}/pvp-talent/index`); + expect(resource.path).toBe(`${wowBasePath}/pvp-talent/index`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for talent', ({ expect }) => { const talentId = 456; const resource = talent(talentId); - expect(resource.path).toBe(`${base}/talent/456`); + expect(resource.path).toBe(`${wowBasePath}/talent/456`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for talentIndex', ({ expect }) => { const resource = talentIndex(); - expect(resource.path).toBe(`${base}/talent/index`); + expect(resource.path).toBe(`${wowBasePath}/talent/index`); expect(resource.namespace).toBe('static'); }); @@ -33,20 +33,20 @@ describe.concurrent('talentApi', () => { const talentTreeId = 789; const specId = 10; const resource = talentTree(talentTreeId, specId); - expect(resource.path).toBe(`${base}/talent-tree/789/playable-specialization/10`); + expect(resource.path).toBe(`${wowBasePath}/talent-tree/789/playable-specialization/10`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for talentTreeIndex', ({ expect }) => { const resource = talentTreeIndex(); - expect(resource.path).toBe(`${base}/talent-tree/index`); + expect(resource.path).toBe(`${wowBasePath}/talent-tree/index`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for talentTreeNodes', ({ expect }) => { const talentTreeId = 789; const resource = talentTreeNodes(talentTreeId); - expect(resource.path).toBe(`${base}/talent-tree/789`); + expect(resource.path).toBe(`${wowBasePath}/talent-tree/789`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/talent/talent.ts b/packages/wow/src/talent/talent.ts index c43e0b6a..8e7cac55 100644 --- a/packages/wow/src/talent/talent.ts +++ b/packages/wow/src/talent/talent.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { PvpTalentIndexResponse, PvpTalentResponse, @@ -18,7 +18,7 @@ import type { export function pvpTalent(pvpTalentId: number): Resource { return { namespace: 'static', - path: `${base}/pvp-talent/${pvpTalentId}`, + path: `${wowBasePath}/pvp-talent/${pvpTalentId}`, }; } /** @@ -28,7 +28,7 @@ export function pvpTalent(pvpTalentId: number): Resource { export function pvpTalentIndex(): Resource { return { namespace: 'static', - path: `${base}/pvp-talent/index`, + path: `${wowBasePath}/pvp-talent/index`, }; } /** @@ -39,7 +39,7 @@ export function pvpTalentIndex(): Resource { export function talent(talentId: number): Resource { return { namespace: 'static', - path: `${base}/talent/${talentId}`, + path: `${wowBasePath}/talent/${talentId}`, }; } /** @@ -49,7 +49,7 @@ export function talent(talentId: number): Resource { export function talentIndex(): Resource { return { namespace: 'static', - path: `${base}/talent/index`, + path: `${wowBasePath}/talent/index`, }; } /** @@ -61,7 +61,7 @@ export function talentIndex(): Resource { export function talentTree(talentTreeId: number, specId: number): Resource { return { namespace: 'static', - path: `${base}/talent-tree/${talentTreeId}/playable-specialization/${specId}`, + path: `${wowBasePath}/talent-tree/${talentTreeId}/playable-specialization/${specId}`, }; } /** @@ -71,7 +71,7 @@ export function talentTree(talentTreeId: number, specId: number): Resource { return { namespace: 'static', - path: `${base}/talent-tree/index`, + path: `${wowBasePath}/talent-tree/index`, }; } /** @@ -82,6 +82,6 @@ export function talentTreeIndex(): Resource { export function talentTreeNodes(talentTreeId: number): Resource { return { namespace: 'static', - path: `${base}/talent-tree/${talentTreeId}`, + path: `${wowBasePath}/talent-tree/${talentTreeId}`, }; } diff --git a/packages/wow/src/talent/types.ts b/packages/wow/src/talent/types.ts index 2eb6267c..29e254d9 100644 --- a/packages/wow/src/talent/types.ts +++ b/packages/wow/src/talent/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a pvp talent index. diff --git a/packages/wow/src/tech-talent/tech-talent.test.ts b/packages/wow/src/tech-talent/tech-talent.test.ts index 37cc9030..ed0bc8a5 100644 --- a/packages/wow/src/tech-talent/tech-talent.test.ts +++ b/packages/wow/src/tech-talent/tech-talent.test.ts @@ -1,38 +1,38 @@ +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base, mediaBase } from '../base'; import { techTalent, techTalentIndex, techTalentMedia, techTalentTree, techTalentTreeIndex } from './tech-talent'; describe.concurrent('techTalentApi', () => { it('should return the correct path for techTalent', ({ expect }) => { const techTalentId = 123; const resource = techTalent(techTalentId); - expect(resource.path).toBe(`${base}/tech-talent/123`); + expect(resource.path).toBe(`${wowBasePath}/tech-talent/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for techTalentIndex', ({ expect }) => { const resource = techTalentIndex(); - expect(resource.path).toBe(`${base}/tech-talent/index`); + expect(resource.path).toBe(`${wowBasePath}/tech-talent/index`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for techTalentMedia', ({ expect }) => { const techTalentId = 456; const resource = techTalentMedia(techTalentId); - expect(resource.path).toBe(`${mediaBase}/tech-talent/456`); + expect(resource.path).toBe(`${wowMediaBasePath}/tech-talent/456`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for techTalentTree', ({ expect }) => { const techTalentTreeId = 789; const resource = techTalentTree(techTalentTreeId); - expect(resource.path).toBe(`${base}/tech-talent-tree/789`); + expect(resource.path).toBe(`${wowBasePath}/tech-talent-tree/789`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for techTalentTreeIndex', ({ expect }) => { const resource = techTalentTreeIndex(); - expect(resource.path).toBe(`${base}/tech-talent-tree/index`); + expect(resource.path).toBe(`${wowBasePath}/tech-talent-tree/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/tech-talent/tech-talent.ts b/packages/wow/src/tech-talent/tech-talent.ts index f0b701cd..73f0f384 100644 --- a/packages/wow/src/tech-talent/tech-talent.ts +++ b/packages/wow/src/tech-talent/tech-talent.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base, mediaBase } from '../base'; +import { wowBasePath, wowMediaBasePath } from '@blizzard-api/core'; import type { TechTalentIndexResponse, TechTalentMediaResponse, @@ -16,7 +16,7 @@ import type { export function techTalent(techTalentId: number): Resource { return { namespace: 'static', - path: `${base}/tech-talent/${techTalentId}`, + path: `${wowBasePath}/tech-talent/${techTalentId}`, }; } /** @@ -26,7 +26,7 @@ export function techTalent(techTalentId: number): Resource { export function techTalentIndex(): Resource { return { namespace: 'static', - path: `${base}/tech-talent/index`, + path: `${wowBasePath}/tech-talent/index`, }; } /** @@ -37,7 +37,7 @@ export function techTalentIndex(): Resource { export function techTalentMedia(techTalentId: number): Resource { return { namespace: 'static', - path: `${mediaBase}/tech-talent/${techTalentId}`, + path: `${wowMediaBasePath}/tech-talent/${techTalentId}`, }; } /** @@ -48,7 +48,7 @@ export function techTalentMedia(techTalentId: number): Resource { return { namespace: 'static', - path: `${base}/tech-talent-tree/${techTalentTreeId}`, + path: `${wowBasePath}/tech-talent-tree/${techTalentTreeId}`, }; } /** @@ -58,6 +58,6 @@ export function techTalentTree(techTalentTreeId: number): Resource { return { namespace: 'static', - path: `${base}/tech-talent-tree/index`, + path: `${wowBasePath}/tech-talent-tree/index`, }; } diff --git a/packages/wow/src/tech-talent/types.ts b/packages/wow/src/tech-talent/types.ts index e7a7f8d8..0ddc6e9f 100644 --- a/packages/wow/src/tech-talent/types.ts +++ b/packages/wow/src/tech-talent/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a tech talent index. diff --git a/packages/wow/src/title/title.test.ts b/packages/wow/src/title/title.test.ts index 26f41935..04ed9dfc 100644 --- a/packages/wow/src/title/title.test.ts +++ b/packages/wow/src/title/title.test.ts @@ -1,18 +1,18 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { title, titleIndex } from './title'; describe.concurrent('titleApi', () => { it('should return the correct path for title', ({ expect }) => { const titleId = 123; const resource = title(titleId); - expect(resource.path).toBe(`${base}/title/123`); + expect(resource.path).toBe(`${wowBasePath}/title/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for titleIndex', ({ expect }) => { const resource = titleIndex(); - expect(resource.path).toBe(`${base}/title/index`); + expect(resource.path).toBe(`${wowBasePath}/title/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/title/title.ts b/packages/wow/src/title/title.ts index e5608278..d17bf604 100644 --- a/packages/wow/src/title/title.ts +++ b/packages/wow/src/title/title.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { TitleIndexResponse, TitleResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { TitleIndexResponse, TitleResponse } from './types'; export function title(titleId: number): Resource { return { namespace: 'static', - path: `${base}/title/${titleId}`, + path: `${wowBasePath}/title/${titleId}`, }; } /** @@ -20,6 +20,6 @@ export function title(titleId: number): Resource { export function titleIndex(): Resource { return { namespace: 'static', - path: `${base}/title/index`, + path: `${wowBasePath}/title/index`, }; } diff --git a/packages/wow/src/title/types.ts b/packages/wow/src/title/types.ts index ab7fb129..e5184e84 100644 --- a/packages/wow/src/title/types.ts +++ b/packages/wow/src/title/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, NameId, NameIdKey, ResponseBase } from '../base'; +import type { GenderName, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a title index. diff --git a/packages/wow/src/toy/toy.test.ts b/packages/wow/src/toy/toy.test.ts index 4bcf5290..9b4510ed 100644 --- a/packages/wow/src/toy/toy.test.ts +++ b/packages/wow/src/toy/toy.test.ts @@ -1,18 +1,18 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { toy, toyIndex } from './toy'; describe.concurrent('toyApi', () => { it('should return the correct path for toy', ({ expect }) => { const toyId = 123; const resource = toy(toyId); - expect(resource.path).toBe(`${base}/toy/123`); + expect(resource.path).toBe(`${wowBasePath}/toy/123`); expect(resource.namespace).toBe('static'); }); it('should return the correct path for toyIndex', ({ expect }) => { const resource = toyIndex(); - expect(resource.path).toBe(`${base}/toy/index`); + expect(resource.path).toBe(`${wowBasePath}/toy/index`); expect(resource.namespace).toBe('static'); }); }); diff --git a/packages/wow/src/toy/toy.ts b/packages/wow/src/toy/toy.ts index 99a61215..fe25f9a4 100644 --- a/packages/wow/src/toy/toy.ts +++ b/packages/wow/src/toy/toy.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { ToyIndexResponse, ToyResponse } from './types'; /** @@ -10,7 +10,7 @@ import type { ToyIndexResponse, ToyResponse } from './types'; export function toy(toyId: number): Resource { return { namespace: 'static', - path: `${base}/toy/${toyId}`, + path: `${wowBasePath}/toy/${toyId}`, }; } /** @@ -20,6 +20,6 @@ export function toy(toyId: number): Resource { export function toyIndex(): Resource { return { namespace: 'static', - path: `${base}/toy/index`, + path: `${wowBasePath}/toy/index`, }; } diff --git a/packages/wow/src/toy/types.ts b/packages/wow/src/toy/types.ts index f0755ded..b0c73164 100644 --- a/packages/wow/src/toy/types.ts +++ b/packages/wow/src/toy/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '../base'; +import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a toy index. diff --git a/packages/wow/src/wow-token/types.ts b/packages/wow/src/wow-token/types.ts index 581b9c05..924c7635 100644 --- a/packages/wow/src/wow-token/types.ts +++ b/packages/wow/src/wow-token/types.ts @@ -1,4 +1,4 @@ -import type { ResponseBase } from '../base'; +import type { ResponseBase } from '@blizzard-api/core'; /** * The response for a WoW token. diff --git a/packages/wow/src/wow-token/wow-token.test.ts b/packages/wow/src/wow-token/wow-token.test.ts index e5419808..a3442434 100644 --- a/packages/wow/src/wow-token/wow-token.test.ts +++ b/packages/wow/src/wow-token/wow-token.test.ts @@ -1,11 +1,11 @@ +import { wowBasePath } from '@blizzard-api/core'; import { describe, it } from 'vitest'; -import { base } from '../base'; import { wowToken } from './wow-token'; describe.concurrent('wowTokenApi', () => { it('should return the wow token resource', ({ expect }) => { const resource = wowToken(); - expect(resource.path).toBe(`${base}/token/index`); + expect(resource.path).toBe(`${wowBasePath}/token/index`); expect(resource.namespace).toBe('dynamic'); }); }); diff --git a/packages/wow/src/wow-token/wow-token.ts b/packages/wow/src/wow-token/wow-token.ts index 4e2f6792..9b2ecbb6 100644 --- a/packages/wow/src/wow-token/wow-token.ts +++ b/packages/wow/src/wow-token/wow-token.ts @@ -1,5 +1,5 @@ import type { Resource } from '@blizzard-api/core'; -import { base } from '../base'; +import { wowBasePath } from '@blizzard-api/core'; import type { WowTokenResponse } from './types'; /** @@ -9,6 +9,6 @@ import type { WowTokenResponse } from './types'; export function wowToken(): Resource { return { namespace: 'dynamic', - path: `${base}/token/index`, + path: `${wowBasePath}/token/index`, }; } diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index 0ccb3532..24c80702 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -54,18 +54,24 @@ async function run(): Promise { for (const file of tsFiles) { try { - console.log('Generating schema for', path.relative(root, file)); + //console.log('Generating schema for', path.relative(root, file)); const content = await fs.readFile(file, 'utf8'); const generator = generate({ inputOutputMappings, keepComments: true, - skipParseJSDoc: true, + skipParseJSDoc: false, sourceText: content, }); const schema = generator.getZodSchemasFile(file); + if (generator.errors.length > 0) { + for (const error of generator.errors) { + console.error(error); + } + } + const parentName = path.basename(path.dirname(file)); // For the packages where we only handle `types.ts`, use the parent folder name as output file name. // E.g. `packages/wow/src/character-hunter-pets/types.ts` -> `generated/wow/character-hunter-pets.ts` @@ -73,7 +79,7 @@ async function run(): Promise { const outName = HANDLE_ALL_FILE_FOLDERS.has(packageName) ? path.basename(file) : `${parentName}.ts`; const outPath = path.join(packageOut, outName); await fs.writeFile(outPath, schema, 'utf8'); - console.log('Wrote', path.relative(root, outPath)); + //console.log('Wrote', path.relative(root, outPath)); } catch (error) { console.error('Failed to generate for', file, (error as Error)?.message ?? error); } From 1dbee36e7eac7a8136b56716fb0f47ca32e3dfcd Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 23:38:03 +0100 Subject: [PATCH 05/52] Export search/sort so they don't go unused --- generated/hs/card-backs.ts | 78 ++++++++++++++--------------- packages/hs/src/card-backs/types.ts | 9 ++-- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/generated/hs/card-backs.ts b/generated/hs/card-backs.ts index 5b33eff7..e9d34318 100644 --- a/generated/hs/card-backs.ts +++ b/generated/hs/card-backs.ts @@ -2,44 +2,6 @@ import { z } from 'zod'; import { localesSchema } from '../core'; -const searchSortOptionSchema = z.union([ - z.literal('attack:asc'), - z.literal('attack:desc'), - z.literal('class:asc'), - z.literal('class:desc'), - z.literal('dataAdded:asc'), - z.literal('dataAdded:desc'), - z.literal('groupByClass:asc'), - z.literal('groupByClass:desc'), - z.literal('health:asc'), - z.literal('health:desc'), - z.literal('manaCost:asc'), - z.literal('manaCost:desc'), - z.literal('name:asc'), - z.literal('name:desc'), -]); - -export const singleCardBackSearchResponseSchema = z.object({ - id: z.number(), - image: z.string(), - name: z.union([z.record(localesSchema, z.string()), z.string()]), - slug: z.string(), - sortCategory: z.number(), - text: z.union([z.record(localesSchema, z.string()), z.string()]), -}); - -const searchOptionsSchema = z.union([ - z.literal('attack'), - z.literal('class'), - z.literal('dataAdded'), - z.literal('groupByClass'), - z.literal('health'), - z.literal('manaCost'), - z.literal('name'), -]); - -const sortOptionsSchema = z.union([z.literal('asc'), z.literal('desc')]); - export const cardBackSearchParametersSchema = z.object({ cardBackCategory: z .union([ @@ -61,10 +23,48 @@ export const cardBackSearchParametersSchema = z.object({ locale: localesSchema.optional(), page: z.number().optional(), pageSize: z.number().optional(), - sort: searchSortOptionSchema.optional(), + sort: z + .union([ + z.literal('attack:asc'), + z.literal('attack:desc'), + z.literal('class:asc'), + z.literal('class:desc'), + z.literal('dataAdded:asc'), + z.literal('dataAdded:desc'), + z.literal('groupByClass:asc'), + z.literal('groupByClass:desc'), + z.literal('health:asc'), + z.literal('health:desc'), + z.literal('manaCost:asc'), + z.literal('manaCost:desc'), + z.literal('name:asc'), + z.literal('name:desc'), + ]) + .optional(), textFilter: z.string().optional(), }); +export const singleCardBackSearchResponseSchema = z.object({ + id: z.number(), + image: z.string(), + name: z.union([z.record(localesSchema, z.string()), z.string()]), + slug: z.string(), + sortCategory: z.number(), + text: z.union([z.record(localesSchema, z.string()), z.string()]), +}); + +export const searchOptionsSchema = z.union([ + z.literal('attack'), + z.literal('class'), + z.literal('dataAdded'), + z.literal('groupByClass'), + z.literal('health'), + z.literal('manaCost'), + z.literal('name'), +]); + +export const sortOptionsSchema = z.union([z.literal('asc'), z.literal('desc')]); + export const cardBackSearchResponseSchema = z.object({ cardBacks: z.array(singleCardBackSearchResponseSchema), cardCount: z.number(), diff --git a/packages/hs/src/card-backs/types.ts b/packages/hs/src/card-backs/types.ts index 5216eea1..bc1b0acb 100644 --- a/packages/hs/src/card-backs/types.ts +++ b/packages/hs/src/card-backs/types.ts @@ -18,7 +18,7 @@ export interface CardBackSearchParameters { locale?: Locales; page?: number; pageSize?: number; - sort?: SearchSortOption; + sort?: `${SearchOptions}:${SortOptions}`; textFilter?: string; } @@ -29,6 +29,8 @@ export interface CardBackSearchResponse { pageCount: number; } +export type SearchOptions = 'attack' | 'class' | 'dataAdded' | 'groupByClass' | 'health' | 'manaCost' | 'name'; + export interface SingleCardBackSearchResponse { id: number; image: string; @@ -37,7 +39,4 @@ export interface SingleCardBackSearchResponse { sortCategory: number; text: Record | string; } - -type SearchOptions = 'attack' | 'class' | 'dataAdded' | 'groupByClass' | 'health' | 'manaCost' | 'name'; -type SearchSortOption = `${SearchOptions}:${SortOptions}`; -type SortOptions = 'asc' | 'desc'; +export type SortOptions = 'asc' | 'desc'; From cdb802d363250adac777593651dcc3a0f76bcf20 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 23:39:34 +0100 Subject: [PATCH 06/52] Remove tsdoc comments --- generated/classic-wow/character-profile.ts | 2 - generated/classic-wow/playable-class.ts | 4 -- generated/core/base.ts | 46 -------------------- generated/core/locales.ts | 6 --- generated/core/namespace.ts | 4 -- generated/wow/achievements.ts | 20 --------- generated/wow/auction-house.ts | 8 ---- generated/wow/azerite-essence.ts | 22 ---------- generated/wow/connected-realm.ts | 18 -------- generated/wow/covenant.ts | 28 ------------ generated/wow/creature.ts | 38 ---------------- generated/wow/guild-crest.ts | 8 ---- generated/wow/heirloom.ts | 8 ---- generated/wow/item.ts | 38 ---------------- generated/wow/journal.ts | 38 ---------------- generated/wow/media-search.ts | 10 ----- generated/wow/modified-crafting.ts | 20 --------- generated/wow/mount.ts | 18 -------- generated/wow/mythic-keystone-affix.ts | 12 ----- generated/wow/mythic-keystone-dungeon.ts | 28 ------------ generated/wow/mythic-keystone-leaderboard.ts | 8 ---- generated/wow/mythic-raid-leaderboard.ts | 4 -- generated/wow/pet.ts | 24 ---------- generated/wow/playable-class.ts | 16 ------- generated/wow/playable-race.ts | 8 ---- generated/wow/playable-specialization.ts | 12 ----- generated/wow/power-type.ts | 8 ---- generated/wow/profession.ts | 24 ---------- generated/wow/pvp-season.ts | 20 --------- generated/wow/pvp-tier.ts | 12 ----- generated/wow/quest.ts | 32 -------------- generated/wow/realm.ts | 31 ------------- generated/wow/region.ts | 8 ---- generated/wow/reputations.ts | 16 ------- generated/wow/spell.ts | 18 -------- generated/wow/talent.ts | 28 ------------ generated/wow/tech-talent.ts | 20 --------- generated/wow/title.ts | 8 ---- generated/wow/toy.ts | 8 ---- generated/wow/wow-token.ts | 4 -- scripts/generate-zod.ts | 2 +- 41 files changed, 1 insertion(+), 686 deletions(-) diff --git a/generated/classic-wow/character-profile.ts b/generated/classic-wow/character-profile.ts index 9994b86c..d540648e 100644 --- a/generated/classic-wow/character-profile.ts +++ b/generated/classic-wow/character-profile.ts @@ -26,9 +26,7 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ gender: genderSchema, guild: guildSchema, id: z.number(), - //Hardcore only is_ghost: z.boolean().optional(), - //Hardcore only is_self_found: z.boolean().optional(), last_login_timestamp: z.number(), level: z.number(), diff --git a/generated/classic-wow/playable-class.ts b/generated/classic-wow/playable-class.ts index 55e770df..b710d1cb 100644 --- a/generated/classic-wow/playable-class.ts +++ b/generated/classic-wow/playable-class.ts @@ -6,10 +6,6 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a playable class. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft-classic/game-data-apis} - */ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_name: genderNameSchema, media: mediaSchema, diff --git a/generated/core/base.ts b/generated/core/base.ts index 8eccad5a..bbfb110d 100644 --- a/generated/core/base.ts +++ b/generated/core/base.ts @@ -1,24 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; -/** - * Base search parameters - * orderby The field to order results by. - * _page The page number to return. - * @example - * const params: BaseSearchParameters = { - * orderby: 'name', - * _page: 1, - * }; - */ export const baseSearchParametersSchema = z.object({ _page: z.number().optional(), orderby: z.union([z.array(z.string()), z.string()]).optional(), }); -/** - * A record containing the RGBA values of a color. - */ export const colorSchema = z.object({ a: z.number(), b: z.number(), @@ -26,22 +13,13 @@ export const colorSchema = z.object({ r: z.number(), }); -/** - * The playable factions in World of Warcraft. - */ export const factionsSchema = z.union([z.literal('ALLIANCE'), z.literal('HORDE')]); -/** - * The gender associated with a character or entity in World of Warcraft. - */ export const genderSchema = z.object({ name: z.union([z.literal('Female'), z.literal('Male')]), type: z.union([z.literal('FEMALE'), z.literal('MALE')]), }); -/** - * The playable gender names/descriptions in World of Warcraft. - */ export const genderNameSchema = z.object({ female: z.string(), male: z.string(), @@ -51,61 +29,37 @@ export const hrefSchema = z.object({ href: z.string(), }); -/** - * Base record interface containing key.href property that often appear in Blizzard API responses. - */ export const keyBaseSchema = z.object({ key: hrefSchema, }); -/** - * The media asset associated with a character or entity in World of Warcraft. - */ export const mediaAssetSchema = z.object({ file_data_id: z.number(), key: z.string(), value: z.string(), }); -/** - * Base record interface containing name and id properties that often appear together in Blizzard API responses. - */ export const nameIdSchema = z.object({ id: z.number(), name: z.string(), }); -/** - * Base record containing both {@link KeyBase} and {@link NameId} interfaces. - */ export const nameIdKeySchema = keyBaseSchema.extend(nameIdSchema.shape); -/** - * The standard structure to represent a World of Warcraft Realm. - */ export const realmSchema = nameIdKeySchema.extend({ slug: z.string(), }); -/** - * Base interface for Blizzard API responses. - */ export const responseBaseSchema = z.object({ _links: z.object({ self: hrefSchema, }), }); -/** - * The standard structure to represent a World of Warcraft Character. - */ export const characterSchema = nameIdKeySchema.extend({ realm: realmSchema, }); -/** - * The faction associated with a character or entity in World of Warcraft. - */ export const factionSchema = z.object({ name: z.union([z.literal('Alliance'), z.literal('Horde')]), type: factionsSchema, diff --git a/generated/core/locales.ts b/generated/core/locales.ts index 847ddb50..14dd0b57 100644 --- a/generated/core/locales.ts +++ b/generated/core/locales.ts @@ -1,9 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -/** - * Possible locales for use within the Blizzard API. - */ export const localesSchema = z.union([ z.literal('de_DE'), z.literal('en_GB'), @@ -21,9 +18,6 @@ export const localesSchema = z.union([ z.literal('zh_TW'), ]); -/** - * Possible regions for use within the Blizzard API. - */ export const originsSchema = z.union([ z.literal('cn'), z.literal('eu'), diff --git a/generated/core/namespace.ts b/generated/core/namespace.ts index 64436710..763856ec 100644 --- a/generated/core/namespace.ts +++ b/generated/core/namespace.ts @@ -1,10 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -/** - * Blizzard API namespaces. - * @see https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces - */ export const blizzardNamespacesSchema = z.union([ z.literal('dynamic'), z.literal('dynamic-classic1x'), diff --git a/generated/wow/achievements.ts b/generated/wow/achievements.ts index 0a834e53..db4bc48b 100644 --- a/generated/wow/achievements.ts +++ b/generated/wow/achievements.ts @@ -2,20 +2,12 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * Interface for a response from the achievement category index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const achievementCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array(nameIdKeySchema), guild_categories: z.array(nameIdKeySchema), root_categories: z.array(nameIdKeySchema), }); -/** - * Interface for a response from the achievement category endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const achievementCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ achievements: z.array(nameIdKeySchema), aggregates_by_faction: z.object({ @@ -33,10 +25,6 @@ export const achievementCategoryResponseSchema = nameIdSchema.extend(responseBas parent_category: nameIdKeySchema, }); -/** - * Interface for a response from the achievement index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const achievementIndexResponseSchema = responseBaseSchema.extend({ achievements: z.array(nameIdKeySchema), }); @@ -47,10 +35,6 @@ const achievementMediaItemSchema = z.object({ value: z.string(), }); -/** - * Interface for a response from the achievement endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: nameIdKeySchema, criteria: z.object({ @@ -65,10 +49,6 @@ export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema. points: z.number(), }); -/** - * Interface for a response from the achievement media endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const achievementMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(achievementMediaItemSchema), id: z.number(), diff --git a/generated/wow/auction-house.ts b/generated/wow/auction-house.ts index 144c189c..d012869d 100644 --- a/generated/wow/auction-house.ts +++ b/generated/wow/auction-house.ts @@ -38,10 +38,6 @@ const auctionHouseCommoditySchema = z.object({ unit_price: z.number(), }); -/** - * Interface for a response from the auction house endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const auctionHouseResponseSchema = responseBaseSchema.extend({ auctions: z.array(auctionHousePostingSchema), commodities: z.object({ @@ -52,10 +48,6 @@ export const auctionHouseResponseSchema = responseBaseSchema.extend({ }), }); -/** - * Interface for a response from the auction house commodities endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const auctionHouseCommoditiesResponseSchema = responseBaseSchema.extend({ auctions: z.array(auctionHouseCommoditySchema), }); diff --git a/generated/wow/azerite-essence.ts b/generated/wow/azerite-essence.ts index 8421a045..f5d580bd 100644 --- a/generated/wow/azerite-essence.ts +++ b/generated/wow/azerite-essence.ts @@ -10,18 +10,10 @@ import { responseBaseSchema, } from '../core'; -/** - * Interface for a response from the azerite essence index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const azeriteEssenceIndexResponseSchema = responseBaseSchema.extend({ azerite_essences: z.array(nameIdKeySchema), }); -/** - * Interface for a response from the azerite essence media endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const azeriteEssenceMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -38,20 +30,10 @@ const powerSchema = z.object({ rank: z.number(), }); -/** - * Interface for search parameters for azerite essences. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.extend({ 'allowed_specializations.id': z.number().optional(), }); -/** - * Interface for a response item from the azerite essence search endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ allowed_specializations: z.array(nameIdSchema), @@ -59,10 +41,6 @@ export const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * Interface for a response from the azerite essence endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const azeriteEssenceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ allowed_specializations: z.array(nameIdKeySchema), media: mediaSchema, diff --git a/generated/wow/connected-realm.ts b/generated/wow/connected-realm.ts index ef40a7ae..61c7274b 100644 --- a/generated/wow/connected-realm.ts +++ b/generated/wow/connected-realm.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * Connected Realm Index API response. - * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis - */ export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ connected_realms: z.array( z.object({ @@ -69,11 +65,6 @@ const realmSchema = z.object({ }), }); -/** - * Connected Realm Search API parameters. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.extend({ 'realms.timezone': realmTimezoneSchema.optional(), 'status.type': realmStatusCapitalizedSchema.optional(), @@ -97,10 +88,6 @@ const searchRealmSchema = z.object({ }), }); -/** - * Connected Realm API response. - * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis - */ export const connectedRealmResponseSchema = responseBaseSchema.extend({ auctions: z.object({ href: z.string(), @@ -128,11 +115,6 @@ export const connectedRealmResponseSchema = responseBaseSchema.extend({ }), }); -/** - * Connected Realm Search API response item. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ has_queue: z.boolean(), diff --git a/generated/wow/covenant.ts b/generated/wow/covenant.ts index ed61524e..110fc5d0 100644 --- a/generated/wow/covenant.ts +++ b/generated/wow/covenant.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * Interface for a response from the conduit index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const conduitIndexResponseSchema = responseBaseSchema.extend({ conduits: z.array(nameIdKeySchema), }); @@ -19,10 +15,6 @@ const socketTypeSchema = z.object({ type: z.string(), }); -/** - * Interface for a response from the covenant index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const covenantIndexResponseSchema = responseBaseSchema.extend({ covenants: z.array(nameIdKeySchema), }); @@ -36,10 +28,6 @@ const renownRewardSchema = z.object({ reward: nameIdKeySchema, }); -/** - * Interface for a response from the covenant endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const covenantResponseSchema = responseBaseSchema.extend({ description: z.string(), id: z.number(), @@ -47,18 +35,10 @@ export const covenantResponseSchema = responseBaseSchema.extend({ renown_rewards: z.array(renownRewardSchema), }); -/** - * Interface for a response from the soulbind index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const soulbindIndexResponseSchema = responseBaseSchema.extend({ soulbinds: z.array(nameIdKeySchema), }); -/** - * Interface for a response from the soulbind endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const soulbindResponseSchema = responseBaseSchema.extend({ covenant: nameIdKeySchema, creature: nameIdKeySchema, @@ -107,10 +87,6 @@ const signatureAbilitySchema = z.object({ spell_tooltip: signatureAbilitySpellTooltipSchema, }); -/** - * Interface for a response from the conduit endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const conduitResponseSchema = responseBaseSchema.extend({ id: z.number(), item: itemSchema, @@ -119,10 +95,6 @@ export const conduitResponseSchema = responseBaseSchema.extend({ socket_type: socketTypeSchema, }); -/** - * Interface for a response from the covenant media endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const covenantMediaResponseSchema = responseBaseSchema.extend({ class_abilities: z.array(classAbilitySchema), description: z.string(), diff --git a/generated/wow/creature.ts b/generated/wow/creature.ts index abff31b2..47baf0ea 100644 --- a/generated/wow/creature.ts +++ b/generated/wow/creature.ts @@ -14,18 +14,10 @@ const displayMediaAssetSchema = z.object({ value: z.string(), }); -/** - * The response for a creature family index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureFamilyIndexResponseSchema = responseBaseSchema.extend({ creature_families: z.array(nameIdKeySchema), }); -/** - * The response for creature family media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureFamilyMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -39,21 +31,11 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The search parameters for a creature. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ locale: localesSchema, name: z.string(), }); -/** - * The response for a creature search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ creature_displays: z.array( @@ -77,36 +59,20 @@ export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for a creature type index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureTypeIndexResponseSchema = responseBaseSchema.extend({ creature_types: z.array(nameIdKeySchema), }); -/** - * The response for a creature type. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureTypeResponseSchema = responseBaseSchema.extend({ id: z.number(), name: z.string(), }); -/** - * The response for creature display media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(displayMediaAssetSchema), id: z.number(), }); -/** - * The response for a creature family. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureFamilyResponseSchema = responseBaseSchema.extend({ id: z.number(), media: mediaSchema, @@ -114,10 +80,6 @@ export const creatureFamilyResponseSchema = responseBaseSchema.extend({ specialization: nameIdKeySchema, }); -/** - * The response for a creature. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const creatureResponseSchema = responseBaseSchema.extend({ creature_displays: z.array(creatureDisplaySchema), family: nameIdKeySchema, diff --git a/generated/wow/guild-crest.ts b/generated/wow/guild-crest.ts index d740e8cb..4b5a6f17 100644 --- a/generated/wow/guild-crest.ts +++ b/generated/wow/guild-crest.ts @@ -23,10 +23,6 @@ const backgroundSchema = z.object({ rgba: rgbaSchema, }); -/** - * The response for a guild crest border or emblem. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ assets: z.array(guildCrestAssetSchema), id: z.number(), @@ -43,10 +39,6 @@ const colorsSchema = z.object({ emblems: z.array(backgroundSchema), }); -/** - * The response for the guild crest components index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const guildCrestComponentsIndexResponseSchema = responseBaseSchema.extend({ borders: z.array(borderSchema), colors: colorsSchema, diff --git a/generated/wow/heirloom.ts b/generated/wow/heirloom.ts index 5301ce74..6e3e3f78 100644 --- a/generated/wow/heirloom.ts +++ b/generated/wow/heirloom.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * The response for the heirloom index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const heirloomIndexResponseSchema = responseBaseSchema.extend({ heirlooms: z.array(nameIdKeySchema), }); @@ -86,10 +82,6 @@ const upgradeSchema = z.object({ level: z.number(), }); -/** - * The response for a heirloom. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const heirloomResponseSchema = responseBaseSchema.extend({ id: z.number(), item: nameIdKeySchema, diff --git a/generated/wow/item.ts b/generated/wow/item.ts index b06a80d3..681fd94f 100644 --- a/generated/wow/item.ts +++ b/generated/wow/item.ts @@ -11,28 +11,16 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for an item class index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemClassIndexResponseSchema = responseBaseSchema.extend({ item_classes: z.array(nameIdKeySchema), }); -/** - * The response for an item class. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemClassResponseSchema = responseBaseSchema.extend({ class_id: z.number(), item_subclasses: z.array(nameIdKeySchema), name: z.string(), }); -/** - * The response for an item media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -79,21 +67,11 @@ const itemQualitySchema = z.object({ ]), }); -/** - * The parameters for an item search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ locale: localesSchema, name: z.string(), }); -/** - * The response for an item search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const itemSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ id: z.number(), @@ -122,10 +100,6 @@ export const itemSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for an item set index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemSetIndexResponseSchema = responseBaseSchema.extend({ item_sets: z.array(nameIdKeySchema), }); @@ -135,10 +109,6 @@ const effectSchema = z.object({ required_count: z.number(), }); -/** - * The response for an item subclass. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemSubClassResponseSchema = responseBaseSchema.extend({ class_id: z.number(), display_name: z.string(), @@ -216,10 +186,6 @@ const statTypeCapitalizedSchema = z.union([ z.literal('VERSATILITY'), ]); -/** - * The response for an item set. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemSetResponseSchema = responseBaseSchema.extend({ effects: z.array(effectSchema), id: z.number(), @@ -306,10 +272,6 @@ const previewItemSchema = z.object({ weapon: weaponSchema.optional(), }); -/** - * The response for an item. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const itemResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ description: z.string().optional(), inventory_type: inventoryTypeSchema, diff --git a/generated/wow/journal.ts b/generated/wow/journal.ts index 24fc284b..3e598a86 100644 --- a/generated/wow/journal.ts +++ b/generated/wow/journal.ts @@ -10,10 +10,6 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for a journal encounter index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ encounters: z.array(nameIdKeySchema), }); @@ -23,11 +19,6 @@ const itemSchema = z.object({ item: nameIdKeySchema, }); -/** - * The parameters for a journal encounter search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const journalEncounterSearchParametersSchema = baseSearchParametersSchema.extend({ instanceName: z.string(), locale: localesSchema, @@ -51,27 +42,15 @@ const journalEncounterSearchItemSchema = z.object({ const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); -/** - * The response for a journal expansion index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ tiers: z.array(nameIdKeySchema), }); -/** - * The response for a journal expansion. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalExpansionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ dungeons: z.array(nameIdKeySchema), raids: z.array(nameIdKeySchema), }); -/** - * The response for a journal instance index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ instances: z.array(nameIdKeySchema), }); @@ -137,10 +116,6 @@ const creatureSchema = nameIdSchema.extend({ description: z.string().optional(), }); -/** - * The response for journal instance media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalInstanceMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(assetSchema), }); @@ -160,10 +135,6 @@ const journalSubSection3Schema = z.object({ title: z.string(), }); -/** - * The response for a journal instance. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalInstanceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ area: nameIdSchema, category: categorySchema, @@ -205,11 +176,6 @@ const journalSectionSchema = z.object({ title: z.string(), }); -/** - * The response for a journal encounter search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ category: categorySchema, @@ -233,10 +199,6 @@ export const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for a journal encounter. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const journalEncounterResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: categorySchema, creatures: z.array(creatureSchema), diff --git a/generated/wow/media-search.ts b/generated/wow/media-search.ts index 2c40e301..5e070ab0 100644 --- a/generated/wow/media-search.ts +++ b/generated/wow/media-search.ts @@ -2,11 +2,6 @@ import { z } from 'zod'; import { baseSearchParametersSchema, keyBaseSchema } from '../core'; -/** - * The search parameters for media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); @@ -17,11 +12,6 @@ const mediaAssetSchema = z.object({ value: z.string(), }); -/** - * The response for a media search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ assets: z.array(mediaAssetSchema), diff --git a/generated/wow/modified-crafting.ts b/generated/wow/modified-crafting.ts index 604bdc4e..591b20b1 100644 --- a/generated/wow/modified-crafting.ts +++ b/generated/wow/modified-crafting.ts @@ -2,24 +2,12 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a modified crafting category index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const modifiedCraftingCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array(nameIdKeySchema), }); -/** - * The response for a modified crafting category. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const modifiedCraftingCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); -/** - * The response for a modified crafting index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const modifiedCraftingIndexResponseSchema = responseBaseSchema.extend({ categories: z.object({ href: z.string(), @@ -34,20 +22,12 @@ const slotTypeSchema = keyBaseSchema.extend({ name: z.string().optional(), }); -/** - * The response for a modified crafting reagent slot type. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const modifiedCraftingReagentSlotTypeResponseSchema = responseBaseSchema.extend({ compatible_categories: z.array(nameIdKeySchema), description: z.string(), id: z.number(), }); -/** - * The response for a modified crafting reagent slot type index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const modifiedCraftingReagentSlotTypeIndexResponseSchema = responseBaseSchema.extend({ slot_types: z.array(slotTypeSchema), }); diff --git a/generated/wow/mount.ts b/generated/wow/mount.ts index adbea505..c1d1a68b 100644 --- a/generated/wow/mount.ts +++ b/generated/wow/mount.ts @@ -9,10 +9,6 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for a mount index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mountIndexResponseSchema = responseBaseSchema.extend({ mounts: z.array(nameIdKeySchema), }); @@ -26,21 +22,11 @@ const sourceSchema = z.object({ type: z.string(), }); -/** - * The search parameters for mounts. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ locale: localesSchema, name: z.string(), }); -/** - * The response for a mount search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const mountSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ creature_displays: z.array( @@ -63,10 +49,6 @@ export const mountSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for a mount. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mountResponseSchema = responseBaseSchema.extend({ creature_displays: z.array(creatureDisplaySchema), description: z.string(), diff --git a/generated/wow/mythic-keystone-affix.ts b/generated/wow/mythic-keystone-affix.ts index 47b7e309..a0059956 100644 --- a/generated/wow/mythic-keystone-affix.ts +++ b/generated/wow/mythic-keystone-affix.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a Mythic Keystone affix index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneAffixIndexResponseSchema = responseBaseSchema.extend({ affixes: z.array(nameIdKeySchema), }); -/** - * The response for a Mythic Keystone affix media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneAffixMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -23,10 +15,6 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a Mythic Keystone affix. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneAffixResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ description: z.string(), media: mediaSchema, diff --git a/generated/wow/mythic-keystone-dungeon.ts b/generated/wow/mythic-keystone-dungeon.ts index a99b3c52..84e69cd1 100644 --- a/generated/wow/mythic-keystone-dungeon.ts +++ b/generated/wow/mythic-keystone-dungeon.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a Mythic Keystone dungeon index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneDungeonIndexResponseSchema = responseBaseSchema.extend({ dungeons: z.array(nameIdKeySchema), }); @@ -19,10 +15,6 @@ const zoneSchema = z.object({ slug: z.string(), }); -/** - * The response for a Mythic Keystone index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneIndexResponseSchema = responseBaseSchema.extend({ dungeons: z.object({ href: z.string(), @@ -36,29 +28,17 @@ const periodSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a Mythic Keystone period. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystonePeriodResponseSchema = responseBaseSchema.extend({ end_timestamp: z.number(), id: z.number(), start_timestamp: z.number(), }); -/** - * The response for a Mythic Keystone season index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneSeasonIndexResponseSchema = responseBaseSchema.extend({ current_season: periodSchema, seasons: z.array(periodSchema), }); -/** - * The response for a Mythic Keystone season. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneSeasonResponseSchema = responseBaseSchema.extend({ end_timestamp: z.number(), id: z.number(), @@ -67,10 +47,6 @@ export const mythicKeystoneSeasonResponseSchema = responseBaseSchema.extend({ start_timestamp: z.number(), }); -/** - * The response for a Mythic Keystone dungeon. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneDungeonResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ dungeon: nameIdKeySchema, is_tracked: z.boolean(), @@ -79,10 +55,6 @@ export const mythicKeystoneDungeonResponseSchema = nameIdSchema.extend(responseB zone: zoneSchema, }); -/** - * The response for a Mythic Keystone period index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystonePeriodIndexResponseSchema = responseBaseSchema.extend({ current_period: periodSchema, periods: z.array(periodSchema), diff --git a/generated/wow/mythic-keystone-leaderboard.ts b/generated/wow/mythic-keystone-leaderboard.ts index 9ce5d972..df3cc1d6 100644 --- a/generated/wow/mythic-keystone-leaderboard.ts +++ b/generated/wow/mythic-keystone-leaderboard.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { colorSchema, factionsSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a Mythic Keystone leaderboard index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneLeaderboardIndexResponseSchema = responseBaseSchema.extend({ current_leaderboards: z.array(nameIdKeySchema), }); @@ -50,10 +46,6 @@ const leadingGroupSchema = z.object({ ranking: z.number(), }); -/** - * The response for a Mythic Keystone leaderboard. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicKeystoneLeaderboardResponseSchema = responseBaseSchema.extend({ connected_realm: z.object({ href: z.string(), diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/wow/mythic-raid-leaderboard.ts index abf4b448..d7a97a5a 100644 --- a/generated/wow/mythic-raid-leaderboard.ts +++ b/generated/wow/mythic-raid-leaderboard.ts @@ -27,10 +27,6 @@ const entrySchema = z.object({ timestamp: z.number(), }); -/** - * The response for a Mythic Raid leaderboard. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const mythicRaidLeaderboardResponseSchema = responseBaseSchema.extend({ criteria_type: z.string(), entries: z.array(entrySchema), diff --git a/generated/wow/pet.ts b/generated/wow/pet.ts index 109ada3d..2171e7da 100644 --- a/generated/wow/pet.ts +++ b/generated/wow/pet.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a pet ability index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petAbilityIndexResponseSchema = responseBaseSchema.extend({ abilities: z.array(nameIdKeySchema), }); -/** - * The response for a pet ability media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petAbilityMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -27,18 +19,10 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a pet index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petIndexResponseSchema = responseBaseSchema.extend({ pets: z.array(nameIdKeySchema), }); -/** - * The response for a pet search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -55,20 +39,12 @@ const sourceSchema = z.object({ type: z.string(), }); -/** - * The response for a pet ability. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petAbilityResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ battle_pet_type: battlePetTypeSchema, media: mediaSchema, rounds: z.number(), }); -/** - * The response for a pet. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const petResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ abilities: z.array(abilitySchema), battle_pet_type: battlePetTypeSchema, diff --git a/generated/wow/playable-class.ts b/generated/wow/playable-class.ts index 771f9753..b5a9d750 100644 --- a/generated/wow/playable-class.ts +++ b/generated/wow/playable-class.ts @@ -9,18 +9,10 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for a playable class index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableClassIndexResponseSchema = responseBaseSchema.extend({ classes: z.array(nameIdKeySchema), }); -/** - * The response for playable class media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableClassMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -35,10 +27,6 @@ const talentSlotSchema = z.object({ unlock_player_level: z.number(), }); -/** - * The response for a playable class. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_name: genderNameSchema, media: mediaSchema, @@ -50,10 +38,6 @@ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchem specializations: z.array(nameIdKeySchema), }); -/** - * The response for a playable class's PvP talent slots. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTalentSlotsResponseSchema = responseBaseSchema.extend({ talent_slots: z.array(talentSlotSchema), }); diff --git a/generated/wow/playable-race.ts b/generated/wow/playable-race.ts index cd0fe608..bae69103 100644 --- a/generated/wow/playable-race.ts +++ b/generated/wow/playable-race.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { factionSchema, genderNameSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The playable race index response. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableRaceIndexResponseSchema = responseBaseSchema.extend({ races: z.array(nameIdKeySchema), }); -/** - * The playable race response. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableRaceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ faction: factionSchema, gender_name: genderNameSchema, diff --git a/generated/wow/playable-specialization.ts b/generated/wow/playable-specialization.ts index 0b96e33d..c3eee3b5 100644 --- a/generated/wow/playable-specialization.ts +++ b/generated/wow/playable-specialization.ts @@ -9,19 +9,11 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for a playable specialization index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableSpecializationIndexResponseSchema = responseBaseSchema.extend({ character_specializations: z.array(nameIdKeySchema), pet_specializations: z.array(nameIdKeySchema), }); -/** - * The response for a playable specialization media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableSpecializationMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -53,10 +45,6 @@ const pvpTalentSchema = z.object({ talent: nameIdKeySchema, }); -/** - * The response for a playable specialization. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const playableSpecializationResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_description: genderNameSchema, media: mediaSchema, diff --git a/generated/wow/power-type.ts b/generated/wow/power-type.ts index 1292be49..4278ddab 100644 --- a/generated/wow/power-type.ts +++ b/generated/wow/power-type.ts @@ -2,16 +2,8 @@ import { z } from 'zod'; import { nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a power type index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const powerTypeIndexResponseSchema = responseBaseSchema.extend({ power_types: z.array(nameIdKeySchema), }); -/** - * The response for a power type. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const powerTypeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); diff --git a/generated/wow/profession.ts b/generated/wow/profession.ts index 4529231b..812c7a58 100644 --- a/generated/wow/profession.ts +++ b/generated/wow/profession.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a profession index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const professionIndexResponseSchema = responseBaseSchema.extend({ professions: z.array(nameIdKeySchema), }); -/** - * The response for a profession media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const professionMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -33,10 +25,6 @@ const categorySchema = z.object({ recipes: z.array(nameIdKeySchema), }); -/** - * The response for a recipe media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const recipeMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -51,10 +39,6 @@ const reagentSchema = z.object({ reagent: nameIdKeySchema, }); -/** - * The response for a profession. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const professionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ description: z.string(), media: mediaSchema, @@ -62,20 +46,12 @@ export const professionResponseSchema = nameIdSchema.extend(responseBaseSchema.s type: typeSchema, }); -/** - * The response for a profession skill tier. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const professionSkillTierResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ categories: z.array(categorySchema), maximum_skill_level: z.number(), minimum_skill_level: z.number(), }); -/** - * The response for a recipe. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const recipeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ crafted_item: nameIdKeySchema, crafted_quantity: craftedQuantitySchema, diff --git a/generated/wow/pvp-season.ts b/generated/wow/pvp-season.ts index 08d8a031..3af384d7 100644 --- a/generated/wow/pvp-season.ts +++ b/generated/wow/pvp-season.ts @@ -26,19 +26,11 @@ const rewardSchema = z.object({ specialization: nameIdKeySchema.optional(), }); -/** - * The response for a PvP season index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpSeasonIndexResponseSchema = responseBaseSchema.extend({ current_season: seasonSchema, seasons: z.array(seasonSchema), }); -/** - * The response for a PvP season. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpSeasonResponseSchema = responseBaseSchema.extend({ id: z.number(), leaderboards: z.object({ @@ -66,10 +58,6 @@ const seasonMatchStatisticsSchema = z.object({ won: z.number(), }); -/** - * The response for a PvP leaderboard index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpLeaderboardIndexResponseSchema = responseBaseSchema.extend({ leaderboards: z.array(nameIdKeySchema), season: seasonSchema, @@ -86,19 +74,11 @@ const entrySchema = z.object({ tier: seasonSchema, }); -/** - * The response for PvP rewards index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpRewardsIndexResponseSchema = responseBaseSchema.extend({ rewards: z.array(rewardSchema), season: seasonSchema, }); -/** - * The response for a PvP leaderboard. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpLeaderboardResponseSchema = responseBaseSchema.extend({ bracket: bracketSchema, entries: z.array(entrySchema), diff --git a/generated/wow/pvp-tier.ts b/generated/wow/pvp-tier.ts index 600a5fc8..25b72df8 100644 --- a/generated/wow/pvp-tier.ts +++ b/generated/wow/pvp-tier.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a PvP tier index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTierIndexResponseSchema = responseBaseSchema.extend({ tiers: z.array(nameIdKeySchema), }); -/** - * The response for a PvP tier media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTierMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -28,10 +20,6 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The response for a PvP tier. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTierResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ bracket: bracketSchema, max_rating: z.number(), diff --git a/generated/wow/quest.ts b/generated/wow/quest.ts index 6d0ac64e..49f638fb 100644 --- a/generated/wow/quest.ts +++ b/generated/wow/quest.ts @@ -2,46 +2,26 @@ import { z } from 'zod'; import { factionSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * The response for a quest area index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questAreaIndexResponseSchema = responseBaseSchema.extend({ areas: z.array(nameIdKeySchema), }); -/** - * The response for a quest area. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questAreaResponseSchema = responseBaseSchema.extend({ area: z.string(), id: z.number(), quests: z.array(nameIdKeySchema), }); -/** - * The response for a quest category index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array(nameIdKeySchema), }); -/** - * The response for a quest category. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questCategoryResponseSchema = responseBaseSchema.extend({ category: z.string(), id: z.number(), quests: z.array(nameIdKeySchema), }); -/** - * The response for a quest index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questIndexResponseSchema = responseBaseSchema.extend({ areas: z.object({ href: z.string(), @@ -60,18 +40,10 @@ const requirementsSchema = z.object({ min_character_level: z.number(), }); -/** - * The response for a quest type index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questTypeIndexResponseSchema = responseBaseSchema.extend({ types: z.array(nameIdKeySchema), }); -/** - * The response for a quest type. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questTypeResponseSchema = responseBaseSchema.extend({ id: z.number(), quests: z.array(nameIdKeySchema), @@ -100,10 +72,6 @@ const rewardsSchema = z.object({ reputations: z.array(reputationSchema), }); -/** - * The response for a quest. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const questResponseSchema = responseBaseSchema.extend({ area: nameIdKeySchema, description: z.string(), diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts index 7e34574b..5e7e3edd 100644 --- a/generated/wow/realm.ts +++ b/generated/wow/realm.ts @@ -10,10 +10,6 @@ import { responseBaseSchema, } from '../core'; -/** - * The category of a realm. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const realmCategorySchema = z.union([ z.literal('Brazil'), z.literal('English'), @@ -29,10 +25,6 @@ export const realmCategorySchema = z.union([ z.literal('\uD55C\uAD6D'), ]); -/** - * The response for a realm index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const realmIndexResponseSchema = responseBaseSchema.extend({ realms: z.array(realmSchema), }); @@ -53,9 +45,6 @@ export const realmLocalesSchema = z.union([ z.literal('zhTW'), ]); -/** - * The timezone of a realm. - */ export const realmTimezoneSchema = z.union([ z.literal('America/Chicago'), z.literal('America/Denver'), @@ -67,30 +56,14 @@ export const realmTimezoneSchema = z.union([ z.literal('Europe/Paris'), ]); -/** - * The type of a realm, not capitalized or shortened. - */ export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplaying')]); -/** - * The type of a realm, capitalized and shortended). - */ export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); -/** - * The search parameters for realms. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ timezone: realmTimezoneSchema.optional(), }); -/** - * The response for a realm search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), @@ -111,10 +84,6 @@ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for a realm. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: realmCategorySchema, connected_realm: z.object({ diff --git a/generated/wow/region.ts b/generated/wow/region.ts index f778b96e..6c42d049 100644 --- a/generated/wow/region.ts +++ b/generated/wow/region.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a region index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const regionIndexResponseSchema = responseBaseSchema.extend({ regions: z.array( z.object({ @@ -14,10 +10,6 @@ export const regionIndexResponseSchema = responseBaseSchema.extend({ ), }); -/** - * The response for a region. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const regionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ patch_string: z.string(), tag: z.string(), diff --git a/generated/wow/reputations.ts b/generated/wow/reputations.ts index 17d2195f..a51ae05c 100644 --- a/generated/wow/reputations.ts +++ b/generated/wow/reputations.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * The response for a reputation faction index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const reputationFactionIndexResponseSchema = responseBaseSchema.extend({ factions: z.array(nameIdKeySchema), root_factions: z.array(nameIdKeySchema), @@ -27,10 +23,6 @@ const tierSchema = z.object({ name: z.string(), }); -/** - * The response for a reputation faction. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const reputationFactionResponseSchema = responseBaseSchema.extend({ description: z.string(), id: z.number(), @@ -38,18 +30,10 @@ export const reputationFactionResponseSchema = responseBaseSchema.extend({ reputation_tiers: reputationTiersSchema, }); -/** - * The response for a reputation tier index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const reputationTiersIndexResponseSchema = responseBaseSchema.extend({ reputation_tiers: z.array(reputationTierSchema), }); -/** - * The response for a reputation tier. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const reputationTiersResponseSchema = responseBaseSchema.extend({ faction: nameIdKeySchema.optional(), id: z.number(), diff --git a/generated/wow/spell.ts b/generated/wow/spell.ts index 8fdf6cf9..0771ca07 100644 --- a/generated/wow/spell.ts +++ b/generated/wow/spell.ts @@ -9,10 +9,6 @@ import { responseBaseSchema, } from '../core'; -/** - * The response for a spell media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const spellMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), id: z.number(), @@ -22,21 +18,11 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -/** - * The search parameters for spells. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ locale: localesSchema, name: z.string(), }); -/** - * The response for a spell search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} - */ export const spellSearchResponseItemSchema = keyBaseSchema.extend({ data: z.object({ id: z.number(), @@ -47,10 +33,6 @@ export const spellSearchResponseItemSchema = keyBaseSchema.extend({ }), }); -/** - * The response for a spell. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const spellResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ description: z.string().nullable(), media: mediaSchema, diff --git a/generated/wow/talent.ts b/generated/wow/talent.ts index 6cc2ea5e..95647ee8 100644 --- a/generated/wow/talent.ts +++ b/generated/wow/talent.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a pvp talent index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTalentIndexResponseSchema = responseBaseSchema.extend({ pvp_talents: z.array(nameIdKeySchema), }); -/** - * The response for a pvp talent. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const pvpTalentResponseSchema = responseBaseSchema.extend({ compatible_slots: z.array(z.number()), description: z.string(), @@ -23,10 +15,6 @@ export const pvpTalentResponseSchema = responseBaseSchema.extend({ unlock_player_level: z.number(), }); -/** - * The response for a talent index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const talentIndexResponseSchema = responseBaseSchema.extend({ talents: z.array(nameIdKeySchema), }); @@ -79,10 +67,6 @@ const tooltipSpellTooltipSchema = z.object({ spell: nameIdKeySchema, }); -/** - * The response for a talent. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const talentResponseSchema = responseBaseSchema.extend({ id: z.number(), playable_class: playableClassSchema, @@ -90,10 +74,6 @@ export const talentResponseSchema = responseBaseSchema.extend({ spell: nameIdKeySchema, }); -/** - * The response for a talent tree index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const talentTreeIndexResponseSchema = responseBaseSchema.extend({ class_talent_trees: z.array(talentTreeSchema), spec_talent_trees: z.array(talentTreeSchema), @@ -126,10 +106,6 @@ const talentNodeSchema = z.object({ raw_position_y: z.number(), }); -/** - * The response for a talent tree nodes. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const talentTreeNodesResponseSchema = responseBaseSchema.extend({ id: z.number(), spec_talent_trees: z.array(specTalentTreeSchema), @@ -167,10 +143,6 @@ const classTalentNodeSchema = z.object({ unlocks: z.array(z.number()).optional(), }); -/** - * The response for a talent tree. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const talentTreeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ class_talent_nodes: z.array(classTalentNodeSchema), media: z.object({ diff --git a/generated/wow/tech-talent.ts b/generated/wow/tech-talent.ts index c02c2c5b..f2dbb3a1 100644 --- a/generated/wow/tech-talent.ts +++ b/generated/wow/tech-talent.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a tech talent index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const techTalentIndexResponseSchema = responseBaseSchema.extend({ talents: z.array(nameIdKeySchema), }); -/** - * The response for a tech talent media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const techTalentMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(mediaAssetSchema), }); @@ -27,10 +19,6 @@ const talentTreeSchema = keyBaseSchema.extend({ name: z.string().optional(), }); -/** - * The response for a tech talent tree. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const techTalentTreeResponseSchema = responseBaseSchema.extend({ id: z.number(), max_tiers: z.number(), @@ -38,10 +26,6 @@ export const techTalentTreeResponseSchema = responseBaseSchema.extend({ talents: z.array(nameIdKeySchema), }); -/** - * The response for a tech talent. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const techTalentResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ display_order: z.number(), media: mediaSchema, @@ -49,10 +33,6 @@ export const techTalentResponseSchema = nameIdSchema.extend(responseBaseSchema.s tier: z.number(), }); -/** - * The response for a tech talent tree index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const techTalentTreeIndexResponseSchema = responseBaseSchema.extend({ talent_trees: z.array(talentTreeSchema), }); diff --git a/generated/wow/title.ts b/generated/wow/title.ts index 9c360da7..bdcab987 100644 --- a/generated/wow/title.ts +++ b/generated/wow/title.ts @@ -2,18 +2,10 @@ import { z } from 'zod'; import { genderNameSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -/** - * The response for a title index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const titleIndexResponseSchema = responseBaseSchema.extend({ titles: z.array(nameIdKeySchema), }); -/** - * The response for a title. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const titleResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_name: genderNameSchema, }); diff --git a/generated/wow/toy.ts b/generated/wow/toy.ts index d0599fd2..1688a28a 100644 --- a/generated/wow/toy.ts +++ b/generated/wow/toy.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -/** - * The response for a toy index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const toyIndexResponseSchema = responseBaseSchema.extend({ toys: z.array(nameIdKeySchema), }); @@ -19,10 +15,6 @@ const sourceSchema = z.object({ type: z.string(), }); -/** - * The response for a toy. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const toyResponseSchema = responseBaseSchema.extend({ id: z.number(), item: nameIdKeySchema, diff --git a/generated/wow/wow-token.ts b/generated/wow/wow-token.ts index 0b7787e8..de7d514e 100644 --- a/generated/wow/wow-token.ts +++ b/generated/wow/wow-token.ts @@ -2,10 +2,6 @@ import { z } from 'zod'; import { responseBaseSchema } from '../core'; -/** - * The response for a WoW token. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ export const wowTokenResponseSchema = responseBaseSchema.extend({ last_updated_timestamp: z.number(), price: z.number(), diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index 24c80702..4a427b79 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -59,7 +59,7 @@ async function run(): Promise { const content = await fs.readFile(file, 'utf8'); const generator = generate({ inputOutputMappings, - keepComments: true, + keepComments: false, skipParseJSDoc: false, sourceText: content, }); From be6facce0650d0f35111e943215a6043457a0dbc Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 27 Nov 2025 23:41:22 +0100 Subject: [PATCH 07/52] Add changelog for d3 change --- .changeset/fifty-mammals-raise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fifty-mammals-raise.md diff --git a/.changeset/fifty-mammals-raise.md b/.changeset/fifty-mammals-raise.md new file mode 100644 index 00000000..66a9dc3a --- /dev/null +++ b/.changeset/fifty-mammals-raise.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/d3': patch +--- + +Fix an issue when calling D3 profile APIs where the battletag wasn't encoded properly From cc35a9724b431b853e352dd4dc61ba0e36ecff91 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:09:36 +0100 Subject: [PATCH 08/52] Fix remaining lint issues --- .../classic-wow/character-achievements.ts | 81 ++++- generated/classic-wow/character-equipment.ts | 169 +++++++++++ .../classic-wow/character-hunter-pets.ts | 20 ++ generated/classic-wow/character-media.ts | 11 + generated/classic-wow/connected-realm.ts | 124 ++++++++ generated/classic-wow/creature.ts | 88 ++++++ generated/classic-wow/guild-crest.ts | 37 +++ generated/classic-wow/guild.ts | 84 +++++- generated/classic-wow/index.ts | 26 +- generated/classic-wow/item.ts | 273 +++++++++++++++++ generated/classic-wow/media-search.ts | 18 ++ generated/classic-wow/playable-race.ts | 13 + generated/classic-wow/power-type.ts | 7 + generated/classic-wow/pvp-season.ts | 22 ++ generated/classic-wow/realm.ts | 99 ++++++ generated/classic-wow/region.ts | 14 + generated/wow/guild-crest.ts | 23 +- generated/wow/realm.ts | 2 +- .../src/character-achievements/types.ts | 82 ++++- .../src/character-equipment/types.ts | 158 +++++++++- .../src/character-hunter-pets/types.ts | 17 +- .../classic-wow/src/character-media/types.ts | 12 +- .../classic-wow/src/connected-realm/types.ts | 96 +++++- packages/classic-wow/src/creature/types.ts | 109 ++++++- packages/classic-wow/src/guild-crest/types.ts | 45 ++- packages/classic-wow/src/guild/types.ts | 77 ++++- packages/classic-wow/src/item/types.ts | 281 +++++++++++++++++- .../classic-wow/src/media-search/types.ts | 29 +- .../classic-wow/src/playable-race/types.ts | 22 +- packages/classic-wow/src/power-type/types.ts | 16 +- packages/classic-wow/src/pvp-season/types.ts | 27 +- packages/classic-wow/src/realm/types.ts | 118 +++++++- packages/classic-wow/src/region/types.ts | 19 +- packages/wow/src/guild-crest/types.ts | 11 +- packages/wow/src/item/types.ts | 12 +- packages/wow/src/realm/types.ts | 13 +- 36 files changed, 2172 insertions(+), 83 deletions(-) diff --git a/generated/classic-wow/character-achievements.ts b/generated/classic-wow/character-achievements.ts index e29ef51d..57edadb6 100644 --- a/generated/classic-wow/character-achievements.ts +++ b/generated/classic-wow/character-achievements.ts @@ -1,8 +1,83 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const characterAchievementsSummaryRetailResponseSchema = z.any(); +const categoryProgressSchema = z.object({ + category: nameIdKeySchema, + points: z.number(), + quantity: z.number(), +}); + +const recentEventSchema = z.object({ + achievement: nameIdKeySchema, + timestamp: z.number(), +}); + +const statisticSchema = z.object({ + description: z.string().optional().nullable(), + id: z.number(), + last_updated_timestamp: z.number(), + name: z.string(), + quantity: z.number(), +}); + +const subCategorySchema = z.object({ + id: z.number(), + name: z.string(), + statistics: z.array(statisticSchema), +}); + +const childCriterum3Schema = z.object({ + amount: z.number().optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const categorySchema = z.object({ + id: z.number(), + name: z.string(), + statistics: z.array(statisticSchema), + sub_categories: z.array(subCategorySchema), +}); + +const childCriterum2Schema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterum3Schema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const childCriterumSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterum2Schema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +export const characterAchievementStatisticsResponseSchema = responseBaseSchema.extend({ + categories: z.array(categorySchema), + character: characterSchema, +}); + +const criteriaSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterumSchema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + +const achievementSchema = z.object({ + achievement: nameIdKeySchema, + completed_timestamp: z.number().optional(), + criteria: criteriaSchema.optional(), + id: z.number(), +}); -export const characterAchievementsSummaryResponseSchema = characterAchievementsSummaryRetailResponseSchema.omit({ - statistics: true, +export const characterAchievementsSummaryResponseSchema = responseBaseSchema.extend({ + achievements: z.array(achievementSchema), + category_progress: z.array(categoryProgressSchema), + character: characterSchema, + recent_events: z.array(recentEventSchema), + total_points: z.number(), + total_quantity: z.number(), }); diff --git a/generated/classic-wow/character-equipment.ts b/generated/classic-wow/character-equipment.ts index f5c91046..e57b2ab7 100644 --- a/generated/classic-wow/character-equipment.ts +++ b/generated/classic-wow/character-equipment.ts @@ -1,2 +1,171 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +const nameDescriptionSchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + +const nameTypeSchema = z.object({ + name: z.string(), + type: z.string(), +}); + +const displayStringsSchema = z.object({ + copper: z.string(), + gold: z.string(), + header: z.string(), + silver: z.string(), +}); + +const displayStringValueSchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + +const effectSchema = z.object({ + display_string: z.string(), + is_active: z.boolean(), + required_count: z.number(), +}); + +const enchantmentSlotSchema = z.object({ + id: z.number(), + type: z.string(), +}); + +const armorSchema = z.object({ + display: nameDescriptionSchema, + value: z.number(), +}); + +const enchantmentSchema = z.object({ + display_string: z.string(), + enchantment_id: z.number(), + enchantment_slot: enchantmentSlotSchema, + source_item: nameIdKeySchema.optional(), +}); + +const modifiedCraftingStatSchema = z.object({ + id: z.number(), + name: z.string(), + type: z.string(), +}); + +const sellPriceSchema = z.object({ + display_strings: displayStringsSchema, + value: z.number(), +}); + +const socketSchema = z.object({ + display_string: z.string(), + item: nameIdKeySchema, + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + socket_type: nameTypeSchema, +}); + +const spellSchema = z.object({ + description: z.string(), + spell: nameIdKeySchema, +}); + +const statSchema = z.object({ + display: nameDescriptionSchema, + is_equip_bonus: z.boolean().optional(), + is_negated: z.boolean().optional(), + type: nameTypeSchema, + value: z.number(), +}); + +const transmogSchema = z.object({ + display_string: z.string(), + item: nameIdKeySchema, + item_modified_appearance_id: z.number(), +}); + +const itemElementSchema = nameIdKeySchema.extend({ + is_equipped: z.boolean().optional(), +}); + +const playableClassesSchema = z.object({ + display_string: z.string(), + links: z.array(nameIdKeySchema), +}); + +const requirementsSchema = z.object({ + level: displayStringValueSchema, + playable_classes: playableClassesSchema.optional(), +}); + +const setSchema = z.object({ + display_string: z.string(), + effects: z.array(effectSchema), + item_set: nameIdKeySchema, + items: z.array(itemElementSchema), +}); + +const damageSchema = z.object({ + damage_class: nameTypeSchema, + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const weaponSchema = z.object({ + attack_speed: displayStringValueSchema, + damage: damageSchema, + dps: displayStringValueSchema, +}); + +const equippedItemSchema = z.object({ + armor: armorSchema.optional(), + binding: nameTypeSchema, + bonus_list: z.array(z.number()).optional(), + context: z.number(), + description: z.string().optional(), + durability: displayStringValueSchema.optional(), + enchantments: z.array(enchantmentSchema).optional(), + inventory_type: nameTypeSchema, + is_subclass_hidden: z.boolean().optional(), + item: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: displayStringValueSchema, + limit_category: z.string().optional(), + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + modified_appearance_id: z.number().optional(), + modified_crafting_stat: z.array(modifiedCraftingStatSchema).optional(), + name: z.string(), + name_description: nameDescriptionSchema, + quality: nameTypeSchema, + quantity: z.number(), + requirements: requirementsSchema.optional(), + sell_price: sellPriceSchema.optional(), + set: setSchema.optional(), + slot: nameTypeSchema, + sockets: z.array(socketSchema).optional(), + spells: z.array(spellSchema).optional(), + stats: z.array(statSchema).optional(), + transmog: transmogSchema.optional(), + unique_equipped: z.string().optional(), + weapon: weaponSchema.optional(), +}); + +export const characterEquipmentSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + equipped_item_sets: z.array(setSchema), + equipped_items: z.array(equippedItemSchema), +}); diff --git a/generated/classic-wow/character-hunter-pets.ts b/generated/classic-wow/character-hunter-pets.ts index f5c91046..e2658d8d 100644 --- a/generated/classic-wow/character-hunter-pets.ts +++ b/generated/classic-wow/character-hunter-pets.ts @@ -1,2 +1,22 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +const hunterPetSchema = z.object({ + creature: nameIdKeySchema, + creature_display: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), + is_active: z.boolean().optional(), + is_summoned: z.boolean().optional(), + level: z.number(), + name: z.string(), + slot: z.number(), +}); + +export const characterHunterPetsSummaryResponseSchema = responseBaseSchema.extend({ + character: characterSchema, + hunter_pets: z.array(hunterPetSchema), +}); diff --git a/generated/classic-wow/character-media.ts b/generated/classic-wow/character-media.ts index f5c91046..2d78e329 100644 --- a/generated/classic-wow/character-media.ts +++ b/generated/classic-wow/character-media.ts @@ -1,2 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { characterSchema, responseBaseSchema } from '../core'; + +const assetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +export const characterMediaSummaryResponseSchema = responseBaseSchema.extend({ + assets: z.array(assetSchema), + character: characterSchema, +}); diff --git a/generated/classic-wow/connected-realm.ts b/generated/classic-wow/connected-realm.ts index f5c91046..61c7274b 100644 --- a/generated/classic-wow/connected-realm.ts +++ b/generated/classic-wow/connected-realm.ts @@ -1,2 +1,126 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySchema, responseBaseSchema } from '../core'; + +export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ + connected_realms: z.array( + z.object({ + href: z.string(), + }), + ), +}); + +const realmPopulationCapitalizedSchema = z.union([ + z.literal('FULL'), + z.literal('HIGH'), + z.literal('LOW'), + z.literal('MEDIUM'), + z.literal('RECOMMENDED'), +]); + +const realmLockedStatusSchema = z.object({ + is_locked_for_new_characters: z.boolean(), + is_locked_for_pct: z.boolean(), +}); + +const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); + +const realmStatusCapitalizedSchema = z.union([z.literal('DOWN'), z.literal('UP')]); + +const searchRealmPopulationSchema = z.object({ + name: z.record(localesSchema, z.string()), + type: realmPopulationCapitalizedSchema, +}); + +const searchRealmStatusSchema = z.object({ + name: z.record(localesSchema, z.string()), + type: realmStatusCapitalizedSchema, +}); + +const realmTimezoneSchema = z.any(); + +const realmCategorySchema = z.any(); + +const realmLocalesSchema = z.any(); + +const realmTypeSchema = z.any(); + +const realmTypeCapitalizedSchema = z.any(); + +const realmSchema = z.object({ + category: realmCategorySchema, + connected_realm: z.object({ + href: z.string(), + }), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.string(), + region: nameIdKeySchema, + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), +}); + +export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.extend({ + 'realms.timezone': realmTimezoneSchema.optional(), + 'status.type': realmStatusCapitalizedSchema.optional(), +}); + +const searchRealmSchema = z.object({ + category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + region: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: realmTypeCapitalizedSchema, + }), +}); + +export const connectedRealmResponseSchema = responseBaseSchema.extend({ + auctions: z.object({ + href: z.string(), + }), + has_queue: z.boolean(), + id: z.number(), + mythic_leaderboards: z.object({ + href: z.string(), + }), + population: z.object({ + name: z.union([ + z.literal('Full'), + z.literal('High'), + z.literal('Low'), + z.literal('Medium'), + z.literal('New Players'), + ]), + type: realmPopulationCapitalizedSchema, + }), + realm_locked_status: realmLockedStatusSchema.optional(), + realms: z.array(realmSchema), + status: z.object({ + name: realmStatusSchema, + type: realmStatusCapitalizedSchema, + }), +}); + +export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + has_queue: z.boolean(), + id: z.number(), + population: searchRealmPopulationSchema, + realms: z.array(searchRealmSchema), + status: searchRealmStatusSchema, + }), +}); diff --git a/generated/classic-wow/creature.ts b/generated/classic-wow/creature.ts index f5c91046..47baf0ea 100644 --- a/generated/classic-wow/creature.ts +++ b/generated/classic-wow/creature.ts @@ -1,2 +1,90 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdKeySchema, + responseBaseSchema, +} from '../core'; + +const displayMediaAssetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +export const creatureFamilyIndexResponseSchema = responseBaseSchema.extend({ + creature_families: z.array(nameIdKeySchema), +}); + +export const creatureFamilyMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const creatureDisplaySchema = keyBaseSchema.extend({ + id: z.number(), +}); + +export const creatureSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + creature_displays: z.array( + z.object({ + id: z.number(), + }), + ), + family: z + .object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }) + .optional(), + id: z.number(), + is_tameable: z.boolean(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + }), +}); + +export const creatureTypeIndexResponseSchema = responseBaseSchema.extend({ + creature_types: z.array(nameIdKeySchema), +}); + +export const creatureTypeResponseSchema = responseBaseSchema.extend({ + id: z.number(), + name: z.string(), +}); + +export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(displayMediaAssetSchema), + id: z.number(), +}); + +export const creatureFamilyResponseSchema = responseBaseSchema.extend({ + id: z.number(), + media: mediaSchema, + name: z.string(), + specialization: nameIdKeySchema, +}); + +export const creatureResponseSchema = responseBaseSchema.extend({ + creature_displays: z.array(creatureDisplaySchema), + family: nameIdKeySchema, + id: z.number(), + is_tameable: z.boolean(), + name: z.string(), + type: nameIdKeySchema, +}); diff --git a/generated/classic-wow/guild-crest.ts b/generated/classic-wow/guild-crest.ts index f5c91046..60d57683 100644 --- a/generated/classic-wow/guild-crest.ts +++ b/generated/classic-wow/guild-crest.ts @@ -1,2 +1,39 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { colorSchema, keyBaseSchema, responseBaseSchema } from '../core'; + +const guildCrestAssetSchema = z.object({ + key: z.string(), + value: z.string(), +}); + +const backgroundSchema = z.object({ + id: z.number(), + rgba: colorSchema, +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const colorsSchema = z.object({ + backgrounds: z.array(backgroundSchema), + borders: z.array(backgroundSchema), + emblems: z.array(backgroundSchema), +}); + +export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ + assets: z.array(guildCrestAssetSchema), + id: z.number(), +}); + +const borderSchema = z.object({ + id: z.number(), + media: mediaSchema, +}); + +export const guildCrestComponentsIndexResponseSchema = responseBaseSchema.extend({ + borders: z.array(borderSchema), + colors: colorsSchema, + emblems: z.array(borderSchema), +}); diff --git a/generated/classic-wow/guild.ts b/generated/classic-wow/guild.ts index 71403214..5ed3c6b3 100644 --- a/generated/classic-wow/guild.ts +++ b/generated/classic-wow/guild.ts @@ -2,7 +2,9 @@ import { z } from 'zod'; import { characterSchema, + colorSchema, factionSchema, + hrefSchema, keyBaseSchema, nameIdKeySchema, realmSchema, @@ -14,11 +16,50 @@ const guildSchema = nameIdKeySchema.extend({ realm: realmSchema, }); +const categoryProgressSchema = z.object({ + category: nameIdKeySchema, + points: z.number(), + quantity: z.number(), +}); + +const recentEventSchema = z.object({ + achievement: nameIdKeySchema, + timestamp: z.number(), +}); + const characterAchievementSchema = z.object({ achievement: nameIdKeySchema, character: characterSchema, }); +const rgbWithIdSchema = z.object({ + id: z.number(), + rgba: colorSchema, +}); + +const childCriterumSchema = z.object({ + amount: z.number(), + id: z.number(), + is_completed: z.boolean(), +}); + +const borderSchema = z.object({ + color: rgbWithIdSchema, + id: z.number(), + media: keyBaseSchema.and( + z.object({ + id: z.number(), + }), + ), +}); + +const criteriaSchema = z.object({ + amount: z.number().optional(), + child_criteria: z.array(childCriterumSchema).optional(), + id: z.number(), + is_completed: z.boolean(), +}); + const playableSchema = keyBaseSchema.extend({ id: z.number(), }); @@ -29,12 +70,17 @@ const rosterMemberCharacterSchema = characterSchema.extend({ playable_race: playableSchema, }); -const guildRetailResponseSchema = z.any(); - export const guildAchievementsClassicEraResponseSchema = responseBaseSchema.extend({ guild: guildSchema, }); +const achievementSchema = z.object({ + achievement: nameIdKeySchema, + completed_timestamp: z.number().optional(), + criteria: criteriaSchema.optional(), + id: z.number(), +}); + const activityElementSchema = z.object({ activity: z.object({ type: z.string(), @@ -43,22 +89,48 @@ const activityElementSchema = z.object({ timestamp: z.number(), }); -export const guildResponseSchema = guildRetailResponseSchema.omit({ crest: true }).and( - z.object({ - crest: guildRetailResponseSchema.shape.crest.optional(), +const crestSchema = z.object({ + background: z.object({ + color: rgbWithIdSchema, }), -); + border: borderSchema, + emblem: borderSchema, +}); const memberSchema = z.object({ character: rosterMemberCharacterSchema, rank: z.number(), }); +export const guildAchievementsResponseSchema = responseBaseSchema.extend({ + achievements: z.array(achievementSchema), + category_progress: z.array(categoryProgressSchema), + guild: guildSchema, + recent_events: z.array(recentEventSchema), + total_points: z.number(), + total_quantity: z.number(), +}); + export const guildActivityResponseSchema = responseBaseSchema.extend({ activities: z.array(activityElementSchema).optional(), guild: guildSchema, }); +export const guildResponseSchema = responseBaseSchema.extend({ + achievement_points: z.number(), + achievements: hrefSchema, + activity: hrefSchema, + created_timestamp: z.number(), + crest: crestSchema.optional(), + faction: factionSchema, + id: z.number(), + member_count: z.number(), + name: z.string(), + name_search: z.string(), + realm: realmSchema, + roster: hrefSchema, +}); + export const guildRosterResponseSchema = responseBaseSchema.extend({ guild: guildSchema, members: z.array(memberSchema), diff --git a/generated/classic-wow/index.ts b/generated/classic-wow/index.ts index ff8c154f..6ad9ae17 100644 --- a/generated/classic-wow/index.ts +++ b/generated/classic-wow/index.ts @@ -1,20 +1,20 @@ export * from './auction-house'; export * from './character-achievements'; -export type * from './character-equipment'; -export type * from './character-hunter-pets'; -export type * from './character-media'; +export * from './character-equipment'; +export * from './character-hunter-pets'; +export * from './character-media'; export * from './character-profile'; export * from './character-specialization'; export * from './character-statistics'; -export type * from './connected-realm'; -export type * from './creature'; +export * from './connected-realm'; +export * from './creature'; export * from './guild'; -export type * from './guild-crest'; -export type * from './item'; -export type * from './media-search'; +export * from './guild-crest'; +export * from './item'; +export * from './media-search'; export * from './playable-class'; -export type * from './playable-race'; -export type * from './power-type'; -export type * from './pvp-season'; -export type * from './realm'; -export type * from './region'; +export * from './playable-race'; +export * from './power-type'; +export * from './pvp-season'; +export * from './realm'; +export * from './region'; diff --git a/generated/classic-wow/item.ts b/generated/classic-wow/item.ts index f5c91046..52a55025 100644 --- a/generated/classic-wow/item.ts +++ b/generated/classic-wow/item.ts @@ -1,2 +1,275 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { + baseSearchParametersSchema, + colorSchema, + keyBaseSchema, + localesSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; + +export const itemClassIndexResponseSchema = responseBaseSchema.extend({ + item_classes: z.array(nameIdKeySchema), +}); + +export const itemClassResponseSchema = responseBaseSchema.extend({ + class_id: z.number(), + item_subclasses: z.array(nameIdKeySchema), + name: z.string(), +}); + +export const itemMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); + +const inventoryTypeSchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('BACK'), + z.literal('BAG'), + z.literal('CHEST'), + z.literal('FEET'), + z.literal('FINGER'), + z.literal('HANDS'), + z.literal('HEAD'), + z.literal('LEGS'), + z.literal('NECK'), + z.literal('NON_EQUIP'), + z.literal('SHIRT'), + z.literal('SHOULDER'), + z.literal('TABARD'), + z.literal('TRINKET'), + z.literal('TWOHWEAPON'), + z.literal('WAIST'), + z.literal('WRIST'), + ]), +}); + +const mediaSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +const itemQualitySchema = z.object({ + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + type: z.union([ + z.literal('ARTIFACT'), + z.literal('COMMON'), + z.literal('EPIC'), + z.literal('HEIRLOOM'), + z.literal('LEGENDARY'), + z.literal('POOR'), + z.literal('RARE'), + z.literal('UNCOMMON'), + ]), +}); + +export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ + locale: localesSchema, + name: z.string(), +}); + +export const itemSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + id: z.number(), + inventory_type: inventoryTypeSchema, + is_equippable: z.boolean(), + is_stackable: z.boolean(), + item_class: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + item_subclass: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + level: z.number(), + max_count: z.number(), + media: z.object({ + id: z.number(), + }), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + purchase_price: z.number(), + purchase_quantity: z.number(), + quality: itemQualitySchema, + required_level: z.number(), + sell_price: z.number(), + }), +}); + +export const itemSubClassResponseSchema = responseBaseSchema.extend({ + class_id: z.number(), + display_name: z.string(), + hide_subclass_in_tooltips: z.boolean(), + subclass_id: z.number(), + verbose_name: z.string(), +}); + +const displaySchema = z.object({ + color: colorSchema, + display_string: z.string(), +}); + +const damageSchema = z.object({ + damage_class: z.object({ + name: z.string(), + type: z.string(), + }), + display_string: z.string(), + max_value: z.number(), + min_value: z.number(), +}); + +const durabilitySchema = z.object({ + display_string: z.string(), + value: z.number(), +}); + +const armorSchema = z.object({ + display: displaySchema, + value: z.number(), +}); + +const requirementsSchema = z.object({ + level: durabilitySchema, +}); + +const spellSchema = z.object({ + description: z.string(), + spell: nameIdKeySchema, +}); + +const weaponSchema = z.object({ + attack_speed: durabilitySchema, + damage: damageSchema, + dps: durabilitySchema, +}); + +const recipeItemDisplayStringsSchema = z.object({ + copper: z.string(), + gold: z.string(), + header: z.string(), + silver: z.string(), +}); + +const statTypeSchema = z.union([ + z.literal('Agility'), + z.literal('Critical Strike'), + z.literal('Haste'), + z.literal('Intellect'), + z.literal('Mastery'), + z.literal('Stamina'), + z.literal('Strength'), + z.literal('Versatility'), +]); + +const statTypeCapitalizedSchema = z.union([ + z.literal('AGILITY'), + z.literal('CRIT_RATING'), + z.literal('HASTE_RATING'), + z.literal('INTELLECT'), + z.literal('MASTERY'), + z.literal('STAMINA'), + z.literal('STRENGTH'), + z.literal('VERSATILITY'), +]); + +const statSchema = z.object({ + display: displaySchema, + is_negated: z.boolean().optional(), + type: z.object({ + name: statTypeSchema, + type: statTypeCapitalizedSchema, + }), + value: z.number(), +}); + +const recipeItemSchema = z.object({ + armor: armorSchema.optional(), + binding: z.object({ + name: z.string(), + type: z.string(), + }), + durability: durabilitySchema, + inventory_type: inventoryTypeSchema, + item: mediaSchema, + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: durabilitySchema, + media: mediaSchema, + name: z.string(), + quality: itemQualitySchema, + requirements: requirementsSchema, + sell_price: z.object({ + display_strings: recipeItemDisplayStringsSchema, + value: z.number(), + }), + stats: z.array(statSchema), + weapon: weaponSchema.optional(), +}); + +const recipeSchema = z.object({ + item: recipeItemSchema, + reagents: z.array( + nameIdKeySchema.and( + z.object({ + quantity: z.number(), + }), + ), + ), + reagents_display_string: z.string(), +}); + +const previewItemSchema = z.object({ + armor: armorSchema.optional(), + binding: z + .object({ + name: z.string(), + type: z.string(), + }) + .optional(), + bonus_list: z.array(z.number()).optional(), + container_slots: durabilitySchema.optional(), + context: z.number().optional(), + crafting_reagent: z.string().optional(), + description: z.string().optional(), + durability: durabilitySchema.optional(), + inventory_type: inventoryTypeSchema, + is_subclass_hidden: z.boolean().optional(), + item: mediaSchema, + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: durabilitySchema.optional(), + media: mediaSchema, + name: z.string(), + quality: itemQualitySchema, + recipe: recipeSchema.optional(), + requirements: requirementsSchema.optional(), + sell_price: z.number().optional(), + shield_block: armorSchema.optional(), + spells: z.array(spellSchema).optional(), + stats: z.array(statSchema).optional(), + unique_equipped: z.literal('Unique').optional(), + weapon: weaponSchema.optional(), +}); + +export const itemResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string().optional(), + inventory_type: inventoryTypeSchema, + is_equippable: z.boolean(), + is_stackable: z.boolean(), + item_class: nameIdKeySchema, + item_subclass: nameIdKeySchema, + level: z.number(), + max_count: z.number(), + media: mediaSchema, + preview_item: previewItemSchema, + purchase_price: z.number(), + purchase_quantity: z.number(), + quality: itemQualitySchema, + required_level: z.number(), + sell_price: z.number(), +}); diff --git a/generated/classic-wow/media-search.ts b/generated/classic-wow/media-search.ts index f5c91046..5e070ab0 100644 --- a/generated/classic-wow/media-search.ts +++ b/generated/classic-wow/media-search.ts @@ -1,2 +1,20 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { baseSearchParametersSchema, keyBaseSchema } from '../core'; + +export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ + tags: z.string().optional(), +}); + +const mediaAssetSchema = z.object({ + file_data_id: z.number(), + key: z.string(), + value: z.string(), +}); + +export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + assets: z.array(mediaAssetSchema), + id: z.number(), + }), +}); diff --git a/generated/classic-wow/playable-race.ts b/generated/classic-wow/playable-race.ts index f5c91046..bae69103 100644 --- a/generated/classic-wow/playable-race.ts +++ b/generated/classic-wow/playable-race.ts @@ -1,2 +1,15 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { factionSchema, genderNameSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; + +export const playableRaceIndexResponseSchema = responseBaseSchema.extend({ + races: z.array(nameIdKeySchema), +}); + +export const playableRaceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + faction: factionSchema, + gender_name: genderNameSchema, + is_allied_race: z.boolean(), + is_selectable: z.boolean(), + playable_classes: z.array(nameIdKeySchema), +}); diff --git a/generated/classic-wow/power-type.ts b/generated/classic-wow/power-type.ts index f5c91046..4278ddab 100644 --- a/generated/classic-wow/power-type.ts +++ b/generated/classic-wow/power-type.ts @@ -1,2 +1,9 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; + +export const powerTypeIndexResponseSchema = responseBaseSchema.extend({ + power_types: z.array(nameIdKeySchema), +}); + +export const powerTypeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); diff --git a/generated/classic-wow/pvp-season.ts b/generated/classic-wow/pvp-season.ts index f5c91046..4847dd08 100644 --- a/generated/classic-wow/pvp-season.ts +++ b/generated/classic-wow/pvp-season.ts @@ -1,2 +1,24 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { keyBaseSchema, responseBaseSchema } from '../core'; + +const seasonSchema = keyBaseSchema.extend({ + id: z.number(), +}); + +export const pvpSeasonResponseSchema = responseBaseSchema.extend({ + id: z.number(), + leaderboards: z.object({ + href: z.string(), + }), + rewards: z.object({ + href: z.string(), + }), + season_name: z.string().optional(), + season_start_timestamp: z.number(), +}); + +export const pvpSeasonIndexResponseSchema = responseBaseSchema.extend({ + current_season: seasonSchema, + seasons: z.array(seasonSchema), +}); diff --git a/generated/classic-wow/realm.ts b/generated/classic-wow/realm.ts index f5c91046..98eeb215 100644 --- a/generated/classic-wow/realm.ts +++ b/generated/classic-wow/realm.ts @@ -1,2 +1,101 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + nameIdSchema, + realmSchema, + responseBaseSchema, +} from '../core'; + +export const realmCategorySchema = z.union([ + z.literal('Brazil'), + z.literal('English'), + z.literal('French'), + z.literal('German'), + z.literal('Italian'), + z.literal('Latin America'), + z.literal('Oceanic'), + z.literal('PS'), + z.literal('Russian'), + z.literal('Spanish'), + z.literal('United States'), + z.literal('\uD55C\uAD6D'), +]); + +export const realmIndexResponseSchema = responseBaseSchema.extend({ + realms: z.array(realmSchema), +}); + +export const realmLocalesSchema = z.union([ + z.literal('deDE'), + z.literal('enGB'), + z.literal('enUS'), + z.literal('esES'), + z.literal('esMX'), + z.literal('frFR'), + z.literal('itIT'), + z.literal('koKR'), + z.literal('ptBR'), + z.literal('ptPT'), + z.literal('ruRU'), + z.literal('zhCN'), + z.literal('zhTW'), +]); + +export const realmTimezoneSchema = z.union([ + z.literal('America/Chicago'), + z.literal('America/Denver'), + z.literal('America/Los_Angeles'), + z.literal('America/New_York'), + z.literal('America/Sao_Paulo'), + z.literal('Asia/Seoul'), + z.literal('Australia/Melbourne'), + z.literal('Europe/Paris'), +]); + +export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplaying')]); + +export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); + +export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ + timezone: realmTimezoneSchema.optional(), +}); + +export const realmSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.object({ + category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + id: z.number(), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + region: z.object({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), + }), +}); + +export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + category: realmCategorySchema, + connected_realm: z.object({ + href: z.string(), + }), + is_tournament: z.boolean(), + locale: realmLocalesSchema, + region: nameIdKeySchema, + slug: z.string(), + timezone: realmTimezoneSchema, + type: z.object({ + name: realmTypeSchema, + type: realmTypeCapitalizedSchema, + }), +}); diff --git a/generated/classic-wow/region.ts b/generated/classic-wow/region.ts index f5c91046..6c42d049 100644 --- a/generated/classic-wow/region.ts +++ b/generated/classic-wow/region.ts @@ -1,2 +1,16 @@ // Generated by ts-to-zod import { z } from 'zod'; +import { nameIdSchema, responseBaseSchema } from '../core'; + +export const regionIndexResponseSchema = responseBaseSchema.extend({ + regions: z.array( + z.object({ + href: z.string(), + }), + ), +}); + +export const regionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + patch_string: z.string(), + tag: z.string(), +}); diff --git a/generated/wow/guild-crest.ts b/generated/wow/guild-crest.ts index 4b5a6f17..60d57683 100644 --- a/generated/wow/guild-crest.ts +++ b/generated/wow/guild-crest.ts @@ -1,26 +1,25 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, responseBaseSchema } from '../core'; +import { colorSchema, keyBaseSchema, responseBaseSchema } from '../core'; const guildCrestAssetSchema = z.object({ key: z.string(), value: z.string(), }); -const rgbaSchema = z.object({ - a: z.number(), - b: z.number(), - g: z.number(), - r: z.number(), +const backgroundSchema = z.object({ + id: z.number(), + rgba: colorSchema, }); const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const backgroundSchema = z.object({ - id: z.number(), - rgba: rgbaSchema, +const colorsSchema = z.object({ + backgrounds: z.array(backgroundSchema), + borders: z.array(backgroundSchema), + emblems: z.array(backgroundSchema), }); export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ @@ -33,12 +32,6 @@ const borderSchema = z.object({ media: mediaSchema, }); -const colorsSchema = z.object({ - backgrounds: z.array(backgroundSchema), - borders: z.array(backgroundSchema), - emblems: z.array(backgroundSchema), -}); - export const guildCrestComponentsIndexResponseSchema = responseBaseSchema.extend({ borders: z.array(borderSchema), colors: colorsSchema, diff --git a/generated/wow/realm.ts b/generated/wow/realm.ts index 5e7e3edd..98eeb215 100644 --- a/generated/wow/realm.ts +++ b/generated/wow/realm.ts @@ -78,7 +78,7 @@ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ slug: z.string(), timezone: realmTimezoneSchema, type: z.object({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), }), diff --git a/packages/classic-wow/src/character-achievements/types.ts b/packages/classic-wow/src/character-achievements/types.ts index 5308dccb..d0d6f270 100644 --- a/packages/classic-wow/src/character-achievements/types.ts +++ b/packages/classic-wow/src/character-achievements/types.ts @@ -1,5 +1,81 @@ -import type { CharacterAchievementsSummaryResponse as CharacterAchievementsSummaryRetailResponse } from '../../../wow/src/character-achievements/types'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; -export type { CharacterAchievementStatisticsResponse } from '../../../wow/src/character-achievements/types'; +export interface CharacterAchievementsSummaryResponse extends ResponseBase { + achievements: Array; + category_progress: Array; + character: Character; + recent_events: Array; + total_points: number; + total_quantity: number; +} -export type CharacterAchievementsSummaryResponse = Omit; +export interface CharacterAchievementStatisticsResponse extends ResponseBase { + categories: Array; + character: Character; +} + +interface Achievement { + achievement: NameIdKey; + completed_timestamp?: number; + criteria?: Criteria; + id: number; +} + +interface Category { + id: number; + name: string; + statistics: Array; + sub_categories: Array; +} + +interface CategoryProgress { + category: NameIdKey; + points: number; + quantity: number; +} + +interface ChildCriterum { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + +interface ChildCriterum2 { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + +interface ChildCriterum3 { + amount?: number; + id: number; + is_completed: boolean; +} + +interface Criteria { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + +interface RecentEvent { + achievement: NameIdKey; + timestamp: number; +} + +interface Statistic { + description?: null | string; + id: number; + last_updated_timestamp: number; + name: string; + quantity: number; +} + +interface SubCategory { + id: number; + name: string; + statistics: Array; +} diff --git a/packages/classic-wow/src/character-equipment/types.ts b/packages/classic-wow/src/character-equipment/types.ts index 1b65b96d..3415d941 100644 --- a/packages/classic-wow/src/character-equipment/types.ts +++ b/packages/classic-wow/src/character-equipment/types.ts @@ -1 +1,157 @@ -export type { CharacterEquipmentSummaryResponse } from '../../../wow/src/character-equipment/types'; +import type { Character, Color, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; + +export interface CharacterEquipmentSummaryResponse extends ResponseBase { + character: Character; + equipped_item_sets: Array; + equipped_items: Array; +} + +interface Armor { + display: NameDescription; + value: number; +} + +interface Damage { + damage_class: NameType; + display_string: string; + max_value: number; + min_value: number; +} + +interface DisplayStrings { + copper: string; + gold: string; + header: string; + silver: string; +} + +interface DisplayStringValue { + display_string: string; + value: number; +} + +interface Effect { + display_string: string; + is_active: boolean; + required_count: number; +} + +interface Enchantment { + display_string: string; + enchantment_id: number; + enchantment_slot: EnchantmentSlot; + source_item?: NameIdKey; +} + +interface EnchantmentSlot { + id: number; + type: string; +} + +interface EquippedItem { + armor?: Armor; + binding: NameType; + bonus_list?: Array; + context: number; + description?: string; + durability?: DisplayStringValue; + enchantments?: Array; + inventory_type: NameType; + is_subclass_hidden?: boolean; + item: KeyBase & { id: number }; + item_class: NameIdKey; + item_subclass: NameIdKey; + level: DisplayStringValue; + limit_category?: string; + media: KeyBase & { id: number }; + modified_appearance_id?: number; + modified_crafting_stat?: Array; + name: string; + name_description: NameDescription; + quality: NameType; + quantity: number; + requirements?: Requirements; + sell_price?: SellPrice; + set?: Set; + slot: NameType; + sockets?: Array; + spells?: Array; + stats?: Array; + transmog?: Transmog; + unique_equipped?: string; + weapon?: Weapon; +} + +interface ItemElement extends NameIdKey { + is_equipped?: boolean; +} + +interface ModifiedCraftingStat { + id: number; + name: string; + type: string; +} + +interface NameDescription { + color: Color; + display_string: string; +} + +interface NameType { + name: string; + type: string; +} + +interface PlayableClasses { + display_string: string; + links: Array; +} + +interface Requirements { + level: DisplayStringValue; + playable_classes?: PlayableClasses; +} + +interface SellPrice { + display_strings: DisplayStrings; + value: number; +} + +interface Set { + display_string: string; + effects: Array; + item_set: NameIdKey; + items: Array; +} + +interface Socket { + display_string: string; + item: NameIdKey; + media: KeyBase & { id: number }; + socket_type: NameType; +} + +interface Spell { + description: string; + spell: NameIdKey; +} + +interface Stat { + display: NameDescription; + is_equip_bonus?: boolean; + is_negated?: boolean; + type: NameType; + value: number; +} + +interface Transmog { + display_string: string; + item: NameIdKey; + item_modified_appearance_id: number; +} + +interface Weapon { + attack_speed: DisplayStringValue; + damage: Damage; + dps: DisplayStringValue; +} diff --git a/packages/classic-wow/src/character-hunter-pets/types.ts b/packages/classic-wow/src/character-hunter-pets/types.ts index 847c9c2b..77a6201d 100644 --- a/packages/classic-wow/src/character-hunter-pets/types.ts +++ b/packages/classic-wow/src/character-hunter-pets/types.ts @@ -1 +1,16 @@ -export type { CharacterHunterPetsSummaryResponse } from '../../../wow/src/character-hunter-pets/types'; +import type { Character, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; + +export interface CharacterHunterPetsSummaryResponse extends ResponseBase { + character: Character; + hunter_pets: Array; +} + +interface HunterPet { + creature: NameIdKey; + creature_display: KeyBase & { id: number }; + is_active?: boolean; + is_summoned?: boolean; + level: number; + name: string; + slot: number; +} diff --git a/packages/classic-wow/src/character-media/types.ts b/packages/classic-wow/src/character-media/types.ts index d656980d..f92742c4 100644 --- a/packages/classic-wow/src/character-media/types.ts +++ b/packages/classic-wow/src/character-media/types.ts @@ -1 +1,11 @@ -export type { CharacterMediaSummaryResponse } from '../../../wow/src/character-media/types'; +import type { Character, ResponseBase } from '@blizzard-api/core'; + +export interface CharacterMediaSummaryResponse extends ResponseBase { + assets: Array; + character: Character; +} + +interface Asset { + key: string; + value: string; +} diff --git a/packages/classic-wow/src/connected-realm/types.ts b/packages/classic-wow/src/connected-realm/types.ts index 1c171c9b..a78841b3 100644 --- a/packages/classic-wow/src/connected-realm/types.ts +++ b/packages/classic-wow/src/connected-realm/types.ts @@ -1,2 +1,94 @@ -//The classic version of the connected realm types are the same as the retail version. -export type * from '../../../wow/src/connected-realm/types'; +import type { BaseSearchParameters, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; + +/** + * Connected Realm Index API response. + * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis + */ +export interface ConnectedRealmIndexResponse extends ResponseBase { + connected_realms: Array<{ href: string }>; +} +/** + * Connected Realm API response. + * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis + */ +export interface ConnectedRealmResponse extends ResponseBase { + auctions: { href: string }; + has_queue: boolean; + id: number; + mythic_leaderboards: { href: string }; + population: { name: 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; type: RealmPopulationCapitalized }; + realm_locked_status?: RealmLockedStatus; + realms: Array; + status: { name: RealmStatus; type: RealmStatusCapitalized }; +} +/** + * Connected Realm Search API parameters. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface ConnectedRealmSearchParameters extends BaseSearchParameters { + 'realms.timezone'?: RealmTimezone; + 'status.type'?: RealmStatusCapitalized; +} + +/** + * Connected Realm Search API response item. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface ConnectedRealmSearchResponseItem extends KeyBase { + data: { + has_queue: boolean; + id: number; + population: SearchRealmPopulation; + realms: Array; + status: SearchRealmStatus; + }; +} + +interface Realm { + category: RealmCategory; + connected_realm: { href: string }; + id: number; + is_tournament: boolean; + locale: RealmLocales; + name: string; + region: NameIdKey; + slug: string; + timezone: RealmTimezone; + type: { name: RealmType; type: RealmTypeCapitalized }; +} + +interface RealmLockedStatus { + is_locked_for_new_characters: boolean; + is_locked_for_pct: boolean; +} + +type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; + +type RealmStatus = 'Down' | 'Up'; + +type RealmStatusCapitalized = 'DOWN' | 'UP'; + +interface SearchRealm { + category: Record; + id: number; + is_tournament: boolean; + locale: RealmLocales; + name: Record; + region: { id: number; name: Record }; + slug: string; + timezone: RealmTimezone; + type: { name: Record; type: RealmTypeCapitalized }; +} + +interface SearchRealmPopulation { + name: Record; + type: RealmPopulationCapitalized; +} + +interface SearchRealmStatus { + name: Record; + type: RealmStatusCapitalized; +} diff --git a/packages/classic-wow/src/creature/types.ts b/packages/classic-wow/src/creature/types.ts index 3d4ac5af..bddba7c1 100644 --- a/packages/classic-wow/src/creature/types.ts +++ b/packages/classic-wow/src/creature/types.ts @@ -1,2 +1,107 @@ -//The classic version of the creature types are the same as the retail version. -export type * from '../../../wow/src/creature/types'; +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; + +/** + * The response for creature display media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureDisplayMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + +/** + * The response for a creature family index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureFamilyIndexResponse extends ResponseBase { + creature_families: Array; +} + +/** + * The response for creature family media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureFamilyMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + +/** + * The response for a creature family. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureFamilyResponse extends ResponseBase { + id: number; + media: Media; + name: string; + specialization: NameIdKey; +} + +/** + * The response for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureResponse extends ResponseBase { + creature_displays: Array; + family: NameIdKey; + id: number; + is_tameable: boolean; + name: string; + type: NameIdKey; +} + +/** + * The search parameters for a creature. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface CreatureSearchParameters extends BaseSearchParameters { + locale: Locales; + name: string; +} + +/** + * The response for a creature search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface CreatureSearchResponseItem extends KeyBase { + data: { + creature_displays: Array<{ id: number }>; + family?: { id: number; name: Record }; + id: number; + is_tameable: boolean; + name: Record; + type: { id: number; name: Record }; + }; +} + +/** + * The response for a creature type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureTypeIndexResponse extends ResponseBase { + creature_types: Array; +} + +/** + * The response for a creature type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface CreatureTypeResponse extends ResponseBase { + id: number; + name: string; +} + +interface CreatureDisplay extends KeyBase { + id: number; +} + +interface DisplayMediaAsset { + key: string; + value: string; +} + +interface Media extends KeyBase { + id: number; +} diff --git a/packages/classic-wow/src/guild-crest/types.ts b/packages/classic-wow/src/guild-crest/types.ts index 934a3f35..6a1c8274 100644 --- a/packages/classic-wow/src/guild-crest/types.ts +++ b/packages/classic-wow/src/guild-crest/types.ts @@ -1 +1,44 @@ -export type * from '../../../wow/src/guild-crest/types'; +import type { Color, KeyBase, ResponseBase } from '@blizzard-api/core'; + +/** + * The response for a guild crest border or emblem. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface GuildCrestBorderEmblemResponse extends ResponseBase { + assets: Array; + id: number; +} + +/** + * The response for the guild crest components index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface GuildCrestComponentsIndexResponse extends ResponseBase { + borders: Array; + colors: Colors; + emblems: Array; +} + +interface Background { + id: number; + rgba: Color; +} + +interface Border { + id: number; + media: Media; +} + +interface Colors { + backgrounds: Array; + borders: Array; + emblems: Array; +} + +interface GuildCrestAsset { + key: string; + value: string; +} +interface Media extends KeyBase { + id: number; +} diff --git a/packages/classic-wow/src/guild/types.ts b/packages/classic-wow/src/guild/types.ts index 37cdffbe..f01bb821 100644 --- a/packages/classic-wow/src/guild/types.ts +++ b/packages/classic-wow/src/guild/types.ts @@ -1,34 +1,91 @@ -import type { Character, Faction, KeyBase, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; -import type { GuildResponse as GuildRetailResponse } from '../../../wow/src/guild/types'; -export type { GuildAchievementsResponse } from '../../../wow/src/guild/types'; +import type { Character, Color, Faction, Href, KeyBase, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; export interface GuildAchievementsClassicEraResponse extends ResponseBase { guild: Guild; } +export interface GuildAchievementsResponse extends ResponseBase { + achievements: Array; + category_progress: Array; + guild: Guild; + recent_events: Array; + total_points: number; + total_quantity: number; +} + export interface GuildActivityResponse extends ResponseBase { activities?: Array; guild: Guild; } - -export type GuildResponse = Omit & { crest?: GuildRetailResponse['crest'] }; +export interface GuildResponse extends ResponseBase { + achievement_points: number; + achievements: Href; + activity: Href; + created_timestamp: number; + crest?: Crest; + faction: Faction; + id: number; + member_count: number; + name: string; + name_search: string; + realm: Realm; + roster: Href; +} export interface GuildRosterResponse extends ResponseBase { guild: Guild; members: Array; } +interface Achievement { + achievement: NameIdKey; + completed_timestamp?: number; + criteria?: Criteria; + id: number; +} + interface ActivityElement { activity: { type: string }; character_achievement: CharacterAchievement; timestamp: number; } +interface Border { + color: RgbWithId; + id: number; + media: KeyBase & { id: number }; +} + +interface CategoryProgress { + category: NameIdKey; + points: number; + quantity: number; +} + interface CharacterAchievement { achievement: NameIdKey; character: Character; } +interface ChildCriterum { + amount: number; + id: number; + is_completed: boolean; +} + +interface Crest { + background: { color: RgbWithId }; + border: Border; + emblem: Border; +} + +interface Criteria { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + interface Guild extends NameIdKey { faction: Faction; realm: Realm; @@ -43,6 +100,16 @@ interface Playable extends KeyBase { id: number; } +interface RecentEvent { + achievement: NameIdKey; + timestamp: number; +} + +interface RgbWithId { + id: number; + rgba: Color; +} + interface RosterMemberCharacter extends Character { level: number; playable_class: Playable; diff --git a/packages/classic-wow/src/item/types.ts b/packages/classic-wow/src/item/types.ts index f96783c6..7a894942 100644 --- a/packages/classic-wow/src/item/types.ts +++ b/packages/classic-wow/src/item/types.ts @@ -1,9 +1,272 @@ -export type { - ItemClassIndexResponse, - ItemClassResponse, - ItemMediaResponse, - ItemResponse, - ItemSearchParameters, - ItemSearchResponseItem, - ItemSubClassResponse, -} from '../../../wow/src/item/types.ts'; +import type { + BaseSearchParameters, + Color, + KeyBase, + Locales, + MediaAsset, + NameId, + NameIdKey, + ResponseBase, +} from '@blizzard-api/core'; + +/** + * The response for an item class index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemClassIndexResponse extends ResponseBase { + item_classes: Array; +} + +/** + * The response for an item class. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemClassResponse extends ResponseBase { + class_id: number; + item_subclasses: Array; + name: string; +} + +/** + * The response for an item media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemMediaResponse extends ResponseBase { + assets: Array; + id: number; +} +/** + * The response for an item. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemResponse extends NameId, ResponseBase { + description?: string; + inventory_type: InventoryType; + is_equippable: boolean; + is_stackable: boolean; + item_class: NameIdKey; + item_subclass: NameIdKey; + level: number; + max_count: number; + media: Media; + preview_item: PreviewItem; + purchase_price: number; + purchase_quantity: number; + quality: ItemQuality; + required_level: number; + sell_price: number; +} + +/** + * The parameters for an item search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface ItemSearchParameters extends BaseSearchParameters { + locale: Locales; + name: string; +} + +/** + * The response for an item search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface ItemSearchResponseItem extends KeyBase { + data: { + id: number; + inventory_type: InventoryType; + is_equippable: boolean; + is_stackable: boolean; + item_class: { id: number; name: Record }; + item_subclass: { id: number; name: Record }; + level: number; + max_count: number; + media: { id: number }; + name: Record; + purchase_price: number; + purchase_quantity: number; + quality: ItemQuality; + required_level: number; + sell_price: number; + }; +} + +/** + * The response for an item subclass. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemSubClassResponse extends ResponseBase { + class_id: number; + display_name: string; + hide_subclass_in_tooltips: boolean; + subclass_id: number; + verbose_name: string; +} + +interface Armor { + display: Display; + value: number; +} + +interface Damage { + damage_class: { + name: string; + type: string; + }; + display_string: string; + max_value: number; + min_value: number; +} + +interface Display { + color: Color; + display_string: string; +} + +interface Durability { + display_string: string; + value: number; +} + +interface InventoryType { + name: Record; + type: //Armor + | 'BACK' + | 'BAG' + | 'CHEST' + | 'FEET' + | 'FINGER' + | 'HANDS' + | 'HEAD' + | 'LEGS' + | 'NECK' + | 'NON_EQUIP' + | 'SHIRT' + | 'SHOULDER' + | 'TABARD' + | 'TRINKET' + //Weapons + | 'TWOHWEAPON' + //Misc + | 'WAIST' + | 'WRIST'; +} + +interface ItemQuality { + name: Record; + type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; +} + +interface Media extends KeyBase { + id: number; +} + +interface PreviewItem { + armor?: Armor; + binding?: { + name: string; + type: string; + }; + bonus_list?: Array; + container_slots?: Durability; + context?: number; + crafting_reagent?: string; + description?: string; + durability?: Durability; + inventory_type: InventoryType; + is_subclass_hidden?: boolean; + item: Media; + item_class: NameIdKey; + item_subclass: NameIdKey; + level?: Durability; + media: Media; + name: string; + quality: ItemQuality; + recipe?: Recipe; + requirements?: Requirements; + sell_price?: number; + shield_block?: Armor; + spells?: Array; + stats?: Array; + unique_equipped?: 'Unique'; + weapon?: Weapon; +} + +interface Recipe { + item: RecipeItem; + reagents: Array; + reagents_display_string: string; +} + +interface RecipeItem { + armor?: Armor; + binding: { + name: string; + type: string; + }; + durability: Durability; + inventory_type: InventoryType; + item: Media; + item_class: NameIdKey; + item_subclass: NameIdKey; + level: Durability; + media: Media; + name: string; + quality: ItemQuality; + requirements: Requirements; + sell_price: { display_strings: RecipeItemDisplayStrings; value: number }; + stats: Array; + weapon?: Weapon; +} + +interface RecipeItemDisplayStrings { + copper: string; + gold: string; + header: string; + silver: string; +} + +interface Requirements { + level: Durability; +} + +interface Spell { + description: string; + spell: NameIdKey; +} +interface Stat { + display: Display; + is_negated?: boolean; + type: { + name: StatType; + type: StatTypeCapitalized; + }; + value: number; +} + +type StatType = + | 'Agility' + | 'Critical Strike' + | 'Haste' + | 'Intellect' + | 'Mastery' + | 'Stamina' + | 'Strength' + | 'Versatility'; + +type StatTypeCapitalized = + | 'AGILITY' + | 'CRIT_RATING' + | 'HASTE_RATING' + | 'INTELLECT' + | 'MASTERY' + | 'STAMINA' + | 'STRENGTH' + | 'VERSATILITY'; + +interface Weapon { + attack_speed: Durability; + damage: Damage; + dps: Durability; +} diff --git a/packages/classic-wow/src/media-search/types.ts b/packages/classic-wow/src/media-search/types.ts index b2f94df0..f6b7d351 100644 --- a/packages/classic-wow/src/media-search/types.ts +++ b/packages/classic-wow/src/media-search/types.ts @@ -1 +1,28 @@ -export type * from '../../../wow/src/media-search/types'; +import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; + +/** + * The search parameters for media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface MediaSearchParameters extends BaseSearchParameters { + tags?: string; +} + +/** + * The response for a media search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface MediaSearchResponseItem extends KeyBase { + data: { + assets: Array; + id: number; + }; +} + +interface MediaAsset { + file_data_id: number; + key: string; + value: string; +} diff --git a/packages/classic-wow/src/playable-race/types.ts b/packages/classic-wow/src/playable-race/types.ts index 14af7f6c..d765386e 100644 --- a/packages/classic-wow/src/playable-race/types.ts +++ b/packages/classic-wow/src/playable-race/types.ts @@ -1 +1,21 @@ -export type * from '../../../wow/src/playable-race/types'; +import type { Faction, GenderName, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; + +/** + * The playable race index response. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PlayableRaceIndexResponse extends ResponseBase { + races: Array; +} + +/** + * The playable race response. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PlayableRaceResponse extends NameId, ResponseBase { + faction: Faction; + gender_name: GenderName; + is_allied_race: boolean; + is_selectable: boolean; + playable_classes: Array; +} diff --git a/packages/classic-wow/src/power-type/types.ts b/packages/classic-wow/src/power-type/types.ts index bc627af7..ea0197ed 100644 --- a/packages/classic-wow/src/power-type/types.ts +++ b/packages/classic-wow/src/power-type/types.ts @@ -1 +1,15 @@ -export type * from '../../../wow/src/power-type/types'; +import type { NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; + +/** + * The response for a power type index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PowerTypeIndexResponse extends ResponseBase { + power_types: Array; +} + +/** + * The response for a power type. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PowerTypeResponse extends NameId, ResponseBase {} diff --git a/packages/classic-wow/src/pvp-season/types.ts b/packages/classic-wow/src/pvp-season/types.ts index 5a831cc5..526a18f7 100644 --- a/packages/classic-wow/src/pvp-season/types.ts +++ b/packages/classic-wow/src/pvp-season/types.ts @@ -1 +1,26 @@ -export type { PvpSeasonIndexResponse, PvpSeasonResponse } from '../../../wow/src/pvp-season/types'; +import type { KeyBase, ResponseBase } from '@blizzard-api/core'; + +/** + * The response for a PvP season index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PvpSeasonIndexResponse extends ResponseBase { + current_season: Season; + seasons: Array; +} + +/** + * The response for a PvP season. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PvpSeasonResponse extends ResponseBase { + id: number; + leaderboards: { href: string }; + rewards: { href: string }; + season_name?: string; + season_start_timestamp: number; +} + +interface Season extends KeyBase { + id: number; +} diff --git a/packages/classic-wow/src/realm/types.ts b/packages/classic-wow/src/realm/types.ts index 7b93dfce..93e0bada 100644 --- a/packages/classic-wow/src/realm/types.ts +++ b/packages/classic-wow/src/realm/types.ts @@ -1 +1,117 @@ -export type * from '../../../wow/src/realm/types'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + NameId, + NameIdKey, + Realm, + ResponseBase, +} from '@blizzard-api/core'; + +/** + * The category of a realm. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export type RealmCategory = + | 'Brazil' + | 'English' + | 'French' + | 'German' + | 'Italian' + | 'Latin America' + | 'Oceanic' + | 'PS' + | 'Russian' + | 'Spanish' + | 'United States' + | '한국'; + +/** + * The response for a realm index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface RealmIndexResponse extends ResponseBase { + realms: Array; +} + +export type RealmLocales = + | 'deDE' + | 'enGB' + | 'enUS' + | 'esES' + | 'esMX' + | 'frFR' + | 'itIT' + | 'koKR' + | 'ptBR' + | 'ptPT' + | 'ruRU' + | 'zhCN' + | 'zhTW'; + +/** + * The response for a realm. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface RealmResponse extends NameId, ResponseBase { + category: RealmCategory; + connected_realm: { href: string }; + is_tournament: boolean; + locale: RealmLocales; + region: NameIdKey; + slug: string; + timezone: RealmTimezone; + type: { name: RealmType; type: RealmTypeCapitalized }; +} + +/** + * The search parameters for realms. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface RealmSearchParameters extends BaseSearchParameters { + timezone?: RealmTimezone; +} + +/** + * The response for a realm search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} + */ +export interface RealmSearchResponseItem extends KeyBase { + data: { + category: Record; + id: number; + is_tournament: boolean; + locale: RealmLocales; + name: Record; + region: { id: number; name: Record }; + slug: string; + timezone: RealmTimezone; + type: { name: RealmType; type: RealmTypeCapitalized }; + }; +} + +/** + * The timezone of a realm. + */ +export type RealmTimezone = + | 'America/Chicago' + | 'America/Denver' + | 'America/Los_Angeles' + | 'America/New_York' + | 'America/Sao_Paulo' + | 'Asia/Seoul' + | 'Australia/Melbourne' + | 'Europe/Paris'; + +/** + * The type of a realm, not capitalized or shortened. + */ +export type RealmType = 'Normal' | 'Roleplaying'; + +/** + * The type of a realm, capitalized and shortended). + */ + +export type RealmTypeCapitalized = 'NORMAL' | 'RP'; diff --git a/packages/classic-wow/src/region/types.ts b/packages/classic-wow/src/region/types.ts index 7d5b6202..cd2b9006 100644 --- a/packages/classic-wow/src/region/types.ts +++ b/packages/classic-wow/src/region/types.ts @@ -1 +1,18 @@ -export type * from '../../../wow/src/region/types'; +import type { NameId, ResponseBase } from '@blizzard-api/core'; + +/** + * The response for a region index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface RegionIndexResponse extends ResponseBase { + regions: Array<{ href: string }>; +} + +/** + * The response for a region. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface RegionResponse extends NameId, ResponseBase { + patch_string: string; + tag: string; +} diff --git a/packages/wow/src/guild-crest/types.ts b/packages/wow/src/guild-crest/types.ts index 5748eee4..c786d7fa 100644 --- a/packages/wow/src/guild-crest/types.ts +++ b/packages/wow/src/guild-crest/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, ResponseBase } from '@blizzard-api/core'; +import type { Color, KeyBase, ResponseBase } from '@blizzard-api/core'; /** * The response for a guild crest border or emblem. @@ -21,7 +21,7 @@ export interface GuildCrestComponentsIndexResponse extends ResponseBase { interface Background { id: number; - rgba: RGBA; + rgba: Color; } interface Border { @@ -43,10 +43,3 @@ interface GuildCrestAsset { interface Media extends KeyBase { id: number; } - -interface RGBA { - a: number; - b: number; - g: number; - r: number; -} diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index c2ae6454..1ff8ce5e 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -1,5 +1,13 @@ -import type { BaseSearchParameters, Color, KeyBase, Locales, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; - +import type { + BaseSearchParameters, + Color, + KeyBase, + Locales, + MediaAsset, + NameId, + NameIdKey, + ResponseBase, +} from '@blizzard-api/core'; /** * The response for an item class index. diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index f9fdd200..b18db842 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -1,5 +1,12 @@ -import type { BaseSearchParameters, KeyBase, Locales, NameId, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; - +import type { + BaseSearchParameters, + KeyBase, + Locales, + NameId, + NameIdKey, + Realm, + ResponseBase, +} from '@blizzard-api/core'; /** * The category of a realm. @@ -81,7 +88,7 @@ export interface RealmSearchResponseItem extends KeyBase { region: { id: number; name: Record }; slug: string; timezone: RealmTimezone; - type: { name: Record; type: RealmTypeCapitalized }; + type: { name: RealmType; type: RealmTypeCapitalized }; }; } From c52ec27ec3772fcea86e81922e2cccc10b797733 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:11:40 +0100 Subject: [PATCH 09/52] Move schemas one level deeper --- generated/{ => schemas}/classic-wow/auction-house.ts | 0 generated/{ => schemas}/classic-wow/character-achievements.ts | 0 generated/{ => schemas}/classic-wow/character-equipment.ts | 0 generated/{ => schemas}/classic-wow/character-hunter-pets.ts | 0 generated/{ => schemas}/classic-wow/character-media.ts | 0 generated/{ => schemas}/classic-wow/character-profile.ts | 0 generated/{ => schemas}/classic-wow/character-specialization.ts | 0 generated/{ => schemas}/classic-wow/character-statistics.ts | 0 generated/{ => schemas}/classic-wow/connected-realm.ts | 0 generated/{ => schemas}/classic-wow/creature.ts | 0 generated/{ => schemas}/classic-wow/guild-crest.ts | 0 generated/{ => schemas}/classic-wow/guild.ts | 0 generated/{ => schemas}/classic-wow/index.ts | 0 generated/{ => schemas}/classic-wow/item.ts | 0 generated/{ => schemas}/classic-wow/media-search.ts | 0 generated/{ => schemas}/classic-wow/playable-class.ts | 0 generated/{ => schemas}/classic-wow/playable-race.ts | 0 generated/{ => schemas}/classic-wow/power-type.ts | 0 generated/{ => schemas}/classic-wow/pvp-season.ts | 0 generated/{ => schemas}/classic-wow/realm.ts | 0 generated/{ => schemas}/classic-wow/region.ts | 0 generated/{ => schemas}/core/base.ts | 0 generated/{ => schemas}/core/index.ts | 0 generated/{ => schemas}/core/locales.ts | 0 generated/{ => schemas}/core/namespace.ts | 0 generated/{ => schemas}/d3/act.ts | 0 generated/{ => schemas}/d3/artisan-and-recipe.ts | 0 generated/{ => schemas}/d3/character-class-and-skill.ts | 0 generated/{ => schemas}/d3/follower.ts | 0 generated/{ => schemas}/d3/game-data.ts | 0 generated/{ => schemas}/d3/index.ts | 0 generated/{ => schemas}/d3/item-type.ts | 0 generated/{ => schemas}/d3/item.ts | 0 generated/{ => schemas}/d3/profile.ts | 0 generated/{ => schemas}/hs/card-backs.ts | 0 generated/{ => schemas}/hs/cards.ts | 0 generated/{ => schemas}/hs/decks.ts | 0 generated/{ => schemas}/hs/index.ts | 0 generated/{ => schemas}/hs/metadata.ts | 0 generated/{ => schemas}/sc2/index.ts | 0 generated/{ => schemas}/sc2/ladder.ts | 0 generated/{ => schemas}/sc2/league.ts | 0 generated/{ => schemas}/sc2/legacy.ts | 0 generated/{ => schemas}/sc2/profile.ts | 0 generated/{ => schemas}/wow/account-profile.ts | 0 generated/{ => schemas}/wow/achievements.ts | 0 generated/{ => schemas}/wow/auction-house.ts | 0 generated/{ => schemas}/wow/azerite-essence.ts | 0 generated/{ => schemas}/wow/character-achievements.ts | 0 generated/{ => schemas}/wow/character-appearance.ts | 0 generated/{ => schemas}/wow/character-collections.ts | 0 generated/{ => schemas}/wow/character-encounters.ts | 0 generated/{ => schemas}/wow/character-equipment.ts | 0 generated/{ => schemas}/wow/character-hunter-pets.ts | 0 generated/{ => schemas}/wow/character-media.ts | 0 .../{ => schemas}/wow/character-mythic-keystone-profile.ts | 0 generated/{ => schemas}/wow/character-professions.ts | 0 generated/{ => schemas}/wow/character-profile.ts | 0 generated/{ => schemas}/wow/character-pvp.ts | 0 generated/{ => schemas}/wow/character-quests.ts | 0 generated/{ => schemas}/wow/character-reputations.ts | 0 generated/{ => schemas}/wow/character-soulbinds.ts | 0 generated/{ => schemas}/wow/character-specializations.ts | 0 generated/{ => schemas}/wow/character-statistics.ts | 0 generated/{ => schemas}/wow/character-titles.ts | 0 generated/{ => schemas}/wow/connected-realm.ts | 0 generated/{ => schemas}/wow/covenant.ts | 0 generated/{ => schemas}/wow/creature.ts | 0 generated/{ => schemas}/wow/guild-crest.ts | 0 generated/{ => schemas}/wow/guild.ts | 0 generated/{ => schemas}/wow/heirloom.ts | 0 generated/{ => schemas}/wow/index.ts | 0 generated/{ => schemas}/wow/item.ts | 0 generated/{ => schemas}/wow/journal.ts | 0 generated/{ => schemas}/wow/media-search.ts | 0 generated/{ => schemas}/wow/modified-crafting.ts | 0 generated/{ => schemas}/wow/mount.ts | 0 generated/{ => schemas}/wow/mythic-keystone-affix.ts | 0 generated/{ => schemas}/wow/mythic-keystone-dungeon.ts | 0 generated/{ => schemas}/wow/mythic-keystone-leaderboard.ts | 0 generated/{ => schemas}/wow/mythic-raid-leaderboard.ts | 0 generated/{ => schemas}/wow/pet.ts | 0 generated/{ => schemas}/wow/playable-class.ts | 0 generated/{ => schemas}/wow/playable-race.ts | 0 generated/{ => schemas}/wow/playable-specialization.ts | 0 generated/{ => schemas}/wow/power-type.ts | 0 generated/{ => schemas}/wow/profession.ts | 0 generated/{ => schemas}/wow/pvp-season.ts | 0 generated/{ => schemas}/wow/pvp-tier.ts | 0 generated/{ => schemas}/wow/quest.ts | 0 generated/{ => schemas}/wow/realm.ts | 0 generated/{ => schemas}/wow/region.ts | 0 generated/{ => schemas}/wow/reputations.ts | 0 generated/{ => schemas}/wow/spell.ts | 0 generated/{ => schemas}/wow/talent.ts | 0 generated/{ => schemas}/wow/tech-talent.ts | 0 generated/{ => schemas}/wow/title.ts | 0 generated/{ => schemas}/wow/toy.ts | 0 generated/{ => schemas}/wow/wow-token.ts | 0 scripts/generate-zod.ts | 2 +- 100 files changed, 1 insertion(+), 1 deletion(-) rename generated/{ => schemas}/classic-wow/auction-house.ts (100%) rename generated/{ => schemas}/classic-wow/character-achievements.ts (100%) rename generated/{ => schemas}/classic-wow/character-equipment.ts (100%) rename generated/{ => schemas}/classic-wow/character-hunter-pets.ts (100%) rename generated/{ => schemas}/classic-wow/character-media.ts (100%) rename generated/{ => schemas}/classic-wow/character-profile.ts (100%) rename generated/{ => schemas}/classic-wow/character-specialization.ts (100%) rename generated/{ => schemas}/classic-wow/character-statistics.ts (100%) rename generated/{ => schemas}/classic-wow/connected-realm.ts (100%) rename generated/{ => schemas}/classic-wow/creature.ts (100%) rename generated/{ => schemas}/classic-wow/guild-crest.ts (100%) rename generated/{ => schemas}/classic-wow/guild.ts (100%) rename generated/{ => schemas}/classic-wow/index.ts (100%) rename generated/{ => schemas}/classic-wow/item.ts (100%) rename generated/{ => schemas}/classic-wow/media-search.ts (100%) rename generated/{ => schemas}/classic-wow/playable-class.ts (100%) rename generated/{ => schemas}/classic-wow/playable-race.ts (100%) rename generated/{ => schemas}/classic-wow/power-type.ts (100%) rename generated/{ => schemas}/classic-wow/pvp-season.ts (100%) rename generated/{ => schemas}/classic-wow/realm.ts (100%) rename generated/{ => schemas}/classic-wow/region.ts (100%) rename generated/{ => schemas}/core/base.ts (100%) rename generated/{ => schemas}/core/index.ts (100%) rename generated/{ => schemas}/core/locales.ts (100%) rename generated/{ => schemas}/core/namespace.ts (100%) rename generated/{ => schemas}/d3/act.ts (100%) rename generated/{ => schemas}/d3/artisan-and-recipe.ts (100%) rename generated/{ => schemas}/d3/character-class-and-skill.ts (100%) rename generated/{ => schemas}/d3/follower.ts (100%) rename generated/{ => schemas}/d3/game-data.ts (100%) rename generated/{ => schemas}/d3/index.ts (100%) rename generated/{ => schemas}/d3/item-type.ts (100%) rename generated/{ => schemas}/d3/item.ts (100%) rename generated/{ => schemas}/d3/profile.ts (100%) rename generated/{ => schemas}/hs/card-backs.ts (100%) rename generated/{ => schemas}/hs/cards.ts (100%) rename generated/{ => schemas}/hs/decks.ts (100%) rename generated/{ => schemas}/hs/index.ts (100%) rename generated/{ => schemas}/hs/metadata.ts (100%) rename generated/{ => schemas}/sc2/index.ts (100%) rename generated/{ => schemas}/sc2/ladder.ts (100%) rename generated/{ => schemas}/sc2/league.ts (100%) rename generated/{ => schemas}/sc2/legacy.ts (100%) rename generated/{ => schemas}/sc2/profile.ts (100%) rename generated/{ => schemas}/wow/account-profile.ts (100%) rename generated/{ => schemas}/wow/achievements.ts (100%) rename generated/{ => schemas}/wow/auction-house.ts (100%) rename generated/{ => schemas}/wow/azerite-essence.ts (100%) rename generated/{ => schemas}/wow/character-achievements.ts (100%) rename generated/{ => schemas}/wow/character-appearance.ts (100%) rename generated/{ => schemas}/wow/character-collections.ts (100%) rename generated/{ => schemas}/wow/character-encounters.ts (100%) rename generated/{ => schemas}/wow/character-equipment.ts (100%) rename generated/{ => schemas}/wow/character-hunter-pets.ts (100%) rename generated/{ => schemas}/wow/character-media.ts (100%) rename generated/{ => schemas}/wow/character-mythic-keystone-profile.ts (100%) rename generated/{ => schemas}/wow/character-professions.ts (100%) rename generated/{ => schemas}/wow/character-profile.ts (100%) rename generated/{ => schemas}/wow/character-pvp.ts (100%) rename generated/{ => schemas}/wow/character-quests.ts (100%) rename generated/{ => schemas}/wow/character-reputations.ts (100%) rename generated/{ => schemas}/wow/character-soulbinds.ts (100%) rename generated/{ => schemas}/wow/character-specializations.ts (100%) rename generated/{ => schemas}/wow/character-statistics.ts (100%) rename generated/{ => schemas}/wow/character-titles.ts (100%) rename generated/{ => schemas}/wow/connected-realm.ts (100%) rename generated/{ => schemas}/wow/covenant.ts (100%) rename generated/{ => schemas}/wow/creature.ts (100%) rename generated/{ => schemas}/wow/guild-crest.ts (100%) rename generated/{ => schemas}/wow/guild.ts (100%) rename generated/{ => schemas}/wow/heirloom.ts (100%) rename generated/{ => schemas}/wow/index.ts (100%) rename generated/{ => schemas}/wow/item.ts (100%) rename generated/{ => schemas}/wow/journal.ts (100%) rename generated/{ => schemas}/wow/media-search.ts (100%) rename generated/{ => schemas}/wow/modified-crafting.ts (100%) rename generated/{ => schemas}/wow/mount.ts (100%) rename generated/{ => schemas}/wow/mythic-keystone-affix.ts (100%) rename generated/{ => schemas}/wow/mythic-keystone-dungeon.ts (100%) rename generated/{ => schemas}/wow/mythic-keystone-leaderboard.ts (100%) rename generated/{ => schemas}/wow/mythic-raid-leaderboard.ts (100%) rename generated/{ => schemas}/wow/pet.ts (100%) rename generated/{ => schemas}/wow/playable-class.ts (100%) rename generated/{ => schemas}/wow/playable-race.ts (100%) rename generated/{ => schemas}/wow/playable-specialization.ts (100%) rename generated/{ => schemas}/wow/power-type.ts (100%) rename generated/{ => schemas}/wow/profession.ts (100%) rename generated/{ => schemas}/wow/pvp-season.ts (100%) rename generated/{ => schemas}/wow/pvp-tier.ts (100%) rename generated/{ => schemas}/wow/quest.ts (100%) rename generated/{ => schemas}/wow/realm.ts (100%) rename generated/{ => schemas}/wow/region.ts (100%) rename generated/{ => schemas}/wow/reputations.ts (100%) rename generated/{ => schemas}/wow/spell.ts (100%) rename generated/{ => schemas}/wow/talent.ts (100%) rename generated/{ => schemas}/wow/tech-talent.ts (100%) rename generated/{ => schemas}/wow/title.ts (100%) rename generated/{ => schemas}/wow/toy.ts (100%) rename generated/{ => schemas}/wow/wow-token.ts (100%) diff --git a/generated/classic-wow/auction-house.ts b/generated/schemas/classic-wow/auction-house.ts similarity index 100% rename from generated/classic-wow/auction-house.ts rename to generated/schemas/classic-wow/auction-house.ts diff --git a/generated/classic-wow/character-achievements.ts b/generated/schemas/classic-wow/character-achievements.ts similarity index 100% rename from generated/classic-wow/character-achievements.ts rename to generated/schemas/classic-wow/character-achievements.ts diff --git a/generated/classic-wow/character-equipment.ts b/generated/schemas/classic-wow/character-equipment.ts similarity index 100% rename from generated/classic-wow/character-equipment.ts rename to generated/schemas/classic-wow/character-equipment.ts diff --git a/generated/classic-wow/character-hunter-pets.ts b/generated/schemas/classic-wow/character-hunter-pets.ts similarity index 100% rename from generated/classic-wow/character-hunter-pets.ts rename to generated/schemas/classic-wow/character-hunter-pets.ts diff --git a/generated/classic-wow/character-media.ts b/generated/schemas/classic-wow/character-media.ts similarity index 100% rename from generated/classic-wow/character-media.ts rename to generated/schemas/classic-wow/character-media.ts diff --git a/generated/classic-wow/character-profile.ts b/generated/schemas/classic-wow/character-profile.ts similarity index 100% rename from generated/classic-wow/character-profile.ts rename to generated/schemas/classic-wow/character-profile.ts diff --git a/generated/classic-wow/character-specialization.ts b/generated/schemas/classic-wow/character-specialization.ts similarity index 100% rename from generated/classic-wow/character-specialization.ts rename to generated/schemas/classic-wow/character-specialization.ts diff --git a/generated/classic-wow/character-statistics.ts b/generated/schemas/classic-wow/character-statistics.ts similarity index 100% rename from generated/classic-wow/character-statistics.ts rename to generated/schemas/classic-wow/character-statistics.ts diff --git a/generated/classic-wow/connected-realm.ts b/generated/schemas/classic-wow/connected-realm.ts similarity index 100% rename from generated/classic-wow/connected-realm.ts rename to generated/schemas/classic-wow/connected-realm.ts diff --git a/generated/classic-wow/creature.ts b/generated/schemas/classic-wow/creature.ts similarity index 100% rename from generated/classic-wow/creature.ts rename to generated/schemas/classic-wow/creature.ts diff --git a/generated/classic-wow/guild-crest.ts b/generated/schemas/classic-wow/guild-crest.ts similarity index 100% rename from generated/classic-wow/guild-crest.ts rename to generated/schemas/classic-wow/guild-crest.ts diff --git a/generated/classic-wow/guild.ts b/generated/schemas/classic-wow/guild.ts similarity index 100% rename from generated/classic-wow/guild.ts rename to generated/schemas/classic-wow/guild.ts diff --git a/generated/classic-wow/index.ts b/generated/schemas/classic-wow/index.ts similarity index 100% rename from generated/classic-wow/index.ts rename to generated/schemas/classic-wow/index.ts diff --git a/generated/classic-wow/item.ts b/generated/schemas/classic-wow/item.ts similarity index 100% rename from generated/classic-wow/item.ts rename to generated/schemas/classic-wow/item.ts diff --git a/generated/classic-wow/media-search.ts b/generated/schemas/classic-wow/media-search.ts similarity index 100% rename from generated/classic-wow/media-search.ts rename to generated/schemas/classic-wow/media-search.ts diff --git a/generated/classic-wow/playable-class.ts b/generated/schemas/classic-wow/playable-class.ts similarity index 100% rename from generated/classic-wow/playable-class.ts rename to generated/schemas/classic-wow/playable-class.ts diff --git a/generated/classic-wow/playable-race.ts b/generated/schemas/classic-wow/playable-race.ts similarity index 100% rename from generated/classic-wow/playable-race.ts rename to generated/schemas/classic-wow/playable-race.ts diff --git a/generated/classic-wow/power-type.ts b/generated/schemas/classic-wow/power-type.ts similarity index 100% rename from generated/classic-wow/power-type.ts rename to generated/schemas/classic-wow/power-type.ts diff --git a/generated/classic-wow/pvp-season.ts b/generated/schemas/classic-wow/pvp-season.ts similarity index 100% rename from generated/classic-wow/pvp-season.ts rename to generated/schemas/classic-wow/pvp-season.ts diff --git a/generated/classic-wow/realm.ts b/generated/schemas/classic-wow/realm.ts similarity index 100% rename from generated/classic-wow/realm.ts rename to generated/schemas/classic-wow/realm.ts diff --git a/generated/classic-wow/region.ts b/generated/schemas/classic-wow/region.ts similarity index 100% rename from generated/classic-wow/region.ts rename to generated/schemas/classic-wow/region.ts diff --git a/generated/core/base.ts b/generated/schemas/core/base.ts similarity index 100% rename from generated/core/base.ts rename to generated/schemas/core/base.ts diff --git a/generated/core/index.ts b/generated/schemas/core/index.ts similarity index 100% rename from generated/core/index.ts rename to generated/schemas/core/index.ts diff --git a/generated/core/locales.ts b/generated/schemas/core/locales.ts similarity index 100% rename from generated/core/locales.ts rename to generated/schemas/core/locales.ts diff --git a/generated/core/namespace.ts b/generated/schemas/core/namespace.ts similarity index 100% rename from generated/core/namespace.ts rename to generated/schemas/core/namespace.ts diff --git a/generated/d3/act.ts b/generated/schemas/d3/act.ts similarity index 100% rename from generated/d3/act.ts rename to generated/schemas/d3/act.ts diff --git a/generated/d3/artisan-and-recipe.ts b/generated/schemas/d3/artisan-and-recipe.ts similarity index 100% rename from generated/d3/artisan-and-recipe.ts rename to generated/schemas/d3/artisan-and-recipe.ts diff --git a/generated/d3/character-class-and-skill.ts b/generated/schemas/d3/character-class-and-skill.ts similarity index 100% rename from generated/d3/character-class-and-skill.ts rename to generated/schemas/d3/character-class-and-skill.ts diff --git a/generated/d3/follower.ts b/generated/schemas/d3/follower.ts similarity index 100% rename from generated/d3/follower.ts rename to generated/schemas/d3/follower.ts diff --git a/generated/d3/game-data.ts b/generated/schemas/d3/game-data.ts similarity index 100% rename from generated/d3/game-data.ts rename to generated/schemas/d3/game-data.ts diff --git a/generated/d3/index.ts b/generated/schemas/d3/index.ts similarity index 100% rename from generated/d3/index.ts rename to generated/schemas/d3/index.ts diff --git a/generated/d3/item-type.ts b/generated/schemas/d3/item-type.ts similarity index 100% rename from generated/d3/item-type.ts rename to generated/schemas/d3/item-type.ts diff --git a/generated/d3/item.ts b/generated/schemas/d3/item.ts similarity index 100% rename from generated/d3/item.ts rename to generated/schemas/d3/item.ts diff --git a/generated/d3/profile.ts b/generated/schemas/d3/profile.ts similarity index 100% rename from generated/d3/profile.ts rename to generated/schemas/d3/profile.ts diff --git a/generated/hs/card-backs.ts b/generated/schemas/hs/card-backs.ts similarity index 100% rename from generated/hs/card-backs.ts rename to generated/schemas/hs/card-backs.ts diff --git a/generated/hs/cards.ts b/generated/schemas/hs/cards.ts similarity index 100% rename from generated/hs/cards.ts rename to generated/schemas/hs/cards.ts diff --git a/generated/hs/decks.ts b/generated/schemas/hs/decks.ts similarity index 100% rename from generated/hs/decks.ts rename to generated/schemas/hs/decks.ts diff --git a/generated/hs/index.ts b/generated/schemas/hs/index.ts similarity index 100% rename from generated/hs/index.ts rename to generated/schemas/hs/index.ts diff --git a/generated/hs/metadata.ts b/generated/schemas/hs/metadata.ts similarity index 100% rename from generated/hs/metadata.ts rename to generated/schemas/hs/metadata.ts diff --git a/generated/sc2/index.ts b/generated/schemas/sc2/index.ts similarity index 100% rename from generated/sc2/index.ts rename to generated/schemas/sc2/index.ts diff --git a/generated/sc2/ladder.ts b/generated/schemas/sc2/ladder.ts similarity index 100% rename from generated/sc2/ladder.ts rename to generated/schemas/sc2/ladder.ts diff --git a/generated/sc2/league.ts b/generated/schemas/sc2/league.ts similarity index 100% rename from generated/sc2/league.ts rename to generated/schemas/sc2/league.ts diff --git a/generated/sc2/legacy.ts b/generated/schemas/sc2/legacy.ts similarity index 100% rename from generated/sc2/legacy.ts rename to generated/schemas/sc2/legacy.ts diff --git a/generated/sc2/profile.ts b/generated/schemas/sc2/profile.ts similarity index 100% rename from generated/sc2/profile.ts rename to generated/schemas/sc2/profile.ts diff --git a/generated/wow/account-profile.ts b/generated/schemas/wow/account-profile.ts similarity index 100% rename from generated/wow/account-profile.ts rename to generated/schemas/wow/account-profile.ts diff --git a/generated/wow/achievements.ts b/generated/schemas/wow/achievements.ts similarity index 100% rename from generated/wow/achievements.ts rename to generated/schemas/wow/achievements.ts diff --git a/generated/wow/auction-house.ts b/generated/schemas/wow/auction-house.ts similarity index 100% rename from generated/wow/auction-house.ts rename to generated/schemas/wow/auction-house.ts diff --git a/generated/wow/azerite-essence.ts b/generated/schemas/wow/azerite-essence.ts similarity index 100% rename from generated/wow/azerite-essence.ts rename to generated/schemas/wow/azerite-essence.ts diff --git a/generated/wow/character-achievements.ts b/generated/schemas/wow/character-achievements.ts similarity index 100% rename from generated/wow/character-achievements.ts rename to generated/schemas/wow/character-achievements.ts diff --git a/generated/wow/character-appearance.ts b/generated/schemas/wow/character-appearance.ts similarity index 100% rename from generated/wow/character-appearance.ts rename to generated/schemas/wow/character-appearance.ts diff --git a/generated/wow/character-collections.ts b/generated/schemas/wow/character-collections.ts similarity index 100% rename from generated/wow/character-collections.ts rename to generated/schemas/wow/character-collections.ts diff --git a/generated/wow/character-encounters.ts b/generated/schemas/wow/character-encounters.ts similarity index 100% rename from generated/wow/character-encounters.ts rename to generated/schemas/wow/character-encounters.ts diff --git a/generated/wow/character-equipment.ts b/generated/schemas/wow/character-equipment.ts similarity index 100% rename from generated/wow/character-equipment.ts rename to generated/schemas/wow/character-equipment.ts diff --git a/generated/wow/character-hunter-pets.ts b/generated/schemas/wow/character-hunter-pets.ts similarity index 100% rename from generated/wow/character-hunter-pets.ts rename to generated/schemas/wow/character-hunter-pets.ts diff --git a/generated/wow/character-media.ts b/generated/schemas/wow/character-media.ts similarity index 100% rename from generated/wow/character-media.ts rename to generated/schemas/wow/character-media.ts diff --git a/generated/wow/character-mythic-keystone-profile.ts b/generated/schemas/wow/character-mythic-keystone-profile.ts similarity index 100% rename from generated/wow/character-mythic-keystone-profile.ts rename to generated/schemas/wow/character-mythic-keystone-profile.ts diff --git a/generated/wow/character-professions.ts b/generated/schemas/wow/character-professions.ts similarity index 100% rename from generated/wow/character-professions.ts rename to generated/schemas/wow/character-professions.ts diff --git a/generated/wow/character-profile.ts b/generated/schemas/wow/character-profile.ts similarity index 100% rename from generated/wow/character-profile.ts rename to generated/schemas/wow/character-profile.ts diff --git a/generated/wow/character-pvp.ts b/generated/schemas/wow/character-pvp.ts similarity index 100% rename from generated/wow/character-pvp.ts rename to generated/schemas/wow/character-pvp.ts diff --git a/generated/wow/character-quests.ts b/generated/schemas/wow/character-quests.ts similarity index 100% rename from generated/wow/character-quests.ts rename to generated/schemas/wow/character-quests.ts diff --git a/generated/wow/character-reputations.ts b/generated/schemas/wow/character-reputations.ts similarity index 100% rename from generated/wow/character-reputations.ts rename to generated/schemas/wow/character-reputations.ts diff --git a/generated/wow/character-soulbinds.ts b/generated/schemas/wow/character-soulbinds.ts similarity index 100% rename from generated/wow/character-soulbinds.ts rename to generated/schemas/wow/character-soulbinds.ts diff --git a/generated/wow/character-specializations.ts b/generated/schemas/wow/character-specializations.ts similarity index 100% rename from generated/wow/character-specializations.ts rename to generated/schemas/wow/character-specializations.ts diff --git a/generated/wow/character-statistics.ts b/generated/schemas/wow/character-statistics.ts similarity index 100% rename from generated/wow/character-statistics.ts rename to generated/schemas/wow/character-statistics.ts diff --git a/generated/wow/character-titles.ts b/generated/schemas/wow/character-titles.ts similarity index 100% rename from generated/wow/character-titles.ts rename to generated/schemas/wow/character-titles.ts diff --git a/generated/wow/connected-realm.ts b/generated/schemas/wow/connected-realm.ts similarity index 100% rename from generated/wow/connected-realm.ts rename to generated/schemas/wow/connected-realm.ts diff --git a/generated/wow/covenant.ts b/generated/schemas/wow/covenant.ts similarity index 100% rename from generated/wow/covenant.ts rename to generated/schemas/wow/covenant.ts diff --git a/generated/wow/creature.ts b/generated/schemas/wow/creature.ts similarity index 100% rename from generated/wow/creature.ts rename to generated/schemas/wow/creature.ts diff --git a/generated/wow/guild-crest.ts b/generated/schemas/wow/guild-crest.ts similarity index 100% rename from generated/wow/guild-crest.ts rename to generated/schemas/wow/guild-crest.ts diff --git a/generated/wow/guild.ts b/generated/schemas/wow/guild.ts similarity index 100% rename from generated/wow/guild.ts rename to generated/schemas/wow/guild.ts diff --git a/generated/wow/heirloom.ts b/generated/schemas/wow/heirloom.ts similarity index 100% rename from generated/wow/heirloom.ts rename to generated/schemas/wow/heirloom.ts diff --git a/generated/wow/index.ts b/generated/schemas/wow/index.ts similarity index 100% rename from generated/wow/index.ts rename to generated/schemas/wow/index.ts diff --git a/generated/wow/item.ts b/generated/schemas/wow/item.ts similarity index 100% rename from generated/wow/item.ts rename to generated/schemas/wow/item.ts diff --git a/generated/wow/journal.ts b/generated/schemas/wow/journal.ts similarity index 100% rename from generated/wow/journal.ts rename to generated/schemas/wow/journal.ts diff --git a/generated/wow/media-search.ts b/generated/schemas/wow/media-search.ts similarity index 100% rename from generated/wow/media-search.ts rename to generated/schemas/wow/media-search.ts diff --git a/generated/wow/modified-crafting.ts b/generated/schemas/wow/modified-crafting.ts similarity index 100% rename from generated/wow/modified-crafting.ts rename to generated/schemas/wow/modified-crafting.ts diff --git a/generated/wow/mount.ts b/generated/schemas/wow/mount.ts similarity index 100% rename from generated/wow/mount.ts rename to generated/schemas/wow/mount.ts diff --git a/generated/wow/mythic-keystone-affix.ts b/generated/schemas/wow/mythic-keystone-affix.ts similarity index 100% rename from generated/wow/mythic-keystone-affix.ts rename to generated/schemas/wow/mythic-keystone-affix.ts diff --git a/generated/wow/mythic-keystone-dungeon.ts b/generated/schemas/wow/mythic-keystone-dungeon.ts similarity index 100% rename from generated/wow/mythic-keystone-dungeon.ts rename to generated/schemas/wow/mythic-keystone-dungeon.ts diff --git a/generated/wow/mythic-keystone-leaderboard.ts b/generated/schemas/wow/mythic-keystone-leaderboard.ts similarity index 100% rename from generated/wow/mythic-keystone-leaderboard.ts rename to generated/schemas/wow/mythic-keystone-leaderboard.ts diff --git a/generated/wow/mythic-raid-leaderboard.ts b/generated/schemas/wow/mythic-raid-leaderboard.ts similarity index 100% rename from generated/wow/mythic-raid-leaderboard.ts rename to generated/schemas/wow/mythic-raid-leaderboard.ts diff --git a/generated/wow/pet.ts b/generated/schemas/wow/pet.ts similarity index 100% rename from generated/wow/pet.ts rename to generated/schemas/wow/pet.ts diff --git a/generated/wow/playable-class.ts b/generated/schemas/wow/playable-class.ts similarity index 100% rename from generated/wow/playable-class.ts rename to generated/schemas/wow/playable-class.ts diff --git a/generated/wow/playable-race.ts b/generated/schemas/wow/playable-race.ts similarity index 100% rename from generated/wow/playable-race.ts rename to generated/schemas/wow/playable-race.ts diff --git a/generated/wow/playable-specialization.ts b/generated/schemas/wow/playable-specialization.ts similarity index 100% rename from generated/wow/playable-specialization.ts rename to generated/schemas/wow/playable-specialization.ts diff --git a/generated/wow/power-type.ts b/generated/schemas/wow/power-type.ts similarity index 100% rename from generated/wow/power-type.ts rename to generated/schemas/wow/power-type.ts diff --git a/generated/wow/profession.ts b/generated/schemas/wow/profession.ts similarity index 100% rename from generated/wow/profession.ts rename to generated/schemas/wow/profession.ts diff --git a/generated/wow/pvp-season.ts b/generated/schemas/wow/pvp-season.ts similarity index 100% rename from generated/wow/pvp-season.ts rename to generated/schemas/wow/pvp-season.ts diff --git a/generated/wow/pvp-tier.ts b/generated/schemas/wow/pvp-tier.ts similarity index 100% rename from generated/wow/pvp-tier.ts rename to generated/schemas/wow/pvp-tier.ts diff --git a/generated/wow/quest.ts b/generated/schemas/wow/quest.ts similarity index 100% rename from generated/wow/quest.ts rename to generated/schemas/wow/quest.ts diff --git a/generated/wow/realm.ts b/generated/schemas/wow/realm.ts similarity index 100% rename from generated/wow/realm.ts rename to generated/schemas/wow/realm.ts diff --git a/generated/wow/region.ts b/generated/schemas/wow/region.ts similarity index 100% rename from generated/wow/region.ts rename to generated/schemas/wow/region.ts diff --git a/generated/wow/reputations.ts b/generated/schemas/wow/reputations.ts similarity index 100% rename from generated/wow/reputations.ts rename to generated/schemas/wow/reputations.ts diff --git a/generated/wow/spell.ts b/generated/schemas/wow/spell.ts similarity index 100% rename from generated/wow/spell.ts rename to generated/schemas/wow/spell.ts diff --git a/generated/wow/talent.ts b/generated/schemas/wow/talent.ts similarity index 100% rename from generated/wow/talent.ts rename to generated/schemas/wow/talent.ts diff --git a/generated/wow/tech-talent.ts b/generated/schemas/wow/tech-talent.ts similarity index 100% rename from generated/wow/tech-talent.ts rename to generated/schemas/wow/tech-talent.ts diff --git a/generated/wow/title.ts b/generated/schemas/wow/title.ts similarity index 100% rename from generated/wow/title.ts rename to generated/schemas/wow/title.ts diff --git a/generated/wow/toy.ts b/generated/schemas/wow/toy.ts similarity index 100% rename from generated/wow/toy.ts rename to generated/schemas/wow/toy.ts diff --git a/generated/wow/wow-token.ts b/generated/schemas/wow/wow-token.ts similarity index 100% rename from generated/wow/wow-token.ts rename to generated/schemas/wow/wow-token.ts diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index 4a427b79..aa12243b 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -47,7 +47,7 @@ async function run(): Promise { ? allFiles.filter((f) => f.endsWith('.ts') && !f.endsWith('.test.ts') && !f.endsWith('index.ts')) : allFiles.filter((f) => path.basename(f) === 'types.ts'); - const packageOut = path.join(root, 'generated', packageName); + const packageOut = path.join(root, 'generated', 'schemas', packageName); // Clean package output await fs.rm(packageOut, { force: true, recursive: true }); await fs.mkdir(packageOut, { recursive: true }); From 2612853a8a2e22b9f3560d17ffd7fe3255846a48 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:32:08 +0100 Subject: [PATCH 10/52] Add an integration test project using the new zod schemas --- .changeset/config.json | 2 +- .../auction-house.integration.test.ts | 66 +++++++++++++++++++ packages/integration-tests/package.json | 25 +++++++ pnpm-lock.yaml | 24 +++++++ 4 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 packages/integration-tests/classic-wow/auction-house.integration.test.ts create mode 100644 packages/integration-tests/package.json diff --git a/.changeset/config.json b/.changeset/config.json index 2be13d43..f14edd9d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["@blizzard-api/integration-tests"] } diff --git a/packages/integration-tests/classic-wow/auction-house.integration.test.ts b/packages/integration-tests/classic-wow/auction-house.integration.test.ts new file mode 100644 index 00000000..ac5bf150 --- /dev/null +++ b/packages/integration-tests/classic-wow/auction-house.integration.test.ts @@ -0,0 +1,66 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + auctionHouseIndexResponseSchema, + auctionsResponseSchema, + connectedRealmIndexResponseSchema, +} from '../../../generated/schemas/classic-wow'; + +//The auction house API is known to be flaky, so these tests are skipped by default. +describe.skip('classic-wow auction house integration', () => { + it('fetches index and validates responses with generated schemas', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + // 1) Get connected realm index and validate + const realmIndexResponse = await client.sendRequest(classicWow.connectedRealmIndex('dynamic-classic1x')); + const parsedRealmIndex = connectedRealmIndexResponseSchema.safeParse(realmIndexResponse); + if (!parsedRealmIndex.success) { + // Log detailed zod errors to help debugging + + console.error('Connected realm index validation failed:', treeifyError(parsedRealmIndex.error)); + } + expect(parsedRealmIndex.success).toBe(true); + + const firstRealm = realmIndexResponse.connected_realms?.[0]; + expect(firstRealm).toBeDefined(); + + // Extract connected realm id from the href (e.g. /data/wow/connected-realm/123) + const href = firstRealm?.href; + const match = /connected-realm\/(\d+)/.exec(href ?? ''); + expect(match).toBeTruthy(); + const connectedRealmId = Number(match?.[1]); + + // 2) Fetch auction house index for that connected realm and validate + const auctionIndexResponse = await client.sendRequest( + classicWow.auctionHouseIndex('dynamic-classic1x', connectedRealmId), + ); + const parsedAuctionIndex = auctionHouseIndexResponseSchema.safeParse(auctionIndexResponse); + if (!parsedAuctionIndex.success) { + console.error('Auction house index validation failed:', treeifyError(parsedAuctionIndex.error)); + } + expect(parsedAuctionIndex.success).toBe(true); + + const firstAuctionHouse = auctionIndexResponse.auctions?.[0]; + expect(firstAuctionHouse).toBeDefined(); + + const auctionHouseId = firstAuctionHouse?.id; + expect(auctionHouseId).toBeGreaterThan(0); + + // 3) Fetch auctions for that auction house and validate (may be large) + const auctionsResponse = await client.sendRequest( + classicWow.auctions('dynamic-classic1x', connectedRealmId, auctionHouseId ?? 0), + ); + const parsedAuctions = auctionsResponseSchema.safeParse(auctionsResponse); + if (!parsedAuctions.success) { + console.error('Auctions validation failed:', treeifyError(parsedAuctions.error)); + } + expect(parsedAuctions.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json new file mode 100644 index 00000000..ddfd8575 --- /dev/null +++ b/packages/integration-tests/package.json @@ -0,0 +1,25 @@ +{ + "name": "@blizzard-api/integration-tests", + "version": "0.0.1", + "license": "MIT", + "author": "Putro", + "description": "Integration tests for the Blizzard Battle.net API client", + "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/integration-tests", + "type": "module", + "engines": { + "node": "^18.18 || >=20.9" + }, + "devDependencies": { + "@blizzard-api/classic-wow": "workspace:*", + "@blizzard-api/client": "workspace:*", + "@blizzard-api/core": "workspace:*", + "@blizzard-api/d3": "workspace:*", + "@blizzard-api/hs": "workspace:*", + "@blizzard-api/sc2": "workspace:*", + "@blizzard-api/wow": "workspace:*" + }, + "scripts": { + "test": "vitest run", + "test:watch": "vitest watch" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 01ec3855..acaecec0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,6 +120,30 @@ importers: specifier: workspace:* version: link:../core + packages/integration-tests: + devDependencies: + '@blizzard-api/classic-wow': + specifier: workspace:* + version: link:../classic-wow + '@blizzard-api/client': + specifier: workspace:* + version: link:../client + '@blizzard-api/core': + specifier: workspace:* + version: link:../core + '@blizzard-api/d3': + specifier: workspace:* + version: link:../d3 + '@blizzard-api/hs': + specifier: workspace:* + version: link:../hs + '@blizzard-api/sc2': + specifier: workspace:* + version: link:../sc2 + '@blizzard-api/wow': + specifier: workspace:* + version: link:../wow + packages/sc2: devDependencies: '@blizzard-api/core': From bd1a617a90afaf73c6cb7016c4d00662fe79ac76 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:48:52 +0100 Subject: [PATCH 11/52] Update deps --- pnpm-lock.yaml | 718 ++++++++++++++++++++++++------------------------- 1 file changed, 354 insertions(+), 364 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index acaecec0..1fa47aa3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 2.29.8(@types/node@24.10.1) '@putstack/eslint-config-typescript': specifier: 4.11.0 - version: 4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript-eslint@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + version: 4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(typescript-eslint@8.48.0(eslint@9.39.1)(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.7.1) @@ -28,10 +28,10 @@ importers: version: 4.0.14(vitest@4.0.14) eslint: specifier: 9.39.1 - version: 9.39.1(jiti@2.6.1) + version: 9.39.1 eslint-plugin-jsdoc: specifier: 61.4.1 - version: 61.4.1(eslint@9.39.1(jiti@2.6.1)) + version: 61.4.1(eslint@9.39.1) husky: specifier: 9.1.7 version: 9.1.7 @@ -67,10 +67,10 @@ importers: version: 5.9.3 typescript-eslint: specifier: 8.48.0 - version: 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + version: 8.48.0(eslint@9.39.1)(typescript@5.9.3) vitest: specifier: 4.0.14 - version: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(tsx@4.20.6)(yaml@2.8.1) zod: specifier: 4.1.13 version: 4.1.13 @@ -248,11 +248,11 @@ packages: '@clack/prompts@1.0.0-alpha.4': resolution: {integrity: sha512-KnmtDF2xQGoI5AlBme9akHtvCRV0RKAARUXHBQO2tMwnY8B08/4zPWigT7uLK25UPrMCEqnyQPkKRjNdhPbf8g==} - '@emnapi/core@1.6.0': - resolution: {integrity: sha512-zq/ay+9fNIJJtJiZxdTnXS20PllcYMX3OE23ESc4HK/bdYu3cOWYVhsOhVnXALfU/uqJIxn5NBPd9z4v+SfoSg==} + '@emnapi/core@1.7.1': + resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} - '@emnapi/runtime@1.6.0': - resolution: {integrity: sha512-obtUmAHTMjll499P+D9A3axeJFlhdjOWdKUNs/U6QIGT7V5RjcUW1xToAzjvmgTSQhDbYn/NwfTRoJcQ2rNBxA==} + '@emnapi/runtime@1.7.1': + resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} '@emnapi/wasi-threads@1.1.0': resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} @@ -265,158 +265,158 @@ packages: resolution: {integrity: sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==} engines: {node: '>=10'} - '@esbuild/aix-ppc64@0.25.11': - resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==} + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.11': - resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==} + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.11': - resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==} + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.11': - resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==} + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.11': - resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==} + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.11': - resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==} + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.11': - resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==} + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.11': - resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==} + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.11': - resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==} + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.11': - resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==} + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.11': - resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==} + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.11': - resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==} + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.11': - resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==} + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.11': - resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==} + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.11': - resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==} + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.11': - resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==} + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.11': - resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==} + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.11': - resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==} + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.11': - resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==} + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.11': - resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==} + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.11': - resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==} + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.11': - resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==} + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.25.11': - resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==} + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.11': - resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==} + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.11': - resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==} + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.11': - resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==} + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -463,8 +463,8 @@ packages: resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@gerrit0/mini-shiki@3.13.1': - resolution: {integrity: sha512-fDWM5QQc70jwBIt/WYMybdyXdyBmoJe7r1hpM+V/bHnyla79sygVDK2/LlVxIPc4n5FA3B5Wzt7AQH2+psNphg==} + '@gerrit0/mini-shiki@3.15.0': + resolution: {integrity: sha512-L5IHdZIDa4bG4yJaOzfasOH/o22MCesY0mx+n6VATbaiCtMeR59pdRqYk4bEiQkIHfxsHPNgdi7VJlZb2FhdMQ==} '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} @@ -482,8 +482,8 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@inquirer/external-editor@1.0.2': - resolution: {integrity: sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==} + '@inquirer/external-editor@1.0.3': + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -654,127 +654,127 @@ packages: '@rolldown/pluginutils@1.0.0-beta.52': resolution: {integrity: sha512-/L0htLJZbaZFL1g9OHOblTxbCYIGefErJjtYOwgl9ZqNx27P3L0SDfjhhHIss32gu5NWgnxuT2a2Hnnv6QGHKA==} - '@rollup/rollup-android-arm-eabi@4.52.5': - resolution: {integrity: sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==} + '@rollup/rollup-android-arm-eabi@4.53.3': + resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.52.5': - resolution: {integrity: sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==} + '@rollup/rollup-android-arm64@4.53.3': + resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.52.5': - resolution: {integrity: sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==} + '@rollup/rollup-darwin-arm64@4.53.3': + resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.52.5': - resolution: {integrity: sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==} + '@rollup/rollup-darwin-x64@4.53.3': + resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.52.5': - resolution: {integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==} + '@rollup/rollup-freebsd-arm64@4.53.3': + resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.52.5': - resolution: {integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==} + '@rollup/rollup-freebsd-x64@4.53.3': + resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.52.5': - resolution: {integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.53.3': + resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.52.5': - resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} + '@rollup/rollup-linux-arm-musleabihf@4.53.3': + resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.52.5': - resolution: {integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==} + '@rollup/rollup-linux-arm64-gnu@4.53.3': + resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.52.5': - resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} + '@rollup/rollup-linux-arm64-musl@4.53.3': + resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.52.5': - resolution: {integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==} + '@rollup/rollup-linux-loong64-gnu@4.53.3': + resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.52.5': - resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} + '@rollup/rollup-linux-ppc64-gnu@4.53.3': + resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.52.5': - resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} + '@rollup/rollup-linux-riscv64-gnu@4.53.3': + resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.52.5': - resolution: {integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==} + '@rollup/rollup-linux-riscv64-musl@4.53.3': + resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.52.5': - resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} + '@rollup/rollup-linux-s390x-gnu@4.53.3': + resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.52.5': - resolution: {integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==} + '@rollup/rollup-linux-x64-gnu@4.53.3': + resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.52.5': - resolution: {integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==} + '@rollup/rollup-linux-x64-musl@4.53.3': + resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.52.5': - resolution: {integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==} + '@rollup/rollup-openharmony-arm64@4.53.3': + resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.52.5': - resolution: {integrity: sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==} + '@rollup/rollup-win32-arm64-msvc@4.53.3': + resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.52.5': - resolution: {integrity: sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==} + '@rollup/rollup-win32-ia32-msvc@4.53.3': + resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.52.5': - resolution: {integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==} + '@rollup/rollup-win32-x64-gnu@4.53.3': + resolution: {integrity: sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.52.5': - resolution: {integrity: sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==} + '@rollup/rollup-win32-x64-msvc@4.53.3': + resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==} cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.13.0': - resolution: {integrity: sha512-O42rBGr4UDSlhT2ZFMxqM7QzIU+IcpoTMzb3W7AlziI1ZF7R8eS2M0yt5Ry35nnnTX/LTLXFPUjRFCIW+Operg==} + '@shikijs/engine-oniguruma@3.17.0': + resolution: {integrity: sha512-flSbHZAiOZDNTrEbULY8DLWavu/TyVu/E7RChpLB4WvKX4iHMfj80C6Hi3TjIWaQtHOW0KC6kzMcuB5TO1hZ8Q==} - '@shikijs/langs@3.13.0': - resolution: {integrity: sha512-672c3WAETDYHwrRP0yLy3W1QYB89Hbpj+pO4KhxK6FzIrDI2FoEXNiNCut6BQmEApYLfuYfpgOZaqbY+E9b8wQ==} + '@shikijs/langs@3.17.0': + resolution: {integrity: sha512-icmur2n5Ojb+HAiQu6NEcIIJ8oWDFGGEpiqSCe43539Sabpx7Y829WR3QuUW2zjTM4l6V8Sazgb3rrHO2orEAw==} - '@shikijs/themes@3.13.0': - resolution: {integrity: sha512-Vxw1Nm1/Od8jyA7QuAenaV78BG2nSr3/gCGdBkLpfLscddCkzkL36Q5b67SrLLfvAJTOUzW39x4FHVCFriPVgg==} + '@shikijs/themes@3.17.0': + resolution: {integrity: sha512-/xEizMHLBmMHwtx4JuOkRf3zwhWD2bmG5BRr0IPjpcWpaq4C3mYEuTk/USAEglN0qPrTwEHwKVpSu/y2jhferA==} - '@shikijs/types@3.13.0': - resolution: {integrity: sha512-oM9P+NCFri/mmQ8LoFGVfVyemm5Hi27330zuOBp0annwJdKH1kOLndw3zCtAVDehPLg9fKqoEx3Ht/wNZxolfw==} + '@shikijs/types@3.17.0': + resolution: {integrity: sha512-wjLVfutYWVUnxAjsWEob98xgyaGv0dTEnMZDruU5mRjVN7szcGOfgO+997W2yR6odp+1PtSBNeSITRRTfUzK/g==} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -1036,8 +1036,8 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} - ansi-escapes@7.1.1: - resolution: {integrity: sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==} + ansi-escapes@7.2.0: + resolution: {integrity: sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==} engines: {node: '>=18'} ansi-regex@5.0.1: @@ -1095,8 +1095,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - baseline-browser-mapping@2.8.20: - resolution: {integrity: sha512-JMWsdF+O8Orq3EMukbUN1QfbLK9mX2CkUmQBcW2T0s8OmdAUL5LLM/6wFwSrqXzlXB13yhyK9gTKS1rIizOduQ==} + baseline-browser-mapping@2.8.31: + resolution: {integrity: sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==} hasBin: true better-path-resolve@1.0.0: @@ -1116,8 +1116,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.27.0: - resolution: {integrity: sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==} + browserslist@4.28.0: + resolution: {integrity: sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1141,8 +1141,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001751: - resolution: {integrity: sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==} + caniuse-lite@1.0.30001757: + resolution: {integrity: sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==} chai@6.2.1: resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} @@ -1155,8 +1155,8 @@ packages: change-case@5.4.4: resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} - chardet@2.1.0: - resolution: {integrity: sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==} + chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} chokidar@4.0.3: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} @@ -1215,8 +1215,8 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - core-js-compat@3.46.0: - resolution: {integrity: sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==} + core-js-compat@3.47.0: + resolution: {integrity: sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==} cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} @@ -1260,8 +1260,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.240: - resolution: {integrity: sha512-OBwbZjWgrCOH+g6uJsA2/7Twpas2OlepS9uvByJjR2datRDuKGYeD+nP8lBBks2qnB7bGJNHDUx7c/YLaT3QMQ==} + electron-to-chromium@1.5.262: + resolution: {integrity: sha512-NlAsMteRHek05jRUxUR0a5jpjYq9ykk6+kO0yRaMi5moe7u0fVIOeQ3Y30A8dIiWFBNUoQGi1ljb1i5VtS9WQQ==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -1288,8 +1288,8 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - esbuild@0.25.11: - resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==} + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} engines: {node: '>=18'} hasBin: true @@ -1529,8 +1529,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@16.4.0: - resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==} + globals@16.5.0: + resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} engines: {node: '>=18'} globby@11.1.0: @@ -1665,15 +1665,11 @@ packages: engines: {node: '>=10'} hasBin: true - jiti@2.6.1: - resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} - hasBin: true - js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + js-yaml@3.14.2: + resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} hasBin: true js-yaml@4.1.1: @@ -1790,8 +1786,8 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@10.0.3: - resolution: {integrity: sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==} + minimatch@10.1.1: + resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==} engines: {node: 20 || >=22} minimatch@3.1.2: @@ -1840,8 +1836,8 @@ packages: resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} engines: {node: '>=18'} - node-releases@2.0.26: - resolution: {integrity: sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==} + node-releases@2.0.27: + resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} npm-normalize-package-bin@4.0.0: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} @@ -2013,8 +2009,8 @@ packages: resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==} hasBin: true - reserved-identifiers@1.0.0: - resolution: {integrity: sha512-h0bP2Katmvf3hv4Z3WtDl4+6xt/OglQ2Xa6TnhZ/Rm9/7IH1crXQqMwD4J2ngKBonVv+fB55zfGgNDAmsevLVQ==} + reserved-identifiers@1.2.0: + resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==} engines: {node: '>=18'} resolve-from@4.0.0: @@ -2063,8 +2059,8 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.52.5: - resolution: {integrity: sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==} + rollup@4.53.3: + resolution: {integrity: sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2454,8 +2450,8 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - vite@7.1.12: - resolution: {integrity: sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==} + vite@7.2.4: + resolution: {integrity: sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2646,7 +2642,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.2(@types/node@24.10.1) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.1) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -2756,13 +2752,13 @@ snapshots: picocolors: 1.1.1 sisteransi: 1.0.5 - '@emnapi/core@1.6.0': + '@emnapi/core@1.7.1': dependencies: '@emnapi/wasi-threads': 1.1.0 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.6.0': + '@emnapi/runtime@1.7.1': dependencies: tslib: 2.8.1 optional: true @@ -2782,87 +2778,87 @@ snapshots: '@es-joy/resolve.exports@1.2.0': {} - '@esbuild/aix-ppc64@0.25.11': + '@esbuild/aix-ppc64@0.25.12': optional: true - '@esbuild/android-arm64@0.25.11': + '@esbuild/android-arm64@0.25.12': optional: true - '@esbuild/android-arm@0.25.11': + '@esbuild/android-arm@0.25.12': optional: true - '@esbuild/android-x64@0.25.11': + '@esbuild/android-x64@0.25.12': optional: true - '@esbuild/darwin-arm64@0.25.11': + '@esbuild/darwin-arm64@0.25.12': optional: true - '@esbuild/darwin-x64@0.25.11': + '@esbuild/darwin-x64@0.25.12': optional: true - '@esbuild/freebsd-arm64@0.25.11': + '@esbuild/freebsd-arm64@0.25.12': optional: true - '@esbuild/freebsd-x64@0.25.11': + '@esbuild/freebsd-x64@0.25.12': optional: true - '@esbuild/linux-arm64@0.25.11': + '@esbuild/linux-arm64@0.25.12': optional: true - '@esbuild/linux-arm@0.25.11': + '@esbuild/linux-arm@0.25.12': optional: true - '@esbuild/linux-ia32@0.25.11': + '@esbuild/linux-ia32@0.25.12': optional: true - '@esbuild/linux-loong64@0.25.11': + '@esbuild/linux-loong64@0.25.12': optional: true - '@esbuild/linux-mips64el@0.25.11': + '@esbuild/linux-mips64el@0.25.12': optional: true - '@esbuild/linux-ppc64@0.25.11': + '@esbuild/linux-ppc64@0.25.12': optional: true - '@esbuild/linux-riscv64@0.25.11': + '@esbuild/linux-riscv64@0.25.12': optional: true - '@esbuild/linux-s390x@0.25.11': + '@esbuild/linux-s390x@0.25.12': optional: true - '@esbuild/linux-x64@0.25.11': + '@esbuild/linux-x64@0.25.12': optional: true - '@esbuild/netbsd-arm64@0.25.11': + '@esbuild/netbsd-arm64@0.25.12': optional: true - '@esbuild/netbsd-x64@0.25.11': + '@esbuild/netbsd-x64@0.25.12': optional: true - '@esbuild/openbsd-arm64@0.25.11': + '@esbuild/openbsd-arm64@0.25.12': optional: true - '@esbuild/openbsd-x64@0.25.11': + '@esbuild/openbsd-x64@0.25.12': optional: true - '@esbuild/openharmony-arm64@0.25.11': + '@esbuild/openharmony-arm64@0.25.12': optional: true - '@esbuild/sunos-x64@0.25.11': + '@esbuild/sunos-x64@0.25.12': optional: true - '@esbuild/win32-arm64@0.25.11': + '@esbuild/win32-arm64@0.25.12': optional: true - '@esbuild/win32-ia32@0.25.11': + '@esbuild/win32-ia32@0.25.12': optional: true - '@esbuild/win32-x64@0.25.11': + '@esbuild/win32-x64@0.25.12': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1)': dependencies: - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -2908,12 +2904,12 @@ snapshots: '@eslint/core': 0.17.0 levn: 0.4.1 - '@gerrit0/mini-shiki@3.13.1': + '@gerrit0/mini-shiki@3.15.0': dependencies: - '@shikijs/engine-oniguruma': 3.13.0 - '@shikijs/langs': 3.13.0 - '@shikijs/themes': 3.13.0 - '@shikijs/types': 3.13.0 + '@shikijs/engine-oniguruma': 3.17.0 + '@shikijs/langs': 3.17.0 + '@shikijs/themes': 3.17.0 + '@shikijs/types': 3.17.0 '@shikijs/vscode-textmate': 10.0.2 '@humanfs/core@0.19.1': {} @@ -2927,9 +2923,9 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.2(@types/node@24.10.1)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.1)': dependencies: - chardet: 2.1.0 + chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: '@types/node': 24.10.1 @@ -2972,15 +2968,15 @@ snapshots: '@napi-rs/wasm-runtime@0.2.12': dependencies: - '@emnapi/core': 1.6.0 - '@emnapi/runtime': 1.6.0 + '@emnapi/core': 1.7.1 + '@emnapi/runtime': 1.7.1 '@tybys/wasm-util': 0.10.1 optional: true '@napi-rs/wasm-runtime@1.0.7': dependencies: - '@emnapi/core': 1.6.0 - '@emnapi/runtime': 1.6.0 + '@emnapi/core': 1.7.1 + '@emnapi/runtime': 1.7.1 '@tybys/wasm-util': 0.10.1 optional: true @@ -3023,20 +3019,20 @@ snapshots: '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript-eslint@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(typescript-eslint@8.48.0(eslint@9.39.1)(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.1 - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-de-morgan: 2.0.0(eslint@9.39.1(jiti@2.6.1)) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) + eslint: 9.39.1 + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1))(eslint@9.39.1) + eslint-plugin-de-morgan: 2.0.0(eslint@9.39.1) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-perfectionist: 4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-sonarjs: 3.0.5(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-unicorn: 62.0.0(eslint@9.39.1(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1) + eslint-plugin-perfectionist: 4.15.1(eslint@9.39.1)(typescript@5.9.3) + eslint-plugin-sonarjs: 3.0.5(eslint@9.39.1) + eslint-plugin-unicorn: 62.0.0(eslint@9.39.1) typescript: 5.9.3 - typescript-eslint: 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.48.0(eslint@9.39.1)(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3096,86 +3092,86 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.52': {} - '@rollup/rollup-android-arm-eabi@4.52.5': + '@rollup/rollup-android-arm-eabi@4.53.3': optional: true - '@rollup/rollup-android-arm64@4.52.5': + '@rollup/rollup-android-arm64@4.53.3': optional: true - '@rollup/rollup-darwin-arm64@4.52.5': + '@rollup/rollup-darwin-arm64@4.53.3': optional: true - '@rollup/rollup-darwin-x64@4.52.5': + '@rollup/rollup-darwin-x64@4.53.3': optional: true - '@rollup/rollup-freebsd-arm64@4.52.5': + '@rollup/rollup-freebsd-arm64@4.53.3': optional: true - '@rollup/rollup-freebsd-x64@4.52.5': + '@rollup/rollup-freebsd-x64@4.53.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.52.5': + '@rollup/rollup-linux-arm-gnueabihf@4.53.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.52.5': + '@rollup/rollup-linux-arm-musleabihf@4.53.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.52.5': + '@rollup/rollup-linux-arm64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.52.5': + '@rollup/rollup-linux-arm64-musl@4.53.3': optional: true - '@rollup/rollup-linux-loong64-gnu@4.52.5': + '@rollup/rollup-linux-loong64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.52.5': + '@rollup/rollup-linux-ppc64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.52.5': + '@rollup/rollup-linux-riscv64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.52.5': + '@rollup/rollup-linux-riscv64-musl@4.53.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.52.5': + '@rollup/rollup-linux-s390x-gnu@4.53.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.52.5': + '@rollup/rollup-linux-x64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-x64-musl@4.52.5': + '@rollup/rollup-linux-x64-musl@4.53.3': optional: true - '@rollup/rollup-openharmony-arm64@4.52.5': + '@rollup/rollup-openharmony-arm64@4.53.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.52.5': + '@rollup/rollup-win32-arm64-msvc@4.53.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.52.5': + '@rollup/rollup-win32-ia32-msvc@4.53.3': optional: true - '@rollup/rollup-win32-x64-gnu@4.52.5': + '@rollup/rollup-win32-x64-gnu@4.53.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.52.5': + '@rollup/rollup-win32-x64-msvc@4.53.3': optional: true - '@shikijs/engine-oniguruma@3.13.0': + '@shikijs/engine-oniguruma@3.17.0': dependencies: - '@shikijs/types': 3.13.0 + '@shikijs/types': 3.17.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@3.13.0': + '@shikijs/langs@3.17.0': dependencies: - '@shikijs/types': 3.13.0 + '@shikijs/types': 3.17.0 - '@shikijs/themes@3.13.0': + '@shikijs/themes@3.17.0': dependencies: - '@shikijs/types': 3.13.0 + '@shikijs/types': 3.17.0 - '@shikijs/types@3.13.0': + '@shikijs/types@3.17.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -3214,15 +3210,15 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.0(eslint@9.39.1)(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.48.0 - '@typescript-eslint/type-utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/type-utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.48.0 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -3231,14 +3227,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.48.0(eslint@9.39.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.48.0 '@typescript-eslint/types': 8.48.0 '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.48.0 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -3261,13 +3257,13 @@ snapshots: dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.48.0(eslint@9.39.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/types': 8.48.0 '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 ts-api-utils: 2.1.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: @@ -3290,13 +3286,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1) '@typescript-eslint/scope-manager': 8.48.0 '@typescript-eslint/types': 8.48.0 '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -3385,7 +3381,7 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) + vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(tsx@4.20.6)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -3398,13 +3394,13 @@ snapshots: chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1))': + '@vitest/mocker@4.0.14(vite@7.2.4(@types/node@24.10.1)(tsx@4.20.6)(yaml@2.8.1))': dependencies: '@vitest/spy': 4.0.14 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) + vite: 7.2.4(@types/node@24.10.1)(tsx@4.20.6)(yaml@2.8.1) '@vitest/pretty-format@4.0.14': dependencies: @@ -3432,7 +3428,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) + vitest: 4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(tsx@4.20.6)(yaml@2.8.1) '@vitest/utils@4.0.14': dependencies: @@ -3458,7 +3454,7 @@ snapshots: dependencies: type-fest: 0.21.3 - ansi-escapes@7.1.1: + ansi-escapes@7.2.0: dependencies: environment: 1.1.0 @@ -3503,7 +3499,7 @@ snapshots: balanced-match@1.0.2: {} - baseline-browser-mapping@2.8.20: {} + baseline-browser-mapping@2.8.31: {} better-path-resolve@1.0.0: dependencies: @@ -3524,13 +3520,13 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.27.0: + browserslist@4.28.0: dependencies: - baseline-browser-mapping: 2.8.20 - caniuse-lite: 1.0.30001751 - electron-to-chromium: 1.5.240 - node-releases: 2.0.26 - update-browserslist-db: 1.1.4(browserslist@4.27.0) + baseline-browser-mapping: 2.8.31 + caniuse-lite: 1.0.30001757 + electron-to-chromium: 1.5.262 + node-releases: 2.0.27 + update-browserslist-db: 1.1.4(browserslist@4.28.0) builtin-modules@3.3.0: {} @@ -3542,7 +3538,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001751: {} + caniuse-lite@1.0.30001757: {} chai@6.2.1: {} @@ -3553,7 +3549,7 @@ snapshots: change-case@5.4.4: {} - chardet@2.1.0: {} + chardet@2.1.1: {} chokidar@4.0.3: dependencies: @@ -3600,9 +3596,9 @@ snapshots: concat-map@0.0.1: {} - core-js-compat@3.46.0: + core-js-compat@3.47.0: dependencies: - browserslist: 4.27.0 + browserslist: 4.28.0 cross-spawn@7.0.6: dependencies: @@ -3632,7 +3628,7 @@ snapshots: dependencies: jake: 10.9.4 - electron-to-chromium@1.5.240: {} + electron-to-chromium@1.5.262: {} emoji-regex@10.6.0: {} @@ -3651,34 +3647,34 @@ snapshots: es-module-lexer@1.7.0: {} - esbuild@0.25.11: + esbuild@0.25.12: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.11 - '@esbuild/android-arm': 0.25.11 - '@esbuild/android-arm64': 0.25.11 - '@esbuild/android-x64': 0.25.11 - '@esbuild/darwin-arm64': 0.25.11 - '@esbuild/darwin-x64': 0.25.11 - '@esbuild/freebsd-arm64': 0.25.11 - '@esbuild/freebsd-x64': 0.25.11 - '@esbuild/linux-arm': 0.25.11 - '@esbuild/linux-arm64': 0.25.11 - '@esbuild/linux-ia32': 0.25.11 - '@esbuild/linux-loong64': 0.25.11 - '@esbuild/linux-mips64el': 0.25.11 - '@esbuild/linux-ppc64': 0.25.11 - '@esbuild/linux-riscv64': 0.25.11 - '@esbuild/linux-s390x': 0.25.11 - '@esbuild/linux-x64': 0.25.11 - '@esbuild/netbsd-arm64': 0.25.11 - '@esbuild/netbsd-x64': 0.25.11 - '@esbuild/openbsd-arm64': 0.25.11 - '@esbuild/openbsd-x64': 0.25.11 - '@esbuild/openharmony-arm64': 0.25.11 - '@esbuild/sunos-x64': 0.25.11 - '@esbuild/win32-arm64': 0.25.11 - '@esbuild/win32-ia32': 0.25.11 - '@esbuild/win32-x64': 0.25.11 + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 escalade@3.2.0: {} @@ -3693,10 +3689,10 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1))(eslint@9.39.1): dependencies: debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 eslint-import-context: 0.1.9(unrs-resolver@1.11.1) get-tsconfig: 4.13.0 is-bun-module: 2.0.0 @@ -3704,13 +3700,13 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1) transitivePeerDependencies: - supports-color - eslint-plugin-de-morgan@2.0.0(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-de-morgan@2.0.0(eslint@9.39.1): dependencies: - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 eslint-plugin-depend@1.4.0: dependencies: @@ -3718,24 +3714,24 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1): dependencies: '@typescript-eslint/types': 8.48.0 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 - minimatch: 10.0.3 + minimatch: 10.1.1 semver: 7.7.3 stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@61.4.1(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-jsdoc@61.4.1(eslint@9.39.1): dependencies: '@es-joy/jsdoccomment': 0.76.0 '@es-joy/resolve.exports': 1.2.0 @@ -3743,7 +3739,7 @@ snapshots: comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 espree: 10.4.0 esquery: 1.6.0 html-entities: 2.6.0 @@ -3755,22 +3751,22 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-perfectionist@4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@4.15.1(eslint@9.39.1)(typescript@5.9.3): dependencies: '@typescript-eslint/types': 8.48.0 - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) + eslint: 9.39.1 natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-sonarjs@3.0.5(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-sonarjs@3.0.5(eslint@9.39.1): dependencies: '@eslint-community/regexpp': 4.12.1 builtin-modules: 3.3.0 bytes: 3.1.2 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.1 functional-red-black-tree: 1.0.1 jsx-ast-utils-x: 0.1.0 lodash.merge: 4.6.2 @@ -3779,19 +3775,19 @@ snapshots: semver: 7.7.2 typescript: 5.9.3 - eslint-plugin-unicorn@62.0.0(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-unicorn@62.0.0(eslint@9.39.1): dependencies: '@babel/helper-validator-identifier': 7.28.5 - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1) '@eslint/plugin-kit': 0.4.1 change-case: 5.4.4 ci-info: 4.3.1 clean-regexp: 1.0.0 - core-js-compat: 3.46.0 - eslint: 9.39.1(jiti@2.6.1) + core-js-compat: 3.47.0 + eslint: 9.39.1 esquery: 1.6.0 find-up-simple: 1.0.1 - globals: 16.4.0 + globals: 16.5.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 jsesc: 3.1.0 @@ -3810,9 +3806,9 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.39.1(jiti@2.6.1): + eslint@9.39.1: dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 @@ -3846,8 +3842,6 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - optionalDependencies: - jiti: 2.6.1 transitivePeerDependencies: - supports-color @@ -3971,7 +3965,7 @@ snapshots: globals@14.0.0: {} - globals@16.4.0: {} + globals@16.5.0: {} globby@11.1.0: dependencies: @@ -4082,12 +4076,9 @@ snapshots: filelist: 1.0.4 picocolors: 1.1.1 - jiti@2.6.1: - optional: true - js-tokens@9.0.1: {} - js-yaml@3.14.1: + js-yaml@3.14.2: dependencies: argparse: 1.0.10 esprima: 4.0.1 @@ -4164,7 +4155,7 @@ snapshots: log-update@6.1.0: dependencies: - ansi-escapes: 7.1.1 + ansi-escapes: 7.2.0 cli-cursor: 5.0.0 slice-ansi: 7.1.2 strip-ansi: 7.1.2 @@ -4208,7 +4199,7 @@ snapshots: mimic-function@5.0.1: {} - minimatch@10.0.3: + minimatch@10.1.1: dependencies: '@isaacs/brace-expansion': 5.0.0 @@ -4242,7 +4233,7 @@ snapshots: natural-orderby@5.0.0: {} - node-releases@2.0.26: {} + node-releases@2.0.27: {} npm-normalize-package-bin@4.0.0: {} @@ -4362,7 +4353,7 @@ snapshots: read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 - js-yaml: 3.14.1 + js-yaml: 3.14.2 pify: 4.0.1 strip-bom: 3.0.0 @@ -4385,7 +4376,7 @@ snapshots: dependencies: jsesc: 3.1.0 - reserved-identifiers@1.0.0: {} + reserved-identifiers@1.2.0: {} resolve-from@4.0.0: {} @@ -4439,32 +4430,32 @@ snapshots: '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.52 '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.52 - rollup@4.52.5: + rollup@4.53.3: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.52.5 - '@rollup/rollup-android-arm64': 4.52.5 - '@rollup/rollup-darwin-arm64': 4.52.5 - '@rollup/rollup-darwin-x64': 4.52.5 - '@rollup/rollup-freebsd-arm64': 4.52.5 - '@rollup/rollup-freebsd-x64': 4.52.5 - '@rollup/rollup-linux-arm-gnueabihf': 4.52.5 - '@rollup/rollup-linux-arm-musleabihf': 4.52.5 - '@rollup/rollup-linux-arm64-gnu': 4.52.5 - '@rollup/rollup-linux-arm64-musl': 4.52.5 - '@rollup/rollup-linux-loong64-gnu': 4.52.5 - '@rollup/rollup-linux-ppc64-gnu': 4.52.5 - '@rollup/rollup-linux-riscv64-gnu': 4.52.5 - '@rollup/rollup-linux-riscv64-musl': 4.52.5 - '@rollup/rollup-linux-s390x-gnu': 4.52.5 - '@rollup/rollup-linux-x64-gnu': 4.52.5 - '@rollup/rollup-linux-x64-musl': 4.52.5 - '@rollup/rollup-openharmony-arm64': 4.52.5 - '@rollup/rollup-win32-arm64-msvc': 4.52.5 - '@rollup/rollup-win32-ia32-msvc': 4.52.5 - '@rollup/rollup-win32-x64-gnu': 4.52.5 - '@rollup/rollup-win32-x64-msvc': 4.52.5 + '@rollup/rollup-android-arm-eabi': 4.53.3 + '@rollup/rollup-android-arm64': 4.53.3 + '@rollup/rollup-darwin-arm64': 4.53.3 + '@rollup/rollup-darwin-x64': 4.53.3 + '@rollup/rollup-freebsd-arm64': 4.53.3 + '@rollup/rollup-freebsd-x64': 4.53.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.53.3 + '@rollup/rollup-linux-arm-musleabihf': 4.53.3 + '@rollup/rollup-linux-arm64-gnu': 4.53.3 + '@rollup/rollup-linux-arm64-musl': 4.53.3 + '@rollup/rollup-linux-loong64-gnu': 4.53.3 + '@rollup/rollup-linux-ppc64-gnu': 4.53.3 + '@rollup/rollup-linux-riscv64-gnu': 4.53.3 + '@rollup/rollup-linux-riscv64-musl': 4.53.3 + '@rollup/rollup-linux-s390x-gnu': 4.53.3 + '@rollup/rollup-linux-x64-gnu': 4.53.3 + '@rollup/rollup-linux-x64-musl': 4.53.3 + '@rollup/rollup-openharmony-arm64': 4.53.3 + '@rollup/rollup-win32-arm64-msvc': 4.53.3 + '@rollup/rollup-win32-ia32-msvc': 4.53.3 + '@rollup/rollup-win32-x64-gnu': 4.53.3 + '@rollup/rollup-win32-x64-msvc': 4.53.3 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4692,7 +4683,7 @@ snapshots: to-valid-identifier@1.0.0: dependencies: '@sindresorhus/base62': 1.0.0 - reserved-identifiers: 1.0.0 + reserved-identifiers: 1.2.0 totalist@3.0.1: {} @@ -4755,7 +4746,7 @@ snapshots: tsx@4.20.6: dependencies: - esbuild: 0.25.11 + esbuild: 0.25.12 get-tsconfig: 4.13.0 optionalDependencies: fsevents: 2.3.3 @@ -4799,20 +4790,20 @@ snapshots: typedoc@0.28.14(typescript@5.9.3): dependencies: - '@gerrit0/mini-shiki': 3.13.1 + '@gerrit0/mini-shiki': 3.15.0 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 typescript: 5.9.3 yaml: 2.8.1 - typescript-eslint@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.48.0(eslint@9.39.1)(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.0(eslint@9.39.1)(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.48.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + '@typescript-eslint/utils': 8.48.0(eslint@9.39.1)(typescript@5.9.3) + eslint: 9.39.1 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -4859,9 +4850,9 @@ snapshots: '@oxc-project/runtime': 0.99.0 rolldown: 1.0.0-beta.52 - update-browserslist-db@1.1.4(browserslist@4.27.0): + update-browserslist-db@1.1.4(browserslist@4.28.0): dependencies: - browserslist: 4.27.0 + browserslist: 4.28.0 escalade: 3.2.0 picocolors: 1.1.1 @@ -4869,25 +4860,24 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1): + vite@7.2.4(@types/node@24.10.1)(tsx@4.20.6)(yaml@2.8.1): dependencies: - esbuild: 0.25.11 + esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.52.5 + rollup: 4.53.3 tinyglobby: 0.2.15 optionalDependencies: '@types/node': 24.10.1 fsevents: 2.3.3 - jiti: 2.6.1 tsx: 4.20.6 yaml: 2.8.1 - vitest@4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1): + vitest@4.0.14(@types/node@24.10.1)(@vitest/ui@4.0.14)(tsx@4.20.6)(yaml@2.8.1): dependencies: '@vitest/expect': 4.0.14 - '@vitest/mocker': 4.0.14(vite@7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1)) + '@vitest/mocker': 4.0.14(vite@7.2.4(@types/node@24.10.1)(tsx@4.20.6)(yaml@2.8.1)) '@vitest/pretty-format': 4.0.14 '@vitest/runner': 4.0.14 '@vitest/snapshot': 4.0.14 @@ -4904,7 +4894,7 @@ snapshots: tinyexec: 0.3.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.1.12(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.1) + vite: 7.2.4(@types/node@24.10.1)(tsx@4.20.6)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.10.1 From ec6cb234f4b918cdb334bf87797290ee0c8aca9a Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:56:57 +0100 Subject: [PATCH 12/52] Updates based on eslint --- packages/classic-wow/src/item/types.ts | 2 +- .../classic-wow/src/power-type/power-type.test.ts | 4 ++-- packages/classic-wow/src/power-type/power-type.ts | 4 ++-- .../classic-wow/src/pvp-season/pvp-season.test.ts | 4 ++-- packages/classic-wow/src/pvp-season/pvp-season.ts | 4 ++-- packages/classic-wow/src/realm/realm.ts | 10 ++-------- packages/classic-wow/src/region/region.ts | 4 ++-- packages/core/src/blizzard-api.test.ts | 2 +- packages/d3/src/game-data/game-data.ts | 4 ++-- packages/d3/src/profile/profile.ts | 4 ++-- packages/wow/src/azerite-essence/types.ts | 11 +++++++++-- packages/wow/src/creature/types.ts | 3 +-- packages/wow/src/item/types.ts | 2 +- packages/wow/src/journal/types.ts | 11 +++++++++-- packages/wow/src/media-search/types.ts | 3 +-- packages/wow/src/mount/types.ts | 3 +-- .../mythic-raid-leaderboard.ts | 2 +- packages/wow/src/mythic-raid-leaderboard/types.ts | 3 +-- packages/wow/src/spell/types.ts | 3 +-- scripts/generate-zod.ts | 3 --- 20 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/classic-wow/src/item/types.ts b/packages/classic-wow/src/item/types.ts index 7a894942..d821748c 100644 --- a/packages/classic-wow/src/item/types.ts +++ b/packages/classic-wow/src/item/types.ts @@ -132,7 +132,7 @@ interface Durability { interface InventoryType { name: Record; type: //Armor - | 'BACK' + | 'BACK' | 'BAG' | 'CHEST' | 'FEET' diff --git a/packages/classic-wow/src/power-type/power-type.test.ts b/packages/classic-wow/src/power-type/power-type.test.ts index 630d5b7a..94473acd 100644 --- a/packages/classic-wow/src/power-type/power-type.test.ts +++ b/packages/classic-wow/src/power-type/power-type.test.ts @@ -1,5 +1,5 @@ -import { wowBasePath } from '@blizzard-api/core'; -import type {BlizzardNamespaces} from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces } from '@blizzard-api/core'; import { describe, it } from 'vitest'; import { powerType, powerTypeIndex } from './power-type'; diff --git a/packages/classic-wow/src/power-type/power-type.ts b/packages/classic-wow/src/power-type/power-type.ts index 8088ff04..b36e9ed0 100644 --- a/packages/classic-wow/src/power-type/power-type.ts +++ b/packages/classic-wow/src/power-type/power-type.ts @@ -1,5 +1,5 @@ -import { wowBasePath } from '@blizzard-api/core'; -import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { PowerTypeIndexResponse, PowerTypeResponse } from './types'; /** diff --git a/packages/classic-wow/src/pvp-season/pvp-season.test.ts b/packages/classic-wow/src/pvp-season/pvp-season.test.ts index bcb357eb..b39c2029 100644 --- a/packages/classic-wow/src/pvp-season/pvp-season.test.ts +++ b/packages/classic-wow/src/pvp-season/pvp-season.test.ts @@ -1,5 +1,5 @@ -import { wowBasePath } from '@blizzard-api/core'; -import type {BlizzardNamespaces} from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces } from '@blizzard-api/core'; import { describe, it } from 'vitest'; import { pvpLeaderboard, diff --git a/packages/classic-wow/src/pvp-season/pvp-season.ts b/packages/classic-wow/src/pvp-season/pvp-season.ts index 57d0cb95..feda78d1 100644 --- a/packages/classic-wow/src/pvp-season/pvp-season.ts +++ b/packages/classic-wow/src/pvp-season/pvp-season.ts @@ -1,5 +1,5 @@ -import { wowBasePath } from '@blizzard-api/core'; -import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { PvpSeasonIndexResponse, PvpSeasonResponse } from './types'; /** diff --git a/packages/classic-wow/src/realm/realm.ts b/packages/classic-wow/src/realm/realm.ts index 82032601..3663b6c9 100644 --- a/packages/classic-wow/src/realm/realm.ts +++ b/packages/classic-wow/src/realm/realm.ts @@ -1,11 +1,5 @@ -import { - - - - wowBasePath, - wowSearchBasePath -} from '@blizzard-api/core'; -import type {BlizzardNamespaces, Resource, SearchResponse} from '@blizzard-api/core'; +import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponseItem } from './types'; /** diff --git a/packages/classic-wow/src/region/region.ts b/packages/classic-wow/src/region/region.ts index 02d2fc26..5aee7a40 100644 --- a/packages/classic-wow/src/region/region.ts +++ b/packages/classic-wow/src/region/region.ts @@ -1,5 +1,5 @@ -import { wowBasePath } from '@blizzard-api/core'; -import type {BlizzardNamespaces, Resource} from '@blizzard-api/core'; +import { wowBasePath } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { RegionIndexResponse, RegionResponse } from './types'; /** diff --git a/packages/core/src/blizzard-api.test.ts b/packages/core/src/blizzard-api.test.ts index 66a586b1..3fd33d8a 100644 --- a/packages/core/src/blizzard-api.test.ts +++ b/packages/core/src/blizzard-api.test.ts @@ -1,6 +1,6 @@ import { describe, it } from 'vitest'; -import type { Locales, Origins } from './blizzard-api'; import { getBlizzardApi } from './blizzard-api'; +import type { Locales, Origins } from './locales'; describe.concurrent('getBlizzardApi', () => { it('should return the correct endpoint for the specified origin and locale', ({ expect }) => { diff --git a/packages/d3/src/game-data/game-data.ts b/packages/d3/src/game-data/game-data.ts index b71adc5c..a4aa8d58 100644 --- a/packages/d3/src/game-data/game-data.ts +++ b/packages/d3/src/game-data/game-data.ts @@ -1,5 +1,5 @@ -import { d3GameDataBasePath } from '@blizzard-api/core'; -import type {Resource} from '@blizzard-api/core'; +import { d3GameDataBasePath } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import type { EraIndexResponse, EraLeaderboardResponse, diff --git a/packages/d3/src/profile/profile.ts b/packages/d3/src/profile/profile.ts index 330ab70e..72d237fc 100644 --- a/packages/d3/src/profile/profile.ts +++ b/packages/d3/src/profile/profile.ts @@ -1,5 +1,5 @@ -import { d3ProfileBasePath } from '@blizzard-api/core'; -import type {Resource} from '@blizzard-api/core'; +import { d3ProfileBasePath } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import type { AccountHeroFollowerItemsResponse, AccountHeroResponse, AccountResponse } from './types'; /** diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index da84ffcf..68fd57d6 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -1,5 +1,12 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; - +import type { + BaseSearchParameters, + KeyBase, + Locales, + MediaAsset, + NameId, + NameIdKey, + ResponseBase, +} from '@blizzard-api/core'; /** * Interface for a response from the azerite essence index endpoint. diff --git a/packages/wow/src/creature/types.ts b/packages/wow/src/creature/types.ts index dca44add..bddba7c1 100644 --- a/packages/wow/src/creature/types.ts +++ b/packages/wow/src/creature/types.ts @@ -1,5 +1,4 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; - +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for creature display media. diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index 1ff8ce5e..3d4bf67b 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -157,7 +157,7 @@ interface Effect { interface InventoryType { name: Record; type: //Armor - | 'BACK' + | 'BACK' | 'BAG' | 'CHEST' | 'FEET' diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 45784395..1b940985 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -1,5 +1,12 @@ -import type { BaseSearchParameters, Faction, KeyBase, Locales, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; - +import type { + BaseSearchParameters, + Faction, + KeyBase, + Locales, + NameId, + NameIdKey, + ResponseBase, +} from '@blizzard-api/core'; /** * The response for a journal encounter index. diff --git a/packages/wow/src/media-search/types.ts b/packages/wow/src/media-search/types.ts index ec34a908..f6b7d351 100644 --- a/packages/wow/src/media-search/types.ts +++ b/packages/wow/src/media-search/types.ts @@ -1,5 +1,4 @@ -import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; - +import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; /** * The search parameters for media. diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index 85db39cf..227bfbeb 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -1,5 +1,4 @@ -import type { BaseSearchParameters, Factions, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; - +import type { BaseSearchParameters, Factions, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a mount index. diff --git a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts index ebe0b452..3025dfcd 100644 --- a/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts +++ b/packages/wow/src/mythic-raid-leaderboard/mythic-raid-leaderboard.ts @@ -1,4 +1,4 @@ -import type { Factions, Resource } from '@blizzard-api/core'; +import type { Factions, Resource } from '@blizzard-api/core'; import { wowBasePath } from '@blizzard-api/core'; import type { MythicRaidLeaderboardResponse } from './types'; diff --git a/packages/wow/src/mythic-raid-leaderboard/types.ts b/packages/wow/src/mythic-raid-leaderboard/types.ts index f7544531..799eb2e0 100644 --- a/packages/wow/src/mythic-raid-leaderboard/types.ts +++ b/packages/wow/src/mythic-raid-leaderboard/types.ts @@ -1,5 +1,4 @@ -import type { Factions, KeyBase, NameId, Origins, ResponseBase } from '@blizzard-api/core'; - +import type { Factions, KeyBase, NameId, Origins, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Raid leaderboard. diff --git a/packages/wow/src/spell/types.ts b/packages/wow/src/spell/types.ts index 00f5bf73..783787e2 100644 --- a/packages/wow/src/spell/types.ts +++ b/packages/wow/src/spell/types.ts @@ -1,5 +1,4 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, ResponseBase } from '@blizzard-api/core'; - +import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, ResponseBase } from '@blizzard-api/core'; /** * The response for a spell media. diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index aa12243b..e63a6fca 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -54,8 +54,6 @@ async function run(): Promise { for (const file of tsFiles) { try { - //console.log('Generating schema for', path.relative(root, file)); - const content = await fs.readFile(file, 'utf8'); const generator = generate({ inputOutputMappings, @@ -79,7 +77,6 @@ async function run(): Promise { const outName = HANDLE_ALL_FILE_FOLDERS.has(packageName) ? path.basename(file) : `${parentName}.ts`; const outPath = path.join(packageOut, outName); await fs.writeFile(outPath, schema, 'utf8'); - //console.log('Wrote', path.relative(root, outPath)); } catch (error) { console.error('Failed to generate for', file, (error as Error)?.message ?? error); } From e58966842a85c0e6ecb61edb2f7482f4624e89a8 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:22:52 +0100 Subject: [PATCH 13/52] Update d3 tests --- packages/d3/src/profile/profile.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/d3/src/profile/profile.test.ts b/packages/d3/src/profile/profile.test.ts index b86bc66e..9b4eb7c3 100644 --- a/packages/d3/src/profile/profile.test.ts +++ b/packages/d3/src/profile/profile.test.ts @@ -7,7 +7,7 @@ const heroId = 42; describe.concurrent('profile', () => { it('account should return the correct resource', ({ expect }) => { - const expectedPath = `${d3ProfileBasePath}/example#1234`; + const expectedPath = `${d3ProfileBasePath}/example%231234`; const resource = account(battleTag); @@ -15,7 +15,7 @@ describe.concurrent('profile', () => { }); it('should return the correct resource path', ({ expect }) => { - const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42`; + const expectedPath = `${d3ProfileBasePath}/example%231234/hero/42`; const resource = accountHero(battleTag, heroId); @@ -23,7 +23,7 @@ describe.concurrent('profile', () => { }); it('should return the correct resource path', ({ expect }) => { - const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42/items`; + const expectedPath = `${d3ProfileBasePath}/example%231234/hero/42/items`; const resource = accountHeroItems(battleTag, heroId); @@ -31,7 +31,7 @@ describe.concurrent('profile', () => { }); it('accountHeroFollowerItems should return the correct resource', ({ expect }) => { - const expectedPath = `${d3ProfileBasePath}/example#1234/hero/42/follower-items`; + const expectedPath = `${d3ProfileBasePath}/example%231234/hero/42/follower-items`; const resource = accountHeroFollowerItems(battleTag, heroId); From dc35e2a2269085881b257fbfa17aad8c8aaea428 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:21:39 +0100 Subject: [PATCH 14/52] [Project] Update transitive dependencies --- pnpm-lock.yaml | 175 ++++++++++++++++++++++++------------------------- 1 file changed, 86 insertions(+), 89 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dba5219c..5104c8a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -447,8 +447,8 @@ packages: resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@3.3.1': - resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} + '@eslint/eslintrc@3.3.3': + resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/js@9.39.1': @@ -482,8 +482,8 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@inquirer/external-editor@1.0.2': - resolution: {integrity: sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==} + '@inquirer/external-editor@1.0.3': + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -565,8 +565,8 @@ packages: peerDependencies: prettier: '>=3.0.3' - '@quansync/fs@0.1.5': - resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} + '@quansync/fs@1.0.0': + resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} '@rolldown/binding-android-arm64@1.0.0-beta.53': resolution: {integrity: sha512-Ok9V8o7o6YfSdTTYA/uHH30r3YtOxLD6G3wih/U9DO0ucBBFq8WPt/DslU53OgfteLRHITZny9N/qCUxMf9kjQ==} @@ -1030,8 +1030,8 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} - ansi-escapes@7.1.1: - resolution: {integrity: sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==} + ansi-escapes@7.2.0: + resolution: {integrity: sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==} engines: {node: '>=18'} ansi-regex@5.0.1: @@ -1089,8 +1089,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - baseline-browser-mapping@2.8.20: - resolution: {integrity: sha512-JMWsdF+O8Orq3EMukbUN1QfbLK9mX2CkUmQBcW2T0s8OmdAUL5LLM/6wFwSrqXzlXB13yhyK9gTKS1rIizOduQ==} + baseline-browser-mapping@2.9.2: + resolution: {integrity: sha512-PxSsosKQjI38iXkmb3d0Y32efqyA0uW4s41u4IVBsLlWLhCiYNpH/AfNOVWRqCQBlD8TFJTz6OUWNd4DFJCnmw==} hasBin: true better-path-resolve@1.0.0: @@ -1110,8 +1110,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.27.0: - resolution: {integrity: sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==} + browserslist@4.28.1: + resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1135,8 +1135,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001751: - resolution: {integrity: sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==} + caniuse-lite@1.0.30001759: + resolution: {integrity: sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==} chai@6.2.1: resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} @@ -1149,8 +1149,8 @@ packages: change-case@5.4.4: resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} - chardet@2.1.0: - resolution: {integrity: sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==} + chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} chokidar@4.0.3: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} @@ -1205,8 +1205,8 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - core-js-compat@3.46.0: - resolution: {integrity: sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==} + core-js-compat@3.47.0: + resolution: {integrity: sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==} cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} @@ -1246,8 +1246,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.240: - resolution: {integrity: sha512-OBwbZjWgrCOH+g6uJsA2/7Twpas2OlepS9uvByJjR2datRDuKGYeD+nP8lBBks2qnB7bGJNHDUx7c/YLaT3QMQ==} + electron-to-chromium@1.5.266: + resolution: {integrity: sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -1515,8 +1515,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@16.4.0: - resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==} + globals@16.5.0: + resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} engines: {node: '>=18'} globby@11.1.0: @@ -1542,8 +1542,8 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - human-id@4.1.2: - resolution: {integrity: sha512-v/J+4Z/1eIJovEBdlV5TYj1IR+ZiohcYGRY+qN/oC9dAfKzVT023N/Bgw37hrKCoVRBvk3bqyzpr2PP5YeTMSg==} + human-id@4.1.3: + resolution: {integrity: sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==} hasBin: true husky@9.1.7: @@ -1662,8 +1662,8 @@ packages: js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + js-yaml@3.14.2: + resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} hasBin: true js-yaml@4.1.1: @@ -1780,8 +1780,8 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@10.0.3: - resolution: {integrity: sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==} + minimatch@10.1.1: + resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==} engines: {node: 20 || >=22} minimatch@3.1.2: @@ -1830,8 +1830,8 @@ packages: resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} engines: {node: '>=18'} - node-releases@2.0.26: - resolution: {integrity: sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==} + node-releases@2.0.27: + resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} npm-normalize-package-bin@4.0.0: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} @@ -1968,6 +1968,9 @@ packages: quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} + quansync@1.0.0: + resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1999,8 +2002,8 @@ packages: resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==} hasBin: true - reserved-identifiers@1.0.0: - resolution: {integrity: sha512-h0bP2Katmvf3hv4Z3WtDl4+6xt/OglQ2Xa6TnhZ/Rm9/7IH1crXQqMwD4J2ngKBonVv+fB55zfGgNDAmsevLVQ==} + reserved-identifiers@1.2.0: + resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==} engines: {node: '>=18'} resolve-from@4.0.0: @@ -2405,8 +2408,8 @@ packages: uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - unconfig-core@7.4.1: - resolution: {integrity: sha512-Bp/bPZjV2Vl/fofoA2OYLSnw1Z0MOhCX7zHnVCYrazpfZvseBbGhwcNQMxsg185Mqh7VZQqK3C8hFG/Dyng+yA==} + unconfig-core@7.4.2: + resolution: {integrity: sha512-VgPCvLWugINbXvMQDf8Jh0mlbvNjNC6eSUziHsBCMpxR05OPrNrvDnyatdMjRgcHaaNsCqz+wjNXxNw1kRLHUg==} undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -2428,8 +2431,8 @@ packages: synckit: optional: true - update-browserslist-db@1.1.4: - resolution: {integrity: sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==} + update-browserslist-db@1.2.2: + resolution: {integrity: sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -2545,11 +2548,6 @@ packages: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} - yaml@2.8.1: - resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==} - engines: {node: '>= 14.6'} - hasBin: true - yaml@2.8.2: resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==} engines: {node: '>= 14.6'} @@ -2634,7 +2632,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.2(@types/node@24.10.1) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.1) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -2730,7 +2728,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 fs-extra: 7.0.1 - human-id: 4.1.2 + human-id: 4.1.3 prettier: 2.8.8 '@clack/core@1.0.0-alpha.4': @@ -2873,7 +2871,7 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@3.3.1': + '@eslint/eslintrc@3.3.3': dependencies: ajv: 6.12.6 debug: 4.4.3(supports-color@8.1.1) @@ -2915,9 +2913,9 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.2(@types/node@24.10.1)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.1)': dependencies: - chardet: 2.1.0 + chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: '@types/node': 24.10.1 @@ -3034,9 +3032,9 @@ snapshots: dependencies: prettier: 3.7.4 - '@quansync/fs@0.1.5': + '@quansync/fs@1.0.0': dependencies: - quansync: 0.2.11 + quansync: 1.0.0 '@rolldown/binding-android-arm64@1.0.0-beta.53': optional: true @@ -3443,7 +3441,7 @@ snapshots: dependencies: type-fest: 0.21.3 - ansi-escapes@7.1.1: + ansi-escapes@7.2.0: dependencies: environment: 1.1.0 @@ -3488,7 +3486,7 @@ snapshots: balanced-match@1.0.2: {} - baseline-browser-mapping@2.8.20: {} + baseline-browser-mapping@2.9.2: {} better-path-resolve@1.0.0: dependencies: @@ -3509,13 +3507,13 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.27.0: + browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.8.20 - caniuse-lite: 1.0.30001751 - electron-to-chromium: 1.5.240 - node-releases: 2.0.26 - update-browserslist-db: 1.1.4(browserslist@4.27.0) + baseline-browser-mapping: 2.9.2 + caniuse-lite: 1.0.30001759 + electron-to-chromium: 1.5.266 + node-releases: 2.0.27 + update-browserslist-db: 1.2.2(browserslist@4.28.1) builtin-modules@3.3.0: {} @@ -3527,7 +3525,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001751: {} + caniuse-lite@1.0.30001759: {} chai@6.2.1: {} @@ -3538,7 +3536,7 @@ snapshots: change-case@5.4.4: {} - chardet@2.1.0: {} + chardet@2.1.1: {} chokidar@4.0.3: dependencies: @@ -3581,9 +3579,9 @@ snapshots: concat-map@0.0.1: {} - core-js-compat@3.46.0: + core-js-compat@3.47.0: dependencies: - browserslist: 4.27.0 + browserslist: 4.28.1 cross-spawn@7.0.6: dependencies: @@ -3611,7 +3609,7 @@ snapshots: dependencies: jake: 10.9.4 - electron-to-chromium@1.5.240: {} + electron-to-chromium@1.5.266: {} emoji-regex@10.6.0: {} @@ -3705,7 +3703,7 @@ snapshots: eslint: 9.39.1(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 - minimatch: 10.0.3 + minimatch: 10.1.1 semver: 7.7.3 stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 @@ -3766,11 +3764,11 @@ snapshots: change-case: 5.4.4 ci-info: 4.3.1 clean-regexp: 1.0.0 - core-js-compat: 3.46.0 + core-js-compat: 3.47.0 eslint: 9.39.1(jiti@2.6.1) esquery: 1.6.0 find-up-simple: 1.0.1 - globals: 16.4.0 + globals: 16.5.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 jsesc: 3.1.0 @@ -3796,7 +3794,7 @@ snapshots: '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.1 + '@eslint/eslintrc': 3.3.3 '@eslint/js': 9.39.1 '@eslint/plugin-kit': 0.4.1 '@humanfs/node': 0.16.7 @@ -3950,7 +3948,7 @@ snapshots: globals@14.0.0: {} - globals@16.4.0: {} + globals@16.5.0: {} globby@11.1.0: dependencies: @@ -3973,7 +3971,7 @@ snapshots: html-escaper@2.0.2: {} - human-id@4.1.2: {} + human-id@4.1.3: {} husky@9.1.7: {} @@ -4068,7 +4066,7 @@ snapshots: js-tokens@9.0.1: {} - js-yaml@3.14.1: + js-yaml@3.14.2: dependencies: argparse: 1.0.10 esprima: 4.0.1 @@ -4120,7 +4118,7 @@ snapshots: nano-spawn: 2.0.0 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.8.1 + yaml: 2.8.2 listr2@9.0.5: dependencies: @@ -4145,7 +4143,7 @@ snapshots: log-update@6.1.0: dependencies: - ansi-escapes: 7.1.1 + ansi-escapes: 7.2.0 cli-cursor: 5.0.0 slice-ansi: 7.1.2 strip-ansi: 7.1.2 @@ -4189,7 +4187,7 @@ snapshots: mimic-function@5.0.1: {} - minimatch@10.0.3: + minimatch@10.1.1: dependencies: '@isaacs/brace-expansion': 5.0.0 @@ -4223,7 +4221,7 @@ snapshots: natural-orderby@5.0.0: {} - node-releases@2.0.26: {} + node-releases@2.0.27: {} npm-normalize-package-bin@4.0.0: {} @@ -4333,6 +4331,8 @@ snapshots: quansync@0.2.11: {} + quansync@1.0.0: {} + queue-microtask@1.2.3: {} read-package-json-fast@4.0.0: @@ -4343,7 +4343,7 @@ snapshots: read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 - js-yaml: 3.14.1 + js-yaml: 3.14.2 pify: 4.0.1 strip-bom: 3.0.0 @@ -4351,11 +4351,11 @@ snapshots: refa@0.12.1: dependencies: - '@eslint-community/regexpp': 4.12.2 + '@eslint-community/regexpp': 4.12.1 regexp-ast-analysis@0.7.1: dependencies: - '@eslint-community/regexpp': 4.12.2 + '@eslint-community/regexpp': 4.12.1 refa: 0.12.1 regexp-tree@0.1.27: {} @@ -4364,7 +4364,7 @@ snapshots: dependencies: jsesc: 3.1.0 - reserved-identifiers@1.0.0: {} + reserved-identifiers@1.2.0: {} resolve-from@4.0.0: {} @@ -4453,7 +4453,7 @@ snapshots: scslre@0.3.0: dependencies: - '@eslint-community/regexpp': 4.12.2 + '@eslint-community/regexpp': 4.12.1 refa: 0.12.1 regexp-ast-analysis: 0.7.1 @@ -4668,7 +4668,7 @@ snapshots: to-valid-identifier@1.0.0: dependencies: '@sindresorhus/base62': 1.0.0 - reserved-identifiers: 1.0.0 + reserved-identifiers: 1.2.0 totalist@3.0.1: {} @@ -4708,7 +4708,7 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 - unconfig-core: 7.4.1 + unconfig-core: 7.4.2 unrun: 0.2.16 optionalDependencies: typescript: 5.9.3 @@ -4779,7 +4779,7 @@ snapshots: markdown-it: 14.1.0 minimatch: 9.0.5 typescript: 5.9.3 - yaml: 2.8.1 + yaml: 2.8.2 typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: @@ -4796,10 +4796,10 @@ snapshots: uc.micro@2.1.0: {} - unconfig-core@7.4.1: + unconfig-core@7.4.2: dependencies: - '@quansync/fs': 0.1.5 - quansync: 0.2.11 + '@quansync/fs': 1.0.0 + quansync: 1.0.0 undici-types@7.16.0: {} @@ -4834,9 +4834,9 @@ snapshots: '@oxc-project/runtime': 0.101.0 rolldown: 1.0.0-beta.53 - update-browserslist-db@1.1.4(browserslist@4.27.0): + update-browserslist-db@1.2.2(browserslist@4.28.1): dependencies: - browserslist: 4.27.0 + browserslist: 4.28.1 escalade: 3.2.0 picocolors: 1.1.1 @@ -4930,10 +4930,7 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.2 - yaml@2.8.1: {} - - yaml@2.8.2: - optional: true + yaml@2.8.2: {} yocto-queue@0.1.0: {} From 8cc63ff97fccb6765eb5772db7139eb48ae70b92 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:22:25 +0100 Subject: [PATCH 15/52] [Project] Update tsx --- package.json | 2 +- pnpm-lock.yaml | 306 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 288 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 677f17fd..6ea6a2f5 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "npm-run-all2": "8.0.4", "prettier": "3.7.4", "ts-to-zod": "5.1.0", - "tsx": "4.20.6", + "tsx": "4.21.0", "tsdown": "0.17.0", "turbo": "2.6.3", "typedoc": "0.28.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5104c8a6..2bd6dcf6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 0.17.0 version: 0.17.0(typescript@5.9.3) tsx: - specifier: 4.20.6 - version: 4.20.6 + specifier: 4.21.0 + version: 4.21.0 turbo: specifier: 2.6.3 version: 2.6.3 @@ -70,7 +70,7 @@ importers: version: 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: 4.0.15 - version: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2) + version: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: specifier: 4.1.13 version: 4.1.13 @@ -271,156 +271,312 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.27.1': + resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.25.12': resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} engines: {node: '>=18'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.27.1': + resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.25.12': resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} engines: {node: '>=18'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.27.1': + resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.25.12': resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} engines: {node: '>=18'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.27.1': + resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.25.12': resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.27.1': + resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.25.12': resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.27.1': + resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.25.12': resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.27.1': + resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.25.12': resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.27.1': + resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.25.12': resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.27.1': + resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.25.12': resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} engines: {node: '>=18'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.27.1': + resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.25.12': resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} engines: {node: '>=18'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.27.1': + resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.25.12': resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} engines: {node: '>=18'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.27.1': + resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.25.12': resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.27.1': + resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.25.12': resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.27.1': + resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.25.12': resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.27.1': + resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.25.12': resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} engines: {node: '>=18'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.27.1': + resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.25.12': resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.27.1': + resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-arm64@0.25.12': resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] + '@esbuild/netbsd-arm64@0.27.1': + resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.25.12': resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.27.1': + resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.25.12': resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.27.1': + resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.25.12': resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.27.1': + resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/openharmony-arm64@0.25.12': resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] + '@esbuild/openharmony-arm64@0.27.1': + resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/sunos-x64@0.25.12': resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} engines: {node: '>=18'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.27.1': + resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.25.12': resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.27.1': + resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.25.12': resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.27.1': + resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.25.12': resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} engines: {node: '>=18'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.27.1': + resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.9.0': resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1279,6 +1435,11 @@ packages: engines: {node: '>=18'} hasBin: true + esbuild@0.27.1: + resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -2333,8 +2494,8 @@ packages: peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - tsx@4.20.6: - resolution: {integrity: sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==} + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} engines: {node: '>=18.0.0'} hasBin: true @@ -2771,81 +2932,159 @@ snapshots: '@esbuild/aix-ppc64@0.25.12': optional: true + '@esbuild/aix-ppc64@0.27.1': + optional: true + '@esbuild/android-arm64@0.25.12': optional: true + '@esbuild/android-arm64@0.27.1': + optional: true + '@esbuild/android-arm@0.25.12': optional: true + '@esbuild/android-arm@0.27.1': + optional: true + '@esbuild/android-x64@0.25.12': optional: true + '@esbuild/android-x64@0.27.1': + optional: true + '@esbuild/darwin-arm64@0.25.12': optional: true + '@esbuild/darwin-arm64@0.27.1': + optional: true + '@esbuild/darwin-x64@0.25.12': optional: true + '@esbuild/darwin-x64@0.27.1': + optional: true + '@esbuild/freebsd-arm64@0.25.12': optional: true + '@esbuild/freebsd-arm64@0.27.1': + optional: true + '@esbuild/freebsd-x64@0.25.12': optional: true + '@esbuild/freebsd-x64@0.27.1': + optional: true + '@esbuild/linux-arm64@0.25.12': optional: true + '@esbuild/linux-arm64@0.27.1': + optional: true + '@esbuild/linux-arm@0.25.12': optional: true + '@esbuild/linux-arm@0.27.1': + optional: true + '@esbuild/linux-ia32@0.25.12': optional: true + '@esbuild/linux-ia32@0.27.1': + optional: true + '@esbuild/linux-loong64@0.25.12': optional: true + '@esbuild/linux-loong64@0.27.1': + optional: true + '@esbuild/linux-mips64el@0.25.12': optional: true + '@esbuild/linux-mips64el@0.27.1': + optional: true + '@esbuild/linux-ppc64@0.25.12': optional: true + '@esbuild/linux-ppc64@0.27.1': + optional: true + '@esbuild/linux-riscv64@0.25.12': optional: true + '@esbuild/linux-riscv64@0.27.1': + optional: true + '@esbuild/linux-s390x@0.25.12': optional: true + '@esbuild/linux-s390x@0.27.1': + optional: true + '@esbuild/linux-x64@0.25.12': optional: true + '@esbuild/linux-x64@0.27.1': + optional: true + '@esbuild/netbsd-arm64@0.25.12': optional: true + '@esbuild/netbsd-arm64@0.27.1': + optional: true + '@esbuild/netbsd-x64@0.25.12': optional: true + '@esbuild/netbsd-x64@0.27.1': + optional: true + '@esbuild/openbsd-arm64@0.25.12': optional: true + '@esbuild/openbsd-arm64@0.27.1': + optional: true + '@esbuild/openbsd-x64@0.25.12': optional: true + '@esbuild/openbsd-x64@0.27.1': + optional: true + '@esbuild/openharmony-arm64@0.25.12': optional: true + '@esbuild/openharmony-arm64@0.27.1': + optional: true + '@esbuild/sunos-x64@0.25.12': optional: true + '@esbuild/sunos-x64@0.27.1': + optional: true + '@esbuild/win32-arm64@0.25.12': optional: true + '@esbuild/win32-arm64@0.27.1': + optional: true + '@esbuild/win32-ia32@0.25.12': optional: true + '@esbuild/win32-ia32@0.27.1': + optional: true + '@esbuild/win32-x64@0.25.12': optional: true + '@esbuild/win32-x64@0.27.1': + optional: true + '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1(jiti@2.6.1))': dependencies: eslint: 9.39.1(jiti@2.6.1) @@ -3368,7 +3607,7 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2) + vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color @@ -3381,13 +3620,13 @@ snapshots: chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2))': + '@vitest/mocker@4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 4.0.15 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/pretty-format@4.0.15': dependencies: @@ -3415,7 +3654,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2) + vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/utils@4.0.15': dependencies: @@ -3657,6 +3896,35 @@ snapshots: '@esbuild/win32-ia32': 0.25.12 '@esbuild/win32-x64': 0.25.12 + esbuild@0.27.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.1 + '@esbuild/android-arm': 0.27.1 + '@esbuild/android-arm64': 0.27.1 + '@esbuild/android-x64': 0.27.1 + '@esbuild/darwin-arm64': 0.27.1 + '@esbuild/darwin-x64': 0.27.1 + '@esbuild/freebsd-arm64': 0.27.1 + '@esbuild/freebsd-x64': 0.27.1 + '@esbuild/linux-arm': 0.27.1 + '@esbuild/linux-arm64': 0.27.1 + '@esbuild/linux-ia32': 0.27.1 + '@esbuild/linux-loong64': 0.27.1 + '@esbuild/linux-mips64el': 0.27.1 + '@esbuild/linux-ppc64': 0.27.1 + '@esbuild/linux-riscv64': 0.27.1 + '@esbuild/linux-s390x': 0.27.1 + '@esbuild/linux-x64': 0.27.1 + '@esbuild/netbsd-arm64': 0.27.1 + '@esbuild/netbsd-x64': 0.27.1 + '@esbuild/openbsd-arm64': 0.27.1 + '@esbuild/openbsd-x64': 0.27.1 + '@esbuild/openharmony-arm64': 0.27.1 + '@esbuild/sunos-x64': 0.27.1 + '@esbuild/win32-arm64': 0.27.1 + '@esbuild/win32-ia32': 0.27.1 + '@esbuild/win32-x64': 0.27.1 + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -4351,11 +4619,11 @@ snapshots: refa@0.12.1: dependencies: - '@eslint-community/regexpp': 4.12.1 + '@eslint-community/regexpp': 4.12.2 regexp-ast-analysis@0.7.1: dependencies: - '@eslint-community/regexpp': 4.12.1 + '@eslint-community/regexpp': 4.12.2 refa: 0.12.1 regexp-tree@0.1.27: {} @@ -4453,7 +4721,7 @@ snapshots: scslre@0.3.0: dependencies: - '@eslint-community/regexpp': 4.12.1 + '@eslint-community/regexpp': 4.12.2 refa: 0.12.1 regexp-ast-analysis: 0.7.1 @@ -4728,9 +4996,9 @@ snapshots: tslib: 1.14.1 typescript: 5.9.3 - tsx@4.20.6: + tsx@4.21.0: dependencies: - esbuild: 0.25.12 + esbuild: 0.27.1 get-tsconfig: 4.13.0 optionalDependencies: fsevents: 2.3.3 @@ -4844,7 +5112,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2): + vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -4856,13 +5124,13 @@ snapshots: '@types/node': 24.10.1 fsevents: 2.3.3 jiti: 2.6.1 - tsx: 4.20.6 + tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2): + vitest@4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: '@vitest/expect': 4.0.15 - '@vitest/mocker': 4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2)) + '@vitest/mocker': 4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 4.0.15 '@vitest/runner': 4.0.15 '@vitest/snapshot': 4.0.15 @@ -4879,7 +5147,7 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.20.6)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.10.1 From be761851be287fa46d7081c1d1f00cd47033bcbf Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:28:56 +0100 Subject: [PATCH 16/52] [Project] Update dev dependencies --- eslint.config.js | 4 +- package.json | 20 +- pnpm-lock.yaml | 612 +++++++++++++++++++++++------------------------ 3 files changed, 314 insertions(+), 322 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index f4a36160..d75c0c68 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,8 +1,8 @@ import { configs as putstackConfigs } from '@putstack/eslint-config-typescript'; import jsdocEslint from 'eslint-plugin-jsdoc'; -import tseslint from 'typescript-eslint'; +import { defineConfig } from 'eslint/config'; -export default tseslint.config( +export default defineConfig( { ignores: ['**/coverage/**', '**/dist/**', '**/node_modules/**', '**/build/**', '**/docs/**', '!.prettierrc.js'], }, diff --git a/package.json b/package.json index 6ea6a2f5..180987ab 100644 --- a/package.json +++ b/package.json @@ -30,27 +30,27 @@ ], "devDependencies": { "@changesets/cli": "2.29.8", - "@putstack/eslint-config-typescript": "4.11.0", + "@putstack/eslint-config-typescript": "4.12.0", "@putstack/prettier-config": "2.0.0", - "@types/node": "24.10.1", - "@vitest/coverage-v8": "4.0.15", - "@vitest/ui": "4.0.15", - "eslint": "9.39.1", - "eslint-plugin-jsdoc": "61.4.1", + "@types/node": "24.10.4", + "@vitest/coverage-v8": "4.0.16", + "@vitest/ui": "4.0.16", + "eslint": "9.39.2", + "eslint-plugin-jsdoc": "61.5.0", "husky": "9.1.7", "lint-staged": "16.2.7", "npm-run-all2": "8.0.4", "prettier": "3.7.4", "ts-to-zod": "5.1.0", "tsx": "4.21.0", - "tsdown": "0.17.0", + "tsdown": "0.18.1", "turbo": "2.6.3", "typedoc": "0.28.15", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", - "typescript-eslint": "8.48.1", - "vitest": "4.0.15", - "zod": "4.1.13" + "typescript-eslint": "8.50.0", + "vitest": "4.0.16", + "zod": "4.2.1" }, "pnpm": { "onlyBuiltDependencies": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2bd6dcf6..4dcbf69a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,28 +10,28 @@ importers: devDependencies: '@changesets/cli': specifier: 2.29.8 - version: 2.29.8(@types/node@24.10.1) + version: 2.29.8(@types/node@24.10.4) '@putstack/eslint-config-typescript': - specifier: 4.11.0 - version: 4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + specifier: 4.12.0 + version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.7.4) '@types/node': - specifier: 24.10.1 - version: 24.10.1 + specifier: 24.10.4 + version: 24.10.4 '@vitest/coverage-v8': - specifier: 4.0.15 - version: 4.0.15(vitest@4.0.15) + specifier: 4.0.16 + version: 4.0.16(vitest@4.0.16) '@vitest/ui': - specifier: 4.0.15 - version: 4.0.15(vitest@4.0.15) + specifier: 4.0.16 + version: 4.0.16(vitest@4.0.16) eslint: - specifier: 9.39.1 - version: 9.39.1(jiti@2.6.1) + specifier: 9.39.2 + version: 9.39.2(jiti@2.6.1) eslint-plugin-jsdoc: - specifier: 61.4.1 - version: 61.4.1(eslint@9.39.1(jiti@2.6.1)) + specifier: 61.5.0 + version: 61.5.0(eslint@9.39.2(jiti@2.6.1)) husky: specifier: 9.1.7 version: 9.1.7 @@ -48,8 +48,8 @@ importers: specifier: 5.1.0 version: 5.1.0 tsdown: - specifier: 0.17.0 - version: 0.17.0(typescript@5.9.3) + specifier: 0.18.1 + version: 0.18.1(typescript@5.9.3) tsx: specifier: 4.21.0 version: 4.21.0 @@ -66,14 +66,14 @@ importers: specifier: 5.9.3 version: 5.9.3 typescript-eslint: - specifier: 8.48.1 - version: 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + specifier: 8.50.0 + version: 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: - specifier: 4.0.15 - version: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: 4.0.16 + version: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: - specifier: 4.1.13 - version: 4.1.13 + specifier: 4.2.1 + version: 4.2.1 packages/classic-wow: devDependencies: @@ -607,8 +607,8 @@ packages: resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.39.1': - resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + '@eslint/js@9.39.2': + resolution: {integrity: sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.7': @@ -696,18 +696,14 @@ packages: resolution: {integrity: sha512-jteNUQKgJHLHFbbz806aGZqf+RJJ7t4gwF4MYa8fCwCxQ8/klJNWc0MvaJiBebk7Mc+J39mdlsB4XraaCKznFw==} engines: {node: '>=18.0.0'} - '@oxc-project/runtime@0.101.0': - resolution: {integrity: sha512-t3qpfVZIqSiLQ5Kqt/MC4Ge/WCOGrrcagAdzTcDaggupjiGxUx4nJF2v6wUCXWSzWHn5Ns7XLv13fCJEwCOERQ==} - engines: {node: ^20.19.0 || >=22.12.0} - - '@oxc-project/types@0.101.0': - resolution: {integrity: sha512-nuFhqlUzJX+gVIPPfuE6xurd4lST3mdcWOhyK/rZO0B9XWMKm79SuszIQEnSMmmDhq1DC8WWVYGVd+6F93o1gQ==} + '@oxc-project/types@0.103.0': + resolution: {integrity: sha512-bkiYX5kaXWwUessFRSoXFkGIQTmc6dLGdxuRTrC+h8PSnIdZyuXHHlLAeTmOue5Br/a0/a7dHH0Gca6eXn9MKg==} '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@putstack/eslint-config-typescript@4.11.0': - resolution: {integrity: sha512-q5xNFc1xC2pQUO5WO6KZYDVgysNcIG/NcQQS8jzo69De1bObM6KWQPpYxJ7iedADj420ptAg8HXCmCHsWKpOQw==} + '@putstack/eslint-config-typescript@4.12.0': + resolution: {integrity: sha512-ylWREYayHj1q+srkjBpAdxNH1lVpOkq9iJQclj65Bqc5bZgRrXwAyQ0jHGAhWYDoIiUqZeYu+pzCreXrnz8oQg==} engines: {node: ^20.9 || >=22} peerDependencies: '@eslint/js': ^9.20.0 @@ -724,85 +720,85 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@rolldown/binding-android-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-Ok9V8o7o6YfSdTTYA/uHH30r3YtOxLD6G3wih/U9DO0ucBBFq8WPt/DslU53OgfteLRHITZny9N/qCUxMf9kjQ==} + '@rolldown/binding-android-arm64@1.0.0-beta.55': + resolution: {integrity: sha512-5cPpHdO+zp+klznZnIHRO1bMHDq5hS9cqXodEKAaa/dQTPDjnE91OwAsy3o1gT2x4QaY8NzdBXAvutYdaw0WeA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-yIsKqMz0CtRnVa6x3Pa+mzTihr4Ty+Z6HfPbZ7RVbk1Uxnco4+CUn7Qbm/5SBol1JD/7nvY8rphAgyAi7Lj6Vg==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.55': + resolution: {integrity: sha512-l0887CGU2SXZr0UJmeEcXSvtDCOhDTTYXuoWbhrEJ58YQhQk24EVhDhHMTyjJb1PBRniUgNc1G0T51eF8z+TWw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.53': - resolution: {integrity: sha512-GTXe+mxsCGUnJOFMhfGWmefP7Q9TpYUseHvhAhr21nCTgdS8jPsvirb0tJwM3lN0/u/cg7bpFNa16fQrjKrCjQ==} + '@rolldown/binding-darwin-x64@1.0.0-beta.55': + resolution: {integrity: sha512-d7qP2AVYzN0tYIP4vJ7nmr26xvmlwdkLD/jWIc9Z9dqh5y0UGPigO3m5eHoHq9BNazmwdD9WzDHbQZyXFZjgtA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.53': - resolution: {integrity: sha512-9Tmp7bBvKqyDkMcL4e089pH3RsjD3SUungjmqWtyhNOxoQMh0fSmINTyYV8KXtE+JkxYMPWvnEt+/mfpVCkk8w==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.55': + resolution: {integrity: sha512-j311E4NOB0VMmXHoDDZhrWidUf7L/Sa6bu/+i2cskvHKU40zcUNPSYeD2YiO2MX+hhDFa5bJwhliYfs+bTrSZw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': - resolution: {integrity: sha512-a1y5fiB0iovuzdbjUxa7+Zcvgv+mTmlGGC4XydVIsyl48eoxgaYkA3l9079hyTyhECsPq+mbr0gVQsFU11OJAQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': + resolution: {integrity: sha512-lAsaYWhfNTW2A/9O7zCpb5eIJBrFeNEatOS/DDOZ5V/95NHy50g4b/5ViCqchfyFqRb7MKUR18/+xWkIcDkeIw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': - resolution: {integrity: sha512-bpIGX+ov9PhJYV+wHNXl9rzq4F0QvILiURn0y0oepbQx+7stmQsKA0DhPGwmhfvF856wq+gbM8L92SAa/CBcLg==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': + resolution: {integrity: sha512-2x6ffiVLZrQv7Xii9+JdtyT1U3bQhKj59K3eRnYlrXsKyjkjfmiDUVx2n+zSyijisUqD62fcegmx2oLLfeTkCA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': - resolution: {integrity: sha512-bGe5EBB8FVjHBR1mOLOPEFg1Lp3//7geqWkU5NIhxe+yH0W8FVrQ6WRYOap4SUTKdklD/dC4qPLREkMMQ855FA==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': + resolution: {integrity: sha512-QbNncvqAXziya5wleI+OJvmceEE15vE4yn4qfbI/hwT/+8ZcqxyfRZOOh62KjisXxp4D0h3JZspycXYejxAU3w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': - resolution: {integrity: sha512-qL+63WKVQs1CMvFedlPt0U9PiEKJOAL/bsHMKUDS6Vp2Q+YAv/QLPu8rcvkfIMvQ0FPU2WL0aX4eWwF6e/GAnA==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': + resolution: {integrity: sha512-YZCTZZM+rujxwVc6A+QZaNMJXVtmabmFYLG2VGQTKaBfYGvBKUgtbMEttnp/oZ88BMi2DzadBVhOmfQV8SuHhw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': - resolution: {integrity: sha512-VGl9JIGjoJh3H8Mb+7xnVqODajBmrdOOb9lxWXdcmxyI+zjB2sux69br0hZJDTyLJfvBoYm439zPACYbCjGRmw==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': + resolution: {integrity: sha512-28q9OQ/DDpFh2keS4BVAlc3N65/wiqKbk5K1pgLdu/uWbKa8hgUJofhXxqO+a+Ya2HVTUuYHneWsI2u+eu3N5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-B4iIserJXuSnNzA5xBLFUIjTfhNy7d9sq4FUMQY3GhQWGVhS2RWWzzDnkSU6MUt7/aHUrep0CdQfXUJI9D3W7A==} + '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': + resolution: {integrity: sha512-LiCA4BjCnm49B+j1lFzUtlC+4ZphBv0d0g5VqrEJua/uyv9Ey1v9tiaMql1C8c0TVSNDUmrkfHQ71vuQC7YfpQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': - resolution: {integrity: sha512-BUjAEgpABEJXilGq/BPh7jeU3WAJ5o15c1ZEgHaDWSz3LB881LQZnbNJHmUiM4d1JQWMYYyR1Y490IBHi2FPJg==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': + resolution: {integrity: sha512-nZ76tY7T0Oe8vamz5Cv5CBJvrqeQxwj1WaJ2GxX8Msqs0zsQMMcvoyxOf0glnJlxxgKjtoBxAOxaAU8ERbW6Tg==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': - resolution: {integrity: sha512-s27uU7tpCWSjHBnxyVXHt3rMrQdJq5MHNv3BzsewCIroIw3DJFjMH1dzCPPMUFxnh1r52Nf9IJ/eWp6LDoyGcw==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': + resolution: {integrity: sha512-TFVVfLfhL1G+pWspYAgPK/FSqjiBtRKYX9hixfs508QVEZPQlubYAepHPA7kEa6lZXYj5ntzF87KC6RNhxo+ew==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': - resolution: {integrity: sha512-cjWL/USPJ1g0en2htb4ssMjIycc36RvdQAx1WlXnS6DpULswiUTVXPDesTifSKYSyvx24E0YqQkEm0K/M2Z/AA==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': + resolution: {integrity: sha512-j1WBlk0p+ISgLzMIgl0xHp1aBGXenoK2+qWYc/wil2Vse7kVOdFq9aeQ8ahK6/oxX2teQ5+eDvgjdywqTL+daA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.53': - resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==} + '@rolldown/pluginutils@1.0.0-beta.55': + resolution: {integrity: sha512-vajw/B3qoi7aYnnD4BQ4VoCcXQWnF0roSwE2iynbNxgW4l9mFwtLmLmUhpDdcTBfKyZm1p/T0D13qG94XBLohA==} '@rollup/rollup-android-arm-eabi@4.53.3': resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} @@ -957,69 +953,69 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.10.1': - resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==} + '@types/node@24.10.4': + resolution: {integrity: sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.48.1': - resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + '@typescript-eslint/eslint-plugin@8.50.0': + resolution: {integrity: sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.48.1 + '@typescript-eslint/parser': ^8.50.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.48.1': - resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + '@typescript-eslint/parser@8.50.0': + resolution: {integrity: sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.48.1': - resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + '@typescript-eslint/project-service@8.50.0': + resolution: {integrity: sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.48.1': - resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + '@typescript-eslint/scope-manager@8.50.0': + resolution: {integrity: sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.48.1': - resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + '@typescript-eslint/tsconfig-utils@8.50.0': + resolution: {integrity: sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.48.1': - resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + '@typescript-eslint/type-utils@8.50.0': + resolution: {integrity: sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.48.1': - resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + '@typescript-eslint/types@8.50.0': + resolution: {integrity: sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.48.1': - resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + '@typescript-eslint/typescript-estree@8.50.0': + resolution: {integrity: sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.48.1': - resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + '@typescript-eslint/utils@8.50.0': + resolution: {integrity: sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.48.1': - resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + '@typescript-eslint/visitor-keys@8.50.0': + resolution: {integrity: sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.2': @@ -1122,20 +1118,20 @@ packages: cpu: [x64] os: [win32] - '@vitest/coverage-v8@4.0.15': - resolution: {integrity: sha512-FUJ+1RkpTFW7rQITdgTi93qOCWJobWhBirEPCeXh2SW2wsTlFxy51apDz5gzG+ZEYt/THvWeNmhdAoS9DTwpCw==} + '@vitest/coverage-v8@4.0.16': + resolution: {integrity: sha512-2rNdjEIsPRzsdu6/9Eq0AYAzYdpP6Bx9cje9tL3FE5XzXRQF1fNU9pe/1yE8fCrS0HD+fBtt6gLPh6LI57tX7A==} peerDependencies: - '@vitest/browser': 4.0.15 - vitest: 4.0.15 + '@vitest/browser': 4.0.16 + vitest: 4.0.16 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@4.0.15': - resolution: {integrity: sha512-Gfyva9/GxPAWXIWjyGDli9O+waHDC0Q0jaLdFP1qPAUUfo1FEXPXUfUkp3eZA0sSq340vPycSyOlYUeM15Ft1w==} + '@vitest/expect@4.0.16': + resolution: {integrity: sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==} - '@vitest/mocker@4.0.15': - resolution: {integrity: sha512-CZ28GLfOEIFkvCFngN8Sfx5h+Se0zN+h4B7yOsPVCcgtiO7t5jt9xQh2E1UkFep+eb9fjyMfuC5gBypwb07fvQ==} + '@vitest/mocker@4.0.16': + resolution: {integrity: sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0-0 @@ -1145,25 +1141,25 @@ packages: vite: optional: true - '@vitest/pretty-format@4.0.15': - resolution: {integrity: sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==} + '@vitest/pretty-format@4.0.16': + resolution: {integrity: sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==} - '@vitest/runner@4.0.15': - resolution: {integrity: sha512-+A+yMY8dGixUhHmNdPUxOh0la6uVzun86vAbuMT3hIDxMrAOmn5ILBHm8ajrqHE0t8R9T1dGnde1A5DTnmi3qw==} + '@vitest/runner@4.0.16': + resolution: {integrity: sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==} - '@vitest/snapshot@4.0.15': - resolution: {integrity: sha512-A7Ob8EdFZJIBjLjeO0DZF4lqR6U7Ydi5/5LIZ0xcI+23lYlsYJAfGn8PrIWTYdZQRNnSRlzhg0zyGu37mVdy5g==} + '@vitest/snapshot@4.0.16': + resolution: {integrity: sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==} - '@vitest/spy@4.0.15': - resolution: {integrity: sha512-+EIjOJmnY6mIfdXtE/bnozKEvTC4Uczg19yeZ2vtCz5Yyb0QQ31QWVQ8hswJ3Ysx/K2EqaNsVanjr//2+P3FHw==} + '@vitest/spy@4.0.16': + resolution: {integrity: sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==} - '@vitest/ui@4.0.15': - resolution: {integrity: sha512-sxSyJMaKp45zI0u+lHrPuZM1ZJQ8FaVD35k+UxVrha1yyvQ+TZuUYllUixwvQXlB7ixoDc7skf3lQPopZIvaQw==} + '@vitest/ui@4.0.16': + resolution: {integrity: sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==} peerDependencies: - vitest: 4.0.15 + vitest: 4.0.16 - '@vitest/utils@4.0.15': - resolution: {integrity: sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==} + '@vitest/utils@4.0.16': + resolution: {integrity: sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -1253,8 +1249,8 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} - birpc@3.0.0: - resolution: {integrity: sha512-by+04pHuxpCEQcucAXqzopqfhyI8TLK5Qg5MST0cB6MP+JhHna9ollrtK9moVh27aq6Q6MEJgebD0cVm//yBkg==} + birpc@4.0.0: + resolution: {integrity: sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==} brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -1380,6 +1376,9 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -1496,15 +1495,15 @@ packages: eslint-import-resolver-node: optional: true - eslint-plugin-jsdoc@61.4.1: - resolution: {integrity: sha512-3c1QW/bV25sJ1MsIvsvW+EtLtN6yZMduw7LVQNVt72y2/5BbV5Pg5b//TE5T48LRUxoEQGaZJejCmcj3wCxBzw==} + eslint-plugin-jsdoc@61.5.0: + resolution: {integrity: sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==} engines: {node: '>=20.11.0'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-perfectionist@4.15.1: - resolution: {integrity: sha512-MHF0cBoOG0XyBf7G0EAFCuJJu4I18wy0zAoT1OHfx2o6EOx1EFTIzr2HGeuZa1kDcusoX0xJ9V7oZmaeFd773Q==} - engines: {node: ^18.0.0 || >=20.0.0} + eslint-plugin-perfectionist@5.0.0: + resolution: {integrity: sha512-a8PgR2AgCxEVmpIU+vd3nsYWTa8LfyXXJ0gXkPoj1gVW/sfj23BSTtNFBexGysTRNDwuMGLSzejHY+S3qj0EDg==} + engines: {node: ^20.0.0 || >=22.0.0} peerDependencies: eslint: '>=8.45.0' @@ -1531,8 +1530,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.39.1: - resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + eslint@9.39.2: + resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1687,9 +1686,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1728,8 +1724,8 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} - import-without-cache@0.2.2: - resolution: {integrity: sha512-4TTuRrZ0jBULXzac3EoX9ZviOs8Wn9iAbNhJEyLhTpAGF9eNmYSruaMMN/Tec/yqaO7H6yS2kALfQDJ5FxfatA==} + import-without-cache@0.2.4: + resolution: {integrity: sha512-b/Ke0y4n26ffQhkLvgBxV/NVO/QEE6AZlrMj8DYuxBWNAAu4iMQWZTFWzKcCTEmv7VQ0ae0j8KwrlGzSy8sYQQ==} engines: {node: '>=20.19.0'} imurmurhash@0.1.4: @@ -2189,13 +2185,13 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rolldown-plugin-dts@0.18.3: - resolution: {integrity: sha512-rd1LZ0Awwfyn89UndUF/HoFF4oH9a5j+2ZeuKSJYM80vmeN/p0gslYMnHTQHBEXPhUlvAlqGA3tVgXB/1qFNDg==} + rolldown-plugin-dts@0.19.1: + resolution: {integrity: sha512-6z501zDTGq6ZrIEdk57qNUwq7kBRGzv3I3SAN2HMJ2KFYjHLnAuPYOmvfiwdxbRZMJ0iMdkV9rYdC3GjurT2cg==} engines: {node: '>=20.19.0'} peerDependencies: '@ts-macro/tsc': ^0.3.6 '@typescript/native-preview': '>=7.0.0-dev.20250601.1' - rolldown: ^1.0.0-beta.51 + rolldown: ^1.0.0-beta.55 typescript: ^5.0.0 vue-tsc: ~3.1.0 peerDependenciesMeta: @@ -2208,8 +2204,8 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-beta.53: - resolution: {integrity: sha512-Qd9c2p0XKZdgT5AYd+KgAMggJ8ZmCs3JnS9PTMWkyUfteKlfmKtxJbWTHkVakxwXs1Ub7jrRYVeFeF7N0sQxyw==} + rolldown@1.0.0-beta.55: + resolution: {integrity: sha512-r8Ws43aYCnfO07ao0SvQRz4TBAtZJjGWNvScRBOHuiNHvjfECOJBIqJv0nUkL1GYcltjvvHswRilDF1ocsC0+g==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -2457,13 +2453,13 @@ packages: resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} hasBin: true - tsdown@0.17.0: - resolution: {integrity: sha512-NPZRrlC51X9Bb55ZTDwrWges8Dm1niCvNA5AYw7aix6pfnDnB4WR0neG5RPq75xIodg3hqlQUzzyrX7n4dmnJg==} + tsdown@0.18.1: + resolution: {integrity: sha512-na4MdVA8QS9Zw++0KovGpjvw1BY5WvoCWcE4Aw0dyfff9nWK8BPzniQEVs+apGUg3DHaYMDfs+XiFaDDgqDDzQ==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: '@arethetypeswrong/core': ^0.18.1 - '@vitejs/devtools': ^0.0.0-alpha.18 + '@vitejs/devtools': '*' publint: ^0.3.0 typescript: ^5.0.0 unplugin-lightningcss: ^0.4.0 @@ -2554,8 +2550,8 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.48.1: - resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + typescript-eslint@8.50.0: + resolution: {integrity: sha512-Q1/6yNUmCpH94fbgMUMg2/BSAr/6U7GBk61kZTv1/asghQOWOjTlp9K8mixS5NcJmm2creY+UFfGeW/+OcA64A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2582,8 +2578,8 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - unrun@0.2.16: - resolution: {integrity: sha512-DBkjUpQv9AQs1464XWnWQ97RuxPCu+CImvQMPmqFeHoL2Bi6C1BGPacMuXVw4VMIfQewNJZWUxPt5envG90oUA==} + unrun@0.2.20: + resolution: {integrity: sha512-YhobStTk93HYRN/4iBs3q3/sd7knvju1XrzwwrVVfRujyTG1K88hGONIxCoJN0PWBuO+BX7fFiHH0sVDfE3MWw==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2641,18 +2637,18 @@ packages: yaml: optional: true - vitest@4.0.15: - resolution: {integrity: sha512-n1RxDp8UJm6N0IbJLQo+yzLZ2sQCDyl1o0LeugbPWf8+8Fttp29GghsQBjYJVmWq3gBFfe9Hs1spR44vovn2wA==} + vitest@4.0.16: + resolution: {integrity: sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.0.15 - '@vitest/browser-preview': 4.0.15 - '@vitest/browser-webdriverio': 4.0.15 - '@vitest/ui': 4.0.15 + '@vitest/browser-playwright': 4.0.16 + '@vitest/browser-preview': 4.0.16 + '@vitest/browser-webdriverio': 4.0.16 + '@vitest/ui': 4.0.16 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -2718,8 +2714,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.1.13: - resolution: {integrity: sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==} + zod@4.2.1: + resolution: {integrity: sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==} snapshots: @@ -2777,7 +2773,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.8(@types/node@24.10.1)': + '@changesets/cli@2.29.8(@types/node@24.10.4)': dependencies: '@changesets/apply-release-plan': 7.0.14 '@changesets/assemble-release-plan': 6.0.9 @@ -2793,7 +2789,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@24.10.1) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.4) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -2922,7 +2918,7 @@ snapshots: '@es-joy/jsdoccomment@0.76.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/types': 8.50.0 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 6.10.0 @@ -3085,9 +3081,9 @@ snapshots: '@esbuild/win32-x64@0.27.1': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.0(eslint@9.39.2(jiti@2.6.1))': dependencies: - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -3124,7 +3120,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.39.1': {} + '@eslint/js@9.39.2': {} '@eslint/object-schema@2.1.7': {} @@ -3152,12 +3148,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.3(@types/node@24.10.1)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.4)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: - '@types/node': 24.10.1 + '@types/node': 24.10.4 '@isaacs/balanced-match@4.0.1': {} @@ -3242,26 +3238,24 @@ snapshots: wordwrap: 1.0.0 wrap-ansi: 7.0.0 - '@oxc-project/runtime@0.101.0': {} - - '@oxc-project/types@0.101.0': {} + '@oxc-project/types@0.103.0': {} '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.11.0(@eslint/js@9.39.1)(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': dependencies: - '@eslint/js': 9.39.1 - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-de-morgan: 2.0.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint/js': 9.39.2 + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-perfectionist: 4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-sonarjs: 3.0.5(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-unicorn: 62.0.0(eslint@9.39.1(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-perfectionist: 5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-sonarjs: 3.0.5(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) typescript: 5.9.3 - typescript-eslint: 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3275,48 +3269,48 @@ snapshots: dependencies: quansync: 1.0.0 - '@rolldown/binding-android-arm64@1.0.0-beta.53': + '@rolldown/binding-android-arm64@1.0.0-beta.55': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-beta.53': + '@rolldown/binding-darwin-arm64@1.0.0-beta.55': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.53': + '@rolldown/binding-darwin-x64@1.0.0-beta.55': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.53': + '@rolldown/binding-freebsd-x64@1.0.0-beta.55': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': + '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': dependencies: '@napi-rs/wasm-runtime': 1.1.0 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': optional: true - '@rolldown/pluginutils@1.0.0-beta.53': {} + '@rolldown/pluginutils@1.0.0-beta.55': {} '@rollup/rollup-android-arm-eabi@4.53.3': optional: true @@ -3430,22 +3424,21 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@24.10.1': + '@types/node@24.10.4': dependencies: undici-types: 7.16.0 '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.48.1 - '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.48.1 - eslint: 9.39.1(jiti@2.6.1) - graphemer: 1.4.0 + '@typescript-eslint/parser': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.50.0 + '@typescript-eslint/type-utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.50.0 + eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 ts-api-utils: 2.1.0(typescript@5.9.3) @@ -3453,56 +3446,56 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.48.1 - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/typescript-estree': 8.48.1(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.48.1 + '@typescript-eslint/scope-manager': 8.50.0 + '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.50.0 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.48.1(typescript@5.9.3)': + '@typescript-eslint/project-service@8.50.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) - '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3) + '@typescript-eslint/types': 8.50.0 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.48.1': + '@typescript-eslint/scope-manager@8.50.0': dependencies: - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/visitor-keys': 8.48.1 + '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/visitor-keys': 8.50.0 - '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.50.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/typescript-estree': 8.48.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.48.1': {} + '@typescript-eslint/types@8.50.0': {} - '@typescript-eslint/typescript-estree@8.48.1(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.50.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.48.1(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/visitor-keys': 8.48.1 + '@typescript-eslint/project-service': 8.50.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3) + '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/visitor-keys': 8.50.0 debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 @@ -3512,20 +3505,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.48.1 - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/typescript-estree': 8.48.1(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.50.0 + '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.48.1': + '@typescript-eslint/visitor-keys@8.50.0': dependencies: - '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/types': 8.50.0 eslint-visitor-keys: 4.2.1 '@typescript/vfs@1.6.2(typescript@5.9.3)': @@ -3594,10 +3587,10 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitest/coverage-v8@4.0.15(vitest@4.0.15)': + '@vitest/coverage-v8@4.0.16(vitest@4.0.16)': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.0.15 + '@vitest/utils': 4.0.16 ast-v8-to-istanbul: 0.3.8 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -3607,58 +3600,58 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color - '@vitest/expect@4.0.15': + '@vitest/expect@4.0.16': dependencies: '@standard-schema/spec': 1.0.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.16(vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: - '@vitest/spy': 4.0.15 + '@vitest/spy': 4.0.16 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/pretty-format@4.0.15': + '@vitest/pretty-format@4.0.16': dependencies: tinyrainbow: 3.0.3 - '@vitest/runner@4.0.15': + '@vitest/runner@4.0.16': dependencies: - '@vitest/utils': 4.0.15 + '@vitest/utils': 4.0.16 pathe: 2.0.3 - '@vitest/snapshot@4.0.15': + '@vitest/snapshot@4.0.16': dependencies: - '@vitest/pretty-format': 4.0.15 + '@vitest/pretty-format': 4.0.16 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.0.15': {} + '@vitest/spy@4.0.16': {} - '@vitest/ui@4.0.15(vitest@4.0.15)': + '@vitest/ui@4.0.16(vitest@4.0.16)': dependencies: - '@vitest/utils': 4.0.15 + '@vitest/utils': 4.0.16 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/utils@4.0.15': + '@vitest/utils@4.0.16': dependencies: - '@vitest/pretty-format': 4.0.15 + '@vitest/pretty-format': 4.0.16 tinyrainbow: 3.0.3 acorn-jsx@5.3.2(acorn@8.15.0): @@ -3731,7 +3724,7 @@ snapshots: dependencies: is-windows: 1.0.2 - birpc@3.0.0: {} + birpc@4.0.0: {} brace-expansion@1.1.12: dependencies: @@ -3836,6 +3829,8 @@ snapshots: deep-is@0.1.4: {} + defu@6.1.4: {} + detect-indent@6.1.0: {} dir-glob@3.0.1: @@ -3938,10 +3933,10 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) get-tsconfig: 4.13.0 is-bun-module: 2.0.0 @@ -3949,13 +3944,13 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-plugin-de-morgan@2.0.0(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-de-morgan@2.0.0(eslint@9.39.2(jiti@2.6.1)): dependencies: - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) eslint-plugin-depend@1.4.0: dependencies: @@ -3963,12 +3958,12 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/types': 8.50.0 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 minimatch: 10.1.1 @@ -3976,11 +3971,11 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@61.4.1(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-jsdoc@61.5.0(eslint@9.39.2(jiti@2.6.1)): dependencies: '@es-joy/jsdoccomment': 0.76.0 '@es-joy/resolve.exports': 1.2.0 @@ -3988,7 +3983,7 @@ snapshots: comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) espree: 10.4.0 esquery: 1.6.0 html-entities: 2.6.0 @@ -4000,22 +3995,21 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-perfectionist@4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/types': 8.48.1 - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-sonarjs@3.0.5(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-sonarjs@3.0.5(eslint@9.39.2(jiti@2.6.1)): dependencies: '@eslint-community/regexpp': 4.12.1 builtin-modules: 3.3.0 bytes: 3.1.2 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) functional-red-black-tree: 1.0.1 jsx-ast-utils-x: 0.1.0 lodash.merge: 4.6.2 @@ -4024,16 +4018,16 @@ snapshots: semver: 7.7.2 typescript: 5.9.3 - eslint-plugin-unicorn@62.0.0(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)): dependencies: '@babel/helper-validator-identifier': 7.28.5 - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) '@eslint/plugin-kit': 0.4.1 change-case: 5.4.4 ci-info: 4.3.1 clean-regexp: 1.0.0 core-js-compat: 3.47.0 - eslint: 9.39.1(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) esquery: 1.6.0 find-up-simple: 1.0.1 globals: 16.5.0 @@ -4055,15 +4049,15 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.39.1(jiti@2.6.1): + eslint@9.39.2(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 '@eslint/core': 0.17.0 '@eslint/eslintrc': 3.3.3 - '@eslint/js': 9.39.1 + '@eslint/js': 9.39.2 '@eslint/plugin-kit': 0.4.1 '@humanfs/node': 0.16.7 '@humanwhocodes/module-importer': 1.0.1 @@ -4229,8 +4223,6 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - has-flag@4.0.0: {} hookable@5.5.3: {} @@ -4256,7 +4248,7 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - import-without-cache@0.2.2: {} + import-without-cache@0.2.4: {} imurmurhash@0.1.4: {} @@ -4649,41 +4641,40 @@ snapshots: rfdc@1.4.1: {} - rolldown-plugin-dts@0.18.3(rolldown@1.0.0-beta.53)(typescript@5.9.3): + rolldown-plugin-dts@0.19.1(rolldown@1.0.0-beta.55)(typescript@5.9.3): dependencies: '@babel/generator': 7.28.5 '@babel/parser': 7.28.5 '@babel/types': 7.28.5 ast-kit: 2.2.0 - birpc: 3.0.0 + birpc: 4.0.0 dts-resolver: 2.1.3 get-tsconfig: 4.13.0 - magic-string: 0.30.21 obug: 2.1.1 - rolldown: 1.0.0-beta.53 + rolldown: 1.0.0-beta.55 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - oxc-resolver - rolldown@1.0.0-beta.53: + rolldown@1.0.0-beta.55: dependencies: - '@oxc-project/types': 0.101.0 - '@rolldown/pluginutils': 1.0.0-beta.53 + '@oxc-project/types': 0.103.0 + '@rolldown/pluginutils': 1.0.0-beta.55 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.53 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.53 - '@rolldown/binding-darwin-x64': 1.0.0-beta.53 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.53 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.53 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.53 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.53 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.53 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.53 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.53 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.53 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.53 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.53 + '@rolldown/binding-android-arm64': 1.0.0-beta.55 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.55 + '@rolldown/binding-darwin-x64': 1.0.0-beta.55 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.55 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.55 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.55 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.55 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.55 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.55 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.55 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.55 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.55 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.55 rollup@4.53.3: dependencies: @@ -4958,26 +4949,28 @@ snapshots: tslib: 2.8.1 tsutils: 3.21.0(typescript@5.9.3) typescript: 5.9.3 - zod: 4.1.13 + zod: 4.2.1 transitivePeerDependencies: - supports-color - tsdown@0.17.0(typescript@5.9.3): + tsdown@0.18.1(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 + defu: 6.1.4 empathic: 2.0.0 hookable: 5.5.3 - import-without-cache: 0.2.2 + import-without-cache: 0.2.4 obug: 2.1.1 - rolldown: 1.0.0-beta.53 - rolldown-plugin-dts: 0.18.3(rolldown@1.0.0-beta.53)(typescript@5.9.3) + picomatch: 4.0.3 + rolldown: 1.0.0-beta.55 + rolldown-plugin-dts: 0.19.1(rolldown@1.0.0-beta.55)(typescript@5.9.3) semver: 7.7.3 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.4.2 - unrun: 0.2.16 + unrun: 0.2.20 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -5049,13 +5042,13 @@ snapshots: typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.48.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.1(jiti@2.6.1) + '@typescript-eslint/eslint-plugin': 8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -5097,10 +5090,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - unrun@0.2.16: + unrun@0.2.20: dependencies: - '@oxc-project/runtime': 0.101.0 - rolldown: 1.0.0-beta.53 + rolldown: 1.0.0-beta.55 update-browserslist-db@1.2.2(browserslist@4.28.1): dependencies: @@ -5112,7 +5104,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -5121,21 +5113,21 @@ snapshots: rollup: 4.53.3 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 24.10.1 + '@types/node': 24.10.4 fsevents: 2.3.3 jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.15(@types/node@24.10.1)(@vitest/ui@4.0.15)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: - '@vitest/expect': 4.0.15 - '@vitest/mocker': 4.0.15(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) - '@vitest/pretty-format': 4.0.15 - '@vitest/runner': 4.0.15 - '@vitest/snapshot': 4.0.15 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 + '@vitest/expect': 4.0.16 + '@vitest/mocker': 4.0.16(vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/pretty-format': 4.0.16 + '@vitest/runner': 4.0.16 + '@vitest/snapshot': 4.0.16 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 es-module-lexer: 1.7.0 expect-type: 1.2.2 magic-string: 0.30.21 @@ -5147,11 +5139,11 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.1)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.10.1 - '@vitest/ui': 4.0.15(vitest@4.0.15) + '@types/node': 24.10.4 + '@vitest/ui': 4.0.16(vitest@4.0.16) transitivePeerDependencies: - jiti - less @@ -5202,4 +5194,4 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.1.13: {} + zod@4.2.1: {} From 1f63a617f25881d26eaca8a85401d56315faefdb Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:29:27 +0100 Subject: [PATCH 17/52] [Project] Update pnpm to 10.26.0 --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5884bb09..4cfec351 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.24.0 + version: 10.26.0 - name: Cache turbo build setup uses: actions/cache@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e747dedc..784dc099 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,7 @@ jobs: uses: actions/configure-pages@v5 - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.24.0 + version: 10.26.0 - name: Setup Node.js 22.x uses: actions/setup-node@v4 with: diff --git a/package.json b/package.json index 180987ab..70338777 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "engines": { "node": "^18.18 || >=20.9" }, - "packageManager": "pnpm@10.24.0", + "packageManager": "pnpm@10.26.0", "keywords": [ "blizzard", "battlenet", From 8ef0c6409e65fc8015e83d8e2fe5d1dff5fe03d9 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:30:39 +0100 Subject: [PATCH 18/52] [Client] Update ky to 1.14.1 --- .changeset/petite-walls-clean.md | 5 +++++ packages/client/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/petite-walls-clean.md diff --git a/.changeset/petite-walls-clean.md b/.changeset/petite-walls-clean.md new file mode 100644 index 00000000..a108e48a --- /dev/null +++ b/.changeset/petite-walls-clean.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/client': patch +--- + +Update ky to 1.14.1 diff --git a/packages/client/package.json b/packages/client/package.json index ee83d5d3..cf45c38a 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -40,7 +40,7 @@ "hearthstone" ], "dependencies": { - "ky": "1.14.0" + "ky": "1.14.1" }, "peerDependencies": { "@blizzard-api/core": "2.1.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4dcbf69a..ff7e0a2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: packages/client: dependencies: ky: - specifier: 1.14.0 - version: 1.14.0 + specifier: 1.14.1 + version: 1.14.1 devDependencies: '@blizzard-api/classic-wow': specifier: workspace:* @@ -1859,8 +1859,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - ky@1.14.0: - resolution: {integrity: sha512-Rczb6FMM6JT0lvrOlP5WUOCB7s9XKxzwgErzhKlKde1bEV90FXplV1o87fpt4PU/asJFiqjYJxAJyzJhcrxOsQ==} + ky@1.14.1: + resolution: {integrity: sha512-hYje4L9JCmpEQBtudo+v52X5X8tgWXUYyPcxKSuxQNboqufecl9VMWjGiucAFH060AwPXHZuH+WB2rrqfkmafw==} engines: {node: '>=18'} levn@0.4.1: @@ -4357,7 +4357,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - ky@1.14.0: {} + ky@1.14.1: {} levn@0.4.1: dependencies: From 3d2191992d4de6c6fb557ca695ae85617558a7d8 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 25 Dec 2025 11:55:28 +0100 Subject: [PATCH 19/52] Fix a few schemas --- generated/schemas/wow/account-profile.ts | 2 +- generated/schemas/wow/mythic-raid-leaderboard.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generated/schemas/wow/account-profile.ts b/generated/schemas/wow/account-profile.ts index bdf68c53..966aaed2 100644 --- a/generated/schemas/wow/account-profile.ts +++ b/generated/schemas/wow/account-profile.ts @@ -147,7 +147,7 @@ export const accountTransmogsCollectionSummaryResponseSchema = z.object({ export const protectedCharacterProfileSummaryResponseSchema = z.object({ _links: linksSchema, bind_position: positionSchema, - character: nameIdKeySchema.and(realmSchema), + character: realmSchema, id: z.number(), money: z.number(), name: z.string(), diff --git a/generated/schemas/wow/mythic-raid-leaderboard.ts b/generated/schemas/wow/mythic-raid-leaderboard.ts index d7a97a5a..4fdb77de 100644 --- a/generated/schemas/wow/mythic-raid-leaderboard.ts +++ b/generated/schemas/wow/mythic-raid-leaderboard.ts @@ -23,7 +23,7 @@ const entrySchema = z.object({ }), guild: guildSchema, rank: z.number(), - region: z.union([z.literal('cn'), originsSchema]), + region: originsSchema, timestamp: z.number(), }); From 29ac59792e41193aa051e1dc03651e408f367d0e Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 25 Dec 2025 11:56:20 +0100 Subject: [PATCH 20/52] Update dev dependencies --- package.json | 6 +- pnpm-lock.yaml | 382 ++++++++++++++++++++++++------------------------- 2 files changed, 194 insertions(+), 194 deletions(-) diff --git a/package.json b/package.json index 70338777..bf7def96 100644 --- a/package.json +++ b/package.json @@ -43,12 +43,12 @@ "prettier": "3.7.4", "ts-to-zod": "5.1.0", "tsx": "4.21.0", - "tsdown": "0.18.1", - "turbo": "2.6.3", + "tsdown": "0.18.3", + "turbo": "2.7.2", "typedoc": "0.28.15", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", - "typescript-eslint": "8.50.0", + "typescript-eslint": "8.50.1", "vitest": "4.0.16", "zod": "4.2.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff7e0a2e..c09a442a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 2.29.8(@types/node@24.10.4) '@putstack/eslint-config-typescript': specifier: 4.12.0 - version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.7.4) @@ -48,14 +48,14 @@ importers: specifier: 5.1.0 version: 5.1.0 tsdown: - specifier: 0.18.1 - version: 0.18.1(typescript@5.9.3) + specifier: 0.18.3 + version: 0.18.3(typescript@5.9.3) tsx: specifier: 4.21.0 version: 4.21.0 turbo: - specifier: 2.6.3 - version: 2.6.3 + specifier: 2.7.2 + version: 2.7.2 typedoc: specifier: 0.28.15 version: 0.28.15(typescript@5.9.3) @@ -66,8 +66,8 @@ importers: specifier: 5.9.3 version: 5.9.3 typescript-eslint: - specifier: 8.50.0 - version: 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + specifier: 8.50.1 + version: 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: 4.0.16 version: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) @@ -720,85 +720,85 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@rolldown/binding-android-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-5cPpHdO+zp+klznZnIHRO1bMHDq5hS9cqXodEKAaa/dQTPDjnE91OwAsy3o1gT2x4QaY8NzdBXAvutYdaw0WeA==} + '@rolldown/binding-android-arm64@1.0.0-beta.57': + resolution: {integrity: sha512-GoOVDy8bjw9z1K30Oo803nSzXJS/vWhFijFsW3kzvZCO8IZwFnNa6pGctmbbJstKl3Fv6UBwyjJQN6msejW0IQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-l0887CGU2SXZr0UJmeEcXSvtDCOhDTTYXuoWbhrEJ58YQhQk24EVhDhHMTyjJb1PBRniUgNc1G0T51eF8z+TWw==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.57': + resolution: {integrity: sha512-9c4FOhRGpl+PX7zBK5p17c5efpF9aSpTPgyigv57hXf5NjQUaJOOiejPLAtFiKNBIfm5Uu6yFkvLKzOafNvlTw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.55': - resolution: {integrity: sha512-d7qP2AVYzN0tYIP4vJ7nmr26xvmlwdkLD/jWIc9Z9dqh5y0UGPigO3m5eHoHq9BNazmwdD9WzDHbQZyXFZjgtA==} + '@rolldown/binding-darwin-x64@1.0.0-beta.57': + resolution: {integrity: sha512-6RsB8Qy4LnGqNGJJC/8uWeLWGOvbRL/KG5aJ8XXpSEupg/KQtlBEiFaYU/Ma5Usj1s+bt3ItkqZYAI50kSplBA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.55': - resolution: {integrity: sha512-j311E4NOB0VMmXHoDDZhrWidUf7L/Sa6bu/+i2cskvHKU40zcUNPSYeD2YiO2MX+hhDFa5bJwhliYfs+bTrSZw==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.57': + resolution: {integrity: sha512-uA9kG7+MYkHTbqwv67Tx+5GV5YcKd33HCJIi0311iYBd25yuwyIqvJfBdt1VVB8tdOlyTb9cPAgfCki8nhwTQg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': - resolution: {integrity: sha512-lAsaYWhfNTW2A/9O7zCpb5eIJBrFeNEatOS/DDOZ5V/95NHy50g4b/5ViCqchfyFqRb7MKUR18/+xWkIcDkeIw==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.57': + resolution: {integrity: sha512-3KkS0cHsllT2T+Te+VZMKHNw6FPQihYsQh+8J4jkzwgvAQpbsbXmrqhkw3YU/QGRrD8qgcOvBr6z5y6Jid+rmw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': - resolution: {integrity: sha512-2x6ffiVLZrQv7Xii9+JdtyT1U3bQhKj59K3eRnYlrXsKyjkjfmiDUVx2n+zSyijisUqD62fcegmx2oLLfeTkCA==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.57': + resolution: {integrity: sha512-A3/wu1RgsHhqP3rVH2+sM81bpk+Qd2XaHTl8LtX5/1LNR7QVBFBCpAoiXwjTdGnI5cMdBVi7Z1pi52euW760Fw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': - resolution: {integrity: sha512-QbNncvqAXziya5wleI+OJvmceEE15vE4yn4qfbI/hwT/+8ZcqxyfRZOOh62KjisXxp4D0h3JZspycXYejxAU3w==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.57': + resolution: {integrity: sha512-d0kIVezTQtazpyWjiJIn5to8JlwfKITDqwsFv0Xc6s31N16CD2PC/Pl2OtKgS7n8WLOJbfqgIp5ixYzTAxCqMg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': - resolution: {integrity: sha512-YZCTZZM+rujxwVc6A+QZaNMJXVtmabmFYLG2VGQTKaBfYGvBKUgtbMEttnp/oZ88BMi2DzadBVhOmfQV8SuHhw==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.57': + resolution: {integrity: sha512-E199LPijo98yrLjPCmETx8EF43sZf9t3guSrLee/ej1rCCc3zDVTR4xFfN9BRAapGVl7/8hYqbbiQPTkv73kUg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': - resolution: {integrity: sha512-28q9OQ/DDpFh2keS4BVAlc3N65/wiqKbk5K1pgLdu/uWbKa8hgUJofhXxqO+a+Ya2HVTUuYHneWsI2u+eu3N5Q==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.57': + resolution: {integrity: sha512-++EQDpk/UJ33kY/BNsh7A7/P1sr/jbMuQ8cE554ZIy+tCUWCivo9zfyjDUoiMdnxqX6HLJEqqGnbGQOvzm2OMQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-LiCA4BjCnm49B+j1lFzUtlC+4ZphBv0d0g5VqrEJua/uyv9Ey1v9tiaMql1C8c0TVSNDUmrkfHQ71vuQC7YfpQ==} + '@rolldown/binding-openharmony-arm64@1.0.0-beta.57': + resolution: {integrity: sha512-voDEBcNqxbUv/GeXKFtxXVWA+H45P/8Dec4Ii/SbyJyGvCqV1j+nNHfnFUIiRQ2Q40DwPe/djvgYBs9PpETiMA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': - resolution: {integrity: sha512-nZ76tY7T0Oe8vamz5Cv5CBJvrqeQxwj1WaJ2GxX8Msqs0zsQMMcvoyxOf0glnJlxxgKjtoBxAOxaAU8ERbW6Tg==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.57': + resolution: {integrity: sha512-bRhcF7NLlCnpkzLVlVhrDEd0KH22VbTPkPTbMjlYvqhSmarxNIq5vtlQS8qmV7LkPKHrNLWyJW/V/sOyFba26Q==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': - resolution: {integrity: sha512-TFVVfLfhL1G+pWspYAgPK/FSqjiBtRKYX9hixfs508QVEZPQlubYAepHPA7kEa6lZXYj5ntzF87KC6RNhxo+ew==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.57': + resolution: {integrity: sha512-rnDVGRks2FQ2hgJ2g15pHtfxqkGFGjJQUDWzYznEkE8Ra2+Vag9OffxdbJMZqBWXHVM0iS4dv8qSiEn7bO+n1Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': - resolution: {integrity: sha512-j1WBlk0p+ISgLzMIgl0xHp1aBGXenoK2+qWYc/wil2Vse7kVOdFq9aeQ8ahK6/oxX2teQ5+eDvgjdywqTL+daA==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.57': + resolution: {integrity: sha512-OqIUyNid1M4xTj6VRXp/Lht/qIP8fo25QyAZlCP+p6D2ATCEhyW4ZIFLnC9zAGN/HMbXoCzvwfa8Jjg/8J4YEg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.55': - resolution: {integrity: sha512-vajw/B3qoi7aYnnD4BQ4VoCcXQWnF0roSwE2iynbNxgW4l9mFwtLmLmUhpDdcTBfKyZm1p/T0D13qG94XBLohA==} + '@rolldown/pluginutils@1.0.0-beta.57': + resolution: {integrity: sha512-aQNelgx14tGA+n2tNSa9x6/jeoCL9fkDeCei7nOKnHx0fEFRRMu5ReiITo+zZD5TzWDGGRjbSYCs93IfRIyTuQ==} '@rollup/rollup-android-arm-eabi@4.53.3': resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} @@ -959,63 +959,63 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.50.0': - resolution: {integrity: sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==} + '@typescript-eslint/eslint-plugin@8.50.1': + resolution: {integrity: sha512-PKhLGDq3JAg0Jk/aK890knnqduuI/Qj+udH7wCf0217IGi4gt+acgCyPVe79qoT+qKUvHMDQkwJeKW9fwl8Cyw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.50.0 + '@typescript-eslint/parser': ^8.50.1 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.50.0': - resolution: {integrity: sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==} + '@typescript-eslint/parser@8.50.1': + resolution: {integrity: sha512-hM5faZwg7aVNa819m/5r7D0h0c9yC4DUlWAOvHAtISdFTc8xB86VmX5Xqabrama3wIPJ/q9RbGS1worb6JfnMg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.50.0': - resolution: {integrity: sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==} + '@typescript-eslint/project-service@8.50.1': + resolution: {integrity: sha512-E1ur1MCVf+YiP89+o4Les/oBAVzmSbeRB0MQLfSlYtbWU17HPxZ6Bhs5iYmKZRALvEuBoXIZMOIRRc/P++Ortg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.50.0': - resolution: {integrity: sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==} + '@typescript-eslint/scope-manager@8.50.1': + resolution: {integrity: sha512-mfRx06Myt3T4vuoHaKi8ZWNTPdzKPNBhiblze5N50//TSHOAQQevl/aolqA/BcqqbJ88GUnLqjjcBc8EWdBcVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.50.0': - resolution: {integrity: sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==} + '@typescript-eslint/tsconfig-utils@8.50.1': + resolution: {integrity: sha512-ooHmotT/lCWLXi55G4mvaUF60aJa012QzvLK0Y+Mp4WdSt17QhMhWOaBWeGTFVkb2gDgBe19Cxy1elPXylslDw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.50.0': - resolution: {integrity: sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==} + '@typescript-eslint/type-utils@8.50.1': + resolution: {integrity: sha512-7J3bf022QZE42tYMO6SL+6lTPKFk/WphhRPe9Tw/el+cEwzLz1Jjz2PX3GtGQVxooLDKeMVmMt7fWpYRdG5Etg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.50.0': - resolution: {integrity: sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==} + '@typescript-eslint/types@8.50.1': + resolution: {integrity: sha512-v5lFIS2feTkNyMhd7AucE/9j/4V9v5iIbpVRncjk/K0sQ6Sb+Np9fgYS/63n6nwqahHQvbmujeBL7mp07Q9mlA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.50.0': - resolution: {integrity: sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==} + '@typescript-eslint/typescript-estree@8.50.1': + resolution: {integrity: sha512-woHPdW+0gj53aM+cxchymJCrh0cyS7BTIdcDxWUNsclr9VDkOSbqC13juHzxOmQ22dDkMZEpZB+3X1WpUvzgVQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.50.0': - resolution: {integrity: sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==} + '@typescript-eslint/utils@8.50.1': + resolution: {integrity: sha512-lCLp8H1T9T7gPbEuJSnHwnSuO9mDf8mfK/Nion5mZmiEaQD9sWf9W4dfeFqRyqRjF06/kBuTmAqcs9sewM2NbQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.50.0': - resolution: {integrity: sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==} + '@typescript-eslint/visitor-keys@8.50.1': + resolution: {integrity: sha512-IrDKrw7pCRUR94zeuCSUWQ+w8JEf5ZX5jl/e6AHGSLi1/zIr0lgutfn/7JpfCey+urpgQEdrZVYzCaVVKiTwhQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.2': @@ -1690,8 +1690,8 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - hookable@5.5.3: - resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + hookable@6.0.1: + resolution: {integrity: sha512-uKGyY8BuzN/a5gvzvA+3FVWo0+wUjgtfSdnmjtrOVwQCZPHpHDH2WRO3VZSOeluYrHoDCiXFffZXs8Dj1ULWtw==} html-entities@2.6.0: resolution: {integrity: sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==} @@ -1724,8 +1724,8 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} - import-without-cache@0.2.4: - resolution: {integrity: sha512-b/Ke0y4n26ffQhkLvgBxV/NVO/QEE6AZlrMj8DYuxBWNAAu4iMQWZTFWzKcCTEmv7VQ0ae0j8KwrlGzSy8sYQQ==} + import-without-cache@0.2.5: + resolution: {integrity: sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A==} engines: {node: '>=20.19.0'} imurmurhash@0.1.4: @@ -2185,15 +2185,15 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rolldown-plugin-dts@0.19.1: - resolution: {integrity: sha512-6z501zDTGq6ZrIEdk57qNUwq7kBRGzv3I3SAN2HMJ2KFYjHLnAuPYOmvfiwdxbRZMJ0iMdkV9rYdC3GjurT2cg==} + rolldown-plugin-dts@0.20.0: + resolution: {integrity: sha512-cLAY1kN2ilTYMfZcFlGWbXnu6Nb+8uwUBsi+Mjbh4uIx7IN8uMOmJ7RxrrRgPsO4H7eSz3E+JwGoL1gyugiyUA==} engines: {node: '>=20.19.0'} peerDependencies: '@ts-macro/tsc': ^0.3.6 '@typescript/native-preview': '>=7.0.0-dev.20250601.1' - rolldown: ^1.0.0-beta.55 + rolldown: ^1.0.0-beta.57 typescript: ^5.0.0 - vue-tsc: ~3.1.0 + vue-tsc: ~3.2.0 peerDependenciesMeta: '@ts-macro/tsc': optional: true @@ -2204,8 +2204,8 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-beta.55: - resolution: {integrity: sha512-r8Ws43aYCnfO07ao0SvQRz4TBAtZJjGWNvScRBOHuiNHvjfECOJBIqJv0nUkL1GYcltjvvHswRilDF1ocsC0+g==} + rolldown@1.0.0-beta.57: + resolution: {integrity: sha512-lMMxcNN71GMsSko8RyeTaFoATHkCh4IWU7pYF73ziMYjhHZWfVesC6GQ+iaJCvZmVjvgSks9Ks1aaqEkBd8udg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -2453,8 +2453,8 @@ packages: resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} hasBin: true - tsdown@0.18.1: - resolution: {integrity: sha512-na4MdVA8QS9Zw++0KovGpjvw1BY5WvoCWcE4Aw0dyfff9nWK8BPzniQEVs+apGUg3DHaYMDfs+XiFaDDgqDDzQ==} + tsdown@0.18.3: + resolution: {integrity: sha512-OVFzktKDTglFAUh/WO8WamBUbZoBlJ9m7NgZZrVyIKe32BfXBeRZ+soFFpuOGVP8g8OU4tOLOpTyPTELWvcTFw==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2495,38 +2495,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@2.6.3: - resolution: {integrity: sha512-BlJJDc1CQ7SK5Y5qnl7AzpkvKSnpkfPmnA+HeU/sgny3oHZckPV2776ebO2M33CYDSor7+8HQwaodY++IINhYg==} + turbo-darwin-64@2.7.2: + resolution: {integrity: sha512-dxY3X6ezcT5vm3coK6VGixbrhplbQMwgNsCsvZamS/+/6JiebqW9DKt4NwpgYXhDY2HdH00I7FWs3wkVuan4rA==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.6.3: - resolution: {integrity: sha512-MwVt7rBKiOK7zdYerenfCRTypefw4kZCue35IJga9CH1+S50+KTiCkT6LBqo0hHeoH2iKuI0ldTF2a0aB72z3w==} + turbo-darwin-arm64@2.7.2: + resolution: {integrity: sha512-1bXmuwPLqNFt3mzrtYcVx1sdJ8UYb124Bf48nIgcpMCGZy3kDhgxNv1503kmuK/37OGOZbsWSQFU4I08feIuSg==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.6.3: - resolution: {integrity: sha512-cqpcw+dXxbnPtNnzeeSyWprjmuFVpHJqKcs7Jym5oXlu/ZcovEASUIUZVN3OGEM6Y/OTyyw0z09tOHNt5yBAVg==} + turbo-linux-64@2.7.2: + resolution: {integrity: sha512-kP+TiiMaiPugbRlv57VGLfcjFNsFbo8H64wMBCPV2270Or2TpDCBULMzZrvEsvWFjT3pBFvToYbdp8/Kw0jAQg==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.6.3: - resolution: {integrity: sha512-MterpZQmjXyr4uM7zOgFSFL3oRdNKeflY7nsjxJb2TklsYqiu3Z9pQ4zRVFFH8n0mLGna7MbQMZuKoWqqHb45w==} + turbo-linux-arm64@2.7.2: + resolution: {integrity: sha512-VDJwQ0+8zjAfbyY6boNaWfP6RIez4ypKHxwkuB6SrWbOSk+vxTyW5/hEjytTwK8w/TsbKVcMDyvpora8tEsRFw==} cpu: [arm64] os: [linux] - turbo-windows-64@2.6.3: - resolution: {integrity: sha512-biDU70v9dLwnBdLf+daoDlNJVvqOOP8YEjqNipBHzgclbQlXbsi6Gqqelp5er81Qo3BiRgmTNx79oaZQTPb07Q==} + turbo-windows-64@2.7.2: + resolution: {integrity: sha512-rPjqQXVnI6A6oxgzNEE8DNb6Vdj2Wwyhfv3oDc+YM3U9P7CAcBIlKv/868mKl4vsBtz4ouWpTQNXG8vljgJO+w==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.6.3: - resolution: {integrity: sha512-dDHVKpSeukah3VsI/xMEKeTnV9V9cjlpFSUs4bmsUiLu3Yv2ENlgVEZv65wxbeE0bh0jjpmElDT+P1KaCxArQQ==} + turbo-windows-arm64@2.7.2: + resolution: {integrity: sha512-tcnHvBhO515OheIFWdxA+qUvZzNqqcHbLVFc1+n+TJ1rrp8prYicQtbtmsiKgMvr/54jb9jOabU62URAobnB7g==} cpu: [arm64] os: [win32] - turbo@2.6.3: - resolution: {integrity: sha512-bf6YKUv11l5Xfcmg76PyWoy/e2vbkkxFNBGJSnfdSXQC33ZiUfutYh6IXidc5MhsnrFkWfdNNLyaRk+kHMLlwA==} + turbo@2.7.2: + resolution: {integrity: sha512-5JIA5aYBAJSAhrhbyag1ZuMSgUZnHtI+Sq3H8D3an4fL8PeF+L1yYvbEJg47akP1PFfATMf5ehkqFnxfkmuwZQ==} hasBin: true type-check@0.4.0: @@ -2550,8 +2550,8 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.50.0: - resolution: {integrity: sha512-Q1/6yNUmCpH94fbgMUMg2/BSAr/6U7GBk61kZTv1/asghQOWOjTlp9K8mixS5NcJmm2creY+UFfGeW/+OcA64A==} + typescript-eslint@8.50.1: + resolution: {integrity: sha512-ytTHO+SoYSbhAH9CrYnMhiLx8To6PSSvqnvXyPUgPETCvB6eBKmTI9w6XMPS3HsBRGkwTVBX+urA8dYQx6bHfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2578,8 +2578,8 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - unrun@0.2.20: - resolution: {integrity: sha512-YhobStTk93HYRN/4iBs3q3/sd7knvju1XrzwwrVVfRujyTG1K88hGONIxCoJN0PWBuO+BX7fFiHH0sVDfE3MWw==} + unrun@0.2.21: + resolution: {integrity: sha512-VuwI4YKtwBpDvM7hCEop2Im/ezS82dliqJpkh9pvS6ve8HcUsBDvESHxMmUfImXR03GkmfdDynyrh/pUJnlguw==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2918,7 +2918,7 @@ snapshots: '@es-joy/jsdoccomment@0.76.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/types': 8.50.1 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 6.10.0 @@ -3242,20 +3242,20 @@ snapshots: '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.2 - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-perfectionist: 5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint-plugin-sonarjs: 3.0.5(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) typescript: 5.9.3 - typescript-eslint: 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3269,48 +3269,48 @@ snapshots: dependencies: quansync: 1.0.0 - '@rolldown/binding-android-arm64@1.0.0-beta.55': + '@rolldown/binding-android-arm64@1.0.0-beta.57': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-beta.55': + '@rolldown/binding-darwin-arm64@1.0.0-beta.57': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.55': + '@rolldown/binding-darwin-x64@1.0.0-beta.57': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.55': + '@rolldown/binding-freebsd-x64@1.0.0-beta.57': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.57': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.57': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.57': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.57': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.57': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': + '@rolldown/binding-openharmony-arm64@1.0.0-beta.57': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.57': dependencies: '@napi-rs/wasm-runtime': 1.1.0 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.57': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.57': optional: true - '@rolldown/pluginutils@1.0.0-beta.55': {} + '@rolldown/pluginutils@1.0.0-beta.57': {} '@rollup/rollup-android-arm-eabi@4.53.3': optional: true @@ -3430,14 +3430,14 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.50.0 - '@typescript-eslint/type-utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.50.0 + '@typescript-eslint/parser': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.50.1 + '@typescript-eslint/type-utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.50.1 eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 @@ -3446,41 +3446,41 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.50.0 - '@typescript-eslint/types': 8.50.0 - '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.50.0 + '@typescript-eslint/scope-manager': 8.50.1 + '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.50.1 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.50.0(typescript@5.9.3)': + '@typescript-eslint/project-service@8.50.1(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3) - '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3) + '@typescript-eslint/types': 8.50.1 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.50.0': + '@typescript-eslint/scope-manager@8.50.1': dependencies: - '@typescript-eslint/types': 8.50.0 - '@typescript-eslint/visitor-keys': 8.50.0 + '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/visitor-keys': 8.50.1 - '@typescript-eslint/tsconfig-utils@8.50.0(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.50.1(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.50.0 - '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.9.3) @@ -3488,14 +3488,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.50.0': {} + '@typescript-eslint/types@8.50.1': {} - '@typescript-eslint/typescript-estree@8.50.0(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.50.1(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.50.0(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3) - '@typescript-eslint/types': 8.50.0 - '@typescript-eslint/visitor-keys': 8.50.0 + '@typescript-eslint/project-service': 8.50.1(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3) + '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/visitor-keys': 8.50.1 debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 @@ -3505,20 +3505,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.50.0 - '@typescript-eslint/types': 8.50.0 - '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.50.1 + '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.50.0': + '@typescript-eslint/visitor-keys@8.50.1': dependencies: - '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/types': 8.50.1 eslint-visitor-keys: 4.2.1 '@typescript/vfs@1.6.2(typescript@5.9.3)': @@ -3933,7 +3933,7 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3944,7 +3944,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -3958,9 +3958,9 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@typescript-eslint/types': 8.50.0 + '@typescript-eslint/types': 8.50.1 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3971,7 +3971,7 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - supports-color @@ -3997,7 +3997,7 @@ snapshots: eslint-plugin-perfectionist@5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: @@ -4225,7 +4225,7 @@ snapshots: has-flag@4.0.0: {} - hookable@5.5.3: {} + hookable@6.0.1: {} html-entities@2.6.0: {} @@ -4248,7 +4248,7 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - import-without-cache@0.2.4: {} + import-without-cache@0.2.5: {} imurmurhash@0.1.4: {} @@ -4641,7 +4641,7 @@ snapshots: rfdc@1.4.1: {} - rolldown-plugin-dts@0.19.1(rolldown@1.0.0-beta.55)(typescript@5.9.3): + rolldown-plugin-dts@0.20.0(rolldown@1.0.0-beta.57)(typescript@5.9.3): dependencies: '@babel/generator': 7.28.5 '@babel/parser': 7.28.5 @@ -4651,30 +4651,30 @@ snapshots: dts-resolver: 2.1.3 get-tsconfig: 4.13.0 obug: 2.1.1 - rolldown: 1.0.0-beta.55 + rolldown: 1.0.0-beta.57 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - oxc-resolver - rolldown@1.0.0-beta.55: + rolldown@1.0.0-beta.57: dependencies: '@oxc-project/types': 0.103.0 - '@rolldown/pluginutils': 1.0.0-beta.55 + '@rolldown/pluginutils': 1.0.0-beta.57 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.55 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.55 - '@rolldown/binding-darwin-x64': 1.0.0-beta.55 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.55 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.55 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.55 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.55 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.55 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.55 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.55 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.55 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.55 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.55 + '@rolldown/binding-android-arm64': 1.0.0-beta.57 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.57 + '@rolldown/binding-darwin-x64': 1.0.0-beta.57 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.57 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.57 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.57 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.57 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.57 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.57 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.57 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.57 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.57 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.57 rollup@4.53.3: dependencies: @@ -4953,24 +4953,24 @@ snapshots: transitivePeerDependencies: - supports-color - tsdown@0.18.1(typescript@5.9.3): + tsdown@0.18.3(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 defu: 6.1.4 empathic: 2.0.0 - hookable: 5.5.3 - import-without-cache: 0.2.4 + hookable: 6.0.1 + import-without-cache: 0.2.5 obug: 2.1.1 picomatch: 4.0.3 - rolldown: 1.0.0-beta.55 - rolldown-plugin-dts: 0.19.1(rolldown@1.0.0-beta.55)(typescript@5.9.3) + rolldown: 1.0.0-beta.57 + rolldown-plugin-dts: 0.20.0(rolldown@1.0.0-beta.57)(typescript@5.9.3) semver: 7.7.3 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.4.2 - unrun: 0.2.20 + unrun: 0.2.21 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -4996,32 +4996,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.6.3: + turbo-darwin-64@2.7.2: optional: true - turbo-darwin-arm64@2.6.3: + turbo-darwin-arm64@2.7.2: optional: true - turbo-linux-64@2.6.3: + turbo-linux-64@2.7.2: optional: true - turbo-linux-arm64@2.6.3: + turbo-linux-arm64@2.7.2: optional: true - turbo-windows-64@2.6.3: + turbo-windows-64@2.7.2: optional: true - turbo-windows-arm64@2.6.3: + turbo-windows-arm64@2.7.2: optional: true - turbo@2.6.3: + turbo@2.7.2: optionalDependencies: - turbo-darwin-64: 2.6.3 - turbo-darwin-arm64: 2.6.3 - turbo-linux-64: 2.6.3 - turbo-linux-arm64: 2.6.3 - turbo-windows-64: 2.6.3 - turbo-windows-arm64: 2.6.3 + turbo-darwin-64: 2.7.2 + turbo-darwin-arm64: 2.7.2 + turbo-linux-64: 2.7.2 + turbo-linux-arm64: 2.7.2 + turbo-windows-64: 2.7.2 + turbo-windows-arm64: 2.7.2 type-check@0.4.0: dependencies: @@ -5042,12 +5042,12 @@ snapshots: typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) + '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -5090,9 +5090,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - unrun@0.2.20: + unrun@0.2.21: dependencies: - rolldown: 1.0.0-beta.55 + rolldown: 1.0.0-beta.57 update-browserslist-db@1.2.2(browserslist@4.28.1): dependencies: From bc7fe1eb38c9722c06290aa57375dddf7319c7ac Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 1 Jan 2026 12:34:49 +0100 Subject: [PATCH 21/52] [Project] Update dev dependencies --- package.json | 6 +- pnpm-lock.yaml | 188 ++++++++++++++++++++++++------------------------- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/package.json b/package.json index bf7def96..e5e6cdf2 100644 --- a/package.json +++ b/package.json @@ -43,14 +43,14 @@ "prettier": "3.7.4", "ts-to-zod": "5.1.0", "tsx": "4.21.0", - "tsdown": "0.18.3", + "tsdown": "0.18.4", "turbo": "2.7.2", "typedoc": "0.28.15", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", - "typescript-eslint": "8.50.1", + "typescript-eslint": "8.51.0", "vitest": "4.0.16", - "zod": "4.2.1" + "zod": "4.3.4" }, "pnpm": { "onlyBuiltDependencies": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c09a442a..02076689 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 2.29.8(@types/node@24.10.4) '@putstack/eslint-config-typescript': specifier: 4.12.0 - version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.7.4) @@ -48,8 +48,8 @@ importers: specifier: 5.1.0 version: 5.1.0 tsdown: - specifier: 0.18.3 - version: 0.18.3(typescript@5.9.3) + specifier: 0.18.4 + version: 0.18.4(typescript@5.9.3) tsx: specifier: 4.21.0 version: 4.21.0 @@ -66,14 +66,14 @@ importers: specifier: 5.9.3 version: 5.9.3 typescript-eslint: - specifier: 8.50.1 - version: 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + specifier: 8.51.0 + version: 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: 4.0.16 version: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: - specifier: 4.2.1 - version: 4.2.1 + specifier: 4.3.4 + version: 4.3.4 packages/classic-wow: devDependencies: @@ -959,63 +959,63 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.50.1': - resolution: {integrity: sha512-PKhLGDq3JAg0Jk/aK890knnqduuI/Qj+udH7wCf0217IGi4gt+acgCyPVe79qoT+qKUvHMDQkwJeKW9fwl8Cyw==} + '@typescript-eslint/eslint-plugin@8.51.0': + resolution: {integrity: sha512-XtssGWJvypyM2ytBnSnKtHYOGT+4ZwTnBVl36TA4nRO2f4PRNGz5/1OszHzcZCvcBMh+qb7I06uoCmLTRdR9og==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.50.1 + '@typescript-eslint/parser': ^8.51.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.50.1': - resolution: {integrity: sha512-hM5faZwg7aVNa819m/5r7D0h0c9yC4DUlWAOvHAtISdFTc8xB86VmX5Xqabrama3wIPJ/q9RbGS1worb6JfnMg==} + '@typescript-eslint/parser@8.51.0': + resolution: {integrity: sha512-3xP4XzzDNQOIqBMWogftkwxhg5oMKApqY0BAflmLZiFYHqyhSOxv/cd/zPQLTcCXr4AkaKb25joocY0BD1WC6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.50.1': - resolution: {integrity: sha512-E1ur1MCVf+YiP89+o4Les/oBAVzmSbeRB0MQLfSlYtbWU17HPxZ6Bhs5iYmKZRALvEuBoXIZMOIRRc/P++Ortg==} + '@typescript-eslint/project-service@8.51.0': + resolution: {integrity: sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.50.1': - resolution: {integrity: sha512-mfRx06Myt3T4vuoHaKi8ZWNTPdzKPNBhiblze5N50//TSHOAQQevl/aolqA/BcqqbJ88GUnLqjjcBc8EWdBcVw==} + '@typescript-eslint/scope-manager@8.51.0': + resolution: {integrity: sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.50.1': - resolution: {integrity: sha512-ooHmotT/lCWLXi55G4mvaUF60aJa012QzvLK0Y+Mp4WdSt17QhMhWOaBWeGTFVkb2gDgBe19Cxy1elPXylslDw==} + '@typescript-eslint/tsconfig-utils@8.51.0': + resolution: {integrity: sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.50.1': - resolution: {integrity: sha512-7J3bf022QZE42tYMO6SL+6lTPKFk/WphhRPe9Tw/el+cEwzLz1Jjz2PX3GtGQVxooLDKeMVmMt7fWpYRdG5Etg==} + '@typescript-eslint/type-utils@8.51.0': + resolution: {integrity: sha512-0XVtYzxnobc9K0VU7wRWg1yiUrw4oQzexCG2V2IDxxCxhqBMSMbjB+6o91A+Uc0GWtgjCa3Y8bi7hwI0Tu4n5Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.50.1': - resolution: {integrity: sha512-v5lFIS2feTkNyMhd7AucE/9j/4V9v5iIbpVRncjk/K0sQ6Sb+Np9fgYS/63n6nwqahHQvbmujeBL7mp07Q9mlA==} + '@typescript-eslint/types@8.51.0': + resolution: {integrity: sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.50.1': - resolution: {integrity: sha512-woHPdW+0gj53aM+cxchymJCrh0cyS7BTIdcDxWUNsclr9VDkOSbqC13juHzxOmQ22dDkMZEpZB+3X1WpUvzgVQ==} + '@typescript-eslint/typescript-estree@8.51.0': + resolution: {integrity: sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.50.1': - resolution: {integrity: sha512-lCLp8H1T9T7gPbEuJSnHwnSuO9mDf8mfK/Nion5mZmiEaQD9sWf9W4dfeFqRyqRjF06/kBuTmAqcs9sewM2NbQ==} + '@typescript-eslint/utils@8.51.0': + resolution: {integrity: sha512-11rZYxSe0zabiKaCP2QAwRf/dnmgFgvTmeDTtZvUvXG3UuAdg/GU02NExmmIXzz3vLGgMdtrIosI84jITQOxUA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.50.1': - resolution: {integrity: sha512-IrDKrw7pCRUR94zeuCSUWQ+w8JEf5ZX5jl/e6AHGSLi1/zIr0lgutfn/7JpfCey+urpgQEdrZVYzCaVVKiTwhQ==} + '@typescript-eslint/visitor-keys@8.51.0': + resolution: {integrity: sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.2': @@ -2443,8 +2443,8 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@2.1.0: - resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + ts-api-utils@2.3.0: + resolution: {integrity: sha512-6eg3Y9SF7SsAvGzRHQvvc1skDAhwI4YQ32ui1scxD1Ccr0G5qIIbUBT3pFTKX8kmWIQClHobtUdNuaBgwdfdWg==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' @@ -2453,8 +2453,8 @@ packages: resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} hasBin: true - tsdown@0.18.3: - resolution: {integrity: sha512-OVFzktKDTglFAUh/WO8WamBUbZoBlJ9m7NgZZrVyIKe32BfXBeRZ+soFFpuOGVP8g8OU4tOLOpTyPTELWvcTFw==} + tsdown@0.18.4: + resolution: {integrity: sha512-J/tRS6hsZTkvqmt4+xdELUCkQYDuUCXgBv0fw3ImV09WPGbEKfsPD65E+WUjSu3E7Z6tji9XZ1iWs8rbGqB/ZA==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2550,8 +2550,8 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.50.1: - resolution: {integrity: sha512-ytTHO+SoYSbhAH9CrYnMhiLx8To6PSSvqnvXyPUgPETCvB6eBKmTI9w6XMPS3HsBRGkwTVBX+urA8dYQx6bHfQ==} + typescript-eslint@8.51.0: + resolution: {integrity: sha512-jh8ZuM5oEh2PSdyQG9YAEM1TCGuWenLSuSUhf/irbVUNW9O5FhbFVONviN2TgMTBnUmyHv7E56rYnfLZK6TkiA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2714,8 +2714,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.2.1: - resolution: {integrity: sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==} + zod@4.3.4: + resolution: {integrity: sha512-Zw/uYiiyF6pUT1qmKbZziChgNPRu+ZRneAsMUDU6IwmXdWt5JwcUfy2bvLOCUtz5UniaN/Zx5aFttZYbYc7O/A==} snapshots: @@ -2918,7 +2918,7 @@ snapshots: '@es-joy/jsdoccomment@0.76.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/types': 8.51.0 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 6.10.0 @@ -3242,20 +3242,20 @@ snapshots: '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.2 - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-perfectionist: 5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint-plugin-sonarjs: 3.0.5(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) typescript: 5.9.3 - typescript-eslint: 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3430,95 +3430,95 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.50.1 - '@typescript-eslint/type-utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.50.1 + '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/type-utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.51.0 eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.9.3) + ts-api-utils: 2.3.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.50.1 - '@typescript-eslint/types': 8.50.1 - '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.50.1 + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.51.0 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.50.1(typescript@5.9.3)': + '@typescript-eslint/project-service@8.51.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3) - '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) + '@typescript-eslint/types': 8.51.0 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.50.1': + '@typescript-eslint/scope-manager@8.51.0': dependencies: - '@typescript-eslint/types': 8.50.1 - '@typescript-eslint/visitor-keys': 8.50.1 + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/visitor-keys': 8.51.0 - '@typescript-eslint/tsconfig-utils@8.50.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.51.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.50.1 - '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) - ts-api-utils: 2.1.0(typescript@5.9.3) + ts-api-utils: 2.3.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.50.1': {} + '@typescript-eslint/types@8.51.0': {} - '@typescript-eslint/typescript-estree@8.50.1(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.51.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.50.1(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3) - '@typescript-eslint/types': 8.50.1 - '@typescript-eslint/visitor-keys': 8.50.1 + '@typescript-eslint/project-service': 8.51.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/visitor-keys': 8.51.0 debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 tinyglobby: 0.2.15 - ts-api-utils: 2.1.0(typescript@5.9.3) + ts-api-utils: 2.3.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.50.1 - '@typescript-eslint/types': 8.50.1 - '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.50.1': + '@typescript-eslint/visitor-keys@8.51.0': dependencies: - '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/types': 8.51.0 eslint-visitor-keys: 4.2.1 '@typescript/vfs@1.6.2(typescript@5.9.3)': @@ -3933,7 +3933,7 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3944,7 +3944,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -3958,9 +3958,9 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@typescript-eslint/types': 8.50.1 + '@typescript-eslint/types': 8.51.0 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3971,7 +3971,7 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - supports-color @@ -3997,7 +3997,7 @@ snapshots: eslint-plugin-perfectionist@5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: @@ -4933,7 +4933,7 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@2.1.0(typescript@5.9.3): + ts-api-utils@2.3.0(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -4949,11 +4949,11 @@ snapshots: tslib: 2.8.1 tsutils: 3.21.0(typescript@5.9.3) typescript: 5.9.3 - zod: 4.2.1 + zod: 4.3.4 transitivePeerDependencies: - supports-color - tsdown@0.18.3(typescript@5.9.3): + tsdown@0.18.4(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -5042,12 +5042,12 @@ snapshots: typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.50.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -5194,4 +5194,4 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.2.1: {} + zod@4.3.4: {} From f04989047fa8098f584be10380bd66ec1b7e0f25 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 1 Jan 2026 12:35:44 +0100 Subject: [PATCH 22/52] [Client] Update ky to 1.14.2 --- .changeset/moody-mirrors-push.md | 5 +++++ packages/client/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/moody-mirrors-push.md diff --git a/.changeset/moody-mirrors-push.md b/.changeset/moody-mirrors-push.md new file mode 100644 index 00000000..901fc3bb --- /dev/null +++ b/.changeset/moody-mirrors-push.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/client': patch +--- + +Update ky to 1.14.2 diff --git a/packages/client/package.json b/packages/client/package.json index cf45c38a..bacae8e0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -40,7 +40,7 @@ "hearthstone" ], "dependencies": { - "ky": "1.14.1" + "ky": "1.14.2" }, "peerDependencies": { "@blizzard-api/core": "2.1.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02076689..0bee9484 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: packages/client: dependencies: ky: - specifier: 1.14.1 - version: 1.14.1 + specifier: 1.14.2 + version: 1.14.2 devDependencies: '@blizzard-api/classic-wow': specifier: workspace:* @@ -1859,8 +1859,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - ky@1.14.1: - resolution: {integrity: sha512-hYje4L9JCmpEQBtudo+v52X5X8tgWXUYyPcxKSuxQNboqufecl9VMWjGiucAFH060AwPXHZuH+WB2rrqfkmafw==} + ky@1.14.2: + resolution: {integrity: sha512-q3RBbsO5A5zrPhB6CaCS8ZUv+NWCXv6JJT4Em0i264G9W0fdPB8YRfnnEi7Dm7X7omAkBIPojzYJ2D1oHTHqug==} engines: {node: '>=18'} levn@0.4.1: @@ -4357,7 +4357,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - ky@1.14.1: {} + ky@1.14.2: {} levn@0.4.1: dependencies: From 521199693058dfd6d219e5be455e991965cba939 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 1 Jan 2026 12:36:12 +0100 Subject: [PATCH 23/52] [Project] Update pnpm version --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cfec351..ad9ed405 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.26.0 + version: 10.27.0 - name: Cache turbo build setup uses: actions/cache@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 784dc099..e77a14c8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,7 @@ jobs: uses: actions/configure-pages@v5 - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.26.0 + version: 10.27.0 - name: Setup Node.js 22.x uses: actions/setup-node@v4 with: diff --git a/package.json b/package.json index e5e6cdf2..4d138edd 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "engines": { "node": "^18.18 || >=20.9" }, - "packageManager": "pnpm@10.26.0", + "packageManager": "pnpm@10.27.0", "keywords": [ "blizzard", "battlenet", @@ -42,8 +42,8 @@ "npm-run-all2": "8.0.4", "prettier": "3.7.4", "ts-to-zod": "5.1.0", - "tsx": "4.21.0", "tsdown": "0.18.4", + "tsx": "4.21.0", "turbo": "2.7.2", "typedoc": "0.28.15", "typedoc-github-theme": "0.3.1", From 1a18bc23d7f2079a9e788811fcba5002243fd9af Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Mon, 12 Jan 2026 23:18:59 +0100 Subject: [PATCH 24/52] [Chore] Update dev dependencies and update minimum version of node --- package.json | 24 +- pnpm-lock.yaml | 677 +++++++++++++++++++++++++------------------------ 2 files changed, 351 insertions(+), 350 deletions(-) diff --git a/package.json b/package.json index 4d138edd..26d5f6c4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": ">=20.19" }, "packageManager": "pnpm@10.27.0", "keywords": [ @@ -30,27 +30,27 @@ ], "devDependencies": { "@changesets/cli": "2.29.8", - "@putstack/eslint-config-typescript": "4.12.0", + "@putstack/eslint-config-typescript": "4.13.0", "@putstack/prettier-config": "2.0.0", - "@types/node": "24.10.4", - "@vitest/coverage-v8": "4.0.16", - "@vitest/ui": "4.0.16", + "@types/node": "24.10.7", + "@vitest/coverage-v8": "4.0.17", + "@vitest/ui": "4.0.17", "eslint": "9.39.2", - "eslint-plugin-jsdoc": "61.5.0", + "eslint-plugin-jsdoc": "62.0.0", "husky": "9.1.7", "lint-staged": "16.2.7", "npm-run-all2": "8.0.4", "prettier": "3.7.4", "ts-to-zod": "5.1.0", - "tsdown": "0.18.4", + "tsdown": "0.19.0", "tsx": "4.21.0", - "turbo": "2.7.2", - "typedoc": "0.28.15", + "turbo": "2.7.4", + "typedoc": "0.28.16", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", - "typescript-eslint": "8.51.0", - "vitest": "4.0.16", - "zod": "4.3.4" + "typescript-eslint": "8.53.0", + "vitest": "4.0.17", + "zod": "4.3.5" }, "pnpm": { "onlyBuiltDependencies": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0bee9484..31ce9c02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,28 +10,28 @@ importers: devDependencies: '@changesets/cli': specifier: 2.29.8 - version: 2.29.8(@types/node@24.10.4) + version: 2.29.8(@types/node@24.10.7) '@putstack/eslint-config-typescript': - specifier: 4.12.0 - version: 4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + specifier: 4.13.0 + version: 4.13.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.7.4) '@types/node': - specifier: 24.10.4 - version: 24.10.4 + specifier: 24.10.7 + version: 24.10.7 '@vitest/coverage-v8': - specifier: 4.0.16 - version: 4.0.16(vitest@4.0.16) + specifier: 4.0.17 + version: 4.0.17(vitest@4.0.17) '@vitest/ui': - specifier: 4.0.16 - version: 4.0.16(vitest@4.0.16) + specifier: 4.0.17 + version: 4.0.17(vitest@4.0.17) eslint: specifier: 9.39.2 version: 9.39.2(jiti@2.6.1) eslint-plugin-jsdoc: - specifier: 61.5.0 - version: 61.5.0(eslint@9.39.2(jiti@2.6.1)) + specifier: 62.0.0 + version: 62.0.0(eslint@9.39.2(jiti@2.6.1)) husky: specifier: 9.1.7 version: 9.1.7 @@ -48,32 +48,32 @@ importers: specifier: 5.1.0 version: 5.1.0 tsdown: - specifier: 0.18.4 - version: 0.18.4(typescript@5.9.3) + specifier: 0.19.0 + version: 0.19.0(typescript@5.9.3) tsx: specifier: 4.21.0 version: 4.21.0 turbo: - specifier: 2.7.2 - version: 2.7.2 + specifier: 2.7.4 + version: 2.7.4 typedoc: - specifier: 0.28.15 - version: 0.28.15(typescript@5.9.3) + specifier: 0.28.16 + version: 0.28.16(typescript@5.9.3) typedoc-github-theme: specifier: 0.3.1 - version: 0.3.1(typedoc@0.28.15(typescript@5.9.3)) + version: 0.3.1(typedoc@0.28.16(typescript@5.9.3)) typescript: specifier: 5.9.3 version: 5.9.3 typescript-eslint: - specifier: 8.51.0 - version: 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + specifier: 8.53.0 + version: 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: - specifier: 4.0.16 - version: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: 4.0.17 + version: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: - specifier: 4.3.4 - version: 4.3.4 + specifier: 4.3.5 + version: 4.3.5 packages/classic-wow: devDependencies: @@ -257,9 +257,9 @@ packages: '@emnapi/wasi-threads@1.1.0': resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} - '@es-joy/jsdoccomment@0.76.0': - resolution: {integrity: sha512-g+RihtzFgGTx2WYCuTHbdOXJeAlGnROws0TeALx9ow/ZmOROOZkVg5wp/B44n0WJgI4SQFP1eWM2iRPlU2Y14w==} - engines: {node: '>=20.11.0'} + '@es-joy/jsdoccomment@0.79.0': + resolution: {integrity: sha512-q/Nc241VsVRC5b1dgbsOI0fnWfrb1S9sdceFewpDHto4+4r2o6SSCpcY+Z+EdLdMPN6Nsj/PjlPcKag6WbU6XQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@es-joy/resolve.exports@1.2.0': resolution: {integrity: sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==} @@ -577,8 +577,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.0': - resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} + '@eslint-community/eslint-utils@4.9.1': + resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -677,8 +677,8 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@napi-rs/wasm-runtime@1.1.0': - resolution: {integrity: sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA==} + '@napi-rs/wasm-runtime@1.1.1': + resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -696,14 +696,14 @@ packages: resolution: {integrity: sha512-jteNUQKgJHLHFbbz806aGZqf+RJJ7t4gwF4MYa8fCwCxQ8/klJNWc0MvaJiBebk7Mc+J39mdlsB4XraaCKznFw==} engines: {node: '>=18.0.0'} - '@oxc-project/types@0.103.0': - resolution: {integrity: sha512-bkiYX5kaXWwUessFRSoXFkGIQTmc6dLGdxuRTrC+h8PSnIdZyuXHHlLAeTmOue5Br/a0/a7dHH0Gca6eXn9MKg==} + '@oxc-project/types@0.107.0': + resolution: {integrity: sha512-QFDRbYfV2LVx8tyqtyiah3jQPUj1mK2+RYwxyFWyGoys6XJnwTdlzO6rdNNHOPorHAu5Uo34oWRKcvNpbJarmQ==} '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@putstack/eslint-config-typescript@4.12.0': - resolution: {integrity: sha512-ylWREYayHj1q+srkjBpAdxNH1lVpOkq9iJQclj65Bqc5bZgRrXwAyQ0jHGAhWYDoIiUqZeYu+pzCreXrnz8oQg==} + '@putstack/eslint-config-typescript@4.13.0': + resolution: {integrity: sha512-B6wkXz1ieV7kd+o0Wykjqigtv1DvzZO0vWiAsdaGVMBiJbWwqq7r6DyKGCziQmeN5TjrwgTksJDxi5jhnhdtxA==} engines: {node: ^20.9 || >=22} peerDependencies: '@eslint/js': ^9.20.0 @@ -720,85 +720,85 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@rolldown/binding-android-arm64@1.0.0-beta.57': - resolution: {integrity: sha512-GoOVDy8bjw9z1K30Oo803nSzXJS/vWhFijFsW3kzvZCO8IZwFnNa6pGctmbbJstKl3Fv6UBwyjJQN6msejW0IQ==} + '@rolldown/binding-android-arm64@1.0.0-beta.59': + resolution: {integrity: sha512-6yLLgyswYwiCfls9+hoNFY9F8TQdwo15hpXDHzlAR0X/GojeKF+AuNcXjYNbOJ4zjl/5D6lliE8CbpB5t1OWIQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-beta.57': - resolution: {integrity: sha512-9c4FOhRGpl+PX7zBK5p17c5efpF9aSpTPgyigv57hXf5NjQUaJOOiejPLAtFiKNBIfm5Uu6yFkvLKzOafNvlTw==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.59': + resolution: {integrity: sha512-hqGXRc162qCCIOAcHN2Cw4eXiVTwYsMFLOhAy1IG2CxY+dwc/l4Ga+dLPkLor3Ikqy5WDn+7kxHbbh6EmshEpQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.57': - resolution: {integrity: sha512-6RsB8Qy4LnGqNGJJC/8uWeLWGOvbRL/KG5aJ8XXpSEupg/KQtlBEiFaYU/Ma5Usj1s+bt3ItkqZYAI50kSplBA==} + '@rolldown/binding-darwin-x64@1.0.0-beta.59': + resolution: {integrity: sha512-ezvvGuhteE15JmMhJW0wS7BaXmhwLy1YHeEwievYaPC1PgGD86wgBKfOpHr9tSKllAXbCe0BeeMvasscWLhKdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.57': - resolution: {integrity: sha512-uA9kG7+MYkHTbqwv67Tx+5GV5YcKd33HCJIi0311iYBd25yuwyIqvJfBdt1VVB8tdOlyTb9cPAgfCki8nhwTQg==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.59': + resolution: {integrity: sha512-4fhKVJiEYVd5n6no/mrL3LZ9kByfCGwmONOrdtvx8DJGDQhehH/q3RfhG3V/4jGKhpXgbDjpIjkkFdybCTcgew==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.57': - resolution: {integrity: sha512-3KkS0cHsllT2T+Te+VZMKHNw6FPQihYsQh+8J4jkzwgvAQpbsbXmrqhkw3YU/QGRrD8qgcOvBr6z5y6Jid+rmw==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.59': + resolution: {integrity: sha512-T3Y52sW6JAhvIqArBw+wtjNU1Ieaz4g0NBxyjSJoW971nZJBZygNlSYx78G4cwkCmo1dYTciTPDOnQygLV23pA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.57': - resolution: {integrity: sha512-A3/wu1RgsHhqP3rVH2+sM81bpk+Qd2XaHTl8LtX5/1LNR7QVBFBCpAoiXwjTdGnI5cMdBVi7Z1pi52euW760Fw==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.59': + resolution: {integrity: sha512-NIW40jQDSQap2KDdmm9z3B/4OzWJ6trf8dwx3FD74kcQb3v34ThsBFTtzE5KjDuxnxgUlV+DkAu+XgSMKrgufw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.57': - resolution: {integrity: sha512-d0kIVezTQtazpyWjiJIn5to8JlwfKITDqwsFv0Xc6s31N16CD2PC/Pl2OtKgS7n8WLOJbfqgIp5ixYzTAxCqMg==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.59': + resolution: {integrity: sha512-CCKEk+H+8c0WGe/8n1E20n85Tq4Pv+HNAbjP1KfUXW+01aCWSMjU56ChNrM2tvHnXicfm7QRNoZyfY8cWh7jLQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.57': - resolution: {integrity: sha512-E199LPijo98yrLjPCmETx8EF43sZf9t3guSrLee/ej1rCCc3zDVTR4xFfN9BRAapGVl7/8hYqbbiQPTkv73kUg==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.59': + resolution: {integrity: sha512-VlfwJ/HCskPmQi8R0JuAFndySKVFX7yPhE658o27cjSDWWbXVtGkSbwaxstii7Q+3Rz87ZXN+HLnb1kd4R9Img==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.57': - resolution: {integrity: sha512-++EQDpk/UJ33kY/BNsh7A7/P1sr/jbMuQ8cE554ZIy+tCUWCivo9zfyjDUoiMdnxqX6HLJEqqGnbGQOvzm2OMQ==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.59': + resolution: {integrity: sha512-kuO92hTRyGy0Ts3Nsqll0rfO8eFsEJe9dGQGktkQnZ2hrJrDVN0y419dMgKy/gB2S2o7F2dpWhpfQOBehZPwVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.0.0-beta.57': - resolution: {integrity: sha512-voDEBcNqxbUv/GeXKFtxXVWA+H45P/8Dec4Ii/SbyJyGvCqV1j+nNHfnFUIiRQ2Q40DwPe/djvgYBs9PpETiMA==} + '@rolldown/binding-openharmony-arm64@1.0.0-beta.59': + resolution: {integrity: sha512-PXAebvNL4sYfCqi8LdY4qyFRacrRoiPZLo3NoUmiTxm7MPtYYR8CNtBGNokqDmMuZIQIecRaD/jbmFAIDz7DxQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.57': - resolution: {integrity: sha512-bRhcF7NLlCnpkzLVlVhrDEd0KH22VbTPkPTbMjlYvqhSmarxNIq5vtlQS8qmV7LkPKHrNLWyJW/V/sOyFba26Q==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.59': + resolution: {integrity: sha512-yJoklQg7XIZq8nAg0bbkEXcDK6sfpjxQGxpg2Nd6ERNtvg+eOaEBRgPww0BVTrYFQzje1pB5qPwC2VnJHT3koQ==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.57': - resolution: {integrity: sha512-rnDVGRks2FQ2hgJ2g15pHtfxqkGFGjJQUDWzYznEkE8Ra2+Vag9OffxdbJMZqBWXHVM0iS4dv8qSiEn7bO+n1Q==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.59': + resolution: {integrity: sha512-ljZ4+McmCbIuZwEBaoGtiG8Rq2nJjaXEnLEIx+usWetXn1ECjXY0LAhkELxOV6ytv4ensEmoJJ8nXg47hRMjlw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.57': - resolution: {integrity: sha512-OqIUyNid1M4xTj6VRXp/Lht/qIP8fo25QyAZlCP+p6D2ATCEhyW4ZIFLnC9zAGN/HMbXoCzvwfa8Jjg/8J4YEg==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.59': + resolution: {integrity: sha512-bMY4tTIwbdZljW+xe/ln1hvs0SRitahQSXfWtvgAtIzgSX9Ar7KqJzU7lRm33YTRFIHLULRi53yNjw9nJGd6uQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.57': - resolution: {integrity: sha512-aQNelgx14tGA+n2tNSa9x6/jeoCL9fkDeCei7nOKnHx0fEFRRMu5ReiITo+zZD5TzWDGGRjbSYCs93IfRIyTuQ==} + '@rolldown/pluginutils@1.0.0-beta.59': + resolution: {integrity: sha512-aoh6LAJRyhtazs98ydgpNOYstxUlsOV1KJXcpf/0c0vFcUA8uyd/hwKRhqE/AAPNqAho9RliGsvitCoOzREoVA==} '@rollup/rollup-android-arm-eabi@4.53.3': resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} @@ -953,69 +953,69 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.10.4': - resolution: {integrity: sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==} + '@types/node@24.10.7': + resolution: {integrity: sha512-+054pVMzVTmRQV8BhpGv3UyfZ2Llgl8rdpDTon+cUH9+na0ncBVXj3wTUKh14+Kiz18ziM3b4ikpP5/Pc0rQEQ==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.51.0': - resolution: {integrity: sha512-XtssGWJvypyM2ytBnSnKtHYOGT+4ZwTnBVl36TA4nRO2f4PRNGz5/1OszHzcZCvcBMh+qb7I06uoCmLTRdR9og==} + '@typescript-eslint/eslint-plugin@8.53.0': + resolution: {integrity: sha512-eEXsVvLPu8Z4PkFibtuFJLJOTAV/nPdgtSjkGoPpddpFk3/ym2oy97jynY6ic2m6+nc5M8SE1e9v/mHKsulcJg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.51.0 + '@typescript-eslint/parser': ^8.53.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.51.0': - resolution: {integrity: sha512-3xP4XzzDNQOIqBMWogftkwxhg5oMKApqY0BAflmLZiFYHqyhSOxv/cd/zPQLTcCXr4AkaKb25joocY0BD1WC6A==} + '@typescript-eslint/parser@8.53.0': + resolution: {integrity: sha512-npiaib8XzbjtzS2N4HlqPvlpxpmZ14FjSJrteZpPxGUaYPlvhzlzUZ4mZyABo0EFrOWnvyd0Xxroq//hKhtAWg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.51.0': - resolution: {integrity: sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==} + '@typescript-eslint/project-service@8.53.0': + resolution: {integrity: sha512-Bl6Gdr7NqkqIP5yP9z1JU///Nmes4Eose6L1HwpuVHwScgDPPuEWbUVhvlZmb8hy0vX9syLk5EGNL700WcBlbg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.51.0': - resolution: {integrity: sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==} + '@typescript-eslint/scope-manager@8.53.0': + resolution: {integrity: sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.51.0': - resolution: {integrity: sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==} + '@typescript-eslint/tsconfig-utils@8.53.0': + resolution: {integrity: sha512-K6Sc0R5GIG6dNoPdOooQ+KtvT5KCKAvTcY8h2rIuul19vxH5OTQk7ArKkd4yTzkw66WnNY0kPPzzcmWA+XRmiA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.51.0': - resolution: {integrity: sha512-0XVtYzxnobc9K0VU7wRWg1yiUrw4oQzexCG2V2IDxxCxhqBMSMbjB+6o91A+Uc0GWtgjCa3Y8bi7hwI0Tu4n5Q==} + '@typescript-eslint/type-utils@8.53.0': + resolution: {integrity: sha512-BBAUhlx7g4SmcLhn8cnbxoxtmS7hcq39xKCgiutL3oNx1TaIp+cny51s8ewnKMpVUKQUGb41RAUWZ9kxYdovuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.51.0': - resolution: {integrity: sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==} + '@typescript-eslint/types@8.53.0': + resolution: {integrity: sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.51.0': - resolution: {integrity: sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==} + '@typescript-eslint/typescript-estree@8.53.0': + resolution: {integrity: sha512-pw0c0Gdo7Z4xOG987u3nJ8akL9093yEEKv8QTJ+Bhkghj1xyj8cgPaavlr9rq8h7+s6plUJ4QJYw2gCZodqmGw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.51.0': - resolution: {integrity: sha512-11rZYxSe0zabiKaCP2QAwRf/dnmgFgvTmeDTtZvUvXG3UuAdg/GU02NExmmIXzz3vLGgMdtrIosI84jITQOxUA==} + '@typescript-eslint/utils@8.53.0': + resolution: {integrity: sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.51.0': - resolution: {integrity: sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==} + '@typescript-eslint/visitor-keys@8.53.0': + resolution: {integrity: sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.2': @@ -1118,20 +1118,20 @@ packages: cpu: [x64] os: [win32] - '@vitest/coverage-v8@4.0.16': - resolution: {integrity: sha512-2rNdjEIsPRzsdu6/9Eq0AYAzYdpP6Bx9cje9tL3FE5XzXRQF1fNU9pe/1yE8fCrS0HD+fBtt6gLPh6LI57tX7A==} + '@vitest/coverage-v8@4.0.17': + resolution: {integrity: sha512-/6zU2FLGg0jsd+ePZcwHRy3+WpNTBBhDY56P4JTRqUN/Dp6CvOEa9HrikcQ4KfV2b2kAHUFB4dl1SuocWXSFEw==} peerDependencies: - '@vitest/browser': 4.0.16 - vitest: 4.0.16 + '@vitest/browser': 4.0.17 + vitest: 4.0.17 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@4.0.16': - resolution: {integrity: sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==} + '@vitest/expect@4.0.17': + resolution: {integrity: sha512-mEoqP3RqhKlbmUmntNDDCJeTDavDR+fVYkSOw8qRwJFaW/0/5zA9zFeTrHqNtcmwh6j26yMmwx2PqUDPzt5ZAQ==} - '@vitest/mocker@4.0.16': - resolution: {integrity: sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==} + '@vitest/mocker@4.0.17': + resolution: {integrity: sha512-+ZtQhLA3lDh1tI2wxe3yMsGzbp7uuJSWBM1iTIKCbppWTSBN09PUC+L+fyNlQApQoR+Ps8twt2pbSSXg2fQVEQ==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0-0 @@ -1141,25 +1141,25 @@ packages: vite: optional: true - '@vitest/pretty-format@4.0.16': - resolution: {integrity: sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==} + '@vitest/pretty-format@4.0.17': + resolution: {integrity: sha512-Ah3VAYmjcEdHg6+MwFE17qyLqBHZ+ni2ScKCiW2XrlSBV4H3Z7vYfPfz7CWQ33gyu76oc0Ai36+kgLU3rfF4nw==} - '@vitest/runner@4.0.16': - resolution: {integrity: sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==} + '@vitest/runner@4.0.17': + resolution: {integrity: sha512-JmuQyf8aMWoo/LmNFppdpkfRVHJcsgzkbCA+/Bk7VfNH7RE6Ut2qxegeyx2j3ojtJtKIbIGy3h+KxGfYfk28YQ==} - '@vitest/snapshot@4.0.16': - resolution: {integrity: sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==} + '@vitest/snapshot@4.0.17': + resolution: {integrity: sha512-npPelD7oyL+YQM2gbIYvlavlMVWUfNNGZPcu0aEUQXt7FXTuqhmgiYupPnAanhKvyP6Srs2pIbWo30K0RbDtRQ==} - '@vitest/spy@4.0.16': - resolution: {integrity: sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==} + '@vitest/spy@4.0.17': + resolution: {integrity: sha512-I1bQo8QaP6tZlTomQNWKJE6ym4SHf3oLS7ceNjozxxgzavRAgZDc06T7kD8gb9bXKEgcLNt00Z+kZO6KaJ62Ew==} - '@vitest/ui@4.0.16': - resolution: {integrity: sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==} + '@vitest/ui@4.0.17': + resolution: {integrity: sha512-hRDjg6dlDz7JlZAvjbiCdAJ3SDG+NH8tjZe21vjxfvT2ssYAn72SRXMge3dKKABm3bIJ3C+3wdunIdur8PHEAw==} peerDependencies: - vitest: 4.0.16 + vitest: 4.0.17 - '@vitest/utils@4.0.16': - resolution: {integrity: sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==} + '@vitest/utils@4.0.17': + resolution: {integrity: sha512-RG6iy+IzQpa9SB8HAFHJ9Y+pTzI+h8553MrciN9eC6TFBErqrQaTas4vG+MVj8S4uKk8uTT2p0vgZPnTdxd96w==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -1232,8 +1232,8 @@ packages: resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} engines: {node: '>=20.19.0'} - ast-v8-to-istanbul@0.3.8: - resolution: {integrity: sha512-szgSZqUxI5T8mLKvS7WTjF9is+MVbOeLADU73IseOcrqhxr/VAvy6wfoVE39KnKzA7JRhjF5eUagNlHwvZPlKQ==} + ast-v8-to-istanbul@0.3.10: + resolution: {integrity: sha512-p4K7vMz2ZSk3wN8l5o3y2bJAoZXT3VuJI5OLTATY/01CYWumWvwkUw0SqDBnNq6IiTO3qDa1eSQDibAV8g7XOQ==} async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -1495,14 +1495,14 @@ packages: eslint-import-resolver-node: optional: true - eslint-plugin-jsdoc@61.5.0: - resolution: {integrity: sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==} - engines: {node: '>=20.11.0'} + eslint-plugin-jsdoc@62.0.0: + resolution: {integrity: sha512-sNdIGLAvjFK3pB0SYFW74iXODZ4ifF8Ax13Wgq8jKepKnrCFzGo7+jRZfLf70h81SD7lPYnTE7MR2nhYSvaLTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-perfectionist@5.0.0: - resolution: {integrity: sha512-a8PgR2AgCxEVmpIU+vd3nsYWTa8LfyXXJ0gXkPoj1gVW/sfj23BSTtNFBexGysTRNDwuMGLSzejHY+S3qj0EDg==} + eslint-plugin-perfectionist@5.2.0: + resolution: {integrity: sha512-rLD4VyA6sxcCPlG/koqjp0D46JTNRURSDs22Jr1JeVbOiu1BoeRdROnJoqDoGESuXbwxvGEnMSqClX/Q3HSMig==} engines: {node: ^20.0.0 || >=22.0.0} peerDependencies: eslint: '>=8.45.0' @@ -1530,6 +1530,10 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.0: + resolution: {integrity: sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + eslint@9.39.2: resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1544,13 +1548,17 @@ packages: resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@11.0.0: + resolution: {integrity: sha512-+gMeWRrIh/NsG+3NaLeWHuyeyk70p2tbvZIWBYcqQ4/7Xvars6GYTZNhF1sIeLcc6Wb11He5ffz3hsHyXFrw5A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -1799,10 +1807,6 @@ packages: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} - istanbul-lib-source-maps@5.0.6: - resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} - engines: {node: '>=10'} - istanbul-reports@3.2.0: resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} engines: {node: '>=8'} @@ -1827,8 +1831,8 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true - jsdoc-type-pratt-parser@6.10.0: - resolution: {integrity: sha512-+LexoTRyYui5iOhJGn13N9ZazL23nAHGkXsa1p/C8yeq79WRfLBag6ZZ0FQG2aRoc9yfo59JT9EYCQonOkHKkQ==} + jsdoc-type-pratt-parser@7.0.0: + resolution: {integrity: sha512-c7YbokssPOSHmqTbSAmTtnVgAVa/7lumWNYqomgd5KOMyPrRve2anx6lonfOsXEQacqF9FKVUj7bLg4vRSvdYA==} engines: {node: '>=20.0.0'} jsesc@3.1.0: @@ -2204,8 +2208,8 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-beta.57: - resolution: {integrity: sha512-lMMxcNN71GMsSko8RyeTaFoATHkCh4IWU7pYF73ziMYjhHZWfVesC6GQ+iaJCvZmVjvgSks9Ks1aaqEkBd8udg==} + rolldown@1.0.0-beta.59: + resolution: {integrity: sha512-Slm000Gd8/AO9z4Kxl4r8mp/iakrbAuJ1L+7ddpkNxgQ+Vf37WPvY63l3oeyZcfuPD1DRrUYBsRPIXSOhvOsmw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -2443,8 +2447,8 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@2.3.0: - resolution: {integrity: sha512-6eg3Y9SF7SsAvGzRHQvvc1skDAhwI4YQ32ui1scxD1Ccr0G5qIIbUBT3pFTKX8kmWIQClHobtUdNuaBgwdfdWg==} + ts-api-utils@2.4.0: + resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' @@ -2453,8 +2457,8 @@ packages: resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} hasBin: true - tsdown@0.18.4: - resolution: {integrity: sha512-J/tRS6hsZTkvqmt4+xdELUCkQYDuUCXgBv0fw3ImV09WPGbEKfsPD65E+WUjSu3E7Z6tji9XZ1iWs8rbGqB/ZA==} + tsdown@0.19.0: + resolution: {integrity: sha512-uqg8yzlS7GemFWcM6aCp/sptF4bJiJbWUibuHTRLLCBEsGCgJxuqxPhuVTqyHXqoEkh9ohwAdlyDKli5MEWCyQ==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2495,38 +2499,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@2.7.2: - resolution: {integrity: sha512-dxY3X6ezcT5vm3coK6VGixbrhplbQMwgNsCsvZamS/+/6JiebqW9DKt4NwpgYXhDY2HdH00I7FWs3wkVuan4rA==} + turbo-darwin-64@2.7.4: + resolution: {integrity: sha512-xDR30ltfkSsRfGzABBckvl1nz1cZ3ssTujvdj+TPwOweeDRvZ0e06t5DS0rmRBvyKpgGs42K/EK6Mn2qLlFY9A==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.7.2: - resolution: {integrity: sha512-1bXmuwPLqNFt3mzrtYcVx1sdJ8UYb124Bf48nIgcpMCGZy3kDhgxNv1503kmuK/37OGOZbsWSQFU4I08feIuSg==} + turbo-darwin-arm64@2.7.4: + resolution: {integrity: sha512-P7sjqXtOL/+nYWPvcDGWhi8wf8M8mZHHB8XEzw2VX7VJrS8IGHyJHGD1AYfDvhAEcr7pnk3gGifz3/xyhI655w==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.7.2: - resolution: {integrity: sha512-kP+TiiMaiPugbRlv57VGLfcjFNsFbo8H64wMBCPV2270Or2TpDCBULMzZrvEsvWFjT3pBFvToYbdp8/Kw0jAQg==} + turbo-linux-64@2.7.4: + resolution: {integrity: sha512-GofFOxRO/IhG8BcPyMSSB3Y2+oKQotsaYbHxL9yD6JPb20/o35eo+zUSyazOtilAwDHnak5dorAJFoFU8MIg2A==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.7.2: - resolution: {integrity: sha512-VDJwQ0+8zjAfbyY6boNaWfP6RIez4ypKHxwkuB6SrWbOSk+vxTyW5/hEjytTwK8w/TsbKVcMDyvpora8tEsRFw==} + turbo-linux-arm64@2.7.4: + resolution: {integrity: sha512-+RQKgNjksVPxYAyAgmDV7w/1qj++qca+nSNTAOKGOfJiDtSvRKoci89oftJ6anGs00uamLKVEQ712TI/tfNAIw==} cpu: [arm64] os: [linux] - turbo-windows-64@2.7.2: - resolution: {integrity: sha512-rPjqQXVnI6A6oxgzNEE8DNb6Vdj2Wwyhfv3oDc+YM3U9P7CAcBIlKv/868mKl4vsBtz4ouWpTQNXG8vljgJO+w==} + turbo-windows-64@2.7.4: + resolution: {integrity: sha512-rfak1+g+ON3czs1mDYsCS4X74ZmK6gOgRQTXjDICtzvR4o61paqtgAYtNPofcVsMWeF4wvCajSeoAkkeAnQ1kg==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.7.2: - resolution: {integrity: sha512-tcnHvBhO515OheIFWdxA+qUvZzNqqcHbLVFc1+n+TJ1rrp8prYicQtbtmsiKgMvr/54jb9jOabU62URAobnB7g==} + turbo-windows-arm64@2.7.4: + resolution: {integrity: sha512-1ZgBNjNRbDu/fPeqXuX9i26x3CJ/Y1gcwUpQ+Vp7kN9Un6RZ9kzs164f/knrjcu5E+szCRexVjRSJay1k5jApA==} cpu: [arm64] os: [win32] - turbo@2.7.2: - resolution: {integrity: sha512-5JIA5aYBAJSAhrhbyag1ZuMSgUZnHtI+Sq3H8D3an4fL8PeF+L1yYvbEJg47akP1PFfATMf5ehkqFnxfkmuwZQ==} + turbo@2.7.4: + resolution: {integrity: sha512-bkO4AddmDishzJB2ze7aYYPaejMoJVfS0XnaR6RCdXFOY8JGJfQE+l9fKiV7uDPa5Ut44gmOWJL3894CIMeH9g==} hasBin: true type-check@0.4.0: @@ -2543,15 +2547,15 @@ packages: peerDependencies: typedoc: ~0.28.0 - typedoc@0.28.15: - resolution: {integrity: sha512-mw2/2vTL7MlT+BVo43lOsufkkd2CJO4zeOSuWQQsiXoV2VuEn7f6IZp2jsUDPmBMABpgR0R5jlcJ2OGEFYmkyg==} + typedoc@0.28.16: + resolution: {integrity: sha512-x4xW77QC3i5DUFMBp0qjukOTnr/sSg+oEs86nB3LjDslvAmwe/PUGDWbe3GrIqt59oTqoXK5GRK9tAa0sYMiog==} engines: {node: '>= 18', pnpm: '>= 10'} hasBin: true peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.51.0: - resolution: {integrity: sha512-jh8ZuM5oEh2PSdyQG9YAEM1TCGuWenLSuSUhf/irbVUNW9O5FhbFVONviN2TgMTBnUmyHv7E56rYnfLZK6TkiA==} + typescript-eslint@8.53.0: + resolution: {integrity: sha512-xHURCQNxZ1dsWn0sdOaOfCSQG0HKeqSj9OexIxrz6ypU6wHYOdX2I3D2b8s8wFSsSOYJb+6q283cLiLlkEsBYw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2578,8 +2582,8 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - unrun@0.2.21: - resolution: {integrity: sha512-VuwI4YKtwBpDvM7hCEop2Im/ezS82dliqJpkh9pvS6ve8HcUsBDvESHxMmUfImXR03GkmfdDynyrh/pUJnlguw==} + unrun@0.2.24: + resolution: {integrity: sha512-xa4/O5q2jmI6EqxweJ+sOy5cyORZWcsgmi8pmABVSUyg24Fh44qJrneUHavZEMsbJbghHYWKSraFy5hDCb/m4w==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2637,18 +2641,18 @@ packages: yaml: optional: true - vitest@4.0.16: - resolution: {integrity: sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q==} + vitest@4.0.17: + resolution: {integrity: sha512-FQMeF0DJdWY0iOnbv466n/0BudNdKj1l5jYgl5JVTwjSsZSlqyXFt/9+1sEyhR6CLowbZpV7O1sCHrzBhucKKg==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.0.16 - '@vitest/browser-preview': 4.0.16 - '@vitest/browser-webdriverio': 4.0.16 - '@vitest/ui': 4.0.16 + '@vitest/browser-playwright': 4.0.17 + '@vitest/browser-preview': 4.0.17 + '@vitest/browser-webdriverio': 4.0.17 + '@vitest/ui': 4.0.17 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -2714,8 +2718,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.3.4: - resolution: {integrity: sha512-Zw/uYiiyF6pUT1qmKbZziChgNPRu+ZRneAsMUDU6IwmXdWt5JwcUfy2bvLOCUtz5UniaN/Zx5aFttZYbYc7O/A==} + zod@4.3.5: + resolution: {integrity: sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==} snapshots: @@ -2773,7 +2777,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.8(@types/node@24.10.4)': + '@changesets/cli@2.29.8(@types/node@24.10.7)': dependencies: '@changesets/apply-release-plan': 7.0.14 '@changesets/assemble-release-plan': 6.0.9 @@ -2789,7 +2793,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@24.10.4) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.7) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -2915,13 +2919,13 @@ snapshots: tslib: 2.8.1 optional: true - '@es-joy/jsdoccomment@0.76.0': + '@es-joy/jsdoccomment@0.79.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/types': 8.53.0 comment-parser: 1.4.1 - esquery: 1.6.0 - jsdoc-type-pratt-parser: 6.10.0 + esquery: 1.7.0 + jsdoc-type-pratt-parser: 7.0.0 '@es-joy/resolve.exports@1.2.0': {} @@ -3081,7 +3085,7 @@ snapshots: '@esbuild/win32-x64@0.27.1': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@9.39.2(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2(jiti@2.6.1))': dependencies: eslint: 9.39.2(jiti@2.6.1) eslint-visitor-keys: 3.4.3 @@ -3148,12 +3152,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.3(@types/node@24.10.4)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.7)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: - '@types/node': 24.10.4 + '@types/node': 24.10.7 '@isaacs/balanced-match@4.0.1': {} @@ -3198,7 +3202,7 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@napi-rs/wasm-runtime@1.1.0': + '@napi-rs/wasm-runtime@1.1.1': dependencies: '@emnapi/core': 1.7.1 '@emnapi/runtime': 1.7.1 @@ -3238,24 +3242,24 @@ snapshots: wordwrap: 1.0.0 wrap-ansi: 7.0.0 - '@oxc-project/types@0.103.0': {} + '@oxc-project/types@0.107.0': {} '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.12.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.13.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.2 - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-perfectionist: 5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-perfectionist: 5.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint-plugin-sonarjs: 3.0.5(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) typescript: 5.9.3 - typescript-eslint: 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3269,48 +3273,48 @@ snapshots: dependencies: quansync: 1.0.0 - '@rolldown/binding-android-arm64@1.0.0-beta.57': + '@rolldown/binding-android-arm64@1.0.0-beta.59': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-beta.57': + '@rolldown/binding-darwin-arm64@1.0.0-beta.59': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.57': + '@rolldown/binding-darwin-x64@1.0.0-beta.59': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.57': + '@rolldown/binding-freebsd-x64@1.0.0-beta.59': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.57': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.59': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.57': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.59': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.57': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.59': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.57': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.59': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.57': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.59': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-beta.57': + '@rolldown/binding-openharmony-arm64@1.0.0-beta.59': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.57': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.59': dependencies: - '@napi-rs/wasm-runtime': 1.1.0 + '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.57': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.59': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.57': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.59': optional: true - '@rolldown/pluginutils@1.0.0-beta.57': {} + '@rolldown/pluginutils@1.0.0-beta.59': {} '@rollup/rollup-android-arm-eabi@4.53.3': optional: true @@ -3424,101 +3428,101 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@24.10.4': + '@types/node@24.10.7': dependencies: undici-types: 7.16.0 '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.53.0(@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.51.0 - '@typescript-eslint/type-utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.51.0 + '@typescript-eslint/parser': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.53.0 eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.3.0(typescript@5.9.3) + ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.51.0 - '@typescript-eslint/types': 8.51.0 - '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.51.0 + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.53.0 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.51.0(typescript@5.9.3)': + '@typescript-eslint/project-service@8.53.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) - '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) + '@typescript-eslint/types': 8.53.0 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.51.0': + '@typescript-eslint/scope-manager@8.53.0': dependencies: - '@typescript-eslint/types': 8.51.0 - '@typescript-eslint/visitor-keys': 8.51.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/visitor-keys': 8.53.0 - '@typescript-eslint/tsconfig-utils@8.51.0(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.53.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.51.0 - '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) - ts-api-utils: 2.3.0(typescript@5.9.3) + ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.51.0': {} + '@typescript-eslint/types@8.53.0': {} - '@typescript-eslint/typescript-estree@8.51.0(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.53.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.51.0(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) - '@typescript-eslint/types': 8.51.0 - '@typescript-eslint/visitor-keys': 8.51.0 + '@typescript-eslint/project-service': 8.53.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/visitor-keys': 8.53.0 debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 tinyglobby: 0.2.15 - ts-api-utils: 2.3.0(typescript@5.9.3) + ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.51.0 - '@typescript-eslint/types': 8.51.0 - '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.51.0': + '@typescript-eslint/visitor-keys@8.53.0': dependencies: - '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/types': 8.53.0 eslint-visitor-keys: 4.2.1 '@typescript/vfs@1.6.2(typescript@5.9.3)': @@ -3587,71 +3591,68 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitest/coverage-v8@4.0.16(vitest@4.0.16)': + '@vitest/coverage-v8@4.0.17(vitest@4.0.17)': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.0.16 - ast-v8-to-istanbul: 0.3.8 + '@vitest/utils': 4.0.17 + ast-v8-to-istanbul: 0.3.10 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.2.0 magicast: 0.5.1 obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - transitivePeerDependencies: - - supports-color + vitest: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/expect@4.0.16': + '@vitest/expect@4.0.17': dependencies: '@standard-schema/spec': 1.0.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/spy': 4.0.17 + '@vitest/utils': 4.0.17 chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.16(vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.17(vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: - '@vitest/spy': 4.0.16 + '@vitest/spy': 4.0.17 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/pretty-format@4.0.16': + '@vitest/pretty-format@4.0.17': dependencies: tinyrainbow: 3.0.3 - '@vitest/runner@4.0.16': + '@vitest/runner@4.0.17': dependencies: - '@vitest/utils': 4.0.16 + '@vitest/utils': 4.0.17 pathe: 2.0.3 - '@vitest/snapshot@4.0.16': + '@vitest/snapshot@4.0.17': dependencies: - '@vitest/pretty-format': 4.0.16 + '@vitest/pretty-format': 4.0.17 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.0.16': {} + '@vitest/spy@4.0.17': {} - '@vitest/ui@4.0.16(vitest@4.0.16)': + '@vitest/ui@4.0.17(vitest@4.0.17)': dependencies: - '@vitest/utils': 4.0.16 + '@vitest/utils': 4.0.17 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/utils@4.0.16': + '@vitest/utils@4.0.17': dependencies: - '@vitest/pretty-format': 4.0.16 + '@vitest/pretty-format': 4.0.17 tinyrainbow: 3.0.3 acorn-jsx@5.3.2(acorn@8.15.0): @@ -3708,7 +3709,7 @@ snapshots: '@babel/parser': 7.28.5 pathe: 2.0.3 - ast-v8-to-istanbul@0.3.8: + ast-v8-to-istanbul@0.3.10: dependencies: '@jridgewell/trace-mapping': 0.3.31 estree-walker: 3.0.3 @@ -3933,7 +3934,7 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3944,7 +3945,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -3958,9 +3959,9 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/types': 8.53.0 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3971,21 +3972,21 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@61.5.0(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-jsdoc@62.0.0(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@es-joy/jsdoccomment': 0.76.0 + '@es-joy/jsdoccomment': 0.79.0 '@es-joy/resolve.exports': 1.2.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 9.39.2(jiti@2.6.1) - espree: 10.4.0 - esquery: 1.6.0 + espree: 11.0.0 + esquery: 1.7.0 html-entities: 2.6.0 object-deep-merge: 2.0.0 parse-imports-exports: 0.2.4 @@ -3995,9 +3996,9 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-perfectionist@5.0.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@5.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: @@ -4021,14 +4022,14 @@ snapshots: eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)): dependencies: '@babel/helper-validator-identifier': 7.28.5 - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) '@eslint/plugin-kit': 0.4.1 change-case: 5.4.4 ci-info: 4.3.1 clean-regexp: 1.0.0 core-js-compat: 3.47.0 eslint: 9.39.2(jiti@2.6.1) - esquery: 1.6.0 + esquery: 1.7.0 find-up-simple: 1.0.1 globals: 16.5.0 indent-string: 5.0.0 @@ -4049,9 +4050,11 @@ snapshots: eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.0: {} + eslint@9.39.2(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 @@ -4071,7 +4074,7 @@ snapshots: eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 - esquery: 1.6.0 + esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 8.0.0 @@ -4096,9 +4099,15 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.15.0) eslint-visitor-keys: 4.2.1 + espree@11.0.0: + dependencies: + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) + eslint-visitor-keys: 5.0.0 + esprima@4.0.1: {} - esquery@1.6.0: + esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -4302,14 +4311,6 @@ snapshots: make-dir: 4.0.0 supports-color: 7.2.0 - istanbul-lib-source-maps@5.0.6: - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - debug: 4.4.3(supports-color@8.1.1) - istanbul-lib-coverage: 3.2.2 - transitivePeerDependencies: - - supports-color - istanbul-reports@3.2.0: dependencies: html-escaper: 2.0.2 @@ -4335,7 +4336,7 @@ snapshots: dependencies: argparse: 2.0.1 - jsdoc-type-pratt-parser@6.10.0: {} + jsdoc-type-pratt-parser@7.0.0: {} jsesc@3.1.0: {} @@ -4641,7 +4642,7 @@ snapshots: rfdc@1.4.1: {} - rolldown-plugin-dts@0.20.0(rolldown@1.0.0-beta.57)(typescript@5.9.3): + rolldown-plugin-dts@0.20.0(rolldown@1.0.0-beta.59)(typescript@5.9.3): dependencies: '@babel/generator': 7.28.5 '@babel/parser': 7.28.5 @@ -4651,30 +4652,30 @@ snapshots: dts-resolver: 2.1.3 get-tsconfig: 4.13.0 obug: 2.1.1 - rolldown: 1.0.0-beta.57 + rolldown: 1.0.0-beta.59 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - oxc-resolver - rolldown@1.0.0-beta.57: + rolldown@1.0.0-beta.59: dependencies: - '@oxc-project/types': 0.103.0 - '@rolldown/pluginutils': 1.0.0-beta.57 + '@oxc-project/types': 0.107.0 + '@rolldown/pluginutils': 1.0.0-beta.59 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.57 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.57 - '@rolldown/binding-darwin-x64': 1.0.0-beta.57 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.57 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.57 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.57 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.57 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.57 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.57 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.57 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.57 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.57 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.57 + '@rolldown/binding-android-arm64': 1.0.0-beta.59 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.59 + '@rolldown/binding-darwin-x64': 1.0.0-beta.59 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.59 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.59 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.59 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.59 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.59 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.59 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.59 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.59 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.59 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.59 rollup@4.53.3: dependencies: @@ -4933,7 +4934,7 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@2.3.0(typescript@5.9.3): + ts-api-utils@2.4.0(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -4949,11 +4950,11 @@ snapshots: tslib: 2.8.1 tsutils: 3.21.0(typescript@5.9.3) typescript: 5.9.3 - zod: 4.3.4 + zod: 4.3.5 transitivePeerDependencies: - supports-color - tsdown@0.18.4(typescript@5.9.3): + tsdown@0.19.0(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -4963,14 +4964,14 @@ snapshots: import-without-cache: 0.2.5 obug: 2.1.1 picomatch: 4.0.3 - rolldown: 1.0.0-beta.57 - rolldown-plugin-dts: 0.20.0(rolldown@1.0.0-beta.57)(typescript@5.9.3) + rolldown: 1.0.0-beta.59 + rolldown-plugin-dts: 0.20.0(rolldown@1.0.0-beta.59)(typescript@5.9.3) semver: 7.7.3 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.4.2 - unrun: 0.2.21 + unrun: 0.2.24 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -4996,32 +4997,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.7.2: + turbo-darwin-64@2.7.4: optional: true - turbo-darwin-arm64@2.7.2: + turbo-darwin-arm64@2.7.4: optional: true - turbo-linux-64@2.7.2: + turbo-linux-64@2.7.4: optional: true - turbo-linux-arm64@2.7.2: + turbo-linux-arm64@2.7.4: optional: true - turbo-windows-64@2.7.2: + turbo-windows-64@2.7.4: optional: true - turbo-windows-arm64@2.7.2: + turbo-windows-arm64@2.7.4: optional: true - turbo@2.7.2: + turbo@2.7.4: optionalDependencies: - turbo-darwin-64: 2.7.2 - turbo-darwin-arm64: 2.7.2 - turbo-linux-64: 2.7.2 - turbo-linux-arm64: 2.7.2 - turbo-windows-64: 2.7.2 - turbo-windows-arm64: 2.7.2 + turbo-darwin-64: 2.7.4 + turbo-darwin-arm64: 2.7.4 + turbo-linux-64: 2.7.4 + turbo-linux-arm64: 2.7.4 + turbo-windows-64: 2.7.4 + turbo-windows-arm64: 2.7.4 type-check@0.4.0: dependencies: @@ -5029,11 +5030,11 @@ snapshots: type-fest@0.21.3: {} - typedoc-github-theme@0.3.1(typedoc@0.28.15(typescript@5.9.3)): + typedoc-github-theme@0.3.1(typedoc@0.28.16(typescript@5.9.3)): dependencies: - typedoc: 0.28.15(typescript@5.9.3) + typedoc: 0.28.16(typescript@5.9.3) - typedoc@0.28.15(typescript@5.9.3): + typedoc@0.28.16(typescript@5.9.3): dependencies: '@gerrit0/mini-shiki': 3.19.0 lunr: 2.3.9 @@ -5042,12 +5043,12 @@ snapshots: typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.53.0(@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -5090,9 +5091,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - unrun@0.2.21: + unrun@0.2.24: dependencies: - rolldown: 1.0.0-beta.57 + rolldown: 1.0.0-beta.59 update-browserslist-db@1.2.2(browserslist@4.28.1): dependencies: @@ -5104,7 +5105,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -5113,21 +5114,21 @@ snapshots: rollup: 4.53.3 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 24.10.4 + '@types/node': 24.10.7 fsevents: 2.3.3 jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.16(@types/node@24.10.4)(@vitest/ui@4.0.16)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: - '@vitest/expect': 4.0.16 - '@vitest/mocker': 4.0.16(vite@7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) - '@vitest/pretty-format': 4.0.16 - '@vitest/runner': 4.0.16 - '@vitest/snapshot': 4.0.16 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/expect': 4.0.17 + '@vitest/mocker': 4.0.17(vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/pretty-format': 4.0.17 + '@vitest/runner': 4.0.17 + '@vitest/snapshot': 4.0.17 + '@vitest/spy': 4.0.17 + '@vitest/utils': 4.0.17 es-module-lexer: 1.7.0 expect-type: 1.2.2 magic-string: 0.30.21 @@ -5139,11 +5140,11 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.10.4 - '@vitest/ui': 4.0.16(vitest@4.0.16) + '@types/node': 24.10.7 + '@vitest/ui': 4.0.17(vitest@4.0.17) transitivePeerDependencies: - jiti - less @@ -5194,4 +5195,4 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.3.4: {} + zod@4.3.5: {} From 71fd204a951ce486b19290a22f03de6fede2ccd0 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Mon, 12 Jan 2026 23:21:34 +0100 Subject: [PATCH 25/52] [Project] Update minimum node version --- .changeset/old-eggs-clap.md | 11 +++++++++++ package.json | 2 +- packages/classic-wow/package.json | 2 +- packages/client/package.json | 2 +- packages/core/package.json | 2 +- packages/d3/package.json | 2 +- packages/hs/package.json | 2 +- packages/integration-tests/package.json | 2 +- packages/sc2/package.json | 2 +- packages/wow/package.json | 2 +- 10 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 .changeset/old-eggs-clap.md diff --git a/.changeset/old-eggs-clap.md b/.changeset/old-eggs-clap.md new file mode 100644 index 00000000..a33ea0e8 --- /dev/null +++ b/.changeset/old-eggs-clap.md @@ -0,0 +1,11 @@ +--- +'@blizzard-api/classic-wow': major +'@blizzard-api/client': major +'@blizzard-api/core': major +'@blizzard-api/sc2': major +'@blizzard-api/wow': major +'@blizzard-api/d3': major +'@blizzard-api/hs': major +--- + +Update minimum node version to ^20.19.0 || ^22.13.0 || >=24 diff --git a/package.json b/package.json index 26d5f6c4..773c77e1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api", "type": "module", "engines": { - "node": ">=20.19" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "packageManager": "pnpm@10.27.0", "keywords": [ diff --git a/packages/classic-wow/package.json b/packages/classic-wow/package.json index c76862c0..1a0ea046 100644 --- a/packages/classic-wow/package.json +++ b/packages/classic-wow/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/classic-wow", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/client/package.json b/packages/client/package.json index bacae8e0..de20d0f6 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/client", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/core/package.json b/packages/core/package.json index 4a1bb42d..0bd46b4b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/core", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/d3/package.json b/packages/d3/package.json index 59f255a0..2b71068e 100644 --- a/packages/d3/package.json +++ b/packages/d3/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/d3", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/hs/package.json b/packages/hs/package.json index b65ec2e2..c44d7ed2 100644 --- a/packages/hs/package.json +++ b/packages/hs/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/hs", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index ddfd8575..3dd59539 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/integration-tests", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "devDependencies": { "@blizzard-api/classic-wow": "workspace:*", diff --git a/packages/sc2/package.json b/packages/sc2/package.json index 232e8579..e159e20a 100644 --- a/packages/sc2/package.json +++ b/packages/sc2/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/sc2", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/wow/package.json b/packages/wow/package.json index 32f752bc..4847cc3e 100644 --- a/packages/wow/package.json +++ b/packages/wow/package.json @@ -7,7 +7,7 @@ "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/wow", "type": "module", "engines": { - "node": "^18.18 || >=20.9" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "module": "./dist/index.js", "types": "./dist/index.d.ts", From 34c29d3a7d7b32dd0dac4a7419649a3eab9e07f0 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Mon, 12 Jan 2026 23:22:25 +0100 Subject: [PATCH 26/52] [Project] Update pnpm version --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad9ed405..2d12bbfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.27.0 + version: 10.28.0 - name: Cache turbo build setup uses: actions/cache@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e77a14c8..db1292f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,7 @@ jobs: uses: actions/configure-pages@v5 - uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0 with: - version: 10.27.0 + version: 10.28.0 - name: Setup Node.js 22.x uses: actions/setup-node@v4 with: diff --git a/package.json b/package.json index 773c77e1..83d4b1d9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" }, - "packageManager": "pnpm@10.27.0", + "packageManager": "pnpm@10.28.0", "keywords": [ "blizzard", "battlenet", From 448f8a0c3b5d5338877853e6b902f563f5e2a9e4 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Fri, 23 Jan 2026 22:54:37 +0100 Subject: [PATCH 27/52] [Project] Move back to the old prettier extension as a suggestion --- .vscode/extensions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 12e2f723..78348c4d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["dbaeumer.vscode-eslint", "prettier.prettier-vscode", "yoavbls.pretty-ts-errors"] + "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "yoavbls.pretty-ts-errors"] } From 0e0628cec6aee70c648bffdb4615d03b9c87823a Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:33:19 +0100 Subject: [PATCH 28/52] [Project] Update dependencies --- package.json | 22 +- pnpm-lock.yaml | 698 ++++++++++++++++++++++++++----------------------- 2 files changed, 378 insertions(+), 342 deletions(-) diff --git a/package.json b/package.json index 83d4b1d9..8396a4cf 100644 --- a/package.json +++ b/package.json @@ -30,27 +30,27 @@ ], "devDependencies": { "@changesets/cli": "2.29.8", - "@putstack/eslint-config-typescript": "4.13.0", + "@putstack/eslint-config-typescript": "4.14.0", "@putstack/prettier-config": "2.0.0", - "@types/node": "24.10.7", - "@vitest/coverage-v8": "4.0.17", - "@vitest/ui": "4.0.17", + "@types/node": "24.10.9", + "@vitest/coverage-v8": "4.0.18", + "@vitest/ui": "4.0.18", "eslint": "9.39.2", - "eslint-plugin-jsdoc": "62.0.0", + "eslint-plugin-jsdoc": "62.4.1", "husky": "9.1.7", "lint-staged": "16.2.7", "npm-run-all2": "8.0.4", - "prettier": "3.7.4", + "prettier": "3.8.1", "ts-to-zod": "5.1.0", - "tsdown": "0.19.0", + "tsdown": "0.20.1", "tsx": "4.21.0", - "turbo": "2.7.4", + "turbo": "2.7.6", "typedoc": "0.28.16", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", - "typescript-eslint": "8.53.0", - "vitest": "4.0.17", - "zod": "4.3.5" + "typescript-eslint": "8.54.0", + "vitest": "4.0.18", + "zod": "4.3.6" }, "pnpm": { "onlyBuiltDependencies": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31ce9c02..377248f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,28 +10,28 @@ importers: devDependencies: '@changesets/cli': specifier: 2.29.8 - version: 2.29.8(@types/node@24.10.7) + version: 2.29.8(@types/node@24.10.9) '@putstack/eslint-config-typescript': - specifier: 4.13.0 - version: 4.13.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + specifier: 4.14.0 + version: 4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 - version: 2.0.0(prettier@3.7.4) + version: 2.0.0(prettier@3.8.1) '@types/node': - specifier: 24.10.7 - version: 24.10.7 + specifier: 24.10.9 + version: 24.10.9 '@vitest/coverage-v8': - specifier: 4.0.17 - version: 4.0.17(vitest@4.0.17) + specifier: 4.0.18 + version: 4.0.18(vitest@4.0.18) '@vitest/ui': - specifier: 4.0.17 - version: 4.0.17(vitest@4.0.17) + specifier: 4.0.18 + version: 4.0.18(vitest@4.0.18) eslint: specifier: 9.39.2 version: 9.39.2(jiti@2.6.1) eslint-plugin-jsdoc: - specifier: 62.0.0 - version: 62.0.0(eslint@9.39.2(jiti@2.6.1)) + specifier: 62.4.1 + version: 62.4.1(eslint@9.39.2(jiti@2.6.1)) husky: specifier: 9.1.7 version: 9.1.7 @@ -42,20 +42,20 @@ importers: specifier: 8.0.4 version: 8.0.4 prettier: - specifier: 3.7.4 - version: 3.7.4 + specifier: 3.8.1 + version: 3.8.1 ts-to-zod: specifier: 5.1.0 version: 5.1.0 tsdown: - specifier: 0.19.0 - version: 0.19.0(typescript@5.9.3) + specifier: 0.20.1 + version: 0.20.1(typescript@5.9.3) tsx: specifier: 4.21.0 version: 4.21.0 turbo: - specifier: 2.7.4 - version: 2.7.4 + specifier: 2.7.6 + version: 2.7.6 typedoc: specifier: 0.28.16 version: 0.28.16(typescript@5.9.3) @@ -66,14 +66,14 @@ importers: specifier: 5.9.3 version: 5.9.3 typescript-eslint: - specifier: 8.53.0 - version: 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + specifier: 8.54.0 + version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: - specifier: 4.0.17 - version: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: 4.0.18 + version: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: - specifier: 4.3.5 - version: 4.3.5 + specifier: 4.3.6 + version: 4.3.6 packages/classic-wow: devDependencies: @@ -158,23 +158,36 @@ importers: packages: - '@babel/generator@7.28.5': - resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} - engines: {node: '>=6.9.0'} + '@babel/generator@8.0.0-beta.4': + resolution: {integrity: sha512-5xRfRZk6wx1BRu2XnTE8cTh2mx1ixrZ3/vpn7p/RCJpgctL6pexVVHE3eqtwlYvHhPAuOYCAlnsAyXpBdmfh5Q==} + engines: {node: ^20.19.0 || >=22.12.0} '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@8.0.0-beta.4': + resolution: {integrity: sha512-FGwbdQ/I2nJXXfyxa7dT0Fr/zPWwgX7m+hNVj0HrIHYJtyLxSQeQY1Kd8QkAYviQJV3OWFlRLuGd5epF03bdQg==} + engines: {node: ^20.19.0 || >=22.12.0} + '@babel/helper-validator-identifier@7.28.5': resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@8.0.0-beta.4': + resolution: {integrity: sha512-6t0IaUEzlinbLmsGIvBZIHEJGjuchx+cMj+FbS78zL17tucYervgbwO07V5/CgBenVraontpmyMCTVyqCfxhFQ==} + engines: {node: ^20.19.0 || >=22.12.0} + '@babel/parser@7.28.5': resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@8.0.0-beta.4': + resolution: {integrity: sha512-fBcUqUN3eenLyg25QFkOwY1lmV6L0RdG92g6gxyS2CVCY8kHdibkQz1+zV3bLzxcvNnfHoi3i9n5Dci+g93acg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + '@babel/runtime@7.28.4': resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==} engines: {node: '>=6.9.0'} @@ -183,6 +196,10 @@ packages: resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} engines: {node: '>=6.9.0'} + '@babel/types@8.0.0-beta.4': + resolution: {integrity: sha512-xjk2xqYp25ePzAs0I08hN2lrbUDDQFfCjwq6MIEa8HwHa0WK8NfNtdvtXod8Ku2CbE1iui7qwWojGvjQiyrQeA==} + engines: {node: ^20.19.0 || >=22.12.0} + '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} @@ -257,8 +274,8 @@ packages: '@emnapi/wasi-threads@1.1.0': resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} - '@es-joy/jsdoccomment@0.79.0': - resolution: {integrity: sha512-q/Nc241VsVRC5b1dgbsOI0fnWfrb1S9sdceFewpDHto4+4r2o6SSCpcY+Z+EdLdMPN6Nsj/PjlPcKag6WbU6XQ==} + '@es-joy/jsdoccomment@0.83.0': + resolution: {integrity: sha512-e1MHSEPJ4m35zkBvNT6kcdeH1SvMaJDsPC3Xhfseg3hvF50FUE3f46Yn36jgbrPYYXezlWUQnevv23c+lx2MCA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@es-joy/resolve.exports@1.2.0': @@ -583,10 +600,6 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.12.2': resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -696,14 +709,14 @@ packages: resolution: {integrity: sha512-jteNUQKgJHLHFbbz806aGZqf+RJJ7t4gwF4MYa8fCwCxQ8/klJNWc0MvaJiBebk7Mc+J39mdlsB4XraaCKznFw==} engines: {node: '>=18.0.0'} - '@oxc-project/types@0.107.0': - resolution: {integrity: sha512-QFDRbYfV2LVx8tyqtyiah3jQPUj1mK2+RYwxyFWyGoys6XJnwTdlzO6rdNNHOPorHAu5Uo34oWRKcvNpbJarmQ==} + '@oxc-project/types@0.110.0': + resolution: {integrity: sha512-6Ct21OIlrEnFEJk5LT4e63pk3btsI6/TusD/GStLi7wYlGJNOl1GI9qvXAnRAxQU9zqA2Oz+UwhfTOU2rPZVow==} '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@putstack/eslint-config-typescript@4.13.0': - resolution: {integrity: sha512-B6wkXz1ieV7kd+o0Wykjqigtv1DvzZO0vWiAsdaGVMBiJbWwqq7r6DyKGCziQmeN5TjrwgTksJDxi5jhnhdtxA==} + '@putstack/eslint-config-typescript@4.14.0': + resolution: {integrity: sha512-mPWiyzN3i1nsbOJDbJXIVIDQRXehfHSUA2HnlIDzUYbSQo66J3TuIC5reEZ8GuA30KQUqVmI+XsgbnxQ+UDOVg==} engines: {node: ^20.9 || >=22} peerDependencies: '@eslint/js': ^9.20.0 @@ -720,85 +733,85 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@rolldown/binding-android-arm64@1.0.0-beta.59': - resolution: {integrity: sha512-6yLLgyswYwiCfls9+hoNFY9F8TQdwo15hpXDHzlAR0X/GojeKF+AuNcXjYNbOJ4zjl/5D6lliE8CbpB5t1OWIQ==} + '@rolldown/binding-android-arm64@1.0.0-rc.1': + resolution: {integrity: sha512-He6ZoCfv5D7dlRbrhNBkuMVIHd0GDnjJwbICE1OWpG7G3S2gmJ+eXkcNLJjzjNDpeI2aRy56ou39AJM9AD8YFA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-beta.59': - resolution: {integrity: sha512-hqGXRc162qCCIOAcHN2Cw4eXiVTwYsMFLOhAy1IG2CxY+dwc/l4Ga+dLPkLor3Ikqy5WDn+7kxHbbh6EmshEpQ==} + '@rolldown/binding-darwin-arm64@1.0.0-rc.1': + resolution: {integrity: sha512-YzJdn08kSOXnj85ghHauH2iHpOJ6eSmstdRTLyaziDcUxe9SyQJgGyx/5jDIhDvtOcNvMm2Ju7m19+S/Rm1jFg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.59': - resolution: {integrity: sha512-ezvvGuhteE15JmMhJW0wS7BaXmhwLy1YHeEwievYaPC1PgGD86wgBKfOpHr9tSKllAXbCe0BeeMvasscWLhKdA==} + '@rolldown/binding-darwin-x64@1.0.0-rc.1': + resolution: {integrity: sha512-cIvAbqM+ZVV6lBSKSBtlNqH5iCiW933t1q8j0H66B3sjbe8AxIRetVqfGgcHcJtMzBIkIALlL9fcDrElWLJQcQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.59': - resolution: {integrity: sha512-4fhKVJiEYVd5n6no/mrL3LZ9kByfCGwmONOrdtvx8DJGDQhehH/q3RfhG3V/4jGKhpXgbDjpIjkkFdybCTcgew==} + '@rolldown/binding-freebsd-x64@1.0.0-rc.1': + resolution: {integrity: sha512-rVt+B1B/qmKwCl1XD02wKfgh3vQPXRXdB/TicV2w6g7RVAM1+cZcpigwhLarqiVCxDObFZ7UgXCxPC7tpDoRog==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.59': - resolution: {integrity: sha512-T3Y52sW6JAhvIqArBw+wtjNU1Ieaz4g0NBxyjSJoW971nZJBZygNlSYx78G4cwkCmo1dYTciTPDOnQygLV23pA==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.1': + resolution: {integrity: sha512-69YKwJJBOFprQa1GktPgbuBOfnn+EGxu8sBJ1TjPER+zhSpYeaU4N07uqmyBiksOLGXsMegymuecLobfz03h8Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.59': - resolution: {integrity: sha512-NIW40jQDSQap2KDdmm9z3B/4OzWJ6trf8dwx3FD74kcQb3v34ThsBFTtzE5KjDuxnxgUlV+DkAu+XgSMKrgufw==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.1': + resolution: {integrity: sha512-9JDhHUf3WcLfnViFWm+TyorqUtnSAHaCzlSNmMOq824prVuuzDOK91K0Hl8DUcEb9M5x2O+d2/jmBMsetRIn3g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.59': - resolution: {integrity: sha512-CCKEk+H+8c0WGe/8n1E20n85Tq4Pv+HNAbjP1KfUXW+01aCWSMjU56ChNrM2tvHnXicfm7QRNoZyfY8cWh7jLQ==} + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.1': + resolution: {integrity: sha512-UvApLEGholmxw/HIwmUnLq3CwdydbhaHHllvWiCTNbyGom7wTwOtz5OAQbAKZYyiEOeIXZNPkM7nA4Dtng7CLw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.59': - resolution: {integrity: sha512-VlfwJ/HCskPmQi8R0JuAFndySKVFX7yPhE658o27cjSDWWbXVtGkSbwaxstii7Q+3Rz87ZXN+HLnb1kd4R9Img==} + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.1': + resolution: {integrity: sha512-uVctNgZHiGnJx5Fij7wHLhgw4uyZBVi6mykeWKOqE7bVy9Hcxn0fM/IuqdMwk6hXlaf9fFShDTFz2+YejP+x0A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.59': - resolution: {integrity: sha512-kuO92hTRyGy0Ts3Nsqll0rfO8eFsEJe9dGQGktkQnZ2hrJrDVN0y419dMgKy/gB2S2o7F2dpWhpfQOBehZPwVA==} + '@rolldown/binding-linux-x64-musl@1.0.0-rc.1': + resolution: {integrity: sha512-T6Eg0xWwcxd/MzBcuv4Z37YVbUbJxy5cMNnbIt/Yr99wFwli30O4BPlY8hKeGyn6lWNtU0QioBS46lVzDN38bg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.0.0-beta.59': - resolution: {integrity: sha512-PXAebvNL4sYfCqi8LdY4qyFRacrRoiPZLo3NoUmiTxm7MPtYYR8CNtBGNokqDmMuZIQIecRaD/jbmFAIDz7DxQ==} + '@rolldown/binding-openharmony-arm64@1.0.0-rc.1': + resolution: {integrity: sha512-PuGZVS2xNJyLADeh2F04b+Cz4NwvpglbtWACgrDOa5YDTEHKwmiTDjoD5eZ9/ptXtcpeFrMqD2H4Zn33KAh1Eg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.59': - resolution: {integrity: sha512-yJoklQg7XIZq8nAg0bbkEXcDK6sfpjxQGxpg2Nd6ERNtvg+eOaEBRgPww0BVTrYFQzje1pB5qPwC2VnJHT3koQ==} + '@rolldown/binding-wasm32-wasi@1.0.0-rc.1': + resolution: {integrity: sha512-2mOxY562ihHlz9lEXuaGEIDCZ1vI+zyFdtsoa3M62xsEunDXQE+DVPO4S4x5MPK9tKulG/aFcA/IH5eVN257Cw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.59': - resolution: {integrity: sha512-ljZ4+McmCbIuZwEBaoGtiG8Rq2nJjaXEnLEIx+usWetXn1ECjXY0LAhkELxOV6ytv4ensEmoJJ8nXg47hRMjlw==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.1': + resolution: {integrity: sha512-oQVOP5cfAWZwRD0Q3nGn/cA9FW3KhMMuQ0NIndALAe6obqjLhqYVYDiGGRGrxvnjJsVbpLwR14gIUYnpIcHR1g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.59': - resolution: {integrity: sha512-bMY4tTIwbdZljW+xe/ln1hvs0SRitahQSXfWtvgAtIzgSX9Ar7KqJzU7lRm33YTRFIHLULRi53yNjw9nJGd6uQ==} + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.1': + resolution: {integrity: sha512-Ydsxxx++FNOuov3wCBPaYjZrEvKOOGq3k+BF4BPridhg2pENfitSRD2TEuQ8i33bp5VptuNdC9IzxRKU031z5A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.59': - resolution: {integrity: sha512-aoh6LAJRyhtazs98ydgpNOYstxUlsOV1KJXcpf/0c0vFcUA8uyd/hwKRhqE/AAPNqAho9RliGsvitCoOzREoVA==} + '@rolldown/pluginutils@1.0.0-rc.1': + resolution: {integrity: sha512-UTBjtTxVOhodhzFVp/ayITaTETRHPUPYZPXQe0WU0wOgxghMojXxYjOiPOauKIYNWJAWS2fd7gJgGQK8GU8vDA==} '@rollup/rollup-android-arm-eabi@4.53.3': resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} @@ -947,51 +960,54 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/jsesc@2.5.1': + resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.10.7': - resolution: {integrity: sha512-+054pVMzVTmRQV8BhpGv3UyfZ2Llgl8rdpDTon+cUH9+na0ncBVXj3wTUKh14+Kiz18ziM3b4ikpP5/Pc0rQEQ==} + '@types/node@24.10.9': + resolution: {integrity: sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.53.0': - resolution: {integrity: sha512-eEXsVvLPu8Z4PkFibtuFJLJOTAV/nPdgtSjkGoPpddpFk3/ym2oy97jynY6ic2m6+nc5M8SE1e9v/mHKsulcJg==} + '@typescript-eslint/eslint-plugin@8.54.0': + resolution: {integrity: sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.53.0 + '@typescript-eslint/parser': ^8.54.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.53.0': - resolution: {integrity: sha512-npiaib8XzbjtzS2N4HlqPvlpxpmZ14FjSJrteZpPxGUaYPlvhzlzUZ4mZyABo0EFrOWnvyd0Xxroq//hKhtAWg==} + '@typescript-eslint/parser@8.54.0': + resolution: {integrity: sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.53.0': - resolution: {integrity: sha512-Bl6Gdr7NqkqIP5yP9z1JU///Nmes4Eose6L1HwpuVHwScgDPPuEWbUVhvlZmb8hy0vX9syLk5EGNL700WcBlbg==} + '@typescript-eslint/project-service@8.54.0': + resolution: {integrity: sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.53.0': - resolution: {integrity: sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g==} + '@typescript-eslint/scope-manager@8.54.0': + resolution: {integrity: sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.53.0': - resolution: {integrity: sha512-K6Sc0R5GIG6dNoPdOooQ+KtvT5KCKAvTcY8h2rIuul19vxH5OTQk7ArKkd4yTzkw66WnNY0kPPzzcmWA+XRmiA==} + '@typescript-eslint/tsconfig-utils@8.54.0': + resolution: {integrity: sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.53.0': - resolution: {integrity: sha512-BBAUhlx7g4SmcLhn8cnbxoxtmS7hcq39xKCgiutL3oNx1TaIp+cny51s8ewnKMpVUKQUGb41RAUWZ9kxYdovuw==} + '@typescript-eslint/type-utils@8.54.0': + resolution: {integrity: sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1001,21 +1017,25 @@ packages: resolution: {integrity: sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.53.0': - resolution: {integrity: sha512-pw0c0Gdo7Z4xOG987u3nJ8akL9093yEEKv8QTJ+Bhkghj1xyj8cgPaavlr9rq8h7+s6plUJ4QJYw2gCZodqmGw==} + '@typescript-eslint/types@8.54.0': + resolution: {integrity: sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.54.0': + resolution: {integrity: sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.53.0': - resolution: {integrity: sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA==} + '@typescript-eslint/utils@8.54.0': + resolution: {integrity: sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.53.0': - resolution: {integrity: sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw==} + '@typescript-eslint/visitor-keys@8.54.0': + resolution: {integrity: sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.2': @@ -1118,20 +1138,20 @@ packages: cpu: [x64] os: [win32] - '@vitest/coverage-v8@4.0.17': - resolution: {integrity: sha512-/6zU2FLGg0jsd+ePZcwHRy3+WpNTBBhDY56P4JTRqUN/Dp6CvOEa9HrikcQ4KfV2b2kAHUFB4dl1SuocWXSFEw==} + '@vitest/coverage-v8@4.0.18': + resolution: {integrity: sha512-7i+N2i0+ME+2JFZhfuz7Tg/FqKtilHjGyGvoHYQ6iLV0zahbsJ9sljC9OcFcPDbhYKCet+sG8SsVqlyGvPflZg==} peerDependencies: - '@vitest/browser': 4.0.17 - vitest: 4.0.17 + '@vitest/browser': 4.0.18 + vitest: 4.0.18 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@4.0.17': - resolution: {integrity: sha512-mEoqP3RqhKlbmUmntNDDCJeTDavDR+fVYkSOw8qRwJFaW/0/5zA9zFeTrHqNtcmwh6j26yMmwx2PqUDPzt5ZAQ==} + '@vitest/expect@4.0.18': + resolution: {integrity: sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==} - '@vitest/mocker@4.0.17': - resolution: {integrity: sha512-+ZtQhLA3lDh1tI2wxe3yMsGzbp7uuJSWBM1iTIKCbppWTSBN09PUC+L+fyNlQApQoR+Ps8twt2pbSSXg2fQVEQ==} + '@vitest/mocker@4.0.18': + resolution: {integrity: sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0-0 @@ -1141,25 +1161,25 @@ packages: vite: optional: true - '@vitest/pretty-format@4.0.17': - resolution: {integrity: sha512-Ah3VAYmjcEdHg6+MwFE17qyLqBHZ+ni2ScKCiW2XrlSBV4H3Z7vYfPfz7CWQ33gyu76oc0Ai36+kgLU3rfF4nw==} + '@vitest/pretty-format@4.0.18': + resolution: {integrity: sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==} - '@vitest/runner@4.0.17': - resolution: {integrity: sha512-JmuQyf8aMWoo/LmNFppdpkfRVHJcsgzkbCA+/Bk7VfNH7RE6Ut2qxegeyx2j3ojtJtKIbIGy3h+KxGfYfk28YQ==} + '@vitest/runner@4.0.18': + resolution: {integrity: sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==} - '@vitest/snapshot@4.0.17': - resolution: {integrity: sha512-npPelD7oyL+YQM2gbIYvlavlMVWUfNNGZPcu0aEUQXt7FXTuqhmgiYupPnAanhKvyP6Srs2pIbWo30K0RbDtRQ==} + '@vitest/snapshot@4.0.18': + resolution: {integrity: sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==} - '@vitest/spy@4.0.17': - resolution: {integrity: sha512-I1bQo8QaP6tZlTomQNWKJE6ym4SHf3oLS7ceNjozxxgzavRAgZDc06T7kD8gb9bXKEgcLNt00Z+kZO6KaJ62Ew==} + '@vitest/spy@4.0.18': + resolution: {integrity: sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==} - '@vitest/ui@4.0.17': - resolution: {integrity: sha512-hRDjg6dlDz7JlZAvjbiCdAJ3SDG+NH8tjZe21vjxfvT2ssYAn72SRXMge3dKKABm3bIJ3C+3wdunIdur8PHEAw==} + '@vitest/ui@4.0.18': + resolution: {integrity: sha512-CGJ25bc8fRi8Lod/3GHSvXRKi7nBo3kxh0ApW4yCjmrWmRmlT53B5E08XRSZRliygG0aVNxLrBEqPYdz/KcCtQ==} peerDependencies: - vitest: 4.0.17 + vitest: 4.0.18 - '@vitest/utils@4.0.17': - resolution: {integrity: sha512-RG6iy+IzQpa9SB8HAFHJ9Y+pTzI+h8553MrciN9eC6TFBErqrQaTas4vG+MVj8S4uKk8uTT2p0vgZPnTdxd96w==} + '@vitest/utils@4.0.18': + resolution: {integrity: sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -1228,8 +1248,8 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - ast-kit@2.2.0: - resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} + ast-kit@3.0.0-beta.1: + resolution: {integrity: sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw==} engines: {node: '>=20.19.0'} ast-v8-to-istanbul@0.3.10: @@ -1354,6 +1374,10 @@ packages: resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} engines: {node: '>= 12.0.0'} + comment-parser@1.4.5: + resolution: {integrity: sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==} + engines: {node: '>= 12.0.0'} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1495,20 +1519,20 @@ packages: eslint-import-resolver-node: optional: true - eslint-plugin-jsdoc@62.0.0: - resolution: {integrity: sha512-sNdIGLAvjFK3pB0SYFW74iXODZ4ifF8Ax13Wgq8jKepKnrCFzGo7+jRZfLf70h81SD7lPYnTE7MR2nhYSvaLTA==} + eslint-plugin-jsdoc@62.4.1: + resolution: {integrity: sha512-HgX2iN4j104D/mCUqRbhtzSZbph+KO9jfMHiIJjJ19Q+IwLQ5Na2IqvOJYq4S+4kgvEk1w6KYF4vVus6H2wcHg==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-perfectionist@5.2.0: - resolution: {integrity: sha512-rLD4VyA6sxcCPlG/koqjp0D46JTNRURSDs22Jr1JeVbOiu1BoeRdROnJoqDoGESuXbwxvGEnMSqClX/Q3HSMig==} + eslint-plugin-perfectionist@5.4.0: + resolution: {integrity: sha512-XxpUMpeVaSJF5rpF6NHmhj3xavHZrflKcRbDssAUWrHUU/+l3l7PPYnVJ6IOpR2KjQ1Blucaeb0cFL3LIBis0A==} engines: {node: ^20.0.0 || >=22.0.0} peerDependencies: eslint: '>=8.45.0' - eslint-plugin-sonarjs@3.0.5: - resolution: {integrity: sha512-dI62Ff3zMezUToi161hs2i1HX1ie8Ia2hO0jtNBfdgRBicAG4ydy2WPt0rMTrAe3ZrlqhpAO3w1jcQEdneYoFA==} + eslint-plugin-sonarjs@3.0.6: + resolution: {integrity: sha512-3mVUqsAUSylGfkJMj2v0aC2Cu/eUunDLm+XMjLf0uLjAZao205NWF3g6EXxcCAFO+rCZiQ6Or1WQkUcU9/sKFQ==} peerDependencies: eslint: ^8.0.0 || ^9.0.0 @@ -1548,8 +1572,8 @@ packages: resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - espree@11.0.0: - resolution: {integrity: sha512-+gMeWRrIh/NsG+3NaLeWHuyeyk70p2tbvZIWBYcqQ4/7Xvars6GYTZNhF1sIeLcc6Wb11He5ffz3hsHyXFrw5A==} + espree@11.1.0: + resolution: {integrity: sha512-WFWYhO1fV4iYkqOOvq8FbqIhr2pYfoDY0kCotMkDeNtGpiGGkZ1iov2u8ydjtgM8yF8rzK7oaTbw2NAzbAbehw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} esprima@4.0.1: @@ -1831,8 +1855,8 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true - jsdoc-type-pratt-parser@7.0.0: - resolution: {integrity: sha512-c7YbokssPOSHmqTbSAmTtnVgAVa/7lumWNYqomgd5KOMyPrRve2anx6lonfOsXEQacqF9FKVUj7bLg4vRSvdYA==} + jsdoc-type-pratt-parser@7.1.0: + resolution: {integrity: sha512-SX7q7XyCwzM/MEDCYz0l8GgGbJAACGFII9+WfNYr5SLEKukHWRy2Jk3iWRe7P+lpYJNs7oQ+OSei4JtKGUjd7A==} engines: {node: '>=20.0.0'} jsesc@3.1.0: @@ -2113,8 +2137,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.7.4: - resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} hasBin: true @@ -2189,8 +2213,8 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rolldown-plugin-dts@0.20.0: - resolution: {integrity: sha512-cLAY1kN2ilTYMfZcFlGWbXnu6Nb+8uwUBsi+Mjbh4uIx7IN8uMOmJ7RxrrRgPsO4H7eSz3E+JwGoL1gyugiyUA==} + rolldown-plugin-dts@0.21.7: + resolution: {integrity: sha512-u6mHPTxLzC/eU3hbFqu1Hd47if1zXITvNtbro5PRVqMe3tLzUkdeur87wRg8Y/bX5PYUUtPuGO815uHp8zi9uQ==} engines: {node: '>=20.19.0'} peerDependencies: '@ts-macro/tsc': ^0.3.6 @@ -2208,8 +2232,8 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-beta.59: - resolution: {integrity: sha512-Slm000Gd8/AO9z4Kxl4r8mp/iakrbAuJ1L+7ddpkNxgQ+Vf37WPvY63l3oeyZcfuPD1DRrUYBsRPIXSOhvOsmw==} + rolldown@1.0.0-rc.1: + resolution: {integrity: sha512-M3AeZjYE6UclblEf531Hch0WfVC/NOL43Cc+WdF3J50kk5/fvouHhDumSGTh0oRjbZ8C4faaVr5r6Nx1xMqDGg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -2228,11 +2252,6 @@ packages: resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} engines: {node: ^14.0.0 || >=16.0.0} - semver@7.7.2: - resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} - engines: {node: '>=10'} - hasBin: true - semver@7.7.3: resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} engines: {node: '>=10'} @@ -2457,8 +2476,8 @@ packages: resolution: {integrity: sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==} hasBin: true - tsdown@0.19.0: - resolution: {integrity: sha512-uqg8yzlS7GemFWcM6aCp/sptF4bJiJbWUibuHTRLLCBEsGCgJxuqxPhuVTqyHXqoEkh9ohwAdlyDKli5MEWCyQ==} + tsdown@0.20.1: + resolution: {integrity: sha512-Wo1BzqNQVZ6SFQV8rjQBwMmNubO+yV3F+vp2WNTjEaS4S5CT1C1dHtUbeFMrCEasZpGy5w6TshpehNnfTe8QBQ==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2499,38 +2518,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@2.7.4: - resolution: {integrity: sha512-xDR30ltfkSsRfGzABBckvl1nz1cZ3ssTujvdj+TPwOweeDRvZ0e06t5DS0rmRBvyKpgGs42K/EK6Mn2qLlFY9A==} + turbo-darwin-64@2.7.6: + resolution: {integrity: sha512-bYu0qnWju2Ha3EbIkPCk1SMLT3sltKh1P/Jy5FER6BmH++H5z+T5MHh3W1Xoers9rk4N1VdKvog9FO1pxQyjhw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.7.4: - resolution: {integrity: sha512-P7sjqXtOL/+nYWPvcDGWhi8wf8M8mZHHB8XEzw2VX7VJrS8IGHyJHGD1AYfDvhAEcr7pnk3gGifz3/xyhI655w==} + turbo-darwin-arm64@2.7.6: + resolution: {integrity: sha512-KCxTf3Y1hgNLYIWRLw8bwH8Zie9RyCGoxAlXYsCBI/YNqBSR+ZZK9KYzFxAqDaVaNvTwLFv3rJRGsXOFWg4+Uw==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.7.4: - resolution: {integrity: sha512-GofFOxRO/IhG8BcPyMSSB3Y2+oKQotsaYbHxL9yD6JPb20/o35eo+zUSyazOtilAwDHnak5dorAJFoFU8MIg2A==} + turbo-linux-64@2.7.6: + resolution: {integrity: sha512-vjoU8zIfNgvJR3cMitgw7inEoi6bmuVuFawDl5yKtxjAEhDktFdRBpGS3WojD4l3BklBbIK689ssXcGf21LxRA==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.7.4: - resolution: {integrity: sha512-+RQKgNjksVPxYAyAgmDV7w/1qj++qca+nSNTAOKGOfJiDtSvRKoci89oftJ6anGs00uamLKVEQ712TI/tfNAIw==} + turbo-linux-arm64@2.7.6: + resolution: {integrity: sha512-TcMpBvTqZf+1DptrVYLbZls7WY1UVNDTGaf0bo7/GCgWYv5eZHCVo4Td7kCJeDU4glbXg67REX0md0S0V6ghMg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.7.4: - resolution: {integrity: sha512-rfak1+g+ON3czs1mDYsCS4X74ZmK6gOgRQTXjDICtzvR4o61paqtgAYtNPofcVsMWeF4wvCajSeoAkkeAnQ1kg==} + turbo-windows-64@2.7.6: + resolution: {integrity: sha512-1/MhkYldiihjneY8QnnDMbAkHXn/udTWSVYS94EMlkE9AShozsLTTOT1gDOpX06EfEW5njP09suhMvxbvwuwpQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.7.4: - resolution: {integrity: sha512-1ZgBNjNRbDu/fPeqXuX9i26x3CJ/Y1gcwUpQ+Vp7kN9Un6RZ9kzs164f/knrjcu5E+szCRexVjRSJay1k5jApA==} + turbo-windows-arm64@2.7.6: + resolution: {integrity: sha512-0wDVnUJLFAWm4ZzOQFDkbyyUqaszorTGf3Rdc22IRIyJTTLd6ajqdb+cWD89UZ1RKr953+PZR1gqgWQY4PDuhA==} cpu: [arm64] os: [win32] - turbo@2.7.4: - resolution: {integrity: sha512-bkO4AddmDishzJB2ze7aYYPaejMoJVfS0XnaR6RCdXFOY8JGJfQE+l9fKiV7uDPa5Ut44gmOWJL3894CIMeH9g==} + turbo@2.7.6: + resolution: {integrity: sha512-PO9AvJLEsNLO+EYhF4zB+v10hOjsJe5kJW+S6tTbRv+TW7gf1Qer4mfjP9h3/y9h8ZiPvOrenxnEgDtFgaM5zw==} hasBin: true type-check@0.4.0: @@ -2554,8 +2573,8 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.53.0: - resolution: {integrity: sha512-xHURCQNxZ1dsWn0sdOaOfCSQG0HKeqSj9OexIxrz6ypU6wHYOdX2I3D2b8s8wFSsSOYJb+6q283cLiLlkEsBYw==} + typescript-eslint@8.54.0: + resolution: {integrity: sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2582,8 +2601,8 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - unrun@0.2.24: - resolution: {integrity: sha512-xa4/O5q2jmI6EqxweJ+sOy5cyORZWcsgmi8pmABVSUyg24Fh44qJrneUHavZEMsbJbghHYWKSraFy5hDCb/m4w==} + unrun@0.2.26: + resolution: {integrity: sha512-A3DQLBcDyTui4Hlaoojkldg+8x+CIR+tcSHY0wzW+CgB4X/DNyH58jJpXp1B/EkE+yG6tU8iH1mWsLtwFU3IQg==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -2641,18 +2660,18 @@ packages: yaml: optional: true - vitest@4.0.17: - resolution: {integrity: sha512-FQMeF0DJdWY0iOnbv466n/0BudNdKj1l5jYgl5JVTwjSsZSlqyXFt/9+1sEyhR6CLowbZpV7O1sCHrzBhucKKg==} + vitest@4.0.18: + resolution: {integrity: sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.0.17 - '@vitest/browser-preview': 4.0.17 - '@vitest/browser-webdriverio': 4.0.17 - '@vitest/ui': 4.0.17 + '@vitest/browser-playwright': 4.0.18 + '@vitest/browser-preview': 4.0.18 + '@vitest/browser-webdriverio': 4.0.18 + '@vitest/ui': 4.0.18 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -2718,27 +2737,36 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.3.5: - resolution: {integrity: sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==} + zod@4.3.6: + resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} snapshots: - '@babel/generator@7.28.5': + '@babel/generator@8.0.0-beta.4': dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 + '@babel/parser': 8.0.0-beta.4 + '@babel/types': 8.0.0-beta.4 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 + '@types/jsesc': 2.5.1 jsesc: 3.1.0 '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-string-parser@8.0.0-beta.4': {} + '@babel/helper-validator-identifier@7.28.5': {} + '@babel/helper-validator-identifier@8.0.0-beta.4': {} + '@babel/parser@7.28.5': dependencies: '@babel/types': 7.28.5 + '@babel/parser@8.0.0-beta.4': + dependencies: + '@babel/types': 8.0.0-beta.4 + '@babel/runtime@7.28.4': {} '@babel/types@7.28.5': @@ -2746,6 +2774,11 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@babel/types@8.0.0-beta.4': + dependencies: + '@babel/helper-string-parser': 8.0.0-beta.4 + '@babel/helper-validator-identifier': 8.0.0-beta.4 + '@bcoe/v8-coverage@1.0.2': {} '@changesets/apply-release-plan@7.0.14': @@ -2777,7 +2810,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.8(@types/node@24.10.7)': + '@changesets/cli@2.29.8(@types/node@24.10.9)': dependencies: '@changesets/apply-release-plan': 7.0.14 '@changesets/assemble-release-plan': 6.0.9 @@ -2793,7 +2826,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@24.10.7) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.9) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -2919,13 +2952,13 @@ snapshots: tslib: 2.8.1 optional: true - '@es-joy/jsdoccomment@0.79.0': + '@es-joy/jsdoccomment@0.83.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.53.0 - comment-parser: 1.4.1 + '@typescript-eslint/types': 8.54.0 + comment-parser: 1.4.5 esquery: 1.7.0 - jsdoc-type-pratt-parser: 7.0.0 + jsdoc-type-pratt-parser: 7.1.0 '@es-joy/resolve.exports@1.2.0': {} @@ -3090,8 +3123,6 @@ snapshots: eslint: 9.39.2(jiti@2.6.1) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.1': {} - '@eslint-community/regexpp@4.12.2': {} '@eslint/config-array@0.21.1': @@ -3152,12 +3183,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.3(@types/node@24.10.7)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.9)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: - '@types/node': 24.10.7 + '@types/node': 24.10.9 '@isaacs/balanced-match@4.0.1': {} @@ -3242,79 +3273,79 @@ snapshots: wordwrap: 1.0.0 wrap-ansi: 7.0.0 - '@oxc-project/types@0.107.0': {} + '@oxc-project/types@0.110.0': {} '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.13.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.2 - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-perfectionist: 5.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-sonarjs: 3.0.5(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-perfectionist: 5.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-sonarjs: 3.0.6(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) typescript: 5.9.3 - typescript-eslint: 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import - supports-color - '@putstack/prettier-config@2.0.0(prettier@3.7.4)': + '@putstack/prettier-config@2.0.0(prettier@3.8.1)': dependencies: - prettier: 3.7.4 + prettier: 3.8.1 '@quansync/fs@1.0.0': dependencies: quansync: 1.0.0 - '@rolldown/binding-android-arm64@1.0.0-beta.59': + '@rolldown/binding-android-arm64@1.0.0-rc.1': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-beta.59': + '@rolldown/binding-darwin-arm64@1.0.0-rc.1': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.59': + '@rolldown/binding-darwin-x64@1.0.0-rc.1': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.59': + '@rolldown/binding-freebsd-x64@1.0.0-rc.1': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.59': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.1': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.59': + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.1': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.59': + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.1': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.59': + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.1': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.59': + '@rolldown/binding-linux-x64-musl@1.0.0-rc.1': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-beta.59': + '@rolldown/binding-openharmony-arm64@1.0.0-rc.1': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.59': + '@rolldown/binding-wasm32-wasi@1.0.0-rc.1': dependencies: '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.59': + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.1': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.59': + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.1': optional: true - '@rolldown/pluginutils@1.0.0-beta.59': {} + '@rolldown/pluginutils@1.0.0-rc.1': {} '@rollup/rollup-android-arm-eabi@4.53.3': optional: true @@ -3424,24 +3455,26 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/jsesc@2.5.1': {} + '@types/json-schema@7.0.15': {} '@types/node@12.20.55': {} - '@types/node@24.10.7': + '@types/node@24.10.9': dependencies: undici-types: 7.16.0 '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.53.0(@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.53.0 - '@typescript-eslint/type-utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.53.0 + '@typescript-eslint/parser': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.54.0 + '@typescript-eslint/type-utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.54.0 eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 @@ -3450,41 +3483,41 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.53.0 - '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.53.0 + '@typescript-eslint/scope-manager': 8.54.0 + '@typescript-eslint/types': 8.54.0 + '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.54.0 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.53.0(typescript@5.9.3)': + '@typescript-eslint/project-service@8.54.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) - '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/tsconfig-utils': 8.54.0(typescript@5.9.3) + '@typescript-eslint/types': 8.54.0 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.53.0': + '@typescript-eslint/scope-manager@8.54.0': dependencies: - '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/visitor-keys': 8.53.0 + '@typescript-eslint/types': 8.54.0 + '@typescript-eslint/visitor-keys': 8.54.0 - '@typescript-eslint/tsconfig-utils@8.53.0(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.54.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.54.0 + '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) ts-api-utils: 2.4.0(typescript@5.9.3) @@ -3494,12 +3527,14 @@ snapshots: '@typescript-eslint/types@8.53.0': {} - '@typescript-eslint/typescript-estree@8.53.0(typescript@5.9.3)': + '@typescript-eslint/types@8.54.0': {} + + '@typescript-eslint/typescript-estree@8.54.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.53.0(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) - '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/visitor-keys': 8.53.0 + '@typescript-eslint/project-service': 8.54.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.54.0(typescript@5.9.3) + '@typescript-eslint/types': 8.54.0 + '@typescript-eslint/visitor-keys': 8.54.0 debug: 4.4.3(supports-color@8.1.1) minimatch: 9.0.5 semver: 7.7.3 @@ -3509,20 +3544,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.53.0 - '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.54.0 + '@typescript-eslint/types': 8.54.0 + '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.53.0': + '@typescript-eslint/visitor-keys@8.54.0': dependencies: - '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/types': 8.54.0 eslint-visitor-keys: 4.2.1 '@typescript/vfs@1.6.2(typescript@5.9.3)': @@ -3591,10 +3626,10 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitest/coverage-v8@4.0.17(vitest@4.0.17)': + '@vitest/coverage-v8@4.0.18(vitest@4.0.18)': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.0.17 + '@vitest/utils': 4.0.18 ast-v8-to-istanbul: 0.3.10 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -3603,56 +3638,56 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/expect@4.0.17': + '@vitest/expect@4.0.18': dependencies: '@standard-schema/spec': 1.0.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.0.17 - '@vitest/utils': 4.0.17 + '@vitest/spy': 4.0.18 + '@vitest/utils': 4.0.18 chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.17(vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.18(vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: - '@vitest/spy': 4.0.17 + '@vitest/spy': 4.0.18 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/pretty-format@4.0.17': + '@vitest/pretty-format@4.0.18': dependencies: tinyrainbow: 3.0.3 - '@vitest/runner@4.0.17': + '@vitest/runner@4.0.18': dependencies: - '@vitest/utils': 4.0.17 + '@vitest/utils': 4.0.18 pathe: 2.0.3 - '@vitest/snapshot@4.0.17': + '@vitest/snapshot@4.0.18': dependencies: - '@vitest/pretty-format': 4.0.17 + '@vitest/pretty-format': 4.0.18 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.0.17': {} + '@vitest/spy@4.0.18': {} - '@vitest/ui@4.0.17(vitest@4.0.17)': + '@vitest/ui@4.0.18(vitest@4.0.18)': dependencies: - '@vitest/utils': 4.0.17 + '@vitest/utils': 4.0.18 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/utils@4.0.17': + '@vitest/utils@4.0.18': dependencies: - '@vitest/pretty-format': 4.0.17 + '@vitest/pretty-format': 4.0.18 tinyrainbow: 3.0.3 acorn-jsx@5.3.2(acorn@8.15.0): @@ -3704,9 +3739,10 @@ snapshots: assertion-error@2.0.1: {} - ast-kit@2.2.0: + ast-kit@3.0.0-beta.1: dependencies: - '@babel/parser': 7.28.5 + '@babel/parser': 8.0.0-beta.4 + estree-walker: 3.0.3 pathe: 2.0.3 ast-v8-to-istanbul@0.3.10: @@ -3810,6 +3846,8 @@ snapshots: comment-parser@1.4.1: {} + comment-parser@1.4.5: {} + concat-map@0.0.1: {} core-js-compat@3.47.0: @@ -3934,7 +3972,7 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) @@ -3945,7 +3983,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -3959,7 +3997,7 @@ snapshots: module-replacements: 2.10.1 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: '@typescript-eslint/types': 8.53.0 comment-parser: 1.4.1 @@ -3972,20 +4010,20 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@62.0.0(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-jsdoc@62.4.1(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@es-joy/jsdoccomment': 0.79.0 + '@es-joy/jsdoccomment': 0.83.0 '@es-joy/resolve.exports': 1.2.0 are-docs-informative: 0.0.2 - comment-parser: 1.4.1 + comment-parser: 1.4.5 debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 9.39.2(jiti@2.6.1) - espree: 11.0.0 + espree: 11.1.0 esquery: 1.7.0 html-entities: 2.6.0 object-deep-merge: 2.0.0 @@ -3996,27 +4034,27 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-perfectionist@5.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@5.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-sonarjs@3.0.5(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-sonarjs@3.0.6(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@eslint-community/regexpp': 4.12.1 + '@eslint-community/regexpp': 4.12.2 builtin-modules: 3.3.0 bytes: 3.1.2 eslint: 9.39.2(jiti@2.6.1) functional-red-black-tree: 1.0.1 jsx-ast-utils-x: 0.1.0 lodash.merge: 4.6.2 - minimatch: 9.0.5 + minimatch: 10.1.1 scslre: 0.3.0 - semver: 7.7.2 + semver: 7.7.3 typescript: 5.9.3 eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)): @@ -4099,7 +4137,7 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.15.0) eslint-visitor-keys: 4.2.1 - espree@11.0.0: + espree@11.1.0: dependencies: acorn: 8.15.0 acorn-jsx: 5.3.2(acorn@8.15.0) @@ -4336,7 +4374,7 @@ snapshots: dependencies: argparse: 2.0.1 - jsdoc-type-pratt-parser@7.0.0: {} + jsdoc-type-pratt-parser@7.1.0: {} jsesc@3.1.0: {} @@ -4584,7 +4622,7 @@ snapshots: prettier@2.8.8: {} - prettier@3.7.4: {} + prettier@3.8.1: {} punycode.js@2.3.1: {} @@ -4642,40 +4680,40 @@ snapshots: rfdc@1.4.1: {} - rolldown-plugin-dts@0.20.0(rolldown@1.0.0-beta.59)(typescript@5.9.3): + rolldown-plugin-dts@0.21.7(rolldown@1.0.0-rc.1)(typescript@5.9.3): dependencies: - '@babel/generator': 7.28.5 - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 - ast-kit: 2.2.0 + '@babel/generator': 8.0.0-beta.4 + '@babel/parser': 8.0.0-beta.4 + '@babel/types': 8.0.0-beta.4 + ast-kit: 3.0.0-beta.1 birpc: 4.0.0 dts-resolver: 2.1.3 get-tsconfig: 4.13.0 obug: 2.1.1 - rolldown: 1.0.0-beta.59 + rolldown: 1.0.0-rc.1 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - oxc-resolver - rolldown@1.0.0-beta.59: + rolldown@1.0.0-rc.1: dependencies: - '@oxc-project/types': 0.107.0 - '@rolldown/pluginutils': 1.0.0-beta.59 + '@oxc-project/types': 0.110.0 + '@rolldown/pluginutils': 1.0.0-rc.1 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.59 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.59 - '@rolldown/binding-darwin-x64': 1.0.0-beta.59 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.59 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.59 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.59 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.59 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.59 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.59 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.59 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.59 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.59 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.59 + '@rolldown/binding-android-arm64': 1.0.0-rc.1 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.1 + '@rolldown/binding-darwin-x64': 1.0.0-rc.1 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.1 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.1 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.1 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.1 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.1 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.1 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.1 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.1 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.1 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.1 rollup@4.53.3: dependencies: @@ -4717,8 +4755,6 @@ snapshots: refa: 0.12.1 regexp-ast-analysis: 0.7.1 - semver@7.7.2: {} - semver@7.7.3: {} shebang-command@2.0.0: @@ -4950,11 +4986,11 @@ snapshots: tslib: 2.8.1 tsutils: 3.21.0(typescript@5.9.3) typescript: 5.9.3 - zod: 4.3.5 + zod: 4.3.6 transitivePeerDependencies: - supports-color - tsdown@0.19.0(typescript@5.9.3): + tsdown@0.20.1(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -4964,14 +5000,14 @@ snapshots: import-without-cache: 0.2.5 obug: 2.1.1 picomatch: 4.0.3 - rolldown: 1.0.0-beta.59 - rolldown-plugin-dts: 0.20.0(rolldown@1.0.0-beta.59)(typescript@5.9.3) + rolldown: 1.0.0-rc.1 + rolldown-plugin-dts: 0.21.7(rolldown@1.0.0-rc.1)(typescript@5.9.3) semver: 7.7.3 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.4.2 - unrun: 0.2.24 + unrun: 0.2.26 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -4997,32 +5033,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.7.4: + turbo-darwin-64@2.7.6: optional: true - turbo-darwin-arm64@2.7.4: + turbo-darwin-arm64@2.7.6: optional: true - turbo-linux-64@2.7.4: + turbo-linux-64@2.7.6: optional: true - turbo-linux-arm64@2.7.4: + turbo-linux-arm64@2.7.6: optional: true - turbo-windows-64@2.7.4: + turbo-windows-64@2.7.6: optional: true - turbo-windows-arm64@2.7.4: + turbo-windows-arm64@2.7.6: optional: true - turbo@2.7.4: + turbo@2.7.6: optionalDependencies: - turbo-darwin-64: 2.7.4 - turbo-darwin-arm64: 2.7.4 - turbo-linux-64: 2.7.4 - turbo-linux-arm64: 2.7.4 - turbo-windows-64: 2.7.4 - turbo-windows-arm64: 2.7.4 + turbo-darwin-64: 2.7.6 + turbo-darwin-arm64: 2.7.6 + turbo-linux-64: 2.7.6 + turbo-linux-arm64: 2.7.6 + turbo-windows-64: 2.7.6 + turbo-windows-arm64: 2.7.6 type-check@0.4.0: dependencies: @@ -5043,12 +5079,12 @@ snapshots: typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.53.0(@typescript-eslint/parser@8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -5091,9 +5127,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - unrun@0.2.24: + unrun@0.2.26: dependencies: - rolldown: 1.0.0-beta.59 + rolldown: 1.0.0-rc.1 update-browserslist-db@1.2.2(browserslist@4.28.1): dependencies: @@ -5105,7 +5141,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -5114,21 +5150,21 @@ snapshots: rollup: 4.53.3 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 24.10.7 + '@types/node': 24.10.9 fsevents: 2.3.3 jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.17(@types/node@24.10.7)(@vitest/ui@4.0.17)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: - '@vitest/expect': 4.0.17 - '@vitest/mocker': 4.0.17(vite@7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) - '@vitest/pretty-format': 4.0.17 - '@vitest/runner': 4.0.17 - '@vitest/snapshot': 4.0.17 - '@vitest/spy': 4.0.17 - '@vitest/utils': 4.0.17 + '@vitest/expect': 4.0.18 + '@vitest/mocker': 4.0.18(vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/pretty-format': 4.0.18 + '@vitest/runner': 4.0.18 + '@vitest/snapshot': 4.0.18 + '@vitest/spy': 4.0.18 + '@vitest/utils': 4.0.18 es-module-lexer: 1.7.0 expect-type: 1.2.2 magic-string: 0.30.21 @@ -5140,11 +5176,11 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.7)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.10.7 - '@vitest/ui': 4.0.17(vitest@4.0.17) + '@types/node': 24.10.9 + '@vitest/ui': 4.0.18(vitest@4.0.18) transitivePeerDependencies: - jiti - less @@ -5195,4 +5231,4 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.3.5: {} + zod@4.3.6: {} From a9ce7345679765f784782a1ea13f8e39ac4784df Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:33:33 +0100 Subject: [PATCH 29/52] [Client] Fix lint issues in tests --- packages/client/src/tests/client.test.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/client/src/tests/client.test.ts b/packages/client/src/tests/client.test.ts index 76b8bb8f..61df1c1c 100644 --- a/packages/client/src/tests/client.test.ts +++ b/packages/client/src/tests/client.test.ts @@ -90,7 +90,6 @@ describe.concurrent('client', async () => { expect(config.searchParams.locale).toBeDefined(); }); - // eslint-disable-next-line sonarjs/assertions-in-tests it("validateAccessToken should throw an error if the access token isn't valid", async ({ expect }) => { await expect(() => client.validateAccessToken({ token: undefined })).rejects.toThrow(); }); @@ -105,12 +104,10 @@ describe.concurrent('client', async () => { expect(sub).length.greaterThan(0); }); - // eslint-disable-next-line sonarjs/assertions-in-tests it("the client will throw an error when requesting resources that don't exist", async ({ expect }) => { await expect(() => client.sendRequest(wow.connectedRealm(9_999_999_999))).rejects.toThrow(); }); - // eslint-disable-next-line sonarjs/assertions-in-tests it('the client cannot be created without a client id and secret', async ({ expect }) => { await expect(() => //@ts-expect-error expect error when key is missing From 584aab0188077f2bee8075b3221681d5d7dd3c1f Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:33:51 +0100 Subject: [PATCH 30/52] [Project] Allow CI to generate oidc and publish with provenance --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d12bbfd..d3cf3ec5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: CI permissions: contents: write + id-token: write pull-requests: write on: @@ -72,4 +73,5 @@ jobs: publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_PROVENANCE: true NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 2902fab26491c54bdc38565838626d1fcd783882 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:34:56 +0100 Subject: [PATCH 31/52] [Client] Update ky to 1.14.3 --- .changeset/funny-snakes-see.md | 5 +++++ packages/client/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/funny-snakes-see.md diff --git a/.changeset/funny-snakes-see.md b/.changeset/funny-snakes-see.md new file mode 100644 index 00000000..403a28d4 --- /dev/null +++ b/.changeset/funny-snakes-see.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/client': patch +--- + +Update ky to 1.14.3 diff --git a/packages/client/package.json b/packages/client/package.json index de20d0f6..bbf0e1a0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -40,7 +40,7 @@ "hearthstone" ], "dependencies": { - "ky": "1.14.2" + "ky": "1.14.3" }, "peerDependencies": { "@blizzard-api/core": "2.1.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 377248f9..56b266dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: packages/client: dependencies: ky: - specifier: 1.14.2 - version: 1.14.2 + specifier: 1.14.3 + version: 1.14.3 devDependencies: '@blizzard-api/classic-wow': specifier: workspace:* @@ -1887,8 +1887,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - ky@1.14.2: - resolution: {integrity: sha512-q3RBbsO5A5zrPhB6CaCS8ZUv+NWCXv6JJT4Em0i264G9W0fdPB8YRfnnEi7Dm7X7omAkBIPojzYJ2D1oHTHqug==} + ky@1.14.3: + resolution: {integrity: sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw==} engines: {node: '>=18'} levn@0.4.1: @@ -4396,7 +4396,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - ky@1.14.2: {} + ky@1.14.3: {} levn@0.4.1: dependencies: From fb0f9717f11c110f9ef4dd4f356e4beb2334658c Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:35:19 +0100 Subject: [PATCH 32/52] [Project] Dedupe dependencies --- pnpm-lock.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56b266dc..58f73959 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1013,10 +1013,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.53.0': - resolution: {integrity: sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.54.0': resolution: {integrity: sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1370,10 +1366,6 @@ packages: resolution: {integrity: sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==} engines: {node: '>=20'} - comment-parser@1.4.1: - resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} - engines: {node: '>= 12.0.0'} - comment-parser@1.4.5: resolution: {integrity: sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==} engines: {node: '>= 12.0.0'} @@ -3525,8 +3517,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.53.0': {} - '@typescript-eslint/types@8.54.0': {} '@typescript-eslint/typescript-estree@8.54.0(typescript@5.9.3)': @@ -3844,8 +3834,6 @@ snapshots: commander@14.0.2: {} - comment-parser@1.4.1: {} - comment-parser@1.4.5: {} concat-map@0.0.1: {} @@ -3999,8 +3987,8 @@ snapshots: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - '@typescript-eslint/types': 8.53.0 - comment-parser: 1.4.1 + '@typescript-eslint/types': 8.54.0 + comment-parser: 1.4.5 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.2(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) From dc1fd78c00e896c48d59c1faa4dba0134735496a Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:35:50 +0100 Subject: [PATCH 33/52] [Project] Update dependencies --- package.json | 6 +- .../auction-house.integration.test.ts | 2 - pnpm-lock.yaml | 110 +++++++++--------- 3 files changed, 58 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 8396a4cf..6a43c87a 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ "@changesets/cli": "2.29.8", "@putstack/eslint-config-typescript": "4.14.0", "@putstack/prettier-config": "2.0.0", - "@types/node": "24.10.9", + "@types/node": "24.10.10", "@vitest/coverage-v8": "4.0.18", "@vitest/ui": "4.0.18", "eslint": "9.39.2", - "eslint-plugin-jsdoc": "62.4.1", + "eslint-plugin-jsdoc": "62.5.0", "husky": "9.1.7", "lint-staged": "16.2.7", "npm-run-all2": "8.0.4", @@ -44,7 +44,7 @@ "ts-to-zod": "5.1.0", "tsdown": "0.20.1", "tsx": "4.21.0", - "turbo": "2.7.6", + "turbo": "2.8.2", "typedoc": "0.28.16", "typedoc-github-theme": "0.3.1", "typescript": "5.9.3", diff --git a/packages/integration-tests/classic-wow/auction-house.integration.test.ts b/packages/integration-tests/classic-wow/auction-house.integration.test.ts index ac5bf150..8485ce4f 100644 --- a/packages/integration-tests/classic-wow/auction-house.integration.test.ts +++ b/packages/integration-tests/classic-wow/auction-house.integration.test.ts @@ -22,8 +22,6 @@ describe.skip('classic-wow auction house integration', () => { const realmIndexResponse = await client.sendRequest(classicWow.connectedRealmIndex('dynamic-classic1x')); const parsedRealmIndex = connectedRealmIndexResponseSchema.safeParse(realmIndexResponse); if (!parsedRealmIndex.success) { - // Log detailed zod errors to help debugging - console.error('Connected realm index validation failed:', treeifyError(parsedRealmIndex.error)); } expect(parsedRealmIndex.success).toBe(true); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 58f73959..1a69c1dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: devDependencies: '@changesets/cli': specifier: 2.29.8 - version: 2.29.8(@types/node@24.10.9) + version: 2.29.8(@types/node@24.10.10) '@putstack/eslint-config-typescript': specifier: 4.14.0 version: 4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) @@ -18,8 +18,8 @@ importers: specifier: 2.0.0 version: 2.0.0(prettier@3.8.1) '@types/node': - specifier: 24.10.9 - version: 24.10.9 + specifier: 24.10.10 + version: 24.10.10 '@vitest/coverage-v8': specifier: 4.0.18 version: 4.0.18(vitest@4.0.18) @@ -30,8 +30,8 @@ importers: specifier: 9.39.2 version: 9.39.2(jiti@2.6.1) eslint-plugin-jsdoc: - specifier: 62.4.1 - version: 62.4.1(eslint@9.39.2(jiti@2.6.1)) + specifier: 62.5.0 + version: 62.5.0(eslint@9.39.2(jiti@2.6.1)) husky: specifier: 9.1.7 version: 9.1.7 @@ -54,8 +54,8 @@ importers: specifier: 4.21.0 version: 4.21.0 turbo: - specifier: 2.7.6 - version: 2.7.6 + specifier: 2.8.2 + version: 2.8.2 typedoc: specifier: 0.28.16 version: 0.28.16(typescript@5.9.3) @@ -70,7 +70,7 @@ importers: version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: 4.0.18 - version: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + version: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) zod: specifier: 4.3.6 version: 4.3.6 @@ -969,8 +969,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.10.9': - resolution: {integrity: sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==} + '@types/node@24.10.10': + resolution: {integrity: sha512-+0/4J266CBGPUq/ELg7QUHhN25WYjE0wYTPSQJn1xeu8DOlIOPxXxrNGiLmfAWl7HMMgWFWXpt9IDjMWrF5Iow==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} @@ -1511,8 +1511,8 @@ packages: eslint-import-resolver-node: optional: true - eslint-plugin-jsdoc@62.4.1: - resolution: {integrity: sha512-HgX2iN4j104D/mCUqRbhtzSZbph+KO9jfMHiIJjJ19Q+IwLQ5Na2IqvOJYq4S+4kgvEk1w6KYF4vVus6H2wcHg==} + eslint-plugin-jsdoc@62.5.0: + resolution: {integrity: sha512-D+1haMVDzW/ZMoPwOnsbXCK07rJtsq98Z1v+ApvDKxSzYTTcPgmFc/nyUDCGmxm2cP7g7hszyjYHO7Zodl/43w==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -2510,38 +2510,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@2.7.6: - resolution: {integrity: sha512-bYu0qnWju2Ha3EbIkPCk1SMLT3sltKh1P/Jy5FER6BmH++H5z+T5MHh3W1Xoers9rk4N1VdKvog9FO1pxQyjhw==} + turbo-darwin-64@2.8.2: + resolution: {integrity: sha512-sumREbxABHxrWIwlK67sZEaDRE7+BFSU8gZj8OK+X7dLpgW1vTjsHzTECB5m2qzWlXHRdueAk8sKv7wyHqv9jw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.7.6: - resolution: {integrity: sha512-KCxTf3Y1hgNLYIWRLw8bwH8Zie9RyCGoxAlXYsCBI/YNqBSR+ZZK9KYzFxAqDaVaNvTwLFv3rJRGsXOFWg4+Uw==} + turbo-darwin-arm64@2.8.2: + resolution: {integrity: sha512-J3zoDkf+k9yozdJmdNUOc9YfIoFs01Zm+GgNyfY8pU6siMWlPlgdt+3ezbIMeOns6CAQUzUcqo9awowykAS9Vw==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.7.6: - resolution: {integrity: sha512-vjoU8zIfNgvJR3cMitgw7inEoi6bmuVuFawDl5yKtxjAEhDktFdRBpGS3WojD4l3BklBbIK689ssXcGf21LxRA==} + turbo-linux-64@2.8.2: + resolution: {integrity: sha512-iVYUM+tyNAPd34HhMSjYWi7OSXnxnDhPjFKVvzSb7cZmQS6GlDSr7MALc5Wt/zn6/7jm1FuS7c5Wffg9WD2e1Q==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.7.6: - resolution: {integrity: sha512-TcMpBvTqZf+1DptrVYLbZls7WY1UVNDTGaf0bo7/GCgWYv5eZHCVo4Td7kCJeDU4glbXg67REX0md0S0V6ghMg==} + turbo-linux-arm64@2.8.2: + resolution: {integrity: sha512-v7FJAHUhY2nSEE87mr5ZBO51GmsFKp0EmK2P6rO+vGimCPmnGlLNj1at/eVcnp/cHRDnJj8J+b3QHWdUzTPTkg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.7.6: - resolution: {integrity: sha512-1/MhkYldiihjneY8QnnDMbAkHXn/udTWSVYS94EMlkE9AShozsLTTOT1gDOpX06EfEW5njP09suhMvxbvwuwpQ==} + turbo-windows-64@2.8.2: + resolution: {integrity: sha512-d1X+U5JLhyAse0VXM0rpmu6iLbBTAvjwc7MX0PBkEaTz2aZQqOHBpQkkrxia7bZzRNbfXHbGSqY/vbE3GSFWzw==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.7.6: - resolution: {integrity: sha512-0wDVnUJLFAWm4ZzOQFDkbyyUqaszorTGf3Rdc22IRIyJTTLd6ajqdb+cWD89UZ1RKr953+PZR1gqgWQY4PDuhA==} + turbo-windows-arm64@2.8.2: + resolution: {integrity: sha512-fMln07/l/5kscs79V0kTwdf17gkZW+E2iyqnzz691gLM7Jf6la0afd3IMsNtLzUh+dxKIFCswNiFVmHe8g+2jA==} cpu: [arm64] os: [win32] - turbo@2.7.6: - resolution: {integrity: sha512-PO9AvJLEsNLO+EYhF4zB+v10hOjsJe5kJW+S6tTbRv+TW7gf1Qer4mfjP9h3/y9h8ZiPvOrenxnEgDtFgaM5zw==} + turbo@2.8.2: + resolution: {integrity: sha512-biW/S5hENCcJ5vxxJszCozEKcXtwGK29vxXzNbdfY/0q7QpYTCoyKdj0e8k/ADA6qkqaKDJwgrrHbC8Vy6wszg==} hasBin: true type-check@0.4.0: @@ -2802,7 +2802,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.8(@types/node@24.10.9)': + '@changesets/cli@2.29.8(@types/node@24.10.10)': dependencies: '@changesets/apply-release-plan': 7.0.14 '@changesets/assemble-release-plan': 6.0.9 @@ -2818,7 +2818,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@24.10.9) + '@inquirer/external-editor': 1.0.3(@types/node@24.10.10) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -3175,12 +3175,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.3(@types/node@24.10.9)': + '@inquirer/external-editor@1.0.3(@types/node@24.10.10)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.0 optionalDependencies: - '@types/node': 24.10.9 + '@types/node': 24.10.10 '@isaacs/balanced-match@4.0.1': {} @@ -3453,7 +3453,7 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@24.10.9': + '@types/node@24.10.10': dependencies: undici-types: 7.16.0 @@ -3628,7 +3628,7 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/expect@4.0.18': dependencies: @@ -3639,13 +3639,13 @@ snapshots: chai: 6.2.1 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.18(vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.18(vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 4.0.18 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/pretty-format@4.0.18': dependencies: @@ -3673,7 +3673,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/utils@4.0.18': dependencies: @@ -4002,7 +4002,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@62.4.1(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-jsdoc@62.5.0(eslint@9.39.2(jiti@2.6.1)): dependencies: '@es-joy/jsdoccomment': 0.83.0 '@es-joy/resolve.exports': 1.2.0 @@ -5021,32 +5021,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.7.6: + turbo-darwin-64@2.8.2: optional: true - turbo-darwin-arm64@2.7.6: + turbo-darwin-arm64@2.8.2: optional: true - turbo-linux-64@2.7.6: + turbo-linux-64@2.8.2: optional: true - turbo-linux-arm64@2.7.6: + turbo-linux-arm64@2.8.2: optional: true - turbo-windows-64@2.7.6: + turbo-windows-64@2.8.2: optional: true - turbo-windows-arm64@2.7.6: + turbo-windows-arm64@2.8.2: optional: true - turbo@2.7.6: + turbo@2.8.2: optionalDependencies: - turbo-darwin-64: 2.7.6 - turbo-darwin-arm64: 2.7.6 - turbo-linux-64: 2.7.6 - turbo-linux-arm64: 2.7.6 - turbo-windows-64: 2.7.6 - turbo-windows-arm64: 2.7.6 + turbo-darwin-64: 2.8.2 + turbo-darwin-arm64: 2.8.2 + turbo-linux-64: 2.8.2 + turbo-linux-arm64: 2.8.2 + turbo-windows-64: 2.8.2 + turbo-windows-arm64: 2.8.2 type-check@0.4.0: dependencies: @@ -5129,7 +5129,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -5138,16 +5138,16 @@ snapshots: rollup: 4.53.3 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 24.10.9 + '@types/node': 24.10.10 fsevents: 2.3.3 jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.18(@types/node@24.10.9)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: '@vitest/expect': 4.0.18 - '@vitest/mocker': 4.0.18(vite@7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 4.0.18(vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 4.0.18 '@vitest/runner': 4.0.18 '@vitest/snapshot': 4.0.18 @@ -5164,10 +5164,10 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.10.9 + '@types/node': 24.10.10 '@vitest/ui': 4.0.18(vitest@4.0.18) transitivePeerDependencies: - jiti From 104508b5556566043482f8b54930a7a6b62170c6 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:30:10 +0100 Subject: [PATCH 34/52] [Classic] Add integration tests for classic --- .../classic-wow/character-achievements.ts | 4 +- .../classic-wow/character-equipment.ts | 27 +++++++----- .../classic-wow/character-statistics.ts | 16 ++++---- generated/schemas/classic-wow/guild-crest.ts | 6 +-- .../src/character-achievements/types.ts | 4 +- .../src/character-equipment/types.ts | 22 +++++----- .../src/character-statistics/types.ts | 16 ++++---- packages/classic-wow/src/guild-crest/types.ts | 6 +-- .../auction-house.integration.test.ts | 2 +- ...character-achievements.integration.test.ts | 40 ++++++++++++++++++ .../character-equipment.integration.test.ts | 26 ++++++++++++ .../character-hunter-pets.integration.test.ts | 26 ++++++++++++ .../character-media.integration.test.ts | 26 ++++++++++++ .../character-profile.integration.test.ts | 29 +++++++++++++ ...aracter-specialization.integration.test.ts | 28 +++++++++++++ .../character-statistics.integration.test.ts | 26 ++++++++++++ .../connected-realm.integration.test.ts | 23 +++++++++++ .../classic-wow/creature.integration.test.ts | 41 +++++++++++++++++++ .../guild-crest.integration.test.ts | 23 +++++++++++ .../classic-wow/guild.integration.test.ts | 28 +++++++++++++ .../classic-wow/item.integration.test.ts | 23 +++++++++++ .../media-search.integration.test.ts | 31 ++++++++++++++ .../playable-class.integration.test.ts | 30 ++++++++++++++ .../playable-race.integration.test.ts | 23 +++++++++++ .../power-type.integration.test.ts | 23 +++++++++++ .../pvp-season.integration.test.ts | 23 +++++++++++ .../classic-wow/realm.integration.test.ts | 23 +++++++++++ .../classic-wow/region.integration.test.ts | 23 +++++++++++ 28 files changed, 571 insertions(+), 47 deletions(-) create mode 100644 packages/integration-tests/classic-wow/character-achievements.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-equipment.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-media.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-profile.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-specialization.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/character-statistics.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/connected-realm.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/creature.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/guild-crest.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/guild.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/item.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/media-search.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/playable-class.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/playable-race.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/power-type.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/pvp-season.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/realm.integration.test.ts create mode 100644 packages/integration-tests/classic-wow/region.integration.test.ts diff --git a/generated/schemas/classic-wow/character-achievements.ts b/generated/schemas/classic-wow/character-achievements.ts index 57edadb6..1f17cd83 100644 --- a/generated/schemas/classic-wow/character-achievements.ts +++ b/generated/schemas/classic-wow/character-achievements.ts @@ -36,8 +36,8 @@ const childCriterum3Schema = z.object({ const categorySchema = z.object({ id: z.number(), name: z.string(), - statistics: z.array(statisticSchema), - sub_categories: z.array(subCategorySchema), + statistics: z.array(statisticSchema).optional(), + sub_categories: z.array(subCategorySchema).optional(), }); const childCriterum2Schema = z.object({ diff --git a/generated/schemas/classic-wow/character-equipment.ts b/generated/schemas/classic-wow/character-equipment.ts index e57b2ab7..a5fdc3d1 100644 --- a/generated/schemas/classic-wow/character-equipment.ts +++ b/generated/schemas/classic-wow/character-equipment.ts @@ -32,7 +32,7 @@ const effectSchema = z.object({ const enchantmentSlotSchema = z.object({ id: z.number(), - type: z.string(), + type: z.string().optional(), }); const armorSchema = z.object({ @@ -41,10 +41,16 @@ const armorSchema = z.object({ }); const enchantmentSchema = z.object({ - display_string: z.string(), + display_string: z.string().optional(), enchantment_id: z.number(), enchantment_slot: enchantmentSlotSchema, source_item: nameIdKeySchema.optional(), + spell: z + .object({ + description: z.string(), + spell: nameIdKeySchema, + }) + .optional(), }); const modifiedCraftingStatSchema = z.object({ @@ -88,8 +94,9 @@ const transmogSchema = z.object({ item_modified_appearance_id: z.number(), }); -const itemElementSchema = nameIdKeySchema.extend({ +const itemElementSchema = z.object({ is_equipped: z.boolean().optional(), + item: nameIdKeySchema, }); const playableClassesSchema = z.object({ @@ -103,10 +110,10 @@ const requirementsSchema = z.object({ }); const setSchema = z.object({ - display_string: z.string(), - effects: z.array(effectSchema), - item_set: nameIdKeySchema, - items: z.array(itemElementSchema), + display_string: z.string().optional(), + effects: z.array(effectSchema).optional(), + item_set: nameIdKeySchema.optional(), + items: z.array(itemElementSchema).optional(), }); const damageSchema = z.object({ @@ -126,7 +133,7 @@ const equippedItemSchema = z.object({ armor: armorSchema.optional(), binding: nameTypeSchema, bonus_list: z.array(z.number()).optional(), - context: z.number(), + context: z.number().optional(), description: z.string().optional(), durability: displayStringValueSchema.optional(), enchantments: z.array(enchantmentSchema).optional(), @@ -139,7 +146,7 @@ const equippedItemSchema = z.object({ ), item_class: nameIdKeySchema, item_subclass: nameIdKeySchema, - level: displayStringValueSchema, + level: displayStringValueSchema.optional(), limit_category: z.string().optional(), media: keyBaseSchema.and( z.object({ @@ -149,7 +156,7 @@ const equippedItemSchema = z.object({ modified_appearance_id: z.number().optional(), modified_crafting_stat: z.array(modifiedCraftingStatSchema).optional(), name: z.string(), - name_description: nameDescriptionSchema, + name_description: nameDescriptionSchema.optional(), quality: nameTypeSchema, quantity: z.number(), requirements: requirementsSchema.optional(), diff --git a/generated/schemas/classic-wow/character-statistics.ts b/generated/schemas/classic-wow/character-statistics.ts index ab7639bf..323ff0ac 100644 --- a/generated/schemas/classic-wow/character-statistics.ts +++ b/generated/schemas/classic-wow/character-statistics.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { characterSchema, responseBaseSchema } from '../core'; +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const baseEffectiveStatSchema = z.object({ base: z.number(), @@ -8,14 +8,14 @@ const baseEffectiveStatSchema = z.object({ }); const ratingWithValueSchema = z.object({ - rating: z.number(), rating_bonus: z.number(), + rating_normalized: z.number(), value: z.number(), }); export const characterStatisticsSummaryResponseSchema = responseBaseSchema.extend({ agility: baseEffectiveStatSchema, - arcane_resistance: baseEffectiveStatSchema, + arcane_resistance: baseEffectiveStatSchema.optional(), armor: baseEffectiveStatSchema, attack_power: z.number(), block: ratingWithValueSchema, @@ -23,9 +23,9 @@ export const characterStatisticsSummaryResponseSchema = responseBaseSchema.exten character: characterSchema, defense: baseEffectiveStatSchema.optional(), dodge: ratingWithValueSchema, - fire_resistance: baseEffectiveStatSchema, + fire_resistance: baseEffectiveStatSchema.optional(), health: z.number(), - holy_resistance: baseEffectiveStatSchema, + holy_resistance: baseEffectiveStatSchema.optional(), intellect: baseEffectiveStatSchema, main_hand_damage_max: z.number(), main_hand_damage_min: z.number(), @@ -36,17 +36,17 @@ export const characterStatisticsSummaryResponseSchema = responseBaseSchema.exten mastery: ratingWithValueSchema.optional(), melee_crit: ratingWithValueSchema, melee_haste: ratingWithValueSchema.optional(), - nature_resistance: baseEffectiveStatSchema, + nature_resistance: baseEffectiveStatSchema.optional(), off_hand_damage_max: z.number(), off_hand_damage_min: z.number(), off_hand_dps: z.number(), off_hand_speed: z.number(), parry: ratingWithValueSchema, power: z.number(), - power_type: characterSchema, + power_type: nameIdKeySchema, ranged_crit: ratingWithValueSchema, ranged_haste: ratingWithValueSchema.optional(), - shadow_resistance: baseEffectiveStatSchema, + shadow_resistance: baseEffectiveStatSchema.optional(), spell_crit: ratingWithValueSchema, spell_haste: ratingWithValueSchema.optional(), spell_penetration: z.number(), diff --git a/generated/schemas/classic-wow/guild-crest.ts b/generated/schemas/classic-wow/guild-crest.ts index 60d57683..c916ab55 100644 --- a/generated/schemas/classic-wow/guild-crest.ts +++ b/generated/schemas/classic-wow/guild-crest.ts @@ -17,9 +17,9 @@ const mediaSchema = keyBaseSchema.extend({ }); const colorsSchema = z.object({ - backgrounds: z.array(backgroundSchema), - borders: z.array(backgroundSchema), - emblems: z.array(backgroundSchema), + backgrounds: z.array(backgroundSchema).optional(), + borders: z.array(backgroundSchema).optional(), + emblems: z.array(backgroundSchema).optional(), }); export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ diff --git a/packages/classic-wow/src/character-achievements/types.ts b/packages/classic-wow/src/character-achievements/types.ts index d0d6f270..a7fd3035 100644 --- a/packages/classic-wow/src/character-achievements/types.ts +++ b/packages/classic-wow/src/character-achievements/types.ts @@ -24,8 +24,8 @@ interface Achievement { interface Category { id: number; name: string; - statistics: Array; - sub_categories: Array; + statistics?: Array; + sub_categories?: Array; } interface CategoryProgress { diff --git a/packages/classic-wow/src/character-equipment/types.ts b/packages/classic-wow/src/character-equipment/types.ts index 3415d941..70ab649d 100644 --- a/packages/classic-wow/src/character-equipment/types.ts +++ b/packages/classic-wow/src/character-equipment/types.ts @@ -37,22 +37,23 @@ interface Effect { } interface Enchantment { - display_string: string; + display_string?: string; enchantment_id: number; enchantment_slot: EnchantmentSlot; source_item?: NameIdKey; + spell?: { description: string; spell: NameIdKey }; } interface EnchantmentSlot { id: number; - type: string; + type?: string; } interface EquippedItem { armor?: Armor; binding: NameType; bonus_list?: Array; - context: number; + context?: number; description?: string; durability?: DisplayStringValue; enchantments?: Array; @@ -61,13 +62,13 @@ interface EquippedItem { item: KeyBase & { id: number }; item_class: NameIdKey; item_subclass: NameIdKey; - level: DisplayStringValue; + level?: DisplayStringValue; limit_category?: string; media: KeyBase & { id: number }; modified_appearance_id?: number; modified_crafting_stat?: Array; name: string; - name_description: NameDescription; + name_description?: NameDescription; quality: NameType; quantity: number; requirements?: Requirements; @@ -82,8 +83,9 @@ interface EquippedItem { weapon?: Weapon; } -interface ItemElement extends NameIdKey { +interface ItemElement { is_equipped?: boolean; + item: NameIdKey; } interface ModifiedCraftingStat { @@ -118,10 +120,10 @@ interface SellPrice { } interface Set { - display_string: string; - effects: Array; - item_set: NameIdKey; - items: Array; + display_string?: string; + effects?: Array; + item_set?: NameIdKey; + items?: Array; } interface Socket { diff --git a/packages/classic-wow/src/character-statistics/types.ts b/packages/classic-wow/src/character-statistics/types.ts index f5a51a0c..c8bba801 100644 --- a/packages/classic-wow/src/character-statistics/types.ts +++ b/packages/classic-wow/src/character-statistics/types.ts @@ -1,8 +1,8 @@ -import type { Character, ResponseBase } from '@blizzard-api/core'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterStatisticsSummaryResponse extends ResponseBase { agility: BaseEffectiveStat; - arcane_resistance: BaseEffectiveStat; + arcane_resistance?: BaseEffectiveStat; armor: BaseEffectiveStat; attack_power: number; block: RatingWithValue; @@ -10,9 +10,9 @@ export interface CharacterStatisticsSummaryResponse extends ResponseBase { character: Character; defense?: BaseEffectiveStat; dodge: RatingWithValue; - fire_resistance: BaseEffectiveStat; + fire_resistance?: BaseEffectiveStat; health: number; - holy_resistance: BaseEffectiveStat; + holy_resistance?: BaseEffectiveStat; intellect: BaseEffectiveStat; main_hand_damage_max: number; main_hand_damage_min: number; @@ -23,17 +23,17 @@ export interface CharacterStatisticsSummaryResponse extends ResponseBase { mastery?: RatingWithValue; melee_crit: RatingWithValue; melee_haste?: RatingWithValue; - nature_resistance: BaseEffectiveStat; + nature_resistance?: BaseEffectiveStat; off_hand_damage_max: number; off_hand_damage_min: number; off_hand_dps: number; off_hand_speed: number; parry: RatingWithValue; power: number; - power_type: Character; + power_type: NameIdKey; ranged_crit: RatingWithValue; ranged_haste?: RatingWithValue; - shadow_resistance: BaseEffectiveStat; + shadow_resistance?: BaseEffectiveStat; spell_crit: RatingWithValue; spell_haste?: RatingWithValue; spell_penetration: number; @@ -49,7 +49,7 @@ interface BaseEffectiveStat { } interface RatingWithValue { - rating: number; rating_bonus: number; + rating_normalized: number; value: number; } diff --git a/packages/classic-wow/src/guild-crest/types.ts b/packages/classic-wow/src/guild-crest/types.ts index 6a1c8274..227598d7 100644 --- a/packages/classic-wow/src/guild-crest/types.ts +++ b/packages/classic-wow/src/guild-crest/types.ts @@ -30,9 +30,9 @@ interface Border { } interface Colors { - backgrounds: Array; - borders: Array; - emblems: Array; + backgrounds?: Array; + borders?: Array; + emblems?: Array; } interface GuildCrestAsset { diff --git a/packages/integration-tests/classic-wow/auction-house.integration.test.ts b/packages/integration-tests/classic-wow/auction-house.integration.test.ts index 8485ce4f..8f4645c6 100644 --- a/packages/integration-tests/classic-wow/auction-house.integration.test.ts +++ b/packages/integration-tests/classic-wow/auction-house.integration.test.ts @@ -9,7 +9,7 @@ import { connectedRealmIndexResponseSchema, } from '../../../generated/schemas/classic-wow'; -//The auction house API is known to be flaky, so these tests are skipped by default. +//The auction house API is known to be flaky; skip by default. describe.skip('classic-wow auction house integration', () => { it('fetches index and validates responses with generated schemas', async ({ expect }) => { const client = await createBlizzardApiClient({ diff --git a/packages/integration-tests/classic-wow/character-achievements.integration.test.ts b/packages/integration-tests/classic-wow/character-achievements.integration.test.ts new file mode 100644 index 00000000..d4ccc4b7 --- /dev/null +++ b/packages/integration-tests/classic-wow/character-achievements.integration.test.ts @@ -0,0 +1,40 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + characterAchievementsSummaryResponseSchema, + characterAchievementStatisticsResponseSchema, +} from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character achievements integration', () => { + it('fetches achievements summary and statistics for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const summary = await client.sendRequest( + classicWow.characterAchievementsSummary('profile-classic', realm, character), + ); + const parsedSummary = characterAchievementsSummaryResponseSchema.safeParse(summary); + if (!parsedSummary.success) { + console.error('Character achievements summary validation failed:', treeifyError(parsedSummary.error)); + } + expect(parsedSummary.success).toBe(true); + + const stats = await client.sendRequest( + classicWow.characterAchievementStatistics('profile-classic', realm, character), + ); + const parsedStats = characterAchievementStatisticsResponseSchema.safeParse(stats); + if (!parsedStats.success) { + console.error('Character achievement statistics validation failed:', treeifyError(parsedStats.error)); + } + expect(parsedStats.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-equipment.integration.test.ts b/packages/integration-tests/classic-wow/character-equipment.integration.test.ts new file mode 100644 index 00000000..58b452fb --- /dev/null +++ b/packages/integration-tests/classic-wow/character-equipment.integration.test.ts @@ -0,0 +1,26 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterEquipmentSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character equipment integration', () => { + it('fetches equipment summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest(classicWow.characterEquipmentSummary('profile-classic', realm, character)); + const parsed = characterEquipmentSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character equipment summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts new file mode 100644 index 00000000..4c603074 --- /dev/null +++ b/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts @@ -0,0 +1,26 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterHunterPetsSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character hunter pets integration', () => { + it('fetches hunter pets summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest(classicWow.characterHunterPetsSummary('profile-classic', realm, character)); + const parsed = characterHunterPetsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character hunter pets summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-media.integration.test.ts b/packages/integration-tests/classic-wow/character-media.integration.test.ts new file mode 100644 index 00000000..c56f9906 --- /dev/null +++ b/packages/integration-tests/classic-wow/character-media.integration.test.ts @@ -0,0 +1,26 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterMediaSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character media integration', () => { + it('fetches media summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest(classicWow.characterMediaSummary('profile-classic', realm, character)); + const parsed = characterMediaSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character media summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-profile.integration.test.ts b/packages/integration-tests/classic-wow/character-profile.integration.test.ts new file mode 100644 index 00000000..df1ae450 --- /dev/null +++ b/packages/integration-tests/classic-wow/character-profile.integration.test.ts @@ -0,0 +1,29 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterProfileSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character profile integration', () => { + it('fetches profile summary and uses guild info when available', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest(classicWow.characterProfileSummary('profile-classic', realm, character)); + const parsed = characterProfileSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character profile summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + // If the character has a guild, return it to be used by guild tests. + return resp; + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-specialization.integration.test.ts b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts new file mode 100644 index 00000000..88c55cfc --- /dev/null +++ b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts @@ -0,0 +1,28 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterSpecializationsSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character specialization integration', () => { + it('fetches specialization summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest( + classicWow.characterSpecializationsSummary('profile-classic', realm, character), + ); + const parsed = characterSpecializationsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character specialization summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/character-statistics.integration.test.ts b/packages/integration-tests/classic-wow/character-statistics.integration.test.ts new file mode 100644 index 00000000..017679cb --- /dev/null +++ b/packages/integration-tests/classic-wow/character-statistics.integration.test.ts @@ -0,0 +1,26 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterStatisticsSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow character statistics integration', () => { + it('fetches statistics summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const character = 'putro'; + + const resp = await client.sendRequest(classicWow.characterStatisticsSummary('profile-classic', realm, character)); + const parsed = characterStatisticsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character statistics summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/connected-realm.integration.test.ts b/packages/integration-tests/classic-wow/connected-realm.integration.test.ts new file mode 100644 index 00000000..88ab7165 --- /dev/null +++ b/packages/integration-tests/classic-wow/connected-realm.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { connectedRealmIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow connected realm integration', () => { + it('validates connected realm index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.connectedRealmIndex('dynamic-classic1x')); + const parsed = connectedRealmIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Connected realm index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/creature.integration.test.ts b/packages/integration-tests/classic-wow/creature.integration.test.ts new file mode 100644 index 00000000..5d26408a --- /dev/null +++ b/packages/integration-tests/classic-wow/creature.integration.test.ts @@ -0,0 +1,41 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + creatureFamilyIndexResponseSchema, + creatureTypeIndexResponseSchema, +} from '../../../generated/schemas/classic-wow'; + +describe('classic-wow creature integration', () => { + it('validates creature family index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.creatureFamilyIndex('static-classic1x')); + const parsed = creatureFamilyIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature family index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); + + it('validates creature type index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.creatureTypeIndex('static-classic1x')); + const parsed = creatureTypeIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature type index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/guild-crest.integration.test.ts b/packages/integration-tests/classic-wow/guild-crest.integration.test.ts new file mode 100644 index 00000000..d704f09e --- /dev/null +++ b/packages/integration-tests/classic-wow/guild-crest.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { guildCrestComponentsIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow guild crest integration', () => { + it('validates guild crest components index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.guildCrestComponentsIndex('static-classic1x')); + const parsed = guildCrestComponentsIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Guild crest components index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/guild.integration.test.ts b/packages/integration-tests/classic-wow/guild.integration.test.ts new file mode 100644 index 00000000..31e390b1 --- /dev/null +++ b/packages/integration-tests/classic-wow/guild.integration.test.ts @@ -0,0 +1,28 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('classic-wow guild integration', () => { + it('fetches guild endpoints for raid-drømmen on shekzeer', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'shekzeer'; + const guildSlug = 'raid-drømmen'; + + const guildResp = await client.sendRequest(classicWow.guild('profile-classic', realm, guildSlug)); + expect(guildResp).toBeDefined(); + + const achievementsResp = await client.sendRequest( + classicWow.guildAchievements('profile-classic', realm, guildSlug), + ); + expect(achievementsResp).toBeDefined(); + + const rosterResp = await client.sendRequest(classicWow.guildRoster('profile-classic', realm, guildSlug)); + expect(rosterResp).toBeDefined(); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/item.integration.test.ts b/packages/integration-tests/classic-wow/item.integration.test.ts new file mode 100644 index 00000000..6fa2dcc9 --- /dev/null +++ b/packages/integration-tests/classic-wow/item.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { itemClassIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow item integration', () => { + it('validates item class index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.itemClassIndex('static-classic1x')); + const parsed = itemClassIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Item class index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/media-search.integration.test.ts b/packages/integration-tests/classic-wow/media-search.integration.test.ts new file mode 100644 index 00000000..a6396b81 --- /dev/null +++ b/packages/integration-tests/classic-wow/media-search.integration.test.ts @@ -0,0 +1,31 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { mediaSearchResponseItemSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow media search integration', () => { + it('performs a media search and validates items', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + // Use a minimal search (skipped by default; may require tuning) + const resp = await client.sendRequest(classicWow.mediaSearch('static-classic1x', { _page: 1 })); + // `resp` is a SearchResponse; validate first item if present + const first = Array.isArray(resp.results) ? resp.results[0] : undefined; + if (first) { + const parsed = mediaSearchResponseItemSchema.safeParse(first); + if (!parsed.success) { + console.error('Media search item validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } else { + // No results is acceptable for a generic search; assert shape + expect(resp).toBeDefined(); + } + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/playable-class.integration.test.ts b/packages/integration-tests/classic-wow/playable-class.integration.test.ts new file mode 100644 index 00000000..6e9be40f --- /dev/null +++ b/packages/integration-tests/classic-wow/playable-class.integration.test.ts @@ -0,0 +1,30 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { playableClassResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow playable class integration', () => { + it('fetches playable class and media by id', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + // Use a well-known class id (1 = Warrior) + const classId = 1; + + const resp = await client.sendRequest(classicWow.playableClass('static-classic1x', classId)); + const parsed = playableClassResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable class validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic1x', classId)); + // Media response shape isn't fully typed here; assert defined + expect(mediaResp).toBeDefined(); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/playable-race.integration.test.ts b/packages/integration-tests/classic-wow/playable-race.integration.test.ts new file mode 100644 index 00000000..a61946f9 --- /dev/null +++ b/packages/integration-tests/classic-wow/playable-race.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { playableRaceIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow playable race integration', () => { + it('validates playable race index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.playableRaceIndex('static-classic1x')); + const parsed = playableRaceIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable race index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/power-type.integration.test.ts b/packages/integration-tests/classic-wow/power-type.integration.test.ts new file mode 100644 index 00000000..c2450991 --- /dev/null +++ b/packages/integration-tests/classic-wow/power-type.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { powerTypeIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow power type integration', () => { + it('validates power type index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.powerTypeIndex('static-classic1x')); + const parsed = powerTypeIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Power type index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/pvp-season.integration.test.ts b/packages/integration-tests/classic-wow/pvp-season.integration.test.ts new file mode 100644 index 00000000..21f4a172 --- /dev/null +++ b/packages/integration-tests/classic-wow/pvp-season.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { pvpSeasonIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow pvp season integration', () => { + it('validates pvp season index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.pvpSeasonIndex('dynamic-classic')); + const parsed = pvpSeasonIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('PvP season index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/realm.integration.test.ts b/packages/integration-tests/classic-wow/realm.integration.test.ts new file mode 100644 index 00000000..9d0a7479 --- /dev/null +++ b/packages/integration-tests/classic-wow/realm.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { realmIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow realm integration', () => { + it('validates realm index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.realmIndex('dynamic-classic1x')); + const parsed = realmIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Realm index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/classic-wow/region.integration.test.ts b/packages/integration-tests/classic-wow/region.integration.test.ts new file mode 100644 index 00000000..21425888 --- /dev/null +++ b/packages/integration-tests/classic-wow/region.integration.test.ts @@ -0,0 +1,23 @@ +import * as classicWow from '@blizzard-api/classic-wow'; +import { createBlizzardApiClient } from '@blizzard-api/client'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { regionIndexResponseSchema } from '../../../generated/schemas/classic-wow'; + +describe('classic-wow region integration', () => { + it('validates region index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.regionIndex('dynamic-classic1x')); + const parsed = regionIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Region index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); From e56b7b29d7881d197ea3a3de90f09807e4482c3b Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:44:14 +0100 Subject: [PATCH 35/52] [WoW] Initial addition of integration tests for retail --- .../wow/achievements.integration.test.ts | 33 ++++++++++ .../wow/auction-house.integration.test.ts | 28 +++++++++ .../wow/azerite-essence.integration.test.ts | 18 ++++++ ...character-achievements.integration.test.ts | 20 ++++++ .../character-appearance.integration.test.ts | 18 ++++++ .../character-collections.integration.test.ts | 20 ++++++ .../character-encounters.integration.test.ts | 18 ++++++ .../character-equipment.integration.test.ts | 26 ++++++++ .../character-hunter-pets.integration.test.ts | 18 ++++++ .../wow/character-media.integration.test.ts | 26 ++++++++ ...ythic-keystone-profile.integration.test.ts | 18 ++++++ .../character-professions.integration.test.ts | 18 ++++++ .../wow/character-profile.integration.test.ts | 20 ++++++ .../wow/character-pvp.integration.test.ts | 18 ++++++ .../wow/character-quests.integration.test.ts | 18 ++++++ .../character-reputations.integration.test.ts | 18 ++++++ .../character-soulbinds.integration.test.ts | 18 ++++++ ...racter-specializations.integration.test.ts | 18 ++++++ .../character-statistics.integration.test.ts | 26 ++++++++ .../wow/character-titles.integration.test.ts | 18 ++++++ .../wow/connected-realm.integration.test.ts | 23 +++++++ .../wow/covenant.integration.test.ts | 18 ++++++ .../wow/creature.integration.test.ts | 62 +++++++++++++++++++ .../wow/guild-crest.integration.test.ts | 23 +++++++ .../wow/guild.integration.test.ts | 26 ++++++++ .../wow/heirloom.integration.test.ts | 16 +++++ .../wow/item.integration.test.ts | 33 ++++++++++ .../wow/journal.integration.test.ts | 18 ++++++ .../wow/media-search.integration.test.ts | 28 +++++++++ .../wow/modified-crafting.integration.test.ts | 16 +++++ .../wow/mount.integration.test.ts | 16 +++++ .../wow/pet.integration.test.ts | 16 +++++ .../wow/playable-class.integration.test.ts | 36 +++++++++++ .../wow/playable-race.integration.test.ts | 23 +++++++ ...layable-specialization.integration.test.ts | 16 +++++ .../wow/power-type.integration.test.ts | 23 +++++++ .../wow/profession.integration.test.ts | 18 ++++++ .../wow/pvp-season.integration.test.ts | 23 +++++++ .../wow/pvp.integration.test.ts | 18 ++++++ .../wow/quest.integration.test.ts | 18 ++++++ .../wow/realm.integration.test.ts | 23 +++++++ .../wow/region.integration.test.ts | 23 +++++++ .../wow/spell.integration.test.ts | 18 ++++++ .../wow/title.integration.test.ts | 16 +++++ .../wow/toy.integration.test.ts | 16 +++++ .../wow/wow-token.integration.test.ts | 16 +++++ 46 files changed, 997 insertions(+) create mode 100644 packages/integration-tests/wow/achievements.integration.test.ts create mode 100644 packages/integration-tests/wow/auction-house.integration.test.ts create mode 100644 packages/integration-tests/wow/azerite-essence.integration.test.ts create mode 100644 packages/integration-tests/wow/character-achievements.integration.test.ts create mode 100644 packages/integration-tests/wow/character-appearance.integration.test.ts create mode 100644 packages/integration-tests/wow/character-collections.integration.test.ts create mode 100644 packages/integration-tests/wow/character-encounters.integration.test.ts create mode 100644 packages/integration-tests/wow/character-equipment.integration.test.ts create mode 100644 packages/integration-tests/wow/character-hunter-pets.integration.test.ts create mode 100644 packages/integration-tests/wow/character-media.integration.test.ts create mode 100644 packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts create mode 100644 packages/integration-tests/wow/character-professions.integration.test.ts create mode 100644 packages/integration-tests/wow/character-profile.integration.test.ts create mode 100644 packages/integration-tests/wow/character-pvp.integration.test.ts create mode 100644 packages/integration-tests/wow/character-quests.integration.test.ts create mode 100644 packages/integration-tests/wow/character-reputations.integration.test.ts create mode 100644 packages/integration-tests/wow/character-soulbinds.integration.test.ts create mode 100644 packages/integration-tests/wow/character-specializations.integration.test.ts create mode 100644 packages/integration-tests/wow/character-statistics.integration.test.ts create mode 100644 packages/integration-tests/wow/character-titles.integration.test.ts create mode 100644 packages/integration-tests/wow/connected-realm.integration.test.ts create mode 100644 packages/integration-tests/wow/covenant.integration.test.ts create mode 100644 packages/integration-tests/wow/creature.integration.test.ts create mode 100644 packages/integration-tests/wow/guild-crest.integration.test.ts create mode 100644 packages/integration-tests/wow/guild.integration.test.ts create mode 100644 packages/integration-tests/wow/heirloom.integration.test.ts create mode 100644 packages/integration-tests/wow/item.integration.test.ts create mode 100644 packages/integration-tests/wow/journal.integration.test.ts create mode 100644 packages/integration-tests/wow/media-search.integration.test.ts create mode 100644 packages/integration-tests/wow/modified-crafting.integration.test.ts create mode 100644 packages/integration-tests/wow/mount.integration.test.ts create mode 100644 packages/integration-tests/wow/pet.integration.test.ts create mode 100644 packages/integration-tests/wow/playable-class.integration.test.ts create mode 100644 packages/integration-tests/wow/playable-race.integration.test.ts create mode 100644 packages/integration-tests/wow/playable-specialization.integration.test.ts create mode 100644 packages/integration-tests/wow/power-type.integration.test.ts create mode 100644 packages/integration-tests/wow/profession.integration.test.ts create mode 100644 packages/integration-tests/wow/pvp-season.integration.test.ts create mode 100644 packages/integration-tests/wow/pvp.integration.test.ts create mode 100644 packages/integration-tests/wow/quest.integration.test.ts create mode 100644 packages/integration-tests/wow/realm.integration.test.ts create mode 100644 packages/integration-tests/wow/region.integration.test.ts create mode 100644 packages/integration-tests/wow/spell.integration.test.ts create mode 100644 packages/integration-tests/wow/title.integration.test.ts create mode 100644 packages/integration-tests/wow/toy.integration.test.ts create mode 100644 packages/integration-tests/wow/wow-token.integration.test.ts diff --git a/packages/integration-tests/wow/achievements.integration.test.ts b/packages/integration-tests/wow/achievements.integration.test.ts new file mode 100644 index 00000000..884f0f27 --- /dev/null +++ b/packages/integration-tests/wow/achievements.integration.test.ts @@ -0,0 +1,33 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { achievementIndexResponseSchema, achievementResponseSchema } from '../../../generated/schemas/wow/achievements'; + +describe('wow achievements integration', () => { + it('fetches achievement indices and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.achievementIndex()); + const parsed = achievementIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Achievement index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + // call a single achievement by id from the index + const first = parsed.success ? parsed.data.achievements[0] : undefined; + if (first) { + const ach = await client.sendRequest(wow.achievement(first.id)); + const parsedAch = achievementResponseSchema.safeParse(ach); + if (!parsedAch.success) { + console.error('Achievement detail validation failed:', treeifyError(parsedAch.error)); + } + expect(parsedAch.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/auction-house.integration.test.ts b/packages/integration-tests/wow/auction-house.integration.test.ts new file mode 100644 index 00000000..e1548540 --- /dev/null +++ b/packages/integration-tests/wow/auction-house.integration.test.ts @@ -0,0 +1,28 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow auction-house integration', () => { + it('fetches auctions and commodities index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const realms = await client.sendRequest(wow.connectedRealmIndex()); + const firstConnectedRealm = realms.connected_realms.find((cr) => cr.href); + if (!firstConnectedRealm) { + throw new Error('No connected realms found for testing auction house'); + } + const realmId = firstConnectedRealm.href.split('/').at(-1)?.split('?')[0]; + if (!realmId) { + throw new Error('No realm ID found for testing auction house'); + } + const auctions = await client.sendRequest(wow.auctions(Number.parseInt(realmId))); + expect(auctions).toBeTruthy(); + const commodities = await client.sendRequest(wow.commodities()); + expect(commodities).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/azerite-essence.integration.test.ts b/packages/integration-tests/wow/azerite-essence.integration.test.ts new file mode 100644 index 00000000..25580cb6 --- /dev/null +++ b/packages/integration-tests/wow/azerite-essence.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow azerite-essence integration', () => { + it('fetches azerite essence index and search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.azeriteEssenceIndex()); + expect(index).toBeTruthy(); + const search = await client.sendRequest(wow.azeriteEssenceSearch({ _page: 1 })); + expect(search).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-achievements.integration.test.ts b/packages/integration-tests/wow/character-achievements.integration.test.ts new file mode 100644 index 00000000..2ed78851 --- /dev/null +++ b/packages/integration-tests/wow/character-achievements.integration.test.ts @@ -0,0 +1,20 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-achievements integration', () => { + it('fetches character achievements summary and statistics for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const summary = await client.sendRequest(wow.characterAchievementsSummary(realm, character)); + expect(summary).toBeTruthy(); + const stats = await client.sendRequest(wow.characterAchievementStatistics(realm, character)); + expect(stats).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-appearance.integration.test.ts b/packages/integration-tests/wow/character-appearance.integration.test.ts new file mode 100644 index 00000000..df8d828c --- /dev/null +++ b/packages/integration-tests/wow/character-appearance.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-appearance integration', () => { + it('fetches character appearance for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterAppearanceSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-collections.integration.test.ts b/packages/integration-tests/wow/character-collections.integration.test.ts new file mode 100644 index 00000000..9f9e0217 --- /dev/null +++ b/packages/integration-tests/wow/character-collections.integration.test.ts @@ -0,0 +1,20 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-collections integration', () => { + it('fetches collections indices and summaries for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const index = await client.sendRequest(wow.characterCollectionsIndex(realm, character)); + expect(index).toBeTruthy(); + const transmog = await client.sendRequest(wow.characterTransmogCollectionSummary(realm, character)); + expect(transmog).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-encounters.integration.test.ts b/packages/integration-tests/wow/character-encounters.integration.test.ts new file mode 100644 index 00000000..d18283d5 --- /dev/null +++ b/packages/integration-tests/wow/character-encounters.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-encounters integration', () => { + it('fetches character encounters for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const encounters = await client.sendRequest(wow.characterEncountersSummary(realm, character)); + expect(encounters).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-equipment.integration.test.ts b/packages/integration-tests/wow/character-equipment.integration.test.ts new file mode 100644 index 00000000..c129f733 --- /dev/null +++ b/packages/integration-tests/wow/character-equipment.integration.test.ts @@ -0,0 +1,26 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterEquipmentSummaryResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow character equipment integration', () => { + it('fetches equipment summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'laughing-skull'; + const character = 'putro'; + + const resp = await client.sendRequest(wow.characterEquipmentSummary(realm, character)); + const parsed = characterEquipmentSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character equipment summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts new file mode 100644 index 00000000..02693b07 --- /dev/null +++ b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-hunter-pets integration', () => { + it('fetches character hunter pets for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterHunterPetsSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-media.integration.test.ts b/packages/integration-tests/wow/character-media.integration.test.ts new file mode 100644 index 00000000..8d5256d5 --- /dev/null +++ b/packages/integration-tests/wow/character-media.integration.test.ts @@ -0,0 +1,26 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterMediaSummaryResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow character media integration', () => { + it('fetches media summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'laughing-skull'; + const character = 'putro'; + + const resp = await client.sendRequest(wow.characterMediaSummary(realm, character)); + const parsed = characterMediaSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character media summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts new file mode 100644 index 00000000..8f6d5df1 --- /dev/null +++ b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-mythic-keystone-profile integration', () => { + it('fetches mythic keystone profile index for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const index = await client.sendRequest(wow.characterMythicKeystoneProfileIndex(realm, character)); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-professions.integration.test.ts b/packages/integration-tests/wow/character-professions.integration.test.ts new file mode 100644 index 00000000..7f96a5ef --- /dev/null +++ b/packages/integration-tests/wow/character-professions.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-professions integration', () => { + it('fetches character professions for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterProfessionsSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-profile.integration.test.ts b/packages/integration-tests/wow/character-profile.integration.test.ts new file mode 100644 index 00000000..9b49f59c --- /dev/null +++ b/packages/integration-tests/wow/character-profile.integration.test.ts @@ -0,0 +1,20 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-profile integration', () => { + it('fetches character profile summary and status for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const summary = await client.sendRequest(wow.characterProfileSummary(realm, character)); + expect(summary).toBeTruthy(); + const status = await client.sendRequest(wow.characterProfileStatus(realm, character)); + expect(status).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-pvp.integration.test.ts b/packages/integration-tests/wow/character-pvp.integration.test.ts new file mode 100644 index 00000000..06a0c34a --- /dev/null +++ b/packages/integration-tests/wow/character-pvp.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-pvp integration', () => { + it('fetches character pvp summary for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterPvpSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-quests.integration.test.ts b/packages/integration-tests/wow/character-quests.integration.test.ts new file mode 100644 index 00000000..18ed47c1 --- /dev/null +++ b/packages/integration-tests/wow/character-quests.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-quests integration', () => { + it('fetches character quests for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterQuests(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-reputations.integration.test.ts b/packages/integration-tests/wow/character-reputations.integration.test.ts new file mode 100644 index 00000000..c359e8ba --- /dev/null +++ b/packages/integration-tests/wow/character-reputations.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-reputations integration', () => { + it('fetches character reputations for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterReputationsSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-soulbinds.integration.test.ts b/packages/integration-tests/wow/character-soulbinds.integration.test.ts new file mode 100644 index 00000000..6c2cb19e --- /dev/null +++ b/packages/integration-tests/wow/character-soulbinds.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-soulbinds integration', () => { + it('fetches character soulbinds for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterSoulbinds(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-specializations.integration.test.ts b/packages/integration-tests/wow/character-specializations.integration.test.ts new file mode 100644 index 00000000..4787dd68 --- /dev/null +++ b/packages/integration-tests/wow/character-specializations.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-specializations integration', () => { + it('fetches character specializations for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterSpecializationsSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-statistics.integration.test.ts b/packages/integration-tests/wow/character-statistics.integration.test.ts new file mode 100644 index 00000000..50c2e56d --- /dev/null +++ b/packages/integration-tests/wow/character-statistics.integration.test.ts @@ -0,0 +1,26 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { characterStatisticsSummaryResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow character statistics integration', () => { + it('fetches statistics summary for a character', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'laughing-skull'; + const character = 'putro'; + + const resp = await client.sendRequest(wow.characterStatisticsSummary(realm, character)); + const parsed = characterStatisticsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character statistics summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/character-titles.integration.test.ts b/packages/integration-tests/wow/character-titles.integration.test.ts new file mode 100644 index 00000000..bf54257f --- /dev/null +++ b/packages/integration-tests/wow/character-titles.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow character-titles integration', () => { + it('fetches character titles for putro', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + const resp = await client.sendRequest(wow.characterTitlesSummary(realm, character)); + expect(resp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/connected-realm.integration.test.ts b/packages/integration-tests/wow/connected-realm.integration.test.ts new file mode 100644 index 00000000..f3e8ad32 --- /dev/null +++ b/packages/integration-tests/wow/connected-realm.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { connectedRealmIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow connected realm integration', () => { + it('validates connected realm index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.connectedRealmIndex()); + const parsed = connectedRealmIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Connected realm index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/covenant.integration.test.ts b/packages/integration-tests/wow/covenant.integration.test.ts new file mode 100644 index 00000000..3a81b8e0 --- /dev/null +++ b/packages/integration-tests/wow/covenant.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow covenant integration', () => { + it('fetches covenant and soulbind indices', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const covIndex = await client.sendRequest(wow.covenantIndex()); + expect(covIndex).toBeTruthy(); + const soulIndex = await client.sendRequest(wow.soulbindIndex()); + expect(soulIndex).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/creature.integration.test.ts b/packages/integration-tests/wow/creature.integration.test.ts new file mode 100644 index 00000000..7cc1dd0c --- /dev/null +++ b/packages/integration-tests/wow/creature.integration.test.ts @@ -0,0 +1,62 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + creatureFamilyIndexResponseSchema, + creatureFamilyResponseSchema, creatureTypeIndexResponseSchema, creatureTypeResponseSchema +} from '../../../generated/schemas/wow/creature'; + + +describe('wow creature integration', () => { + it('validates creature family index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.creatureFamilyIndex()); + const parsed = creatureFamilyIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature family index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.creature_families[0] : undefined; + if (first) { + const detail = await client.sendRequest(wow.creatureFamily(first.id)); + const parsedDetail = creatureFamilyResponseSchema.safeParse(detail); + if (!parsedDetail.success) { + console.error('Creature family detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } + }, 30_000); + + it('validates creature type index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.creatureTypeIndex()); + const parsed = creatureTypeIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature type index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.creature_types[0] : undefined; + if (first) { + const detail = await client.sendRequest(wow.creatureType(first.id)); + const parsedDetail = creatureTypeResponseSchema.safeParse(detail); + if (!parsedDetail.success) { + console.error('Creature type detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/guild-crest.integration.test.ts b/packages/integration-tests/wow/guild-crest.integration.test.ts new file mode 100644 index 00000000..429b4d1e --- /dev/null +++ b/packages/integration-tests/wow/guild-crest.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { guildCrestComponentsIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow guild crest integration', () => { + it('validates guild crest components index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.guildCrestComponentsIndex()); + const parsed = guildCrestComponentsIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Guild crest components index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/guild.integration.test.ts b/packages/integration-tests/wow/guild.integration.test.ts new file mode 100644 index 00000000..f08f97a0 --- /dev/null +++ b/packages/integration-tests/wow/guild.integration.test.ts @@ -0,0 +1,26 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow guild integration', () => { + it('fetches guild endpoints for echoes on laughing-skull', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'laughing-skull'; + const guildSlug = 'echoes'; + + const guildResp = await client.sendRequest(wow.guild(realm, guildSlug)); + expect(guildResp).toBeDefined(); + + const achievementsResp = await client.sendRequest(wow.guildAchievements(realm, guildSlug)); + expect(achievementsResp).toBeDefined(); + + const rosterResp = await client.sendRequest(wow.guildRoster(realm, guildSlug)); + expect(rosterResp).toBeDefined(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/heirloom.integration.test.ts b/packages/integration-tests/wow/heirloom.integration.test.ts new file mode 100644 index 00000000..e63ce66c --- /dev/null +++ b/packages/integration-tests/wow/heirloom.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow heirloom integration', () => { + it('fetches heirloom index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.heirloomIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/item.integration.test.ts b/packages/integration-tests/wow/item.integration.test.ts new file mode 100644 index 00000000..35f16ed7 --- /dev/null +++ b/packages/integration-tests/wow/item.integration.test.ts @@ -0,0 +1,33 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { itemClassIndexResponseSchema, itemClassResponseSchema } from '../../../generated/schemas/wow/item'; + +describe('wow item integration', () => { + it('validates item class index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.itemClassIndex()); + const parsed = itemClassIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Item class index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.item_classes[0] : undefined; + if (first) { + const detail = await client.sendRequest(wow.itemClass(first.id)); + const parsedDetail = itemClassResponseSchema.safeParse(detail); + if (!parsedDetail.success) { + console.error('Item class detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/journal.integration.test.ts b/packages/integration-tests/wow/journal.integration.test.ts new file mode 100644 index 00000000..0c68835b --- /dev/null +++ b/packages/integration-tests/wow/journal.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow journal integration', () => { + it('fetches journal encounter index and expansion index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const enc = await client.sendRequest(wow.journalEncounterIndex()); + expect(enc).toBeTruthy(); + const exp = await client.sendRequest(wow.journalExpansionIndex()); + expect(exp).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/media-search.integration.test.ts b/packages/integration-tests/wow/media-search.integration.test.ts new file mode 100644 index 00000000..16d02008 --- /dev/null +++ b/packages/integration-tests/wow/media-search.integration.test.ts @@ -0,0 +1,28 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { mediaSearchResponseItemSchema } from '../../../generated/schemas/wow'; + +describe('wow media search integration', () => { + it('performs a media search and validates items', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.mediaSearch({ _page: 1 })); + const first = Array.isArray(resp.results) ? resp.results[0] : undefined; + if (first) { + const parsed = mediaSearchResponseItemSchema.safeParse(first); + if (!parsed.success) { + console.error('Media search item validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } else { + expect(resp).toBeDefined(); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/modified-crafting.integration.test.ts b/packages/integration-tests/wow/modified-crafting.integration.test.ts new file mode 100644 index 00000000..d8c61325 --- /dev/null +++ b/packages/integration-tests/wow/modified-crafting.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow modified-crafting integration', () => { + it('fetches modified crafting category index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.modifiedCraftingCategoryIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts new file mode 100644 index 00000000..0794956b --- /dev/null +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow mount integration', () => { + it('fetches mount index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.mountIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/pet.integration.test.ts b/packages/integration-tests/wow/pet.integration.test.ts new file mode 100644 index 00000000..2c873bc9 --- /dev/null +++ b/packages/integration-tests/wow/pet.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow pet integration', () => { + it('fetches pet index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.petIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/playable-class.integration.test.ts b/packages/integration-tests/wow/playable-class.integration.test.ts new file mode 100644 index 00000000..fb21dbb9 --- /dev/null +++ b/packages/integration-tests/wow/playable-class.integration.test.ts @@ -0,0 +1,36 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + playableClassIndexResponseSchema, + playableClassResponseSchema, +} from '../../../generated/schemas/wow/playable-class'; + +describe('wow playable class integration', () => { + it('fetches playable class and media by id', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.playableClassIndex()); + const parsedIndex = playableClassIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Playable class index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const first = parsedIndex.success ? parsedIndex.data.classes[0] : undefined; + if (first) { + const resp = await client.sendRequest(wow.playableClass(first.id)); + const parsed = playableClassResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable class validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/playable-race.integration.test.ts b/packages/integration-tests/wow/playable-race.integration.test.ts new file mode 100644 index 00000000..d3ac137d --- /dev/null +++ b/packages/integration-tests/wow/playable-race.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { playableRaceIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow playable race integration', () => { + it('validates playable race index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.playableRaceIndex()); + const parsed = playableRaceIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable race index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts new file mode 100644 index 00000000..29193956 --- /dev/null +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow playable-specialization integration', () => { + it('fetches playable specialization index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.playableSpecializationIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/power-type.integration.test.ts b/packages/integration-tests/wow/power-type.integration.test.ts new file mode 100644 index 00000000..6f1f7537 --- /dev/null +++ b/packages/integration-tests/wow/power-type.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { powerTypeIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow power type integration', () => { + it('validates power type index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.powerTypeIndex()); + const parsed = powerTypeIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Power type index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/profession.integration.test.ts b/packages/integration-tests/wow/profession.integration.test.ts new file mode 100644 index 00000000..495c11cc --- /dev/null +++ b/packages/integration-tests/wow/profession.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow profession integration', () => { + it('fetches profession index and a recipe search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.professionIndex()); + expect(index).toBeTruthy(); + const search = await client.sendRequest(wow.recipe(index.professions[0]?.id)); + expect(search).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/pvp-season.integration.test.ts b/packages/integration-tests/wow/pvp-season.integration.test.ts new file mode 100644 index 00000000..a6ccb30b --- /dev/null +++ b/packages/integration-tests/wow/pvp-season.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { pvpSeasonIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow pvp season integration', () => { + it('validates pvp season index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.pvpSeasonIndex()); + const parsed = pvpSeasonIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('PvP season index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/pvp.integration.test.ts b/packages/integration-tests/wow/pvp.integration.test.ts new file mode 100644 index 00000000..c253f80d --- /dev/null +++ b/packages/integration-tests/wow/pvp.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow pvp integration', () => { + it('fetches pvp leaderboard index and season index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const lb = await client.sendRequest(wow.pvpLeaderboardIndex()); + expect(lb).toBeTruthy(); + const season = await client.sendRequest(wow.pvpSeasonIndex()); + expect(season).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/quest.integration.test.ts b/packages/integration-tests/wow/quest.integration.test.ts new file mode 100644 index 00000000..d0953624 --- /dev/null +++ b/packages/integration-tests/wow/quest.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow quest integration', () => { + it('fetches quest index and area index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.questIndex()); + expect(index).toBeTruthy(); + const area = await client.sendRequest(wow.questAreaIndex()); + expect(area).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/realm.integration.test.ts b/packages/integration-tests/wow/realm.integration.test.ts new file mode 100644 index 00000000..1a8bffd4 --- /dev/null +++ b/packages/integration-tests/wow/realm.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { realmIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow realm integration', () => { + it('validates realm index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.realmIndex()); + const parsed = realmIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Realm index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/region.integration.test.ts b/packages/integration-tests/wow/region.integration.test.ts new file mode 100644 index 00000000..cef41431 --- /dev/null +++ b/packages/integration-tests/wow/region.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { regionIndexResponseSchema } from '../../../generated/schemas/wow'; + +describe('wow region integration', () => { + it('validates region index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.regionIndex()); + const parsed = regionIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Region index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/spell.integration.test.ts b/packages/integration-tests/wow/spell.integration.test.ts new file mode 100644 index 00000000..0da884d0 --- /dev/null +++ b/packages/integration-tests/wow/spell.integration.test.ts @@ -0,0 +1,18 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow spell integration', () => { + it('fetches spell search and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const search = await client.sendRequest(wow.spellSearch({ locale: 'en_GB', name: 'fire' })); + expect(search).toBeTruthy(); + const index = await client.sendRequest(wow.spellMedia(1)); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/title.integration.test.ts b/packages/integration-tests/wow/title.integration.test.ts new file mode 100644 index 00000000..0add9951 --- /dev/null +++ b/packages/integration-tests/wow/title.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow title integration', () => { + it('fetches title index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.titleIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/toy.integration.test.ts b/packages/integration-tests/wow/toy.integration.test.ts new file mode 100644 index 00000000..71ae0ac7 --- /dev/null +++ b/packages/integration-tests/wow/toy.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow toy integration', () => { + it('fetches toy index', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const index = await client.sendRequest(wow.toyIndex()); + expect(index).toBeTruthy(); + }, 30_000); +}); diff --git a/packages/integration-tests/wow/wow-token.integration.test.ts b/packages/integration-tests/wow/wow-token.integration.test.ts new file mode 100644 index 00000000..6f52b841 --- /dev/null +++ b/packages/integration-tests/wow/wow-token.integration.test.ts @@ -0,0 +1,16 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { environment } from '../../../environment'; + +describe('wow wow-token integration', () => { + it('fetches wow token info', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + const token = await client.sendRequest(wow.wowToken()); + expect(token).toBeTruthy(); + }, 30_000); +}); From ed263a921b21d7064dfceb56b30b413c424e3f7b Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:51:57 +0100 Subject: [PATCH 36/52] [Client] Remove the axios compatability layer --- .changeset/twelve-planes-grin.md | 5 +++++ packages/client/src/client/client.ts | 28 +++++++--------------------- packages/client/src/client/types.ts | 9 --------- 3 files changed, 12 insertions(+), 30 deletions(-) create mode 100644 .changeset/twelve-planes-grin.md diff --git a/.changeset/twelve-planes-grin.md b/.changeset/twelve-planes-grin.md new file mode 100644 index 00000000..1a553538 --- /dev/null +++ b/.changeset/twelve-planes-grin.md @@ -0,0 +1,5 @@ +--- +'@blizzard-api/client': major +--- + +Remove the axios compatability layer that resulted in response existing both directly in the response and in the data. If you face errors after this you likely just need to remove accessing data. diff --git a/packages/client/src/client/client.ts b/packages/client/src/client/client.ts index bb1170be..b48937c4 100644 --- a/packages/client/src/client/client.ts +++ b/packages/client/src/client/client.ts @@ -5,7 +5,6 @@ import ky from 'ky'; import type { AccessToken, AccessTokenRequestArguments, - AxiosCompatability, ClientOptions, ValidateAccessTokenArguments, ValidateAccessTokenResponse, @@ -59,7 +58,7 @@ export class BlizzardApiClient { * // => 86399 * // => 'client-id' */ - public getAccessToken = async (options?: AccessTokenRequestArguments): Promise> => { + public getAccessToken = async (options?: AccessTokenRequestArguments): Promise => { const { key, origin, secret } = { ...this.defaults, ...options }; const basicAuth = Buffer.from(`${key}:${secret}`).toString('base64'); const response = await this.ky @@ -74,10 +73,7 @@ export class BlizzardApiClient { }) .json(); - return { - data: response, - ...response, - }; + return response; }; /** @@ -101,9 +97,7 @@ export class BlizzardApiClient { * // => 86399 * // => 'client-id' */ - public refreshAccessToken = async ( - options?: AccessTokenRequestArguments, - ): Promise> => { + public refreshAccessToken = async (options?: AccessTokenRequestArguments): Promise => { const response = await this.getAccessToken(options); this.setAccessToken(response.access_token); return response; @@ -118,9 +112,7 @@ export class BlizzardApiClient { * console.log(response.client_id); * // => 'client-id' */ - public validateAccessToken = async ( - options?: ValidateAccessTokenArguments, - ): Promise> => { + public validateAccessToken = async (options?: ValidateAccessTokenArguments): Promise => { const { origin, token } = { ...this.defaults, ...options }; if (!token) { @@ -136,10 +128,7 @@ export class BlizzardApiClient { }) .json(); - return { - data: response, - ...response, - }; + return response; }; /** @@ -220,7 +209,7 @@ export class BlizzardApiClient { resource: Resource, options?: Partial, headers?: Record, - ): ResourceResponse> { + ): ResourceResponse { const url = this.getRequestUrl(resource, options); const config = this.getRequestConfig(resource, options, headers); @@ -234,9 +223,6 @@ export class BlizzardApiClient { }); const data = await response.json(); - return { - data, - ...data, - }; + return data; } } diff --git a/packages/client/src/client/types.ts b/packages/client/src/client/types.ts index 8476daad..99c7f751 100644 --- a/packages/client/src/client/types.ts +++ b/packages/client/src/client/types.ts @@ -36,15 +36,6 @@ export interface AccessTokenRequestArguments { secret?: string; // The client secret. } -export type AxiosCompatability = T & { - /** - * @deprecated - * This property is only here for backward compatibility, it will be removed in the next major version. - * All data should be accessed directly from the response object instead of through this property. - */ - data: T; -}; - /** * A client configuration object. * @example From 108c6734993b88e1247c3f7e3866b4be39a4a7d3 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:12:08 +0100 Subject: [PATCH 37/52] Update zod tests for classic-wow --- .../playable-class.integration.test.ts | 53 ++++++++++++++----- .../wow/creature.integration.test.ts | 5 +- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/packages/integration-tests/classic-wow/playable-class.integration.test.ts b/packages/integration-tests/classic-wow/playable-class.integration.test.ts index 6e9be40f..2a835f72 100644 --- a/packages/integration-tests/classic-wow/playable-class.integration.test.ts +++ b/packages/integration-tests/classic-wow/playable-class.integration.test.ts @@ -3,28 +3,57 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { playableClassResponseSchema } from '../../../generated/schemas/classic-wow'; +import { playableClassMediaResponseSchema, playableClassResponseSchema } from '../../../generated/schemas/classic-wow'; describe('classic-wow playable class integration', () => { - it('fetches playable class and media by id', async ({ expect }) => { + it('fetches playable class and media by id for classic era', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'us', secret: environment.blizzardClientSecret, }); - // Use a well-known class id (1 = Warrior) - const classId = 1; + const indices = await client.sendRequest(classicWow.playableClassIndex('static-classic1x')); - const resp = await client.sendRequest(classicWow.playableClass('static-classic1x', classId)); - const parsed = playableClassResponseSchema.safeParse(resp); - if (!parsed.success) { - console.error('Playable class validation failed:', treeifyError(parsed.error)); + for (const playerClass of indices.classes) { + const resp = await client.sendRequest(classicWow.playableClass('static-classic1x', playerClass.id)); + const parsed = playableClassResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable class validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic1x', playerClass.id)); + const mediaParsed = playableClassMediaResponseSchema.safeParse(mediaResp); + if (!mediaParsed.success) { + console.error('Playable class media validation failed:', treeifyError(mediaParsed.error)); + } + expect(mediaParsed.success).toBe(true); } - expect(parsed.success).toBe(true); + }, 30_000); + it('fetches playable class and media by id for classic', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const indices = await client.sendRequest(classicWow.playableClassIndex('static-classic')); - const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic1x', classId)); - // Media response shape isn't fully typed here; assert defined - expect(mediaResp).toBeDefined(); + for (const playerClass of indices.classes) { + const resp = await client.sendRequest(classicWow.playableClass('static-classic', playerClass.id)); + const parsed = playableClassResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable class validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic', playerClass.id)); + const mediaParsed = playableClassMediaResponseSchema.safeParse(mediaResp); + if (!mediaParsed.success) { + console.error('Playable class media validation failed:', treeifyError(mediaParsed.error)); + } + expect(mediaParsed.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/creature.integration.test.ts b/packages/integration-tests/wow/creature.integration.test.ts index 7cc1dd0c..5a4b597a 100644 --- a/packages/integration-tests/wow/creature.integration.test.ts +++ b/packages/integration-tests/wow/creature.integration.test.ts @@ -5,10 +5,11 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { creatureFamilyIndexResponseSchema, - creatureFamilyResponseSchema, creatureTypeIndexResponseSchema, creatureTypeResponseSchema + creatureFamilyResponseSchema, + creatureTypeIndexResponseSchema, + creatureTypeResponseSchema, } from '../../../generated/schemas/wow/creature'; - describe('wow creature integration', () => { it('validates creature family index', async ({ expect }) => { const client = await createBlizzardApiClient({ From 5915d6fdc5e16304fc18f4704ab7a5515746cc73 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:12:34 +0100 Subject: [PATCH 38/52] [Zod] Make zod objects strict to catch more errors --- .../schemas/classic-wow/auction-house.ts | 6 +- .../classic-wow/character-achievements.ts | 20 ++--- .../classic-wow/character-equipment.ts | 50 ++++++------- .../classic-wow/character-hunter-pets.ts | 4 +- .../schemas/classic-wow/character-media.ts | 2 +- .../schemas/classic-wow/character-profile.ts | 2 +- .../classic-wow/character-specialization.ts | 10 +-- .../classic-wow/character-statistics.ts | 4 +- .../schemas/classic-wow/connected-realm.ts | 30 ++++---- generated/schemas/classic-wow/creature.ts | 10 +-- generated/schemas/classic-wow/guild-crest.ts | 8 +- generated/schemas/classic-wow/guild.ts | 28 +++---- generated/schemas/classic-wow/item.ts | 48 ++++++------ generated/schemas/classic-wow/media-search.ts | 10 +-- .../schemas/classic-wow/playable-class.ts | 22 +++++- generated/schemas/classic-wow/pvp-season.ts | 4 +- generated/schemas/classic-wow/realm.ts | 10 +-- generated/schemas/classic-wow/region.ts | 2 +- generated/schemas/core/base.ts | 26 +++---- generated/schemas/d3/act.ts | 8 +- generated/schemas/d3/artisan-and-recipe.ts | 14 ++-- .../schemas/d3/character-class-and-skill.ts | 10 +-- generated/schemas/d3/follower.ts | 4 +- generated/schemas/d3/game-data.ts | 20 ++--- generated/schemas/d3/item-type.ts | 4 +- generated/schemas/d3/item.ts | 10 +-- generated/schemas/d3/profile.ts | 74 +++++++++---------- generated/schemas/hs/card-backs.ts | 6 +- generated/schemas/hs/cards.ts | 12 +-- generated/schemas/hs/decks.ts | 12 +-- generated/schemas/hs/metadata.ts | 6 +- generated/schemas/sc2/ladder.ts | 8 +- generated/schemas/sc2/league.ts | 6 +- generated/schemas/sc2/legacy.ts | 42 +++++------ generated/schemas/sc2/profile.ts | 16 ++-- generated/schemas/wow/account-profile.ts | 44 +++++------ generated/schemas/wow/achievements.ts | 22 ++---- generated/schemas/wow/auction-house.ts | 14 ++-- generated/schemas/wow/azerite-essence.ts | 4 +- .../schemas/wow/character-achievements.ts | 20 ++--- generated/schemas/wow/character-appearance.ts | 18 ++--- .../schemas/wow/character-collections.ts | 18 ++--- generated/schemas/wow/character-encounters.ts | 22 +++--- generated/schemas/wow/character-equipment.ts | 46 ++++++------ .../schemas/wow/character-hunter-pets.ts | 4 +- generated/schemas/wow/character-media.ts | 2 +- .../wow/character-mythic-keystone-profile.ts | 16 ++-- .../schemas/wow/character-professions.ts | 6 +- generated/schemas/wow/character-profile.ts | 4 +- generated/schemas/wow/character-pvp.ts | 10 +-- .../schemas/wow/character-reputations.ts | 6 +- generated/schemas/wow/character-soulbinds.ts | 10 +-- .../schemas/wow/character-specializations.ts | 12 +-- generated/schemas/wow/character-statistics.ts | 6 +- generated/schemas/wow/character-titles.ts | 2 +- generated/schemas/wow/connected-realm.ts | 30 ++++---- generated/schemas/wow/covenant.ts | 16 ++-- generated/schemas/wow/creature.ts | 10 +-- generated/schemas/wow/guild-crest.ts | 8 +- generated/schemas/wow/guild.ts | 28 +++---- generated/schemas/wow/heirloom.ts | 22 +++--- generated/schemas/wow/item.ts | 50 ++++++------- generated/schemas/wow/journal.ts | 34 ++++----- generated/schemas/wow/media-search.ts | 10 +-- generated/schemas/wow/modified-crafting.ts | 4 +- generated/schemas/wow/mount.ts | 10 +-- .../schemas/wow/mythic-keystone-dungeon.ts | 8 +- .../wow/mythic-keystone-leaderboard.ts | 12 +-- .../schemas/wow/mythic-raid-leaderboard.ts | 6 +- generated/schemas/wow/pet.ts | 4 +- generated/schemas/wow/playable-class.ts | 4 +- .../schemas/wow/playable-specialization.ts | 6 +- generated/schemas/wow/profession.ts | 8 +- generated/schemas/wow/pvp-season.ts | 14 ++-- generated/schemas/wow/pvp-tier.ts | 2 +- generated/schemas/wow/quest.ts | 16 ++-- generated/schemas/wow/realm.ts | 10 +-- generated/schemas/wow/region.ts | 2 +- generated/schemas/wow/reputations.ts | 2 +- generated/schemas/wow/spell.ts | 4 +- generated/schemas/wow/talent.ts | 28 +++---- generated/schemas/wow/toy.ts | 2 +- .../classic-wow/src/media-search/types.ts | 8 +- .../classic-wow/src/playable-class/types.ts | 21 +++++- packages/core/src/base.ts | 4 +- packages/wow/src/achievements/types.ts | 10 +-- packages/wow/src/media-search/types.ts | 8 +- scripts/generate-zod.ts | 2 +- 88 files changed, 618 insertions(+), 619 deletions(-) diff --git a/generated/schemas/classic-wow/auction-house.ts b/generated/schemas/classic-wow/auction-house.ts index 3d3734b5..44505370 100644 --- a/generated/schemas/classic-wow/auction-house.ts +++ b/generated/schemas/classic-wow/auction-house.ts @@ -6,11 +6,11 @@ export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ auctions: z.array(nameIdKeySchema), }); -const auctionSchema = z.object({ +const auctionSchema = z.strictObject({ bid: z.number(), buyout: z.number(), id: z.number(), - item: z.object({ + item: z.strictObject({ id: z.number(), rand: z.number().optional(), seed: z.number().optional(), @@ -21,7 +21,7 @@ const auctionSchema = z.object({ export const auctionsResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ auctions: z.array(auctionSchema), - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), }); diff --git a/generated/schemas/classic-wow/character-achievements.ts b/generated/schemas/classic-wow/character-achievements.ts index 1f17cd83..2100c975 100644 --- a/generated/schemas/classic-wow/character-achievements.ts +++ b/generated/schemas/classic-wow/character-achievements.ts @@ -2,18 +2,18 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const categoryProgressSchema = z.object({ +const categoryProgressSchema = z.strictObject({ category: nameIdKeySchema, points: z.number(), quantity: z.number(), }); -const recentEventSchema = z.object({ +const recentEventSchema = z.strictObject({ achievement: nameIdKeySchema, timestamp: z.number(), }); -const statisticSchema = z.object({ +const statisticSchema = z.strictObject({ description: z.string().optional().nullable(), id: z.number(), last_updated_timestamp: z.number(), @@ -21,33 +21,33 @@ const statisticSchema = z.object({ quantity: z.number(), }); -const subCategorySchema = z.object({ +const subCategorySchema = z.strictObject({ id: z.number(), name: z.string(), statistics: z.array(statisticSchema), }); -const childCriterum3Schema = z.object({ +const childCriterum3Schema = z.strictObject({ amount: z.number().optional(), id: z.number(), is_completed: z.boolean(), }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ id: z.number(), name: z.string(), statistics: z.array(statisticSchema).optional(), sub_categories: z.array(subCategorySchema).optional(), }); -const childCriterum2Schema = z.object({ +const childCriterum2Schema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterum3Schema).optional(), id: z.number(), is_completed: z.boolean(), }); -const childCriterumSchema = z.object({ +const childCriterumSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterum2Schema).optional(), id: z.number(), @@ -59,14 +59,14 @@ export const characterAchievementStatisticsResponseSchema = responseBaseSchema.e character: characterSchema, }); -const criteriaSchema = z.object({ +const criteriaSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterumSchema).optional(), id: z.number(), is_completed: z.boolean(), }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ achievement: nameIdKeySchema, completed_timestamp: z.number().optional(), criteria: criteriaSchema.optional(), diff --git a/generated/schemas/classic-wow/character-equipment.ts b/generated/schemas/classic-wow/character-equipment.ts index a5fdc3d1..b8eab59d 100644 --- a/generated/schemas/classic-wow/character-equipment.ts +++ b/generated/schemas/classic-wow/character-equipment.ts @@ -2,85 +2,85 @@ import { z } from 'zod'; import { characterSchema, colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const nameDescriptionSchema = z.object({ +const nameDescriptionSchema = z.strictObject({ color: colorSchema, display_string: z.string(), }); -const nameTypeSchema = z.object({ +const nameTypeSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const displayStringsSchema = z.object({ +const displayStringsSchema = z.strictObject({ copper: z.string(), gold: z.string(), header: z.string(), silver: z.string(), }); -const displayStringValueSchema = z.object({ +const displayStringValueSchema = z.strictObject({ display_string: z.string(), value: z.number(), }); -const effectSchema = z.object({ +const effectSchema = z.strictObject({ display_string: z.string(), is_active: z.boolean(), required_count: z.number(), }); -const enchantmentSlotSchema = z.object({ +const enchantmentSlotSchema = z.strictObject({ id: z.number(), type: z.string().optional(), }); -const armorSchema = z.object({ +const armorSchema = z.strictObject({ display: nameDescriptionSchema, value: z.number(), }); -const enchantmentSchema = z.object({ +const enchantmentSchema = z.strictObject({ display_string: z.string().optional(), enchantment_id: z.number(), enchantment_slot: enchantmentSlotSchema, source_item: nameIdKeySchema.optional(), spell: z - .object({ + .strictObject({ description: z.string(), spell: nameIdKeySchema, }) .optional(), }); -const modifiedCraftingStatSchema = z.object({ +const modifiedCraftingStatSchema = z.strictObject({ id: z.number(), name: z.string(), type: z.string(), }); -const sellPriceSchema = z.object({ +const sellPriceSchema = z.strictObject({ display_strings: displayStringsSchema, value: z.number(), }); -const socketSchema = z.object({ +const socketSchema = z.strictObject({ display_string: z.string(), item: nameIdKeySchema, media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), socket_type: nameTypeSchema, }); -const spellSchema = z.object({ +const spellSchema = z.strictObject({ description: z.string(), spell: nameIdKeySchema, }); -const statSchema = z.object({ +const statSchema = z.strictObject({ display: nameDescriptionSchema, is_equip_bonus: z.boolean().optional(), is_negated: z.boolean().optional(), @@ -88,48 +88,48 @@ const statSchema = z.object({ value: z.number(), }); -const transmogSchema = z.object({ +const transmogSchema = z.strictObject({ display_string: z.string(), item: nameIdKeySchema, item_modified_appearance_id: z.number(), }); -const itemElementSchema = z.object({ +const itemElementSchema = z.strictObject({ is_equipped: z.boolean().optional(), item: nameIdKeySchema, }); -const playableClassesSchema = z.object({ +const playableClassesSchema = z.strictObject({ display_string: z.string(), links: z.array(nameIdKeySchema), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ level: displayStringValueSchema, playable_classes: playableClassesSchema.optional(), }); -const setSchema = z.object({ +const setSchema = z.strictObject({ display_string: z.string().optional(), effects: z.array(effectSchema).optional(), item_set: nameIdKeySchema.optional(), items: z.array(itemElementSchema).optional(), }); -const damageSchema = z.object({ +const damageSchema = z.strictObject({ damage_class: nameTypeSchema, display_string: z.string(), max_value: z.number(), min_value: z.number(), }); -const weaponSchema = z.object({ +const weaponSchema = z.strictObject({ attack_speed: displayStringValueSchema, damage: damageSchema, dps: displayStringValueSchema, }); -const equippedItemSchema = z.object({ +const equippedItemSchema = z.strictObject({ armor: armorSchema.optional(), binding: nameTypeSchema, bonus_list: z.array(z.number()).optional(), @@ -140,7 +140,7 @@ const equippedItemSchema = z.object({ inventory_type: nameTypeSchema, is_subclass_hidden: z.boolean().optional(), item: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), @@ -149,7 +149,7 @@ const equippedItemSchema = z.object({ level: displayStringValueSchema.optional(), limit_category: z.string().optional(), media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/classic-wow/character-hunter-pets.ts b/generated/schemas/classic-wow/character-hunter-pets.ts index e2658d8d..a26a1288 100644 --- a/generated/schemas/classic-wow/character-hunter-pets.ts +++ b/generated/schemas/classic-wow/character-hunter-pets.ts @@ -2,10 +2,10 @@ import { z } from 'zod'; import { characterSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const hunterPetSchema = z.object({ +const hunterPetSchema = z.strictObject({ creature: nameIdKeySchema, creature_display: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/classic-wow/character-media.ts b/generated/schemas/classic-wow/character-media.ts index 2d78e329..6c95c98f 100644 --- a/generated/schemas/classic-wow/character-media.ts +++ b/generated/schemas/classic-wow/character-media.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { characterSchema, responseBaseSchema } from '../core'; -const assetSchema = z.object({ +const assetSchema = z.strictObject({ key: z.string(), value: z.string(), }); diff --git a/generated/schemas/classic-wow/character-profile.ts b/generated/schemas/classic-wow/character-profile.ts index d540648e..f3de4de6 100644 --- a/generated/schemas/classic-wow/character-profile.ts +++ b/generated/schemas/classic-wow/character-profile.ts @@ -12,7 +12,7 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ achievements: hrefSchema.optional(), active_spec: nameIdKeySchema, active_title: z - .object({ + .strictObject({ name: z.string(), }) .optional(), diff --git a/generated/schemas/classic-wow/character-specialization.ts b/generated/schemas/classic-wow/character-specialization.ts index f1e92114..152bcb7e 100644 --- a/generated/schemas/classic-wow/character-specialization.ts +++ b/generated/schemas/classic-wow/character-specialization.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { characterSchema, nameIdSchema, responseBaseSchema } from '../core'; -const spellTooltipSchema = z.object({ +const spellTooltipSchema = z.strictObject({ cast_time: z.union([z.literal('Channeled'), z.literal('Instant'), z.literal('Instant cast'), z.literal('Passive')]), cooldown: z.string().optional(), description: z.string(), @@ -11,21 +11,21 @@ const spellTooltipSchema = z.object({ spell: nameIdSchema, }); -const talentElementSchema = z.object({ +const talentElementSchema = z.strictObject({ spell_tooltip: spellTooltipSchema, - talent: z.object({ + talent: z.strictObject({ id: z.number(), }), talent_rank: z.number(), }); -const specializationSchema = z.object({ +const specializationSchema = z.strictObject({ specialization_name: z.string(), spent_points: z.number(), talents: z.array(talentElementSchema), }); -const specializationGroupSchema = z.object({ +const specializationGroupSchema = z.strictObject({ glyphs: z.array(nameIdSchema).optional(), is_active: z.boolean(), specializations: z.array(specializationSchema).optional(), diff --git a/generated/schemas/classic-wow/character-statistics.ts b/generated/schemas/classic-wow/character-statistics.ts index 323ff0ac..2533663c 100644 --- a/generated/schemas/classic-wow/character-statistics.ts +++ b/generated/schemas/classic-wow/character-statistics.ts @@ -2,12 +2,12 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const baseEffectiveStatSchema = z.object({ +const baseEffectiveStatSchema = z.strictObject({ base: z.number(), effective: z.number(), }); -const ratingWithValueSchema = z.object({ +const ratingWithValueSchema = z.strictObject({ rating_bonus: z.number(), rating_normalized: z.number(), value: z.number(), diff --git a/generated/schemas/classic-wow/connected-realm.ts b/generated/schemas/classic-wow/connected-realm.ts index 61c7274b..4e42447c 100644 --- a/generated/schemas/classic-wow/connected-realm.ts +++ b/generated/schemas/classic-wow/connected-realm.ts @@ -4,7 +4,7 @@ import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySche export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ connected_realms: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), @@ -18,7 +18,7 @@ const realmPopulationCapitalizedSchema = z.union([ z.literal('RECOMMENDED'), ]); -const realmLockedStatusSchema = z.object({ +const realmLockedStatusSchema = z.strictObject({ is_locked_for_new_characters: z.boolean(), is_locked_for_pct: z.boolean(), }); @@ -27,12 +27,12 @@ const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); const realmStatusCapitalizedSchema = z.union([z.literal('DOWN'), z.literal('UP')]); -const searchRealmPopulationSchema = z.object({ +const searchRealmPopulationSchema = z.strictObject({ name: z.record(localesSchema, z.string()), type: realmPopulationCapitalizedSchema, }); -const searchRealmStatusSchema = z.object({ +const searchRealmStatusSchema = z.strictObject({ name: z.record(localesSchema, z.string()), type: realmStatusCapitalizedSchema, }); @@ -47,9 +47,9 @@ const realmTypeSchema = z.any(); const realmTypeCapitalizedSchema = z.any(); -const realmSchema = z.object({ +const realmSchema = z.strictObject({ category: realmCategorySchema, - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), id: z.number(), @@ -59,7 +59,7 @@ const realmSchema = z.object({ region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), @@ -70,34 +70,34 @@ export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.e 'status.type': realmStatusCapitalizedSchema.optional(), }); -const searchRealmSchema = z.object({ +const searchRealmSchema = z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - region: z.object({ + region: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: realmTypeCapitalizedSchema, }), }); export const connectedRealmResponseSchema = responseBaseSchema.extend({ - auctions: z.object({ + auctions: z.strictObject({ href: z.string(), }), has_queue: z.boolean(), id: z.number(), - mythic_leaderboards: z.object({ + mythic_leaderboards: z.strictObject({ href: z.string(), }), - population: z.object({ + population: z.strictObject({ name: z.union([ z.literal('Full'), z.literal('High'), @@ -109,14 +109,14 @@ export const connectedRealmResponseSchema = responseBaseSchema.extend({ }), realm_locked_status: realmLockedStatusSchema.optional(), realms: z.array(realmSchema), - status: z.object({ + status: z.strictObject({ name: realmStatusSchema, type: realmStatusCapitalizedSchema, }), }); export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ has_queue: z.boolean(), id: z.number(), population: searchRealmPopulationSchema, diff --git a/generated/schemas/classic-wow/creature.ts b/generated/schemas/classic-wow/creature.ts index 47baf0ea..20e73097 100644 --- a/generated/schemas/classic-wow/creature.ts +++ b/generated/schemas/classic-wow/creature.ts @@ -9,7 +9,7 @@ import { responseBaseSchema, } from '../core'; -const displayMediaAssetSchema = z.object({ +const displayMediaAssetSchema = z.strictObject({ key: z.string(), value: z.string(), }); @@ -37,14 +37,14 @@ export const creatureSearchParametersSchema = baseSearchParametersSchema.extend( }); export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ creature_displays: z.array( - z.object({ + z.strictObject({ id: z.number(), }), ), family: z - .object({ + .strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }) @@ -52,7 +52,7 @@ export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ id: z.number(), is_tameable: z.boolean(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.object({ + type: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), diff --git a/generated/schemas/classic-wow/guild-crest.ts b/generated/schemas/classic-wow/guild-crest.ts index c916ab55..7d34143b 100644 --- a/generated/schemas/classic-wow/guild-crest.ts +++ b/generated/schemas/classic-wow/guild-crest.ts @@ -2,12 +2,12 @@ import { z } from 'zod'; import { colorSchema, keyBaseSchema, responseBaseSchema } from '../core'; -const guildCrestAssetSchema = z.object({ +const guildCrestAssetSchema = z.strictObject({ key: z.string(), value: z.string(), }); -const backgroundSchema = z.object({ +const backgroundSchema = z.strictObject({ id: z.number(), rgba: colorSchema, }); @@ -16,7 +16,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const colorsSchema = z.object({ +const colorsSchema = z.strictObject({ backgrounds: z.array(backgroundSchema).optional(), borders: z.array(backgroundSchema).optional(), emblems: z.array(backgroundSchema).optional(), @@ -27,7 +27,7 @@ export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const borderSchema = z.object({ +const borderSchema = z.strictObject({ id: z.number(), media: mediaSchema, }); diff --git a/generated/schemas/classic-wow/guild.ts b/generated/schemas/classic-wow/guild.ts index 5ed3c6b3..2a677030 100644 --- a/generated/schemas/classic-wow/guild.ts +++ b/generated/schemas/classic-wow/guild.ts @@ -16,44 +16,44 @@ const guildSchema = nameIdKeySchema.extend({ realm: realmSchema, }); -const categoryProgressSchema = z.object({ +const categoryProgressSchema = z.strictObject({ category: nameIdKeySchema, points: z.number(), quantity: z.number(), }); -const recentEventSchema = z.object({ +const recentEventSchema = z.strictObject({ achievement: nameIdKeySchema, timestamp: z.number(), }); -const characterAchievementSchema = z.object({ +const characterAchievementSchema = z.strictObject({ achievement: nameIdKeySchema, character: characterSchema, }); -const rgbWithIdSchema = z.object({ +const rgbWithIdSchema = z.strictObject({ id: z.number(), rgba: colorSchema, }); -const childCriterumSchema = z.object({ +const childCriterumSchema = z.strictObject({ amount: z.number(), id: z.number(), is_completed: z.boolean(), }); -const borderSchema = z.object({ +const borderSchema = z.strictObject({ color: rgbWithIdSchema, id: z.number(), media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), }); -const criteriaSchema = z.object({ +const criteriaSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterumSchema).optional(), id: z.number(), @@ -74,30 +74,30 @@ export const guildAchievementsClassicEraResponseSchema = responseBaseSchema.exte guild: guildSchema, }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ achievement: nameIdKeySchema, completed_timestamp: z.number().optional(), criteria: criteriaSchema.optional(), id: z.number(), }); -const activityElementSchema = z.object({ - activity: z.object({ +const activityElementSchema = z.strictObject({ + activity: z.strictObject({ type: z.string(), }), character_achievement: characterAchievementSchema, timestamp: z.number(), }); -const crestSchema = z.object({ - background: z.object({ +const crestSchema = z.strictObject({ + background: z.strictObject({ color: rgbWithIdSchema, }), border: borderSchema, emblem: borderSchema, }); -const memberSchema = z.object({ +const memberSchema = z.strictObject({ character: rosterMemberCharacterSchema, rank: z.number(), }); diff --git a/generated/schemas/classic-wow/item.ts b/generated/schemas/classic-wow/item.ts index 52a55025..f6666b48 100644 --- a/generated/schemas/classic-wow/item.ts +++ b/generated/schemas/classic-wow/item.ts @@ -26,7 +26,7 @@ export const itemMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const inventoryTypeSchema = z.object({ +const inventoryTypeSchema = z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.union([ z.literal('BACK'), @@ -53,7 +53,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const itemQualitySchema = z.object({ +const itemQualitySchema = z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.union([ z.literal('ARTIFACT'), @@ -73,22 +73,22 @@ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const itemSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ id: z.number(), inventory_type: inventoryTypeSchema, is_equippable: z.boolean(), is_stackable: z.boolean(), - item_class: z.object({ + item_class: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), - item_subclass: z.object({ + item_subclass: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), level: z.number(), max_count: z.number(), - media: z.object({ + media: z.strictObject({ id: z.number(), }), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), @@ -108,13 +108,13 @@ export const itemSubClassResponseSchema = responseBaseSchema.extend({ verbose_name: z.string(), }); -const displaySchema = z.object({ +const displaySchema = z.strictObject({ color: colorSchema, display_string: z.string(), }); -const damageSchema = z.object({ - damage_class: z.object({ +const damageSchema = z.strictObject({ + damage_class: z.strictObject({ name: z.string(), type: z.string(), }), @@ -123,32 +123,32 @@ const damageSchema = z.object({ min_value: z.number(), }); -const durabilitySchema = z.object({ +const durabilitySchema = z.strictObject({ display_string: z.string(), value: z.number(), }); -const armorSchema = z.object({ +const armorSchema = z.strictObject({ display: displaySchema, value: z.number(), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ level: durabilitySchema, }); -const spellSchema = z.object({ +const spellSchema = z.strictObject({ description: z.string(), spell: nameIdKeySchema, }); -const weaponSchema = z.object({ +const weaponSchema = z.strictObject({ attack_speed: durabilitySchema, damage: damageSchema, dps: durabilitySchema, }); -const recipeItemDisplayStringsSchema = z.object({ +const recipeItemDisplayStringsSchema = z.strictObject({ copper: z.string(), gold: z.string(), header: z.string(), @@ -177,19 +177,19 @@ const statTypeCapitalizedSchema = z.union([ z.literal('VERSATILITY'), ]); -const statSchema = z.object({ +const statSchema = z.strictObject({ display: displaySchema, is_negated: z.boolean().optional(), - type: z.object({ + type: z.strictObject({ name: statTypeSchema, type: statTypeCapitalizedSchema, }), value: z.number(), }); -const recipeItemSchema = z.object({ +const recipeItemSchema = z.strictObject({ armor: armorSchema.optional(), - binding: z.object({ + binding: z.strictObject({ name: z.string(), type: z.string(), }), @@ -203,7 +203,7 @@ const recipeItemSchema = z.object({ name: z.string(), quality: itemQualitySchema, requirements: requirementsSchema, - sell_price: z.object({ + sell_price: z.strictObject({ display_strings: recipeItemDisplayStringsSchema, value: z.number(), }), @@ -211,11 +211,11 @@ const recipeItemSchema = z.object({ weapon: weaponSchema.optional(), }); -const recipeSchema = z.object({ +const recipeSchema = z.strictObject({ item: recipeItemSchema, reagents: z.array( nameIdKeySchema.and( - z.object({ + z.strictObject({ quantity: z.number(), }), ), @@ -223,10 +223,10 @@ const recipeSchema = z.object({ reagents_display_string: z.string(), }); -const previewItemSchema = z.object({ +const previewItemSchema = z.strictObject({ armor: armorSchema.optional(), binding: z - .object({ + .strictObject({ name: z.string(), type: z.string(), }) diff --git a/generated/schemas/classic-wow/media-search.ts b/generated/schemas/classic-wow/media-search.ts index 5e070ab0..6051b458 100644 --- a/generated/schemas/classic-wow/media-search.ts +++ b/generated/schemas/classic-wow/media-search.ts @@ -1,19 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema } from '../core'; +import { baseSearchParametersSchema, keyBaseSchema, mediaAssetSchema } from '../core'; export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); -const mediaAssetSchema = z.object({ - file_data_id: z.number(), - key: z.string(), - value: z.string(), -}); - export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ assets: z.array(mediaAssetSchema), id: z.number(), }), diff --git a/generated/schemas/classic-wow/playable-class.ts b/generated/schemas/classic-wow/playable-class.ts index b710d1cb..4f1c7af1 100644 --- a/generated/schemas/classic-wow/playable-class.ts +++ b/generated/schemas/classic-wow/playable-class.ts @@ -1,17 +1,35 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { genderNameSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { + genderNameSchema, + keyBaseSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; + +export const playableClassIndexResponseSchema = responseBaseSchema.extend({ + classes: z.array(nameIdKeySchema), +}); + +export const playableClassMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), +}); const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + additional_power_types: z.array(nameIdKeySchema).optional(), gender_name: genderNameSchema, media: mediaSchema, playable_races: z.array(nameIdKeySchema), power_type: nameIdKeySchema, - pvp_talent_slots: z.object({ + pvp_talent_slots: z.strictObject({ href: z.string(), }), + specializations: z.array(nameIdKeySchema).optional(), }); diff --git a/generated/schemas/classic-wow/pvp-season.ts b/generated/schemas/classic-wow/pvp-season.ts index 4847dd08..ba4b7e4a 100644 --- a/generated/schemas/classic-wow/pvp-season.ts +++ b/generated/schemas/classic-wow/pvp-season.ts @@ -8,10 +8,10 @@ const seasonSchema = keyBaseSchema.extend({ export const pvpSeasonResponseSchema = responseBaseSchema.extend({ id: z.number(), - leaderboards: z.object({ + leaderboards: z.strictObject({ href: z.string(), }), - rewards: z.object({ + rewards: z.strictObject({ href: z.string(), }), season_name: z.string().optional(), diff --git a/generated/schemas/classic-wow/realm.ts b/generated/schemas/classic-wow/realm.ts index 98eeb215..b182591d 100644 --- a/generated/schemas/classic-wow/realm.ts +++ b/generated/schemas/classic-wow/realm.ts @@ -65,19 +65,19 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const realmSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - region: z.object({ + region: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), @@ -86,7 +86,7 @@ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: realmCategorySchema, - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), is_tournament: z.boolean(), @@ -94,7 +94,7 @@ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), diff --git a/generated/schemas/classic-wow/region.ts b/generated/schemas/classic-wow/region.ts index 6c42d049..38363d3d 100644 --- a/generated/schemas/classic-wow/region.ts +++ b/generated/schemas/classic-wow/region.ts @@ -4,7 +4,7 @@ import { nameIdSchema, responseBaseSchema } from '../core'; export const regionIndexResponseSchema = responseBaseSchema.extend({ regions: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), diff --git a/generated/schemas/core/base.ts b/generated/schemas/core/base.ts index bbfb110d..fa68190d 100644 --- a/generated/schemas/core/base.ts +++ b/generated/schemas/core/base.ts @@ -1,12 +1,12 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const baseSearchParametersSchema = z.object({ +export const baseSearchParametersSchema = z.strictObject({ _page: z.number().optional(), orderby: z.union([z.array(z.string()), z.string()]).optional(), }); -export const colorSchema = z.object({ +export const colorSchema = z.strictObject({ a: z.number(), b: z.number(), g: z.number(), @@ -15,31 +15,31 @@ export const colorSchema = z.object({ export const factionsSchema = z.union([z.literal('ALLIANCE'), z.literal('HORDE')]); -export const genderSchema = z.object({ +export const genderSchema = z.strictObject({ name: z.union([z.literal('Female'), z.literal('Male')]), type: z.union([z.literal('FEMALE'), z.literal('MALE')]), }); -export const genderNameSchema = z.object({ - female: z.string(), - male: z.string(), +export const genderNameSchema = z.strictObject({ + female: z.string().nullable(), + male: z.string().nullable(), }); -export const hrefSchema = z.object({ +export const hrefSchema = z.strictObject({ href: z.string(), }); -export const keyBaseSchema = z.object({ +export const keyBaseSchema = z.strictObject({ key: hrefSchema, }); -export const mediaAssetSchema = z.object({ +export const mediaAssetSchema = z.strictObject({ file_data_id: z.number(), key: z.string(), value: z.string(), }); -export const nameIdSchema = z.object({ +export const nameIdSchema = z.strictObject({ id: z.number(), name: z.string(), }); @@ -50,8 +50,8 @@ export const realmSchema = nameIdKeySchema.extend({ slug: z.string(), }); -export const responseBaseSchema = z.object({ - _links: z.object({ +export const responseBaseSchema = z.strictObject({ + _links: z.strictObject({ self: hrefSchema, }), }); @@ -60,7 +60,7 @@ export const characterSchema = nameIdKeySchema.extend({ realm: realmSchema, }); -export const factionSchema = z.object({ +export const factionSchema = z.strictObject({ name: z.union([z.literal('Alliance'), z.literal('Horde')]), type: factionsSchema, }); diff --git a/generated/schemas/d3/act.ts b/generated/schemas/d3/act.ts index 2dac17b0..85589bf7 100644 --- a/generated/schemas/d3/act.ts +++ b/generated/schemas/d3/act.ts @@ -1,24 +1,24 @@ // Generated by ts-to-zod import { z } from 'zod'; -const questSchema = z.object({ +const questSchema = z.strictObject({ id: z.number(), name: z.string(), slug: z.string(), }); -const actSchema = z.object({ +const actSchema = z.strictObject({ name: z.string(), number: z.number(), quests: z.array(questSchema), slug: z.string(), }); -export const actIndexResponseSchema = z.object({ +export const actIndexResponseSchema = z.strictObject({ acts: z.array(actSchema), }); -export const actResponseSchema = z.object({ +export const actResponseSchema = z.strictObject({ name: z.string(), number: z.number(), quests: z.array(questSchema), diff --git a/generated/schemas/d3/artisan-and-recipe.ts b/generated/schemas/d3/artisan-and-recipe.ts index 4752dfb7..7b434210 100644 --- a/generated/schemas/d3/artisan-and-recipe.ts +++ b/generated/schemas/d3/artisan-and-recipe.ts @@ -1,7 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -const itemSchema = z.object({ +const itemSchema = z.strictObject({ icon: z.string(), id: z.string(), name: z.string(), @@ -9,12 +9,12 @@ const itemSchema = z.object({ slug: z.string(), }); -const reagentSchema = z.object({ +const reagentSchema = z.strictObject({ item: itemSchema, quantity: z.number(), }); -const recipeSchema = z.object({ +const recipeSchema = z.strictObject({ cost: z.number(), id: z.string(), itemProduced: itemSchema, @@ -23,24 +23,24 @@ const recipeSchema = z.object({ slug: z.string(), }); -const tierSchema = z.object({ +const tierSchema = z.strictObject({ taughtRecipes: z.array(recipeSchema), tier: z.number(), trainedRecipes: z.array(recipeSchema), }); -const trainingSchema = z.object({ +const trainingSchema = z.strictObject({ tiers: z.array(tierSchema), }); -export const artisanResponseSchema = z.object({ +export const artisanResponseSchema = z.strictObject({ name: z.string(), portrait: z.string(), slug: z.string(), training: trainingSchema, }); -export const recipeResponseSchema = z.object({ +export const recipeResponseSchema = z.strictObject({ cost: z.number(), id: z.string(), itemProduced: itemSchema, diff --git a/generated/schemas/d3/character-class-and-skill.ts b/generated/schemas/d3/character-class-and-skill.ts index cc0f3a11..2d2779cc 100644 --- a/generated/schemas/d3/character-class-and-skill.ts +++ b/generated/schemas/d3/character-class-and-skill.ts @@ -1,12 +1,12 @@ // Generated by ts-to-zod import { z } from 'zod'; -const skillCategorySchema = z.object({ +const skillCategorySchema = z.strictObject({ name: z.string(), slug: z.string(), }); -const skillSchema = z.object({ +const skillSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), flavorText: z.string().optional(), @@ -17,7 +17,7 @@ const skillSchema = z.object({ tooltipUrl: z.string(), }); -const runeSchema = z.object({ +const runeSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), level: z.number(), @@ -26,7 +26,7 @@ const runeSchema = z.object({ type: z.string(), }); -export const characterClassResponseSchema = z.object({ +export const characterClassResponseSchema = z.strictObject({ femaleName: z.string(), icon: z.string(), maleName: z.string(), @@ -36,7 +36,7 @@ export const characterClassResponseSchema = z.object({ slug: z.string(), }); -export const skillResponseSchema = z.object({ +export const skillResponseSchema = z.strictObject({ runes: z.array(runeSchema), skill: skillSchema, }); diff --git a/generated/schemas/d3/follower.ts b/generated/schemas/d3/follower.ts index 11722d1b..487df799 100644 --- a/generated/schemas/d3/follower.ts +++ b/generated/schemas/d3/follower.ts @@ -1,7 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -const skillSchema = z.object({ +const skillSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), icon: z.string(), @@ -11,7 +11,7 @@ const skillSchema = z.object({ tooltipUrl: z.string(), }); -export const followerResponseSchema = z.object({ +export const followerResponseSchema = z.strictObject({ name: z.string(), portrait: z.string(), realName: z.string(), diff --git a/generated/schemas/d3/game-data.ts b/generated/schemas/d3/game-data.ts index ead52e8b..df58a56b 100644 --- a/generated/schemas/d3/game-data.ts +++ b/generated/schemas/d3/game-data.ts @@ -5,7 +5,7 @@ import { responseBaseSchema } from '../core'; export const eraIndexResponseSchema = responseBaseSchema.extend({ current_era: z.number(), era: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), @@ -18,7 +18,7 @@ export const seasonIndexResponseSchema = responseBaseSchema.extend({ generated_by: z.string(), last_update_time: z.string(), season: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), @@ -26,10 +26,10 @@ export const seasonIndexResponseSchema = responseBaseSchema.extend({ service_season_state: z.string(), }); -const leaderboardSchema = z.object({ +const leaderboardSchema = z.strictObject({ hardcore: z.boolean().optional(), hero_class_string: z.string().optional(), - ladder: z.object({ + ladder: z.strictObject({ href: z.string(), }), team_size: z.number().optional(), @@ -54,24 +54,24 @@ const leaderboardIdSchema = z.union([ z.literal('RiftTime'), ]); -const selfSchema = z.object({ +const selfSchema = z.strictObject({ href: z.string(), }); -const rowDataSchema = z.object({ +const rowDataSchema = z.strictObject({ id: leaderboardIdSchema, number: z.number().optional(), string: z.string().optional(), timestamp: z.number().optional(), }); -const playerSchema = z.object({ +const playerSchema = z.strictObject({ accountId: z.number(), data: z.array(rowDataSchema), key: z.string(), }); -const columnSchema = z.object({ +const columnSchema = z.strictObject({ hidden: z.boolean(), id: leaderboardIdSchema, label: z.string().nullable(), @@ -79,13 +79,13 @@ const columnSchema = z.object({ type: z.union([z.literal('DATETIME'), z.literal('NUMBER'), z.literal('STRING')]), }); -const rowSchema = z.object({ +const rowSchema = z.strictObject({ data: z.array(rowDataSchema), order: z.number(), player: z.array(playerSchema), }); -const eraLeaderboardSchema = z.object({ +const eraLeaderboardSchema = z.strictObject({ hardcore: z.boolean().optional(), hero_class_string: z.string().optional(), ladder: selfSchema, diff --git a/generated/schemas/d3/item-type.ts b/generated/schemas/d3/item-type.ts index 92c1e5b1..5ae25f8f 100644 --- a/generated/schemas/d3/item-type.ts +++ b/generated/schemas/d3/item-type.ts @@ -1,13 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const itemTypeIndexResponseSchema = z.object({ +export const itemTypeIndexResponseSchema = z.strictObject({ id: z.string(), name: z.string(), path: z.string(), }); -export const itemTypeResponseSchema = z.object({ +export const itemTypeResponseSchema = z.strictObject({ icon: z.string(), id: z.string(), name: z.string(), diff --git a/generated/schemas/d3/item.ts b/generated/schemas/d3/item.ts index bc1d8dca..af7e18cc 100644 --- a/generated/schemas/d3/item.ts +++ b/generated/schemas/d3/item.ts @@ -1,27 +1,27 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const primarySchema = z.object({ +export const primarySchema = z.strictObject({ text: z.string(), textHtml: z.string(), }); -export const attributesSchema = z.object({ +export const attributesSchema = z.strictObject({ other: z.array(z.unknown()), primary: z.array(primarySchema), secondary: z.array(primarySchema), }); -export const randomAffixSchema = z.object({ +export const randomAffixSchema = z.strictObject({ oneOf: z.array(primarySchema), }); -export const typeSchema = z.object({ +export const typeSchema = z.strictObject({ id: z.string(), twoHanded: z.boolean(), }); -export const itemResponseSchema = z.object({ +export const itemResponseSchema = z.strictObject({ accountBound: z.boolean(), attributes: attributesSchema, color: z.string(), diff --git a/generated/schemas/d3/profile.ts b/generated/schemas/d3/profile.ts index 9d3fa64f..4224eafb 100644 --- a/generated/schemas/d3/profile.ts +++ b/generated/schemas/d3/profile.ts @@ -1,7 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -const attributesSchema = z.object({ +const attributesSchema = z.strictObject({ primary: z.array(z.string()), secondary: z.array(z.string()).optional(), }); @@ -14,29 +14,29 @@ const displayColorSchema = z.union([ z.literal('yellow'), ]); -const setSchema = z.object({ +const setSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), name: z.string(), slug: z.string(), }); -const killsSchema = z.object({ +const killsSchema = z.strictObject({ elites: z.number(), }); -const artisanSchema = z.object({ +const artisanSchema = z.strictObject({ level: z.number(), slug: z.union([z.literal('blacksmith'), z.literal('jeweler'), z.literal('mystic')]), }); -const accountResponseKillsSchema = z.object({ +const accountResponseKillsSchema = z.strictObject({ elites: z.number(), hardcoreMonsters: z.number(), monsters: z.number(), }); -const progressionSchema = z.object({ +const progressionSchema = z.strictObject({ act1: z.boolean(), act2: z.boolean(), act3: z.boolean(), @@ -44,7 +44,7 @@ const progressionSchema = z.object({ act5: z.boolean(), }); -const timePlayedSchema = z.object({ +const timePlayedSchema = z.strictObject({ barbarian: z.number(), crusader: z.number(), 'demon-hunter': z.number(), @@ -54,7 +54,7 @@ const timePlayedSchema = z.object({ wizard: z.number(), }); -const accountHeroItemSchema = z.object({ +const accountHeroItemSchema = z.strictObject({ icon: z.string(), id: z.string(), name: z.string(), @@ -62,12 +62,12 @@ const accountHeroItemSchema = z.object({ slug: z.string(), }); -const completedQuestSchema = z.object({ +const completedQuestSchema = z.strictObject({ name: z.string(), slug: z.string(), }); -const runeSchema = z.object({ +const runeSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), level: z.number(), @@ -76,7 +76,7 @@ const runeSchema = z.object({ type: z.string(), }); -const skillSchema = z.object({ +const skillSchema = z.strictObject({ description: z.string(), descriptionHtml: z.string(), flavorText: z.string().optional(), @@ -87,30 +87,30 @@ const skillSchema = z.object({ tooltipUrl: z.string(), }); -const itemProducedSchema = z.object({ +const itemProducedSchema = z.strictObject({ id: z.string(), path: z.string(), }); -const reagentSchema = z.object({ +const reagentSchema = z.strictObject({ item: accountHeroItemSchema, quantity: z.number(), }); -const dyeSchema = z.object({ +const dyeSchema = z.strictObject({ icon: z.string(), id: z.string(), name: z.string(), tooltipParams: z.string(), }); -const statsSchema = z.object({ +const statsSchema = z.strictObject({ experienceBonus: z.number(), goldFind: z.number(), magicFind: z.number(), }); -const itemSchema = z.object({ +const itemSchema = z.strictObject({ displayColor: displayColorSchema.optional(), dyeColor: dyeSchema.optional(), icon: z.string(), @@ -119,7 +119,7 @@ const itemSchema = z.object({ tooltipParams: z.string(), }); -const craftedBySchema = z.object({ +const craftedBySchema = z.strictObject({ cost: z.number(), id: z.string(), itemProduced: itemProducedSchema, @@ -128,7 +128,7 @@ const craftedBySchema = z.object({ slug: z.string(), }); -const scoundrelSchema = z.object({ +const scoundrelSchema = z.strictObject({ items: z.record(z.string(), itemSchema), level: z.number(), skills: z.array(skillSchema), @@ -136,7 +136,7 @@ const scoundrelSchema = z.object({ stats: statsSchema, }); -const gemSchema = z.object({ +const gemSchema = z.strictObject({ attributes: z.array(z.string()), isGem: z.boolean(), isJewel: z.boolean(), @@ -145,20 +145,20 @@ const gemSchema = z.object({ jewelSecondaryUnlockRank: z.number().optional(), }); -const heroKillsSchema = z.object({ +const heroKillsSchema = z.strictObject({ elites: z.number(), }); -const actSchema = z.object({ +const actSchema = z.strictObject({ completed: z.boolean(), completedQuests: z.array(completedQuestSchema), }); -const passiveSchema = z.object({ +const passiveSchema = z.strictObject({ skill: skillSchema, }); -const seasonSchema = z.object({ +const seasonSchema = z.strictObject({ highestHardcoreLevel: z.number(), kills: accountResponseKillsSchema, paragonLevel: z.number(), @@ -167,12 +167,12 @@ const seasonSchema = z.object({ timePlayed: timePlayedSchema, }); -const activeSchema = z.object({ +const activeSchema = z.strictObject({ rune: runeSchema, skill: skillSchema, }); -const templarItemsSchema = z.object({ +const templarItemsSchema = z.strictObject({ bracers: itemSchema, feet: itemSchema, hands: itemSchema, @@ -184,7 +184,7 @@ const templarItemsSchema = z.object({ waist: itemSchema, }); -const followerItemSchema = z.object({ +const followerItemSchema = z.strictObject({ accountBound: z.boolean(), armor: z.number(), attacksPerSecond: z.number(), @@ -215,7 +215,7 @@ const followerItemSchema = z.object({ typeName: z.string(), }); -export const accountHeroItemsResponseSchema = z.object({ +export const accountHeroItemsResponseSchema = z.strictObject({ accountBound: z.boolean(), armor: z.number(), attacksPerSecond: z.number(), @@ -246,7 +246,7 @@ export const accountHeroItemsResponseSchema = z.object({ typeName: z.string(), }); -const heroProgressionSchema = z.object({ +const heroProgressionSchema = z.strictObject({ act1: actSchema, act2: actSchema, act3: actSchema, @@ -254,12 +254,12 @@ const heroProgressionSchema = z.object({ act5: actSchema, }); -const skillsSchema = z.object({ +const skillsSchema = z.strictObject({ active: z.array(activeSchema), passive: z.array(passiveSchema), }); -const heroSchema = z.object({ +const heroSchema = z.strictObject({ class: z.string(), classSlug: z.string(), dead: z.boolean(), @@ -274,11 +274,11 @@ const heroSchema = z.object({ seasonal: z.boolean(), }); -const enchantressItemsSchema = z.object({ +const enchantressItemsSchema = z.strictObject({ mainHand: itemSchema, }); -const enchantressSchema = z.object({ +const enchantressSchema = z.strictObject({ items: enchantressItemsSchema, level: z.number(), skills: z.array(z.unknown()), @@ -286,7 +286,7 @@ const enchantressSchema = z.object({ stats: statsSchema, }); -const templarSchema = z.object({ +const templarSchema = z.strictObject({ items: templarItemsSchema, level: z.number(), skills: z.array(skillSchema), @@ -294,19 +294,19 @@ const templarSchema = z.object({ stats: statsSchema, }); -export const accountHeroFollowerItemsResponseSchema = z.object({ +export const accountHeroFollowerItemsResponseSchema = z.strictObject({ enchantress: z.record(z.string(), followerItemSchema), scoundrel: z.record(z.string(), followerItemSchema), templar: z.record(z.string(), followerItemSchema), }); -const followersSchema = z.object({ +const followersSchema = z.strictObject({ enchantress: enchantressSchema, scoundrel: scoundrelSchema, templar: templarSchema, }); -export const accountResponseSchema = z.object({ +export const accountResponseSchema = z.strictObject({ battleTag: z.string(), blacksmith: artisanSchema, blacksmithHardcore: artisanSchema, @@ -335,7 +335,7 @@ export const accountResponseSchema = z.object({ timePlayed: timePlayedSchema, }); -export const accountHeroResponseSchema = z.object({ +export const accountHeroResponseSchema = z.strictObject({ alive: z.boolean(), class: z.string(), followers: followersSchema, diff --git a/generated/schemas/hs/card-backs.ts b/generated/schemas/hs/card-backs.ts index e9d34318..f9cad0b4 100644 --- a/generated/schemas/hs/card-backs.ts +++ b/generated/schemas/hs/card-backs.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { localesSchema } from '../core'; -export const cardBackSearchParametersSchema = z.object({ +export const cardBackSearchParametersSchema = z.strictObject({ cardBackCategory: z .union([ z.literal('achieve'), @@ -44,7 +44,7 @@ export const cardBackSearchParametersSchema = z.object({ textFilter: z.string().optional(), }); -export const singleCardBackSearchResponseSchema = z.object({ +export const singleCardBackSearchResponseSchema = z.strictObject({ id: z.number(), image: z.string(), name: z.union([z.record(localesSchema, z.string()), z.string()]), @@ -65,7 +65,7 @@ export const searchOptionsSchema = z.union([ export const sortOptionsSchema = z.union([z.literal('asc'), z.literal('desc')]); -export const cardBackSearchResponseSchema = z.object({ +export const cardBackSearchResponseSchema = z.strictObject({ cardBacks: z.array(singleCardBackSearchResponseSchema), cardCount: z.number(), page: z.number(), diff --git a/generated/schemas/hs/cards.ts b/generated/schemas/hs/cards.ts index d09e16bc..b3907066 100644 --- a/generated/schemas/hs/cards.ts +++ b/generated/schemas/hs/cards.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { localesSchema } from '../core'; -export const fetchOneCardResponseSchema = z.object({ +export const fetchOneCardResponseSchema = z.strictObject({ artistName: z.string(), attack: z.number(), cardSetId: z.number(), @@ -36,7 +36,7 @@ export const gameModeSchema = z.union([ z.literal('standard'), ]); -const baseSearchParametersSchema = z.object({ +const baseSearchParametersSchema = z.strictObject({ gameMode: gameModeSchema.optional(), locale: localesSchema.optional(), mercenaryRole: z.string().optional(), @@ -61,7 +61,7 @@ const baseSearchParametersSchema = z.object({ .optional(), }); -const statsByLevelSchema = z.object({ +const statsByLevelSchema = z.strictObject({ attack: z.number(), health: z.number(), }); @@ -80,7 +80,7 @@ export const cardSearchParametersSchema = baseSearchParametersSchema.extend({ mercenaryId: z.union([z.array(z.number()), z.number()]).optional(), }); -const mercenaryHeroSchema = z.object({ +const mercenaryHeroSchema = z.strictObject({ collectible: z.number(), craftingCost: z.number(), default: z.number(), @@ -91,7 +91,7 @@ const mercenaryHeroSchema = z.object({ statsByLevel: z.record(z.string(), statsByLevelSchema), }); -const cardSchema = z.object({ +const cardSchema = z.strictObject({ artistName: z.string().nullable(), attack: z.number(), cardSetId: z.number(), @@ -117,7 +117,7 @@ const cardSchema = z.object({ text: z.string(), }); -export const cardSearchResponseSchema = z.object({ +export const cardSearchResponseSchema = z.strictObject({ cardCount: z.number(), cards: z.array(cardSchema), page: z.number(), diff --git a/generated/schemas/hs/decks.ts b/generated/schemas/hs/decks.ts index 8d80f32f..bac94b46 100644 --- a/generated/schemas/hs/decks.ts +++ b/generated/schemas/hs/decks.ts @@ -1,7 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -const cardSchema = z.object({ +const cardSchema = z.strictObject({ armor: z.number().optional(), artistName: z.string(), attack: z.number().optional(), @@ -30,13 +30,13 @@ const cardSchema = z.object({ text: z.string(), }); -const classSchema = z.object({ +const classSchema = z.strictObject({ id: z.number(), name: z.string(), slug: z.string(), }); -const heroSchema = z.object({ +const heroSchema = z.strictObject({ artistName: z.string().nullable(), cardSetId: z.number(), cardTypeId: z.number(), @@ -60,16 +60,16 @@ const heroSchema = z.object({ }); export const deckSearchParametersSchema = z.union([ - z.object({ + z.strictObject({ code: z.string(), }), - z.object({ + z.strictObject({ hero: z.string().optional(), ids: z.string(), }), ]); -export const deckResponseSchema = z.object({ +export const deckResponseSchema = z.strictObject({ cardCount: z.number(), cards: z.array(cardSchema), class: classSchema, diff --git a/generated/schemas/hs/metadata.ts b/generated/schemas/hs/metadata.ts index 8e13b3c1..c855cd2a 100644 --- a/generated/schemas/hs/metadata.ts +++ b/generated/schemas/hs/metadata.ts @@ -7,7 +7,7 @@ const gameModeSchema = nameIdSchema.extend({ slug: z.string(), }); -const classSchema = z.object({ +const classSchema = z.strictObject({ alternateHeroCardIds: z.array(z.number()).optional(), cardId: z.number().optional(), heroPowerCardId: z.number().optional(), @@ -29,7 +29,7 @@ const raritySchema = nameIdSchema.extend({ slug: z.string(), }); -const setGroupSchema = z.object({ +const setGroupSchema = z.strictObject({ cardSets: z.array(z.string()), icon: z.string().optional(), name: z.string(), @@ -53,7 +53,7 @@ const setSchema = nameIdSchema.extend({ type: setTypeSchema, }); -export const allMetadataResponseSchema = z.object({ +export const allMetadataResponseSchema = z.strictObject({ arenaIds: z.array(z.number()), bgGameModes: z.array(gameModeSchema), cardBackCategories: z.array(gameModeSchema), diff --git a/generated/schemas/sc2/ladder.ts b/generated/schemas/sc2/ladder.ts index 2da44fae..49b5282a 100644 --- a/generated/schemas/sc2/ladder.ts +++ b/generated/schemas/sc2/ladder.ts @@ -1,7 +1,7 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const seasonResponseSchema = z.object({ +export const seasonResponseSchema = z.strictObject({ endDate: z.string(), number: z.number(), seasonId: z.number(), @@ -9,7 +9,7 @@ export const seasonResponseSchema = z.object({ year: z.number(), }); -const teamMemberSchema = z.object({ +const teamMemberSchema = z.strictObject({ clanTag: z.string().optional(), displayName: z.string(), favoriteRace: z.union([z.literal('protoss'), z.literal('random'), z.literal('terran'), z.literal('zerg')]), @@ -18,7 +18,7 @@ const teamMemberSchema = z.object({ region: z.number(), }); -const ladderTeamSchema = z.object({ +const ladderTeamSchema = z.strictObject({ joinTimestamp: z.number(), losses: z.number(), mmr: z.number(), @@ -28,6 +28,6 @@ const ladderTeamSchema = z.object({ wins: z.number(), }); -export const grandmasterLeaderboardResponseSchema = z.object({ +export const grandmasterLeaderboardResponseSchema = z.strictObject({ ladderTeams: z.array(ladderTeamSchema), }); diff --git a/generated/schemas/sc2/league.ts b/generated/schemas/sc2/league.ts index 5dddbc86..9db63a51 100644 --- a/generated/schemas/sc2/league.ts +++ b/generated/schemas/sc2/league.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { responseBaseSchema } from '../core'; -const keySchema = z.object({ +const keySchema = z.strictObject({ league_id: z.number(), queue_id: z.number(), season_id: z.number(), @@ -37,13 +37,13 @@ export const starcraftLeagueQueueSchema = z.union([ export const starcraftLeagueTeamTypeSchema = z.union([z.literal('arranged'), z.literal('random')]); -const divisionSchema = z.object({ +const divisionSchema = z.strictObject({ id: z.number(), ladder_id: z.number(), member_count: z.number(), }); -const tierSchema = z.object({ +const tierSchema = z.strictObject({ division: z.array(divisionSchema), id: z.number(), }); diff --git a/generated/schemas/sc2/legacy.ts b/generated/schemas/sc2/legacy.ts index 73dadd9e..53d8363b 100644 --- a/generated/schemas/sc2/legacy.ts +++ b/generated/schemas/sc2/legacy.ts @@ -1,13 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const legacyLaddersResponseSchema = z.object({ +export const legacyLaddersResponseSchema = z.strictObject({ currentSeason: z.array(z.unknown()), previousSeason: z.array(z.unknown()), showcasePlacement: z.array(z.unknown()), }); -const matchSchema = z.object({ +const matchSchema = z.strictObject({ date: z.number(), decision: z.union([z.literal('Left'), z.literal('Loss'), z.literal('Win')]), map: z.string(), @@ -15,12 +15,12 @@ const matchSchema = z.object({ type: z.union([z.literal('2v2'), z.literal('3v3'), z.literal('Co-Op'), z.literal('Custom')]), }); -const campaignSchema = z.object({ +const campaignSchema = z.strictObject({ hots: z.string(), wol: z.string(), }); -const careerSchema = z.object({ +const careerSchema = z.strictObject({ careerTotalGames: z.number(), highest1v1Rank: z.string(), highestTeamRank: z.string(), @@ -31,7 +31,7 @@ const careerSchema = z.object({ zergWins: z.number(), }); -const iconSchema = z.object({ +const iconSchema = z.strictObject({ h: z.number(), offset: z.number(), url: z.string(), @@ -40,12 +40,12 @@ const iconSchema = z.object({ y: z.number(), }); -const rewardsSchema = z.object({ +const rewardsSchema = z.strictObject({ earned: z.array(z.string()), selected: z.array(z.string()), }); -const animationSchema = z.object({ +const animationSchema = z.strictObject({ achievementId: z.string(), command: z.literal('/dance').optional(), icon: iconSchema, @@ -54,7 +54,7 @@ const animationSchema = z.object({ title: z.string(), }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ achievementId: z.string(), categoryId: z.string(), description: z.string(), @@ -63,43 +63,43 @@ const achievementSchema = z.object({ title: z.string(), }); -const pointsSchema = z.object({ +const pointsSchema = z.strictObject({ categoryPoints: z.record(z.string(), z.number()), totalPoints: z.number(), }); -const categoryChildSchema = z.object({ +const categoryChildSchema = z.strictObject({ categoryId: z.string(), featuredAchievementId: z.string(), title: z.string(), }); -const statSchema = z.object({ +const statSchema = z.strictObject({ games: z.number(), type: z.string(), wins: z.number(), }); -const swarmLevelsByRaceSchema = z.object({ +const swarmLevelsByRaceSchema = z.strictObject({ currentLevelXP: z.number(), level: z.number(), totalLevelXP: z.number(), }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ categoryId: z.string(), children: z.array(categoryChildSchema).optional(), featuredAchievementId: z.string(), title: z.string(), }); -export const legacyMatchHistoryResponseSchema = z.object({ +export const legacyMatchHistoryResponseSchema = z.strictObject({ matches: z.array(matchSchema), }); -const achievementsSchema = z.object({ +const achievementsSchema = z.strictObject({ achievements: z.array( - z.object({ + z.strictObject({ achievementId: z.string(), completionDate: z.number(), }), @@ -107,7 +107,7 @@ const achievementsSchema = z.object({ points: pointsSchema, }); -const seasonSchema = z.object({ +const seasonSchema = z.strictObject({ seasonId: z.number(), seasonNumber: z.number(), seasonYear: z.number(), @@ -115,14 +115,14 @@ const seasonSchema = z.object({ totalGamesThisSeason: z.number(), }); -const swarmLevelsSchema = z.object({ +const swarmLevelsSchema = z.strictObject({ level: z.number(), protoss: swarmLevelsByRaceSchema, terran: swarmLevelsByRaceSchema, zerg: swarmLevelsByRaceSchema, }); -export const legacyRewardsResponseSchema = z.object({ +export const legacyRewardsResponseSchema = z.strictObject({ animations: z.array(animationSchema), portraits: z.array(animationSchema), protossDecals: z.array(animationSchema), @@ -131,12 +131,12 @@ export const legacyRewardsResponseSchema = z.object({ zergDecals: z.array(animationSchema), }); -export const legacyAchievementsResponseSchema = z.object({ +export const legacyAchievementsResponseSchema = z.strictObject({ achievements: z.array(achievementSchema), categories: z.array(categorySchema), }); -export const legacyProfileResponseSchema = z.object({ +export const legacyProfileResponseSchema = z.strictObject({ achievements: achievementsSchema, campaign: campaignSchema, career: careerSchema, diff --git a/generated/schemas/sc2/profile.ts b/generated/schemas/sc2/profile.ts index 64a8b8db..31e63293 100644 --- a/generated/schemas/sc2/profile.ts +++ b/generated/schemas/sc2/profile.ts @@ -1,19 +1,19 @@ // Generated by ts-to-zod import { z } from 'zod'; -export const ladderResponseSchema = z.object({ +export const ladderResponseSchema = z.strictObject({ allLadderMemberships: z.array(z.unknown()), ladderTeams: z.array(z.unknown()), ranksAndPools: z.array(z.unknown()), }); -export const ladderSummaryResponseSchema = z.object({ +export const ladderSummaryResponseSchema = z.strictObject({ allLadderMemberships: z.array(z.unknown()), placementMatches: z.array(z.unknown()), showCaseEntries: z.array(z.unknown()), }); -export const metadataResponseSchema = z.object({ +export const metadataResponseSchema = z.strictObject({ avatarUrl: z.string(), name: z.string(), profileId: z.string(), @@ -22,7 +22,7 @@ export const metadataResponseSchema = z.object({ regionId: z.number(), }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ categoryId: z.string(), chainAchievementIds: z.array(z.string()), chainRewardSize: z.number(), @@ -37,7 +37,7 @@ const achievementSchema = z.object({ uiOrderHint: z.number(), }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ childrenCategoryIds: z.array(z.string()), featuredAchievementId: z.string(), id: z.string(), @@ -48,7 +48,7 @@ const categorySchema = z.object({ uiOrderHint: z.number(), }); -const criterionSchema = z.object({ +const criterionSchema = z.strictObject({ achievementId: z.string(), description: z.string(), evaluationClass: z.union([ @@ -64,7 +64,7 @@ const criterionSchema = z.object({ uiOrderHint: z.number(), }); -const rewardSchema = z.object({ +const rewardSchema = z.strictObject({ achievementId: z.string().optional(), command: z.literal('/dance').optional(), flags: z.number(), @@ -76,7 +76,7 @@ const rewardSchema = z.object({ unlockableType: z.string(), }); -export const staticProfileResponseSchema = z.object({ +export const staticProfileResponseSchema = z.strictObject({ achievements: z.array(achievementSchema), categories: z.array(categorySchema), criteria: z.array(criterionSchema), diff --git a/generated/schemas/wow/account-profile.ts b/generated/schemas/wow/account-profile.ts index 966aaed2..555d7cea 100644 --- a/generated/schemas/wow/account-profile.ts +++ b/generated/schemas/wow/account-profile.ts @@ -10,35 +10,35 @@ import { realmSchema, } from '../core'; -const linksSchema = z.object({ +const linksSchema = z.strictObject({ profile: hrefSchema, self: hrefSchema, user: hrefSchema, }); -const heirloomSchema = z.object({ +const heirloomSchema = z.strictObject({ heirloom: nameIdKeySchema, - upgrade: z.object({ + upgrade: z.strictObject({ level: z.number(), }), }); -const mountSchema = z.object({ +const mountSchema = z.strictObject({ is_favorite: z.boolean().optional(), mount: nameIdKeySchema, }); -const toySchema = z.object({ +const toySchema = z.strictObject({ is_favorite: z.boolean().optional(), toy: nameIdKeySchema, }); -const slotSchema = z.object({ +const slotSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const positionSchema = z.object({ +const positionSchema = z.strictObject({ facing: z.number(), map: nameIdSchema, x: z.number(), @@ -47,7 +47,7 @@ const positionSchema = z.object({ zone: nameIdSchema, }); -const protectedStatsSchema = z.object({ +const protectedStatsSchema = z.strictObject({ level_gold_gained: z.number(), level_gold_lost: z.number(), level_item_value_gained: z.number(), @@ -58,7 +58,7 @@ const protectedStatsSchema = z.object({ total_number_deaths: z.number(), }); -const characterSchema = z.object({ +const characterSchema = z.strictObject({ character: hrefSchema, faction: factionSchema, gender: genderSchema, @@ -71,24 +71,24 @@ const characterSchema = z.object({ realm: realmSchema, }); -const qualitySchema = z.object({ +const qualitySchema = z.strictObject({ name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), }); -const statsSchema = z.object({ +const statsSchema = z.strictObject({ breed_id: z.number(), health: z.number(), power: z.number(), speed: z.number(), }); -const wowAccountSchema = z.object({ +const wowAccountSchema = z.strictObject({ characters: z.array(characterSchema), id: z.number(), }); -export const accountCollectionsIndexResponseSchema = z.object({ +export const accountCollectionsIndexResponseSchema = z.strictObject({ _links: linksSchema, heirlooms: hrefSchema, mounts: hrefSchema, @@ -97,21 +97,21 @@ export const accountCollectionsIndexResponseSchema = z.object({ transmogs: hrefSchema, }); -export const accountHeirloomsCollectionSummaryResponseSchema = z.object({ +export const accountHeirloomsCollectionSummaryResponseSchema = z.strictObject({ _links: linksSchema, heirlooms: z.array(heirloomSchema), }); -export const accountMountsCollectionSummaryResponseSchema = z.object({ +export const accountMountsCollectionSummaryResponseSchema = z.strictObject({ _links: linksSchema, mounts: z.array(mountSchema), }); -const petSchema = z.object({ +const petSchema = z.strictObject({ active_slot: z.number().optional(), creature_display: keyBaseSchema .and( - z.object({ + z.strictObject({ id: z.number(), }), ) @@ -126,25 +126,25 @@ const petSchema = z.object({ stats: statsSchema, }); -export const accountProfileSummaryResponseSchema = z.object({ +export const accountProfileSummaryResponseSchema = z.strictObject({ _links: linksSchema, collections: hrefSchema, id: z.number(), wow_accounts: z.array(wowAccountSchema).optional(), }); -export const accountToysCollectionSummaryResponseSchema = z.object({ +export const accountToysCollectionSummaryResponseSchema = z.strictObject({ _links: linksSchema, toys: z.array(toySchema), }); -export const accountTransmogsCollectionSummaryResponseSchema = z.object({ +export const accountTransmogsCollectionSummaryResponseSchema = z.strictObject({ _links: linksSchema, appearance_sets: z.array(nameIdKeySchema), slots: z.array(slotSchema), }); -export const protectedCharacterProfileSummaryResponseSchema = z.object({ +export const protectedCharacterProfileSummaryResponseSchema = z.strictObject({ _links: linksSchema, bind_position: positionSchema, character: realmSchema, @@ -156,7 +156,7 @@ export const protectedCharacterProfileSummaryResponseSchema = z.object({ wow_account: z.number(), }); -export const accountPetsCollectionSummaryResponseSchema = z.object({ +export const accountPetsCollectionSummaryResponseSchema = z.strictObject({ _links: linksSchema, pets: z.array(petSchema), unlocked_battle_pet_slots: z.number(), diff --git a/generated/schemas/wow/achievements.ts b/generated/schemas/wow/achievements.ts index db4bc48b..2cc87ece 100644 --- a/generated/schemas/wow/achievements.ts +++ b/generated/schemas/wow/achievements.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const achievementCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array(nameIdKeySchema), @@ -10,12 +10,12 @@ export const achievementCategoryIndexResponseSchema = responseBaseSchema.extend( export const achievementCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ achievements: z.array(nameIdKeySchema), - aggregates_by_faction: z.object({ - alliance: z.object({ + aggregates_by_faction: z.strictObject({ + alliance: z.strictObject({ points: z.number(), quantity: z.number(), }), - horde: z.object({ + horde: z.strictObject({ points: z.number(), quantity: z.number(), }), @@ -29,15 +29,14 @@ export const achievementIndexResponseSchema = responseBaseSchema.extend({ achievements: z.array(nameIdKeySchema), }); -const achievementMediaItemSchema = z.object({ - file_data_id: z.number(), - key: z.string(), - value: z.string(), +export const achievementMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema), + id: z.number(), }); export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: nameIdKeySchema, - criteria: z.object({ + criteria: z.strictObject({ amount: z.number(), description: z.string(), id: z.number(), @@ -48,8 +47,3 @@ export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema. media: keyBaseSchema, points: z.number(), }); - -export const achievementMediaResponseSchema = responseBaseSchema.extend({ - assets: z.array(achievementMediaItemSchema), - id: z.number(), -}); diff --git a/generated/schemas/wow/auction-house.ts b/generated/schemas/wow/auction-house.ts index d012869d..af9ea7e2 100644 --- a/generated/schemas/wow/auction-house.ts +++ b/generated/schemas/wow/auction-house.ts @@ -9,16 +9,16 @@ const auctionHouseTimeLeftSchema = z.union([ z.literal('VERY_LONG'), ]); -const auctionHousePostingSchema = z.object({ +const auctionHousePostingSchema = z.strictObject({ bid: z.number(), buyout: z.number(), id: z.number(), - item: z.object({ + item: z.strictObject({ bonus_lists: z.array(z.number()), context: z.number(), id: z.number(), modifiers: z.array( - z.object({ + z.strictObject({ type: z.number(), value: z.number(), }), @@ -28,9 +28,9 @@ const auctionHousePostingSchema = z.object({ time_left: auctionHouseTimeLeftSchema, }); -const auctionHouseCommoditySchema = z.object({ +const auctionHouseCommoditySchema = z.strictObject({ id: z.number(), - item: z.object({ + item: z.strictObject({ id: z.number(), }), quantity: z.number(), @@ -40,10 +40,10 @@ const auctionHouseCommoditySchema = z.object({ export const auctionHouseResponseSchema = responseBaseSchema.extend({ auctions: z.array(auctionHousePostingSchema), - commodities: z.object({ + commodities: z.strictObject({ href: z.string(), }), - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), }); diff --git a/generated/schemas/wow/azerite-essence.ts b/generated/schemas/wow/azerite-essence.ts index f5d580bd..c6572546 100644 --- a/generated/schemas/wow/azerite-essence.ts +++ b/generated/schemas/wow/azerite-essence.ts @@ -23,7 +23,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const powerSchema = z.object({ +const powerSchema = z.strictObject({ id: z.number(), main_power_spell: nameIdKeySchema, passive_power_spell: nameIdKeySchema, @@ -35,7 +35,7 @@ export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.e }); export const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ allowed_specializations: z.array(nameIdSchema), name: z.record(localesSchema, z.string()), }), diff --git a/generated/schemas/wow/character-achievements.ts b/generated/schemas/wow/character-achievements.ts index fb0f15e6..aede544c 100644 --- a/generated/schemas/wow/character-achievements.ts +++ b/generated/schemas/wow/character-achievements.ts @@ -2,18 +2,18 @@ import { z } from 'zod'; import { characterSchema, hrefSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const categoryProgressSchema = z.object({ +const categoryProgressSchema = z.strictObject({ category: nameIdKeySchema, points: z.number(), quantity: z.number(), }); -const recentEventSchema = z.object({ +const recentEventSchema = z.strictObject({ achievement: nameIdKeySchema, timestamp: z.number(), }); -const statisticSchema = z.object({ +const statisticSchema = z.strictObject({ description: z.string().optional().nullable(), id: z.number(), last_updated_timestamp: z.number(), @@ -21,33 +21,33 @@ const statisticSchema = z.object({ quantity: z.number(), }); -const subCategorySchema = z.object({ +const subCategorySchema = z.strictObject({ id: z.number(), name: z.string(), statistics: z.array(statisticSchema), }); -const childCriterum3Schema = z.object({ +const childCriterum3Schema = z.strictObject({ amount: z.number().optional(), id: z.number(), is_completed: z.boolean(), }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ id: z.number(), name: z.string(), statistics: z.array(statisticSchema), sub_categories: z.array(subCategorySchema), }); -const childCriterum2Schema = z.object({ +const childCriterum2Schema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterum3Schema).optional(), id: z.number(), is_completed: z.boolean(), }); -const childCriterumSchema = z.object({ +const childCriterumSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterum2Schema).optional(), id: z.number(), @@ -59,14 +59,14 @@ export const characterAchievementStatisticsResponseSchema = responseBaseSchema.e character: characterSchema, }); -const criteriaSchema = z.object({ +const criteriaSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterumSchema).optional(), id: z.number(), is_completed: z.boolean(), }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ achievement: nameIdKeySchema, completed_timestamp: z.number().optional(), criteria: criteriaSchema.optional(), diff --git a/generated/schemas/wow/character-appearance.ts b/generated/schemas/wow/character-appearance.ts index 1d845a4b..1e4fdb1d 100644 --- a/generated/schemas/wow/character-appearance.ts +++ b/generated/schemas/wow/character-appearance.ts @@ -11,46 +11,46 @@ import { responseBaseSchema, } from '../core'; -const itemSchema = z.object({ +const itemSchema = z.strictObject({ enchant: z.number(), id: z.number(), internal_slot_id: z.number(), item_appearance_modifier_id: z.number(), - slot: z.object({ + slot: z.strictObject({ name: z.string(), type: z.string(), }), subclass: z.number(), }); -const rgbWithIdSchema = z.object({ +const rgbWithIdSchema = z.strictObject({ id: z.number(), rgba: colorSchema, }); -const choiceSchema = z.object({ +const choiceSchema = z.strictObject({ display_order: z.number(), id: z.number(), name: z.string().optional(), }); -const customizationSchema = z.object({ +const customizationSchema = z.strictObject({ choice: choiceSchema, option: nameIdSchema, }); -const borderEmblemSchema = z.object({ +const borderEmblemSchema = z.strictObject({ color: rgbWithIdSchema, id: z.number(), media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), }); -const guildCrestSchema = z.object({ - background: z.object({ +const guildCrestSchema = z.strictObject({ + background: z.strictObject({ color: rgbWithIdSchema, }), border: borderEmblemSchema, diff --git a/generated/schemas/wow/character-collections.ts b/generated/schemas/wow/character-collections.ts index 7440933f..2eb5b4e8 100644 --- a/generated/schemas/wow/character-collections.ts +++ b/generated/schemas/wow/character-collections.ts @@ -11,36 +11,36 @@ export const characterCollectionsIndexResponseSchema = responseBaseSchema.extend transmogs: hrefSchema, }); -const heirloomSchema = z.object({ +const heirloomSchema = z.strictObject({ heirloom: nameIdKeySchema, - upgrade: z.object({ + upgrade: z.strictObject({ level: z.number(), }), }); -const mountSchema = z.object({ +const mountSchema = z.strictObject({ is_character_specific: z.boolean().optional(), is_favorite: z.boolean().optional(), is_useable: z.boolean(), mount: nameIdKeySchema, }); -const toySchema = z.object({ +const toySchema = z.strictObject({ is_favorite: z.boolean().optional(), toy: nameIdKeySchema, }); -const slotSchema = z.object({ +const slotSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const qualitySchema = z.object({ +const qualitySchema = z.strictObject({ name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), }); -const statsSchema = z.object({ +const statsSchema = z.strictObject({ breed_id: z.number(), health: z.number(), power: z.number(), @@ -55,11 +55,11 @@ export const characterMountsCollectionSummaryResponseSchema = responseBaseSchema mounts: z.array(mountSchema), }); -const petSchema = z.object({ +const petSchema = z.strictObject({ active_slot: z.number().optional(), creature_display: keyBaseSchema .and( - z.object({ + z.strictObject({ id: z.number(), }), ) diff --git a/generated/schemas/wow/character-encounters.ts b/generated/schemas/wow/character-encounters.ts index 558ed308..1765c855 100644 --- a/generated/schemas/wow/character-encounters.ts +++ b/generated/schemas/wow/character-encounters.ts @@ -8,29 +8,29 @@ export const characterEncountersSummaryResponseSchema = responseBaseSchema.exten raids: hrefSchema, }); -const dungeonDifficultiesSchema = z.object({ +const dungeonDifficultiesSchema = z.strictObject({ name: z.union([z.literal('Heroic'), z.literal('Mythic'), z.literal('Mythic+ Dungeons'), z.literal('Normal')]), type: z.union([z.literal('HEROIC'), z.literal('MYTHIC'), z.literal('MYTHIC_KEYSTONE'), z.literal('NORMAL')]), }); -const statusSchema = z.object({ +const statusSchema = z.strictObject({ name: z.union([z.literal('Complete'), z.literal('In Progress')]), type: z.union([z.literal('COMPLETE'), z.literal('IN_PROGRESS')]), }); -const encounterSchema = z.object({ +const encounterSchema = z.strictObject({ completed_count: z.number(), encounter: nameIdKeySchema, last_kill_timestamp: z.number(), }); -const progressSchema = z.object({ +const progressSchema = z.strictObject({ completed_count: z.number(), encounters: z.array(encounterSchema), total_count: z.number(), }); -const raidDifficultiesSchema = z.object({ +const raidDifficultiesSchema = z.strictObject({ name: z.union([ z.literal('10 Player'), z.literal('10 Player (Heroic)'), @@ -53,34 +53,34 @@ const raidDifficultiesSchema = z.object({ ]), }); -const raidModeSchema = z.object({ +const raidModeSchema = z.strictObject({ difficulty: raidDifficultiesSchema, progress: progressSchema, status: statusSchema, }); -const dungeonModeSchema = z.object({ +const dungeonModeSchema = z.strictObject({ difficulty: dungeonDifficultiesSchema, progress: progressSchema, status: statusSchema, }); -const dungeonInstanceSchema = z.object({ +const dungeonInstanceSchema = z.strictObject({ instance: nameIdKeySchema, modes: z.array(dungeonModeSchema), }); -const raidInstanceSchema = z.object({ +const raidInstanceSchema = z.strictObject({ instance: nameIdKeySchema, modes: z.array(raidModeSchema), }); -const expansionWithDungeonInstancesSchema = z.object({ +const expansionWithDungeonInstancesSchema = z.strictObject({ expansion: nameIdKeySchema, instances: z.array(dungeonInstanceSchema), }); -const expansionWithRaidInstancesSchema = z.object({ +const expansionWithRaidInstancesSchema = z.strictObject({ expansion: nameIdKeySchema, instances: z.array(raidInstanceSchema), }); diff --git a/generated/schemas/wow/character-equipment.ts b/generated/schemas/wow/character-equipment.ts index e57b2ab7..03e7f31e 100644 --- a/generated/schemas/wow/character-equipment.ts +++ b/generated/schemas/wow/character-equipment.ts @@ -2,79 +2,79 @@ import { z } from 'zod'; import { characterSchema, colorSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const nameDescriptionSchema = z.object({ +const nameDescriptionSchema = z.strictObject({ color: colorSchema, display_string: z.string(), }); -const nameTypeSchema = z.object({ +const nameTypeSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const displayStringsSchema = z.object({ +const displayStringsSchema = z.strictObject({ copper: z.string(), gold: z.string(), header: z.string(), silver: z.string(), }); -const displayStringValueSchema = z.object({ +const displayStringValueSchema = z.strictObject({ display_string: z.string(), value: z.number(), }); -const effectSchema = z.object({ +const effectSchema = z.strictObject({ display_string: z.string(), is_active: z.boolean(), required_count: z.number(), }); -const enchantmentSlotSchema = z.object({ +const enchantmentSlotSchema = z.strictObject({ id: z.number(), type: z.string(), }); -const armorSchema = z.object({ +const armorSchema = z.strictObject({ display: nameDescriptionSchema, value: z.number(), }); -const enchantmentSchema = z.object({ +const enchantmentSchema = z.strictObject({ display_string: z.string(), enchantment_id: z.number(), enchantment_slot: enchantmentSlotSchema, source_item: nameIdKeySchema.optional(), }); -const modifiedCraftingStatSchema = z.object({ +const modifiedCraftingStatSchema = z.strictObject({ id: z.number(), name: z.string(), type: z.string(), }); -const sellPriceSchema = z.object({ +const sellPriceSchema = z.strictObject({ display_strings: displayStringsSchema, value: z.number(), }); -const socketSchema = z.object({ +const socketSchema = z.strictObject({ display_string: z.string(), item: nameIdKeySchema, media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), socket_type: nameTypeSchema, }); -const spellSchema = z.object({ +const spellSchema = z.strictObject({ description: z.string(), spell: nameIdKeySchema, }); -const statSchema = z.object({ +const statSchema = z.strictObject({ display: nameDescriptionSchema, is_equip_bonus: z.boolean().optional(), is_negated: z.boolean().optional(), @@ -82,7 +82,7 @@ const statSchema = z.object({ value: z.number(), }); -const transmogSchema = z.object({ +const transmogSchema = z.strictObject({ display_string: z.string(), item: nameIdKeySchema, item_modified_appearance_id: z.number(), @@ -92,37 +92,37 @@ const itemElementSchema = nameIdKeySchema.extend({ is_equipped: z.boolean().optional(), }); -const playableClassesSchema = z.object({ +const playableClassesSchema = z.strictObject({ display_string: z.string(), links: z.array(nameIdKeySchema), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ level: displayStringValueSchema, playable_classes: playableClassesSchema.optional(), }); -const setSchema = z.object({ +const setSchema = z.strictObject({ display_string: z.string(), effects: z.array(effectSchema), item_set: nameIdKeySchema, items: z.array(itemElementSchema), }); -const damageSchema = z.object({ +const damageSchema = z.strictObject({ damage_class: nameTypeSchema, display_string: z.string(), max_value: z.number(), min_value: z.number(), }); -const weaponSchema = z.object({ +const weaponSchema = z.strictObject({ attack_speed: displayStringValueSchema, damage: damageSchema, dps: displayStringValueSchema, }); -const equippedItemSchema = z.object({ +const equippedItemSchema = z.strictObject({ armor: armorSchema.optional(), binding: nameTypeSchema, bonus_list: z.array(z.number()).optional(), @@ -133,7 +133,7 @@ const equippedItemSchema = z.object({ inventory_type: nameTypeSchema, is_subclass_hidden: z.boolean().optional(), item: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), @@ -142,7 +142,7 @@ const equippedItemSchema = z.object({ level: displayStringValueSchema, limit_category: z.string().optional(), media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/wow/character-hunter-pets.ts b/generated/schemas/wow/character-hunter-pets.ts index e2658d8d..a26a1288 100644 --- a/generated/schemas/wow/character-hunter-pets.ts +++ b/generated/schemas/wow/character-hunter-pets.ts @@ -2,10 +2,10 @@ import { z } from 'zod'; import { characterSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const hunterPetSchema = z.object({ +const hunterPetSchema = z.strictObject({ creature: nameIdKeySchema, creature_display: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/wow/character-media.ts b/generated/schemas/wow/character-media.ts index 2d78e329..6c95c98f 100644 --- a/generated/schemas/wow/character-media.ts +++ b/generated/schemas/wow/character-media.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { characterSchema, responseBaseSchema } from '../core'; -const assetSchema = z.object({ +const assetSchema = z.strictObject({ key: z.string(), value: z.string(), }); diff --git a/generated/schemas/wow/character-mythic-keystone-profile.ts b/generated/schemas/wow/character-mythic-keystone-profile.ts index b306ec30..db5fc49f 100644 --- a/generated/schemas/wow/character-mythic-keystone-profile.ts +++ b/generated/schemas/wow/character-mythic-keystone-profile.ts @@ -10,22 +10,22 @@ import { responseBaseSchema, } from '../core'; -const currentPeriodSchema = z.object({ +const currentPeriodSchema = z.strictObject({ period: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), }); -const mythicRatingSchema = z.object({ +const mythicRatingSchema = z.strictObject({ color: colorSchema, rating: z.number(), }); -const memberSchema = z.object({ +const memberSchema = z.strictObject({ character: nameIdSchema.and( - z.object({ + z.strictObject({ realm: realmSchema, }), ), @@ -39,14 +39,14 @@ export const characterMythicKeystoneProfileIndexResponseSchema = responseBaseSch current_period: currentPeriodSchema, seasons: z.array( keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), ), }); -const bestRunSchema = z.object({ +const bestRunSchema = z.strictObject({ completed_timestamp: z.number(), dungeon: nameIdKeySchema, duration: z.number(), @@ -62,7 +62,7 @@ export const characterMythicKeystoneSeasonDetailsResponseSchema = responseBaseSc character: nameIdKeySchema, mythic_rating: mythicRatingSchema, season: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/wow/character-professions.ts b/generated/schemas/wow/character-professions.ts index 8d3cdb83..6fb24be5 100644 --- a/generated/schemas/wow/character-professions.ts +++ b/generated/schemas/wow/character-professions.ts @@ -2,21 +2,21 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; -const tierSchema = z.object({ +const tierSchema = z.strictObject({ known_recipes: z.array(nameIdKeySchema).optional(), max_skill_points: z.number(), skill_points: z.number(), tier: nameIdSchema, }); -const secondarySchema = z.object({ +const secondarySchema = z.strictObject({ max_skill_points: z.number().optional(), profession: nameIdKeySchema, skill_points: z.number().optional(), tiers: z.array(tierSchema).optional(), }); -const primarySchema = z.object({ +const primarySchema = z.strictObject({ profession: nameIdKeySchema, tiers: z.array(tierSchema), }); diff --git a/generated/schemas/wow/character-profile.ts b/generated/schemas/wow/character-profile.ts index 2573dc99..ea1b9506 100644 --- a/generated/schemas/wow/character-profile.ts +++ b/generated/schemas/wow/character-profile.ts @@ -7,7 +7,7 @@ export const characterProfileStatusResponseSchema = responseBaseSchema.extend({ is_valid: z.boolean(), }); -const covenantProgressSchema = z.object({ +const covenantProgressSchema = z.strictObject({ chosen_covenant: nameIdKeySchema, renown_level: z.number(), soulbinds: hrefSchema, @@ -24,7 +24,7 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ achievements_statistics: hrefSchema, active_spec: nameIdKeySchema, active_title: nameIdKeySchema.and( - z.object({ + z.strictObject({ display_string: z.string(), }), ), diff --git a/generated/schemas/wow/character-pvp.ts b/generated/schemas/wow/character-pvp.ts index aff9f9fa..48485d29 100644 --- a/generated/schemas/wow/character-pvp.ts +++ b/generated/schemas/wow/character-pvp.ts @@ -2,18 +2,18 @@ import { z } from 'zod'; import { characterSchema, factionSchema, keyBaseSchema, nameIdSchema, responseBaseSchema } from '../core'; -const bracketSchema = z.object({ +const bracketSchema = z.strictObject({ id: z.number(), type: z.string(), }); -const matchStatisticsSchema = z.object({ +const matchStatisticsSchema = z.strictObject({ lost: z.number(), played: z.number(), won: z.number(), }); -const pvpMapStatisticSchema = z.object({ +const pvpMapStatisticSchema = z.strictObject({ match_statistics: matchStatisticsSchema, world_map: nameIdSchema, }); @@ -24,13 +24,13 @@ export const characterPvpBracketStatisticsResponseSchema = responseBaseSchema.ex faction: factionSchema, rating: z.number(), season: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), season_match_statistics: matchStatisticsSchema, tier: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), diff --git a/generated/schemas/wow/character-reputations.ts b/generated/schemas/wow/character-reputations.ts index 355832b1..1a5148cf 100644 --- a/generated/schemas/wow/character-reputations.ts +++ b/generated/schemas/wow/character-reputations.ts @@ -2,13 +2,13 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const paragonSchema = z.object({ +const paragonSchema = z.strictObject({ max: z.number(), raw: z.number(), value: z.number(), }); -const standingSchema = z.object({ +const standingSchema = z.strictObject({ max: z.number(), name: z.string(), raw: z.number(), @@ -16,7 +16,7 @@ const standingSchema = z.object({ value: z.number(), }); -const reputationSchema = z.object({ +const reputationSchema = z.strictObject({ faction: nameIdKeySchema, paragon: paragonSchema.optional(), standing: standingSchema, diff --git a/generated/schemas/wow/character-soulbinds.ts b/generated/schemas/wow/character-soulbinds.ts index 730dfbdb..2f57d7ec 100644 --- a/generated/schemas/wow/character-soulbinds.ts +++ b/generated/schemas/wow/character-soulbinds.ts @@ -2,12 +2,12 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const socketSchema = z.object({ +const socketSchema = z.strictObject({ conduit: nameIdKeySchema, rank: z.number(), }); -const typeClassSchema = z.object({ +const typeClassSchema = z.strictObject({ name: z.union([ z.literal('Endurance Conduit Slot'), z.literal('Finesse Conduit Slot'), @@ -16,19 +16,19 @@ const typeClassSchema = z.object({ type: z.union([z.literal('ENDURANCE'), z.literal('FINESSE'), z.literal('POTENCY')]), }); -const conduitSocketSchema = z.object({ +const conduitSocketSchema = z.strictObject({ socket: socketSchema, type: typeClassSchema, }); -const traitSchema = z.object({ +const traitSchema = z.strictObject({ conduit_socket: conduitSocketSchema.optional(), display_order: z.number(), tier: z.number(), trait: nameIdKeySchema.optional(), }); -const soulbindSchema = z.object({ +const soulbindSchema = z.strictObject({ is_active: z.boolean().optional(), soulbind: nameIdKeySchema, traits: z.array(traitSchema), diff --git a/generated/schemas/wow/character-specializations.ts b/generated/schemas/wow/character-specializations.ts index 44d7d232..4d34b6bc 100644 --- a/generated/schemas/wow/character-specializations.ts +++ b/generated/schemas/wow/character-specializations.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; -const spellTooltipSchema = z.object({ +const spellTooltipSchema = z.strictObject({ cast_time: z.union([ z.literal('1.5 sec cast'), z.literal('2.5 sec cast'), @@ -29,24 +29,24 @@ const spellTooltipSchema = z.object({ spell: nameIdKeySchema, }); -const selectedSchema = z.object({ +const selectedSchema = z.strictObject({ spell_tooltip: spellTooltipSchema, talent: nameIdKeySchema, }); -const pvpTalentSlotSchema = z.object({ +const pvpTalentSlotSchema = z.strictObject({ selected: selectedSchema, slot_number: z.number(), }); -const selectedTalentSchema = z.object({ +const selectedTalentSchema = z.strictObject({ default_points: z.number().optional(), id: z.number(), rank: z.number(), tooltip: selectedSchema, }); -const loadoutSchema = z.object({ +const loadoutSchema = z.strictObject({ is_active: z.boolean(), selected_class_talent_tree: nameIdKeySchema, selected_class_talents: z.array(selectedTalentSchema), @@ -55,7 +55,7 @@ const loadoutSchema = z.object({ talent_loadout_code: z.string(), }); -const specializationSchema = z.object({ +const specializationSchema = z.strictObject({ glyphs: z.array(nameIdKeySchema).optional(), loadouts: z.array(loadoutSchema), pvp_talent_slots: z.array(pvpTalentSlotSchema).optional(), diff --git a/generated/schemas/wow/character-statistics.ts b/generated/schemas/wow/character-statistics.ts index 68b873fa..91e20af4 100644 --- a/generated/schemas/wow/character-statistics.ts +++ b/generated/schemas/wow/character-statistics.ts @@ -2,17 +2,17 @@ import { z } from 'zod'; import { characterSchema, responseBaseSchema } from '../core'; -const baseEffectiveStatSchema = z.object({ +const baseEffectiveStatSchema = z.strictObject({ base: z.number(), effective: z.number(), }); -const ratingSchema = z.object({ +const ratingSchema = z.strictObject({ rating: z.number(), rating_bonus: z.number(), }); -const ratingWithValueSchema = z.object({ +const ratingWithValueSchema = z.strictObject({ rating: z.number(), rating_bonus: z.number(), value: z.number(), diff --git a/generated/schemas/wow/character-titles.ts b/generated/schemas/wow/character-titles.ts index 4d8f3ec8..8d218933 100644 --- a/generated/schemas/wow/character-titles.ts +++ b/generated/schemas/wow/character-titles.ts @@ -4,7 +4,7 @@ import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const characterTitlesSummaryResponseSchema = responseBaseSchema.extend({ active_title: nameIdKeySchema.and( - z.object({ + z.strictObject({ display_string: z.string(), }), ), diff --git a/generated/schemas/wow/connected-realm.ts b/generated/schemas/wow/connected-realm.ts index 61c7274b..4e42447c 100644 --- a/generated/schemas/wow/connected-realm.ts +++ b/generated/schemas/wow/connected-realm.ts @@ -4,7 +4,7 @@ import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySche export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ connected_realms: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), @@ -18,7 +18,7 @@ const realmPopulationCapitalizedSchema = z.union([ z.literal('RECOMMENDED'), ]); -const realmLockedStatusSchema = z.object({ +const realmLockedStatusSchema = z.strictObject({ is_locked_for_new_characters: z.boolean(), is_locked_for_pct: z.boolean(), }); @@ -27,12 +27,12 @@ const realmStatusSchema = z.union([z.literal('Down'), z.literal('Up')]); const realmStatusCapitalizedSchema = z.union([z.literal('DOWN'), z.literal('UP')]); -const searchRealmPopulationSchema = z.object({ +const searchRealmPopulationSchema = z.strictObject({ name: z.record(localesSchema, z.string()), type: realmPopulationCapitalizedSchema, }); -const searchRealmStatusSchema = z.object({ +const searchRealmStatusSchema = z.strictObject({ name: z.record(localesSchema, z.string()), type: realmStatusCapitalizedSchema, }); @@ -47,9 +47,9 @@ const realmTypeSchema = z.any(); const realmTypeCapitalizedSchema = z.any(); -const realmSchema = z.object({ +const realmSchema = z.strictObject({ category: realmCategorySchema, - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), id: z.number(), @@ -59,7 +59,7 @@ const realmSchema = z.object({ region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), @@ -70,34 +70,34 @@ export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.e 'status.type': realmStatusCapitalizedSchema.optional(), }); -const searchRealmSchema = z.object({ +const searchRealmSchema = z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - region: z.object({ + region: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: realmTypeCapitalizedSchema, }), }); export const connectedRealmResponseSchema = responseBaseSchema.extend({ - auctions: z.object({ + auctions: z.strictObject({ href: z.string(), }), has_queue: z.boolean(), id: z.number(), - mythic_leaderboards: z.object({ + mythic_leaderboards: z.strictObject({ href: z.string(), }), - population: z.object({ + population: z.strictObject({ name: z.union([ z.literal('Full'), z.literal('High'), @@ -109,14 +109,14 @@ export const connectedRealmResponseSchema = responseBaseSchema.extend({ }), realm_locked_status: realmLockedStatusSchema.optional(), realms: z.array(realmSchema), - status: z.object({ + status: z.strictObject({ name: realmStatusSchema, type: realmStatusCapitalizedSchema, }), }); export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ has_queue: z.boolean(), id: z.number(), population: searchRealmPopulationSchema, diff --git a/generated/schemas/wow/covenant.ts b/generated/schemas/wow/covenant.ts index 110fc5d0..668f2a6a 100644 --- a/generated/schemas/wow/covenant.ts +++ b/generated/schemas/wow/covenant.ts @@ -10,7 +10,7 @@ const itemSchema = keyBaseSchema.extend({ id: z.number(), }); -const socketTypeSchema = z.object({ +const socketTypeSchema = z.strictObject({ name: z.string(), type: z.string(), }); @@ -23,7 +23,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const renownRewardSchema = z.object({ +const renownRewardSchema = z.strictObject({ level: z.number(), reward: nameIdKeySchema, }); @@ -48,7 +48,7 @@ export const soulbindResponseSchema = responseBaseSchema.extend({ talent_tree: nameIdKeySchema, }); -const classAbilitySpellTooltipSchema = z.object({ +const classAbilitySpellTooltipSchema = z.strictObject({ cast_time: z.string(), cooldown: z.string().optional(), description: z.string(), @@ -57,32 +57,32 @@ const classAbilitySpellTooltipSchema = z.object({ spell: nameIdKeySchema, }); -const spellTooltipSchema = z.object({ +const spellTooltipSchema = z.strictObject({ cast_time: z.string(), description: z.string(), spell: itemSchema, }); -const signatureAbilitySpellTooltipSchema = z.object({ +const signatureAbilitySpellTooltipSchema = z.strictObject({ cast_time: z.string(), cooldown: z.string(), description: z.string(), spell: nameIdKeySchema, }); -const rankSchema = z.object({ +const rankSchema = z.strictObject({ id: z.number(), spell_tooltip: spellTooltipSchema, tier: z.number(), }); -const classAbilitySchema = z.object({ +const classAbilitySchema = z.strictObject({ id: z.number(), playable_class: nameIdKeySchema, spell_tooltip: classAbilitySpellTooltipSchema, }); -const signatureAbilitySchema = z.object({ +const signatureAbilitySchema = z.strictObject({ id: z.number(), spell_tooltip: signatureAbilitySpellTooltipSchema, }); diff --git a/generated/schemas/wow/creature.ts b/generated/schemas/wow/creature.ts index 47baf0ea..20e73097 100644 --- a/generated/schemas/wow/creature.ts +++ b/generated/schemas/wow/creature.ts @@ -9,7 +9,7 @@ import { responseBaseSchema, } from '../core'; -const displayMediaAssetSchema = z.object({ +const displayMediaAssetSchema = z.strictObject({ key: z.string(), value: z.string(), }); @@ -37,14 +37,14 @@ export const creatureSearchParametersSchema = baseSearchParametersSchema.extend( }); export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ creature_displays: z.array( - z.object({ + z.strictObject({ id: z.number(), }), ), family: z - .object({ + .strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }) @@ -52,7 +52,7 @@ export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ id: z.number(), is_tameable: z.boolean(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.object({ + type: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), diff --git a/generated/schemas/wow/guild-crest.ts b/generated/schemas/wow/guild-crest.ts index 60d57683..c8d44227 100644 --- a/generated/schemas/wow/guild-crest.ts +++ b/generated/schemas/wow/guild-crest.ts @@ -2,12 +2,12 @@ import { z } from 'zod'; import { colorSchema, keyBaseSchema, responseBaseSchema } from '../core'; -const guildCrestAssetSchema = z.object({ +const guildCrestAssetSchema = z.strictObject({ key: z.string(), value: z.string(), }); -const backgroundSchema = z.object({ +const backgroundSchema = z.strictObject({ id: z.number(), rgba: colorSchema, }); @@ -16,7 +16,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const colorsSchema = z.object({ +const colorsSchema = z.strictObject({ backgrounds: z.array(backgroundSchema), borders: z.array(backgroundSchema), emblems: z.array(backgroundSchema), @@ -27,7 +27,7 @@ export const guildCrestBorderEmblemResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const borderSchema = z.object({ +const borderSchema = z.strictObject({ id: z.number(), media: mediaSchema, }); diff --git a/generated/schemas/wow/guild.ts b/generated/schemas/wow/guild.ts index 2869937e..2ec6d9d5 100644 --- a/generated/schemas/wow/guild.ts +++ b/generated/schemas/wow/guild.ts @@ -11,7 +11,7 @@ import { responseBaseSchema, } from '../core'; -const categoryProgressSchema = z.object({ +const categoryProgressSchema = z.strictObject({ category: nameIdKeySchema, points: z.number(), quantity: z.number(), @@ -22,38 +22,38 @@ const guildSchema = nameIdKeySchema.extend({ realm: realmSchema, }); -const recentEventSchema = z.object({ +const recentEventSchema = z.strictObject({ achievement: nameIdKeySchema, timestamp: z.number(), }); -const characterAchievementSchema = z.object({ +const characterAchievementSchema = z.strictObject({ achievement: nameIdKeySchema, character: characterSchema, }); -const rgbWithIdSchema = z.object({ +const rgbWithIdSchema = z.strictObject({ id: z.number(), rgba: colorSchema, }); -const childCriterumSchema = z.object({ +const childCriterumSchema = z.strictObject({ amount: z.number(), id: z.number(), is_completed: z.boolean(), }); -const borderSchema = z.object({ +const borderSchema = z.strictObject({ color: rgbWithIdSchema, id: z.number(), media: keyBaseSchema.and( - z.object({ + z.strictObject({ id: z.number(), }), ), }); -const criteriaSchema = z.object({ +const criteriaSchema = z.strictObject({ amount: z.number().optional(), child_criteria: z.array(childCriterumSchema).optional(), id: z.number(), @@ -70,30 +70,30 @@ const rosterMemberCharacterSchema = characterSchema.extend({ playable_race: playableSchema, }); -const achievementSchema = z.object({ +const achievementSchema = z.strictObject({ achievement: nameIdKeySchema, completed_timestamp: z.number().optional(), criteria: criteriaSchema.optional(), id: z.number(), }); -const activityElementSchema = z.object({ - activity: z.object({ +const activityElementSchema = z.strictObject({ + activity: z.strictObject({ type: z.string(), }), character_achievement: characterAchievementSchema, timestamp: z.number(), }); -const crestSchema = z.object({ - background: z.object({ +const crestSchema = z.strictObject({ + background: z.strictObject({ color: rgbWithIdSchema, }), border: borderSchema, emblem: borderSchema, }); -const memberSchema = z.object({ +const memberSchema = z.strictObject({ character: rosterMemberCharacterSchema, rank: z.number(), }); diff --git a/generated/schemas/wow/heirloom.ts b/generated/schemas/wow/heirloom.ts index 6e3e3f78..3a31974c 100644 --- a/generated/schemas/wow/heirloom.ts +++ b/generated/schemas/wow/heirloom.ts @@ -10,56 +10,56 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const sourceSchema = z.object({ +const sourceSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const attackSpeedClassSchema = z.object({ +const attackSpeedClassSchema = z.strictObject({ display_string: z.string(), value: z.number(), }); -const damageSchema = z.object({ +const damageSchema = z.strictObject({ damage_class: sourceSchema, display_string: z.string(), max_value: z.number(), min_value: z.number(), }); -const displaySchema = z.object({ +const displaySchema = z.strictObject({ color: colorSchema, display_string: z.string(), }); -const requirementsLevelSchema = z.object({ +const requirementsLevelSchema = z.strictObject({ display_string: z.string(), }); -const statSchema = z.object({ +const statSchema = z.strictObject({ display: displaySchema, is_equip_bonus: z.boolean().optional(), type: sourceSchema, value: z.number(), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ level: requirementsLevelSchema, }); -const upgradesSchema = z.object({ +const upgradesSchema = z.strictObject({ display_string: z.string(), max_value: z.number(), value: z.number(), }); -const weaponSchema = z.object({ +const weaponSchema = z.strictObject({ attack_speed: attackSpeedClassSchema, damage: damageSchema, dps: attackSpeedClassSchema, }); -const upgradeItemSchema = z.object({ +const upgradeItemSchema = z.strictObject({ binding: sourceSchema, bonus_list: z.array(z.number()), context: z.number(), @@ -77,7 +77,7 @@ const upgradeItemSchema = z.object({ weapon: weaponSchema, }); -const upgradeSchema = z.object({ +const upgradeSchema = z.strictObject({ item: upgradeItemSchema, level: z.number(), }); diff --git a/generated/schemas/wow/item.ts b/generated/schemas/wow/item.ts index 681fd94f..323fb11a 100644 --- a/generated/schemas/wow/item.ts +++ b/generated/schemas/wow/item.ts @@ -26,7 +26,7 @@ export const itemMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const inventoryTypeSchema = z.object({ +const inventoryTypeSchema = z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.union([ z.literal('BACK'), @@ -53,7 +53,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const itemQualitySchema = z.object({ +const itemQualitySchema = z.strictObject({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.union([ z.literal('ARTIFACT'), @@ -73,22 +73,22 @@ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const itemSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ id: z.number(), inventory_type: inventoryTypeSchema, is_equippable: z.boolean(), is_stackable: z.boolean(), - item_class: z.object({ + item_class: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), - item_subclass: z.object({ + item_subclass: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), level: z.number(), max_count: z.number(), - media: z.object({ + media: z.strictObject({ id: z.number(), }), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), @@ -104,7 +104,7 @@ export const itemSetIndexResponseSchema = responseBaseSchema.extend({ item_sets: z.array(nameIdKeySchema), }); -const effectSchema = z.object({ +const effectSchema = z.strictObject({ display_string: z.string(), required_count: z.number(), }); @@ -117,13 +117,13 @@ export const itemSubClassResponseSchema = responseBaseSchema.extend({ verbose_name: z.string(), }); -const displaySchema = z.object({ +const displaySchema = z.strictObject({ color: colorSchema, display_string: z.string(), }); -const damageSchema = z.object({ - damage_class: z.object({ +const damageSchema = z.strictObject({ + damage_class: z.strictObject({ name: z.string(), type: z.string(), }), @@ -132,32 +132,32 @@ const damageSchema = z.object({ min_value: z.number(), }); -const durabilitySchema = z.object({ +const durabilitySchema = z.strictObject({ display_string: z.string(), value: z.number(), }); -const armorSchema = z.object({ +const armorSchema = z.strictObject({ display: displaySchema, value: z.number(), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ level: durabilitySchema, }); -const spellSchema = z.object({ +const spellSchema = z.strictObject({ description: z.string(), spell: nameIdKeySchema, }); -const weaponSchema = z.object({ +const weaponSchema = z.strictObject({ attack_speed: durabilitySchema, damage: damageSchema, dps: durabilitySchema, }); -const recipeItemDisplayStringsSchema = z.object({ +const recipeItemDisplayStringsSchema = z.strictObject({ copper: z.string(), gold: z.string(), header: z.string(), @@ -193,19 +193,19 @@ export const itemSetResponseSchema = responseBaseSchema.extend({ name: z.string(), }); -const statSchema = z.object({ +const statSchema = z.strictObject({ display: displaySchema, is_negated: z.boolean().optional(), - type: z.object({ + type: z.strictObject({ name: statTypeSchema, type: statTypeCapitalizedSchema, }), value: z.number(), }); -const recipeItemSchema = z.object({ +const recipeItemSchema = z.strictObject({ armor: armorSchema.optional(), - binding: z.object({ + binding: z.strictObject({ name: z.string(), type: z.string(), }), @@ -219,7 +219,7 @@ const recipeItemSchema = z.object({ name: z.string(), quality: itemQualitySchema, requirements: requirementsSchema, - sell_price: z.object({ + sell_price: z.strictObject({ display_strings: recipeItemDisplayStringsSchema, value: z.number(), }), @@ -227,11 +227,11 @@ const recipeItemSchema = z.object({ weapon: weaponSchema.optional(), }); -const recipeSchema = z.object({ +const recipeSchema = z.strictObject({ item: recipeItemSchema, reagents: z.array( nameIdKeySchema.and( - z.object({ + z.strictObject({ quantity: z.number(), }), ), @@ -239,10 +239,10 @@ const recipeSchema = z.object({ reagents_display_string: z.string(), }); -const previewItemSchema = z.object({ +const previewItemSchema = z.strictObject({ armor: armorSchema.optional(), binding: z - .object({ + .strictObject({ name: z.string(), type: z.string(), }) diff --git a/generated/schemas/wow/journal.ts b/generated/schemas/wow/journal.ts index 3e598a86..4cb99e13 100644 --- a/generated/schemas/wow/journal.ts +++ b/generated/schemas/wow/journal.ts @@ -14,7 +14,7 @@ export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ encounters: z.array(nameIdKeySchema), }); -const itemSchema = z.object({ +const itemSchema = z.strictObject({ id: z.number(), item: nameIdKeySchema, }); @@ -24,17 +24,17 @@ export const journalEncounterSearchParametersSchema = baseSearchParametersSchema locale: localesSchema, }); -const journalEncounterSearchCreatureSchema = z.object({ - creature_display: z.object({ +const journalEncounterSearchCreatureSchema = z.strictObject({ + creature_display: z.strictObject({ id: z.number(), }), id: z.number(), name: z.record(localesSchema, z.string()), }); -const journalEncounterSearchItemSchema = z.object({ +const journalEncounterSearchItemSchema = z.strictObject({ id: z.number(), - item: z.object({ + item: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.string()), }), @@ -55,7 +55,7 @@ export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ instances: z.array(nameIdKeySchema), }); -const assetSchema = z.object({ +const assetSchema = z.strictObject({ key: z.string(), value: z.string(), }); @@ -70,7 +70,7 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); -const journalSubSection4Schema = z.object({ +const journalSubSection4Schema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), @@ -102,12 +102,12 @@ const modeTypeSchema = z.union([ z.literal('NORMAL'), ]); -const modeSchema = z.object({ +const modeSchema = z.strictObject({ name: modeNameSchema, type: modeTypeSchema, }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ type: encounterCategorySchema, }); @@ -120,13 +120,13 @@ export const journalInstanceMediaResponseSchema = responseBaseSchema.extend({ assets: z.array(assetSchema), }); -const modeElementSchema = z.object({ +const modeElementSchema = z.strictObject({ is_tracked: z.boolean(), mode: modeSchema, players: z.number(), }); -const journalSubSection3Schema = z.object({ +const journalSubSection3Schema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), @@ -149,7 +149,7 @@ export const journalInstanceResponseSchema = nameIdSchema.extend(responseBaseSch order_index: z.number(), }); -const journalSubSection2Schema = z.object({ +const journalSubSection2Schema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), @@ -158,7 +158,7 @@ const journalSubSection2Schema = z.object({ title: z.string(), }); -const journalSubSectionSchema = z.object({ +const journalSubSectionSchema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), @@ -167,7 +167,7 @@ const journalSubSectionSchema = z.object({ title: z.string(), }); -const journalSectionSchema = z.object({ +const journalSectionSchema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), id: z.number(), @@ -177,18 +177,18 @@ const journalSectionSchema = z.object({ }); export const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ category: categorySchema, creatures: z.array(journalEncounterSearchCreatureSchema), id: z.number(), - instance: z.object({ + instance: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.string()), }), items: z.array(journalEncounterSearchItemSchema), modes: z .array( - z.object({ + z.strictObject({ name: z.record(localesSchema, z.string()), type: encounterModeSchema, }), diff --git a/generated/schemas/wow/media-search.ts b/generated/schemas/wow/media-search.ts index 5e070ab0..6051b458 100644 --- a/generated/schemas/wow/media-search.ts +++ b/generated/schemas/wow/media-search.ts @@ -1,19 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema } from '../core'; +import { baseSearchParametersSchema, keyBaseSchema, mediaAssetSchema } from '../core'; export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); -const mediaAssetSchema = z.object({ - file_data_id: z.number(), - key: z.string(), - value: z.string(), -}); - export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ assets: z.array(mediaAssetSchema), id: z.number(), }), diff --git a/generated/schemas/wow/modified-crafting.ts b/generated/schemas/wow/modified-crafting.ts index 591b20b1..c60c6e3d 100644 --- a/generated/schemas/wow/modified-crafting.ts +++ b/generated/schemas/wow/modified-crafting.ts @@ -9,10 +9,10 @@ export const modifiedCraftingCategoryIndexResponseSchema = responseBaseSchema.ex export const modifiedCraftingCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); export const modifiedCraftingIndexResponseSchema = responseBaseSchema.extend({ - categories: z.object({ + categories: z.strictObject({ href: z.string(), }), - slot_types: z.object({ + slot_types: z.strictObject({ href: z.string(), }), }); diff --git a/generated/schemas/wow/mount.ts b/generated/schemas/wow/mount.ts index c1d1a68b..7d3f3d8f 100644 --- a/generated/schemas/wow/mount.ts +++ b/generated/schemas/wow/mount.ts @@ -17,7 +17,7 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); -const sourceSchema = z.object({ +const sourceSchema = z.strictObject({ name: z.string(), type: z.string(), }); @@ -28,21 +28,21 @@ export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const mountSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ creature_displays: z.array( - z.object({ + z.strictObject({ id: z.number(), }), ), faction: z - .object({ + .strictObject({ name: z.record(localesSchema, z.string()), type: factionsSchema, }) .optional(), id: z.number(), name: z.record(localesSchema, z.string()), - source: z.object({ + source: z.strictObject({ name: z.record(localesSchema, z.string()), type: z.string(), }), diff --git a/generated/schemas/wow/mythic-keystone-dungeon.ts b/generated/schemas/wow/mythic-keystone-dungeon.ts index 84e69cd1..073c7163 100644 --- a/generated/schemas/wow/mythic-keystone-dungeon.ts +++ b/generated/schemas/wow/mythic-keystone-dungeon.ts @@ -6,20 +6,20 @@ export const mythicKeystoneDungeonIndexResponseSchema = responseBaseSchema.exten dungeons: z.array(nameIdKeySchema), }); -const keystoneUpgradeSchema = z.object({ +const keystoneUpgradeSchema = z.strictObject({ qualifying_duration: z.number(), upgrade_level: z.number(), }); -const zoneSchema = z.object({ +const zoneSchema = z.strictObject({ slug: z.string(), }); export const mythicKeystoneIndexResponseSchema = responseBaseSchema.extend({ - dungeons: z.object({ + dungeons: z.strictObject({ href: z.string(), }), - seasons: z.object({ + seasons: z.strictObject({ href: z.string(), }), }); diff --git a/generated/schemas/wow/mythic-keystone-leaderboard.ts b/generated/schemas/wow/mythic-keystone-leaderboard.ts index df3cc1d6..3213cdc7 100644 --- a/generated/schemas/wow/mythic-keystone-leaderboard.ts +++ b/generated/schemas/wow/mythic-keystone-leaderboard.ts @@ -6,12 +6,12 @@ export const mythicKeystoneLeaderboardIndexResponseSchema = responseBaseSchema.e current_leaderboards: z.array(nameIdKeySchema), }); -const keystoneAffixElementSchema = z.object({ +const keystoneAffixElementSchema = z.strictObject({ keystone_affix: nameIdKeySchema, starting_level: z.number(), }); -const mythicRatingSchema = z.object({ +const mythicRatingSchema = z.strictObject({ color: colorSchema, rating: z.number(), }); @@ -29,15 +29,15 @@ const profileSchema = nameIdSchema.extend({ realm: realmSchema, }); -const memberSchema = z.object({ - faction: z.object({ +const memberSchema = z.strictObject({ + faction: z.strictObject({ type: factionsSchema, }), profile: profileSchema, specialization: specializationSchema, }); -const leadingGroupSchema = z.object({ +const leadingGroupSchema = z.strictObject({ completed_timestamp: z.number(), duration: z.number(), keystone_level: z.number(), @@ -47,7 +47,7 @@ const leadingGroupSchema = z.object({ }); export const mythicKeystoneLeaderboardResponseSchema = responseBaseSchema.extend({ - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), keystone_affixes: z.array(keystoneAffixElementSchema), diff --git a/generated/schemas/wow/mythic-raid-leaderboard.ts b/generated/schemas/wow/mythic-raid-leaderboard.ts index 4fdb77de..c12a9b15 100644 --- a/generated/schemas/wow/mythic-raid-leaderboard.ts +++ b/generated/schemas/wow/mythic-raid-leaderboard.ts @@ -7,7 +7,7 @@ const journalInstanceSchema = keyBaseSchema.extend({ name: z.null(), }); -const realmSchema = z.object({ +const realmSchema = z.strictObject({ id: z.number(), name: z.null(), slug: z.string(), @@ -17,8 +17,8 @@ const guildSchema = nameIdSchema.extend({ realm: realmSchema, }); -const entrySchema = z.object({ - faction: z.object({ +const entrySchema = z.strictObject({ + faction: z.strictObject({ type: factionsSchema, }), guild: guildSchema, diff --git a/generated/schemas/wow/pet.ts b/generated/schemas/wow/pet.ts index 2171e7da..bf22486d 100644 --- a/generated/schemas/wow/pet.ts +++ b/generated/schemas/wow/pet.ts @@ -28,13 +28,13 @@ export const petMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const abilitySchema = z.object({ +const abilitySchema = z.strictObject({ ability: nameIdKeySchema, required_level: z.number(), slot: z.number(), }); -const sourceSchema = z.object({ +const sourceSchema = z.strictObject({ name: z.string(), type: z.string(), }); diff --git a/generated/schemas/wow/playable-class.ts b/generated/schemas/wow/playable-class.ts index b5a9d750..313029b1 100644 --- a/generated/schemas/wow/playable-class.ts +++ b/generated/schemas/wow/playable-class.ts @@ -22,7 +22,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const talentSlotSchema = z.object({ +const talentSlotSchema = z.strictObject({ slot_number: z.number(), unlock_player_level: z.number(), }); @@ -32,7 +32,7 @@ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchem media: mediaSchema, playable_races: z.array(nameIdKeySchema), power_type: nameIdKeySchema, - pvp_talent_slots: z.object({ + pvp_talent_slots: z.strictObject({ href: z.string(), }), specializations: z.array(nameIdKeySchema), diff --git a/generated/schemas/wow/playable-specialization.ts b/generated/schemas/wow/playable-specialization.ts index c3eee3b5..dfe1c233 100644 --- a/generated/schemas/wow/playable-specialization.ts +++ b/generated/schemas/wow/playable-specialization.ts @@ -23,7 +23,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const primaryStatTypeSchema = z.object({ +const primaryStatTypeSchema = z.strictObject({ name: z.string(), type: z.string(), }); @@ -32,7 +32,7 @@ const specTalentTreeSchema = keyBaseSchema.extend({ name: z.string(), }); -const spellTooltipSchema = z.object({ +const spellTooltipSchema = z.strictObject({ cast_time: z.string(), cooldown: z.string().optional(), description: z.string(), @@ -40,7 +40,7 @@ const spellTooltipSchema = z.object({ range: z.string().optional(), }); -const pvpTalentSchema = z.object({ +const pvpTalentSchema = z.strictObject({ spell_tooltip: spellTooltipSchema, talent: nameIdKeySchema, }); diff --git a/generated/schemas/wow/profession.ts b/generated/schemas/wow/profession.ts index 812c7a58..73e68b82 100644 --- a/generated/schemas/wow/profession.ts +++ b/generated/schemas/wow/profession.ts @@ -15,12 +15,12 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const typeSchema = z.object({ +const typeSchema = z.strictObject({ name: z.string(), type: z.string(), }); -const categorySchema = z.object({ +const categorySchema = z.strictObject({ name: z.string(), recipes: z.array(nameIdKeySchema), }); @@ -30,11 +30,11 @@ export const recipeMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const craftedQuantitySchema = z.object({ +const craftedQuantitySchema = z.strictObject({ value: z.number(), }); -const reagentSchema = z.object({ +const reagentSchema = z.strictObject({ quantity: z.number(), reagent: nameIdKeySchema, }); diff --git a/generated/schemas/wow/pvp-season.ts b/generated/schemas/wow/pvp-season.ts index 3af384d7..37b85687 100644 --- a/generated/schemas/wow/pvp-season.ts +++ b/generated/schemas/wow/pvp-season.ts @@ -13,12 +13,12 @@ const seasonSchema = keyBaseSchema.extend({ id: z.number(), }); -const bracketSchema = z.object({ +const bracketSchema = z.strictObject({ id: z.number(), type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('SHUFFLE')]), }); -const rewardSchema = z.object({ +const rewardSchema = z.strictObject({ achievement: nameIdKeySchema, bracket: bracketSchema, faction: factionSchema.optional(), @@ -33,10 +33,10 @@ export const pvpSeasonIndexResponseSchema = responseBaseSchema.extend({ export const pvpSeasonResponseSchema = responseBaseSchema.extend({ id: z.number(), - leaderboards: z.object({ + leaderboards: z.strictObject({ href: z.string(), }), - rewards: z.object({ + rewards: z.strictObject({ href: z.string(), }), season_name: z.string().optional(), @@ -52,7 +52,7 @@ const characterSchema = nameIdSchema.extend({ realm: realmSchema, }); -const seasonMatchStatisticsSchema = z.object({ +const seasonMatchStatisticsSchema = z.strictObject({ lost: z.number(), played: z.number(), won: z.number(), @@ -63,9 +63,9 @@ export const pvpLeaderboardIndexResponseSchema = responseBaseSchema.extend({ season: seasonSchema, }); -const entrySchema = z.object({ +const entrySchema = z.strictObject({ character: characterSchema, - faction: z.object({ + faction: z.strictObject({ type: factionsSchema, }), rank: z.number(), diff --git a/generated/schemas/wow/pvp-tier.ts b/generated/schemas/wow/pvp-tier.ts index 25b72df8..fb1343fc 100644 --- a/generated/schemas/wow/pvp-tier.ts +++ b/generated/schemas/wow/pvp-tier.ts @@ -11,7 +11,7 @@ export const pvpTierMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const bracketSchema = z.object({ +const bracketSchema = z.strictObject({ id: z.number(), type: z.string(), }); diff --git a/generated/schemas/wow/quest.ts b/generated/schemas/wow/quest.ts index 49f638fb..3ee418c6 100644 --- a/generated/schemas/wow/quest.ts +++ b/generated/schemas/wow/quest.ts @@ -23,18 +23,18 @@ export const questCategoryResponseSchema = responseBaseSchema.extend({ }); export const questIndexResponseSchema = responseBaseSchema.extend({ - areas: z.object({ + areas: z.strictObject({ href: z.string(), }), - categories: z.object({ + categories: z.strictObject({ href: z.string(), }), - types: z.object({ + types: z.strictObject({ href: z.string(), }), }); -const requirementsSchema = z.object({ +const requirementsSchema = z.strictObject({ faction: factionSchema, max_character_level: z.number(), min_character_level: z.number(), @@ -50,23 +50,23 @@ export const questTypeResponseSchema = responseBaseSchema.extend({ type: z.string(), }); -const unitsSchema = z.object({ +const unitsSchema = z.strictObject({ copper: z.number(), gold: z.number(), silver: z.number(), }); -const reputationSchema = z.object({ +const reputationSchema = z.strictObject({ reward: nameIdKeySchema, value: z.number(), }); -const moneySchema = z.object({ +const moneySchema = z.strictObject({ units: unitsSchema, value: z.number(), }); -const rewardsSchema = z.object({ +const rewardsSchema = z.strictObject({ experience: z.number(), money: moneySchema, reputations: z.array(reputationSchema), diff --git a/generated/schemas/wow/realm.ts b/generated/schemas/wow/realm.ts index 98eeb215..b182591d 100644 --- a/generated/schemas/wow/realm.ts +++ b/generated/schemas/wow/realm.ts @@ -65,19 +65,19 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const realmSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - region: z.object({ + region: z.strictObject({ id: z.number(), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), @@ -86,7 +86,7 @@ export const realmSearchResponseItemSchema = keyBaseSchema.extend({ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: realmCategorySchema, - connected_realm: z.object({ + connected_realm: z.strictObject({ href: z.string(), }), is_tournament: z.boolean(), @@ -94,7 +94,7 @@ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, - type: z.object({ + type: z.strictObject({ name: realmTypeSchema, type: realmTypeCapitalizedSchema, }), diff --git a/generated/schemas/wow/region.ts b/generated/schemas/wow/region.ts index 6c42d049..38363d3d 100644 --- a/generated/schemas/wow/region.ts +++ b/generated/schemas/wow/region.ts @@ -4,7 +4,7 @@ import { nameIdSchema, responseBaseSchema } from '../core'; export const regionIndexResponseSchema = responseBaseSchema.extend({ regions: z.array( - z.object({ + z.strictObject({ href: z.string(), }), ), diff --git a/generated/schemas/wow/reputations.ts b/generated/schemas/wow/reputations.ts index a51ae05c..affb5885 100644 --- a/generated/schemas/wow/reputations.ts +++ b/generated/schemas/wow/reputations.ts @@ -16,7 +16,7 @@ const reputationTierSchema = keyBaseSchema.extend({ name: z.string().optional(), }); -const tierSchema = z.object({ +const tierSchema = z.strictObject({ id: z.number(), max_value: z.number(), min_value: z.number(), diff --git a/generated/schemas/wow/spell.ts b/generated/schemas/wow/spell.ts index 0771ca07..abc462cd 100644 --- a/generated/schemas/wow/spell.ts +++ b/generated/schemas/wow/spell.ts @@ -24,9 +24,9 @@ export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ }); export const spellSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.object({ + data: z.strictObject({ id: z.number(), - media: z.object({ + media: z.strictObject({ id: z.number(), }), name: z.record(localesSchema, z.union([z.string(), z.undefined()])), diff --git a/generated/schemas/wow/talent.ts b/generated/schemas/wow/talent.ts index 95647ee8..555e3ebb 100644 --- a/generated/schemas/wow/talent.ts +++ b/generated/schemas/wow/talent.ts @@ -23,7 +23,7 @@ const playableClassSchema = keyBaseSchema.extend({ id: z.number(), }); -const rankDescriptionSchema = z.object({ +const rankDescriptionSchema = z.strictObject({ description: z.null(), rank: z.number(), }); @@ -36,29 +36,29 @@ const specTalentTreeSchema = keyBaseSchema.extend({ name: z.string(), }); -const restrictionLineSchema = z.object({ +const restrictionLineSchema = z.strictObject({ is_for_class: z.boolean(), required_points: z.number(), restricted_row: z.number(), }); -const purpleSpellTooltipSchema = z.object({ +const purpleSpellTooltipSchema = z.strictObject({ cast_time: z.string(), description: z.string(), spell: nameIdKeySchema, }); -const nodeTypeSchema = z.object({ +const nodeTypeSchema = z.strictObject({ id: z.number(), type: z.union([z.literal('ACTIVE'), z.literal('CHOICE'), z.literal('PASSIVE')]), }); -const choiceOfTooltipSchema = z.object({ +const choiceOfTooltipSchema = z.strictObject({ spell_tooltip: purpleSpellTooltipSchema, talent: nameIdKeySchema, }); -const tooltipSpellTooltipSchema = z.object({ +const tooltipSpellTooltipSchema = z.strictObject({ cast_time: z.string(), cooldown: z.string().optional(), description: z.string(), @@ -79,24 +79,24 @@ export const talentTreeIndexResponseSchema = responseBaseSchema.extend({ spec_talent_trees: z.array(talentTreeSchema), }); -const tooltipSchema = z.object({ +const tooltipSchema = z.strictObject({ spell_tooltip: tooltipSpellTooltipSchema, talent: nameIdKeySchema, }); -const rankSchema = z.object({ +const rankSchema = z.strictObject({ choice_of_tooltips: z.array(tooltipSchema).optional(), rank: z.number(), tooltip: tooltipSchema.optional(), }); -const specTalentNodeRankSchema = z.object({ +const specTalentNodeRankSchema = z.strictObject({ choice_of_tooltips: z.array(choiceOfTooltipSchema).optional(), rank: z.number(), tooltip: tooltipSchema.optional(), }); -const talentNodeSchema = z.object({ +const talentNodeSchema = z.strictObject({ display_col: z.number(), display_row: z.number(), id: z.number(), @@ -112,7 +112,7 @@ export const talentTreeNodesResponseSchema = responseBaseSchema.extend({ talent_nodes: z.array(talentNodeSchema), }); -const specTalentNodeSchema = z.object({ +const specTalentNodeSchema = z.strictObject({ display_col: z.number(), display_row: z.number(), id: z.number(), @@ -124,14 +124,14 @@ const specTalentNodeSchema = z.object({ unlocks: z.array(z.number()).optional(), }); -const classTalentNodeRankSchema = z.object({ +const classTalentNodeRankSchema = z.strictObject({ choice_of_tooltips: z.array(tooltipSchema).optional(), default_points: z.number().optional(), rank: z.number(), tooltip: tooltipSchema.optional(), }); -const classTalentNodeSchema = z.object({ +const classTalentNodeSchema = z.strictObject({ display_col: z.number(), display_row: z.number(), id: z.number(), @@ -145,7 +145,7 @@ const classTalentNodeSchema = z.object({ export const talentTreeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ class_talent_nodes: z.array(classTalentNodeSchema), - media: z.object({ + media: z.strictObject({ href: z.string(), }), playable_class: nameIdKeySchema, diff --git a/generated/schemas/wow/toy.ts b/generated/schemas/wow/toy.ts index 1688a28a..1e7f3d97 100644 --- a/generated/schemas/wow/toy.ts +++ b/generated/schemas/wow/toy.ts @@ -10,7 +10,7 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const sourceSchema = z.object({ +const sourceSchema = z.strictObject({ name: z.string(), type: z.string(), }); diff --git a/packages/classic-wow/src/media-search/types.ts b/packages/classic-wow/src/media-search/types.ts index f6b7d351..1fe748d1 100644 --- a/packages/classic-wow/src/media-search/types.ts +++ b/packages/classic-wow/src/media-search/types.ts @@ -1,4 +1,4 @@ -import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; +import type { BaseSearchParameters, KeyBase, MediaAsset } from '@blizzard-api/core'; /** * The search parameters for media. @@ -20,9 +20,3 @@ export interface MediaSearchResponseItem extends KeyBase { id: number; }; } - -interface MediaAsset { - file_data_id: number; - key: string; - value: string; -} diff --git a/packages/classic-wow/src/playable-class/types.ts b/packages/classic-wow/src/playable-class/types.ts index 0e5a4320..d79ca630 100644 --- a/packages/classic-wow/src/playable-class/types.ts +++ b/packages/classic-wow/src/playable-class/types.ts @@ -1,17 +1,34 @@ -import type { GenderName, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; -export type { PlayableClassIndexResponse, PlayableClassMediaResponse } from '../../../wow/src/playable-class/types'; +/** + * The response for a playable class index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PlayableClassIndexResponse extends ResponseBase { + classes: Array; +} + +/** + * The response for playable class media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PlayableClassMediaResponse extends ResponseBase { + assets: Array; + id: number; +} /** * The response for a playable class. * @see {@link https://develop.battle.net/documentation/world-of-warcraft-classic/game-data-apis} */ export interface PlayableClassResponse extends NameId, ResponseBase { + additional_power_types?: Array; gender_name: GenderName; media: Media; playable_races: Array; power_type: NameIdKey; pvp_talent_slots: { href: string }; + specializations?: Array; } interface Media extends KeyBase { diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts index 8bfd3326..3838c3b1 100644 --- a/packages/core/src/base.ts +++ b/packages/core/src/base.ts @@ -89,8 +89,8 @@ export interface Gender { * The playable gender names/descriptions in World of Warcraft. */ export interface GenderName { - female: string; - male: string; + female: null | string; + male: null | string; } export interface Href { diff --git a/packages/wow/src/achievements/types.ts b/packages/wow/src/achievements/types.ts index 1886487b..93112fa8 100644 --- a/packages/wow/src/achievements/types.ts +++ b/packages/wow/src/achievements/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the achievement category index endpoint. @@ -44,7 +44,7 @@ export interface AchievementIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface AchievementMediaResponse extends ResponseBase { - assets: Array; + assets: Array; id: number; } @@ -65,9 +65,3 @@ export interface AchievementResponse extends NameId, ResponseBase { media: KeyBase; points: number; } - -interface AchievementMediaItem { - file_data_id: number; - key: string; - value: string; -} diff --git a/packages/wow/src/media-search/types.ts b/packages/wow/src/media-search/types.ts index f6b7d351..1fe748d1 100644 --- a/packages/wow/src/media-search/types.ts +++ b/packages/wow/src/media-search/types.ts @@ -1,4 +1,4 @@ -import type { BaseSearchParameters, KeyBase } from '@blizzard-api/core'; +import type { BaseSearchParameters, KeyBase, MediaAsset } from '@blizzard-api/core'; /** * The search parameters for media. @@ -20,9 +20,3 @@ export interface MediaSearchResponseItem extends KeyBase { id: number; }; } - -interface MediaAsset { - file_data_id: number; - key: string; - value: string; -} diff --git a/scripts/generate-zod.ts b/scripts/generate-zod.ts index e63a6fca..16337e28 100644 --- a/scripts/generate-zod.ts +++ b/scripts/generate-zod.ts @@ -62,7 +62,7 @@ async function run(): Promise { sourceText: content, }); - const schema = generator.getZodSchemasFile(file); + const schema = generator.getZodSchemasFile(file).replaceAll('z.object', 'z.strictObject'); if (generator.errors.length > 0) { for (const error of generator.errors) { From 21b7efdfb83ebd457bbfceac436a9f9d76bab8cf Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:47:01 +0100 Subject: [PATCH 39/52] Update classic wow types based on zod tests --- .../classic-wow/character-equipment.ts | 1 + .../schemas/classic-wow/character-profile.ts | 1 + .../classic-wow/character-specialization.ts | 25 +++++++++++++------ .../src/character-equipment/types.ts | 1 + .../src/character-profile/types.ts | 1 + .../src/character-specialization/types.ts | 22 ++++++++++------ 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/generated/schemas/classic-wow/character-equipment.ts b/generated/schemas/classic-wow/character-equipment.ts index b8eab59d..43039fd3 100644 --- a/generated/schemas/classic-wow/character-equipment.ts +++ b/generated/schemas/classic-wow/character-equipment.ts @@ -168,6 +168,7 @@ const equippedItemSchema = z.strictObject({ stats: z.array(statSchema).optional(), transmog: transmogSchema.optional(), unique_equipped: z.string().optional(), + upgrade_id: z.number().optional(), weapon: weaponSchema.optional(), }); diff --git a/generated/schemas/classic-wow/character-profile.ts b/generated/schemas/classic-wow/character-profile.ts index f3de4de6..0c617250 100644 --- a/generated/schemas/classic-wow/character-profile.ts +++ b/generated/schemas/classic-wow/character-profile.ts @@ -25,6 +25,7 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ faction: factionSchema, gender: genderSchema, guild: guildSchema, + hunter_pets: hrefSchema.optional(), id: z.number(), is_ghost: z.boolean().optional(), is_self_found: z.boolean().optional(), diff --git a/generated/schemas/classic-wow/character-specialization.ts b/generated/schemas/classic-wow/character-specialization.ts index 152bcb7e..6957f9c0 100644 --- a/generated/schemas/classic-wow/character-specialization.ts +++ b/generated/schemas/classic-wow/character-specialization.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { characterSchema, nameIdSchema, responseBaseSchema } from '../core'; +import { characterSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; const spellTooltipSchema = z.strictObject({ cast_time: z.union([z.literal('Channeled'), z.literal('Instant'), z.literal('Instant cast'), z.literal('Passive')]), @@ -13,13 +13,22 @@ const spellTooltipSchema = z.strictObject({ const talentElementSchema = z.strictObject({ spell_tooltip: spellTooltipSchema, - talent: z.strictObject({ - id: z.number(), - }), - talent_rank: z.number(), + talent: z.union([ + nameIdSchema, + z.strictObject({ + id: z.number(), + }), + ]), + talent_rank: z.number().optional(), }); -const specializationSchema = z.strictObject({ +const classicProgressionSpecializationSchema = z.strictObject({ + specialization: nameIdKeySchema, + specialization_name: z.string(), + talents: z.array(talentElementSchema).optional(), +}); + +const specializationGroupItemSchema = z.strictObject({ specialization_name: z.string(), spent_points: z.number(), talents: z.array(talentElementSchema), @@ -28,10 +37,12 @@ const specializationSchema = z.strictObject({ const specializationGroupSchema = z.strictObject({ glyphs: z.array(nameIdSchema).optional(), is_active: z.boolean(), - specializations: z.array(specializationSchema).optional(), + specializations: z.array(specializationGroupItemSchema).optional(), }); export const characterSpecializationsSummaryResponseSchema = responseBaseSchema.extend({ + active_specialization: nameIdKeySchema.optional(), character: characterSchema, specialization_groups: z.array(specializationGroupSchema), + specializations: z.array(classicProgressionSpecializationSchema).optional(), }); diff --git a/packages/classic-wow/src/character-equipment/types.ts b/packages/classic-wow/src/character-equipment/types.ts index 70ab649d..6fcb666d 100644 --- a/packages/classic-wow/src/character-equipment/types.ts +++ b/packages/classic-wow/src/character-equipment/types.ts @@ -80,6 +80,7 @@ interface EquippedItem { stats?: Array; transmog?: Transmog; unique_equipped?: string; + upgrade_id?: number; weapon?: Weapon; } diff --git a/packages/classic-wow/src/character-profile/types.ts b/packages/classic-wow/src/character-profile/types.ts index bd8f9024..6cdd1243 100644 --- a/packages/classic-wow/src/character-profile/types.ts +++ b/packages/classic-wow/src/character-profile/types.ts @@ -16,6 +16,7 @@ export interface CharacterProfileSummaryResponse extends ResponseBase { faction: Faction; gender: Gender; guild: Guild; + hunter_pets?: Href; id: number; //Hardcore only is_ghost?: boolean; diff --git a/packages/classic-wow/src/character-specialization/types.ts b/packages/classic-wow/src/character-specialization/types.ts index 5a2de238..5b974922 100644 --- a/packages/classic-wow/src/character-specialization/types.ts +++ b/packages/classic-wow/src/character-specialization/types.ts @@ -1,20 +1,28 @@ -import type { Character, NameId, ResponseBase } from '@blizzard-api/core'; +import type { Character, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterSpecializationsSummaryResponse extends ResponseBase { + active_specialization?: NameIdKey; character: Character; specialization_groups: Array; + specializations?: Array; } -interface Specialization { +interface ClassicProgressionSpecialization { + specialization: NameIdKey; specialization_name: string; - spent_points: number; - talents: Array; + talents?: Array; } interface SpecializationGroup { glyphs?: Array; is_active: boolean; - specializations?: Array; + specializations?: Array; +} + +interface SpecializationGroupItem { + specialization_name: string; + spent_points: number; + talents: Array; } interface SpellTooltip { @@ -28,6 +36,6 @@ interface SpellTooltip { interface TalentElement { spell_tooltip: SpellTooltip; - talent: { id: number }; - talent_rank: number; + talent: NameId | { id: number }; + talent_rank?: number; } From ad98127bac2305a445639a78aa58993a046e9702 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:55:08 +0100 Subject: [PATCH 40/52] Initial work on creating zod integration tests for retail and update some types based on results --- generated/schemas/wow/quest.ts | 21 ++++++---- generated/schemas/wow/toy.ts | 3 +- .../character-profile.integration.test.ts | 5 +-- ...aracter-specialization.integration.test.ts | 21 +++++++++- .../wow/auction-house.integration.test.ts | 23 ++++++++-- .../wow/azerite-essence.integration.test.ts | 21 ++++++++-- ...character-achievements.integration.test.ts | 23 ++++++++-- .../character-appearance.integration.test.ts | 10 ++++- .../character-collections.integration.test.ts | 23 ++++++++-- .../character-encounters.integration.test.ts | 12 ++++-- .../character-hunter-pets.integration.test.ts | 10 ++++- ...ythic-keystone-profile.integration.test.ts | 10 ++++- .../character-professions.integration.test.ts | 10 ++++- .../wow/character-profile.integration.test.ts | 21 ++++++++-- .../wow/character-pvp.integration.test.ts | 10 ++++- .../wow/character-quests.integration.test.ts | 10 ++++- .../character-reputations.integration.test.ts | 10 ++++- .../character-soulbinds.integration.test.ts | 10 ++++- ...racter-specializations.integration.test.ts | 10 ++++- .../wow/character-titles.integration.test.ts | 10 ++++- .../wow/covenant.integration.test.ts | 32 ++++++++++++-- .../wow/heirloom.integration.test.ts | 20 ++++++++- .../wow/journal.integration.test.ts | 42 +++++++++++++++++-- .../wow/modified-crafting.integration.test.ts | 25 +++++++++-- .../wow/mount.integration.test.ts | 22 ++++++++-- .../wow/pet.integration.test.ts | 22 ++++++++-- ...layable-specialization.integration.test.ts | 24 +++++++++-- .../wow/profession.integration.test.ts | 22 ++++++++-- .../wow/pvp.integration.test.ts | 25 ++++++++--- .../wow/quest.integration.test.ts | 22 +++++++--- .../wow/realm.integration.test.ts | 16 +++++-- .../wow/spell.integration.test.ts | 31 ++++++++++++-- .../wow/title.integration.test.ts | 22 ++++++++-- .../wow/toy.integration.test.ts | 32 ++++++++++++-- .../wow/wow-token.integration.test.ts | 12 ++++-- packages/wow/src/quest/types.ts | 9 +++- packages/wow/src/toy/types.ts | 3 +- 37 files changed, 548 insertions(+), 106 deletions(-) diff --git a/generated/schemas/wow/quest.ts b/generated/schemas/wow/quest.ts index 3ee418c6..dc78219c 100644 --- a/generated/schemas/wow/quest.ts +++ b/generated/schemas/wow/quest.ts @@ -34,12 +34,6 @@ export const questIndexResponseSchema = responseBaseSchema.extend({ }), }); -const requirementsSchema = z.strictObject({ - faction: factionSchema, - max_character_level: z.number(), - min_character_level: z.number(), -}); - export const questTypeIndexResponseSchema = responseBaseSchema.extend({ types: z.array(nameIdKeySchema), }); @@ -61,6 +55,18 @@ const reputationSchema = z.strictObject({ value: z.number(), }); +const reputationRequirementSchema = z.strictObject({ + faction: nameIdKeySchema, + min_reputation: z.number(), +}); + +const requirementsSchema = z.strictObject({ + faction: factionSchema, + max_character_level: z.number(), + min_character_level: z.number(), + reputations: z.array(reputationRequirementSchema), +}); + const moneySchema = z.strictObject({ units: unitsSchema, value: z.number(), @@ -73,7 +79,8 @@ const rewardsSchema = z.strictObject({ }); export const questResponseSchema = responseBaseSchema.extend({ - area: nameIdKeySchema, + area: nameIdKeySchema.optional(), + category: nameIdKeySchema, description: z.string(), id: z.number(), requirements: requirementsSchema, diff --git a/generated/schemas/wow/toy.ts b/generated/schemas/wow/toy.ts index 1e7f3d97..3431daf9 100644 --- a/generated/schemas/wow/toy.ts +++ b/generated/schemas/wow/toy.ts @@ -19,6 +19,7 @@ export const toyResponseSchema = responseBaseSchema.extend({ id: z.number(), item: nameIdKeySchema, media: mediaSchema, + should_exclude_if_uncollected: z.boolean().optional(), source: sourceSchema, - source_description: z.string(), + source_description: z.string().optional(), }); diff --git a/packages/integration-tests/classic-wow/character-profile.integration.test.ts b/packages/integration-tests/classic-wow/character-profile.integration.test.ts index df1ae450..4f9b62e7 100644 --- a/packages/integration-tests/classic-wow/character-profile.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-profile.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterProfileSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; describe('classic-wow character profile integration', () => { - it('fetches profile summary and uses guild info when available', async ({ expect }) => { + it('fetches profile summary', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -22,8 +22,5 @@ describe('classic-wow character profile integration', () => { console.error('Character profile summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - - // If the character has a guild, return it to be used by guild tests. - return resp; }, 30_000); }); diff --git a/packages/integration-tests/classic-wow/character-specialization.integration.test.ts b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts index 88c55cfc..05660ea1 100644 --- a/packages/integration-tests/classic-wow/character-specialization.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts @@ -6,7 +6,26 @@ import { environment } from '../../../environment'; import { characterSpecializationsSummaryResponseSchema } from '../../../generated/schemas/classic-wow'; describe('classic-wow character specialization integration', () => { - it('fetches specialization summary for a character', async ({ expect }) => { + it('fetches specialization summary for a character on classic era', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const realm = 'soulseeker'; + const character = 'reonwar'; + + const resp = await client.sendRequest( + classicWow.characterSpecializationsSummary('profile-classic1x', realm, character), + ); + const parsed = characterSpecializationsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character specialization summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }, 30_000); + it('fetches specialization summary for a character on classic progression', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/auction-house.integration.test.ts b/packages/integration-tests/wow/auction-house.integration.test.ts index e1548540..080eb25e 100644 --- a/packages/integration-tests/wow/auction-house.integration.test.ts +++ b/packages/integration-tests/wow/auction-house.integration.test.ts @@ -1,13 +1,18 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + auctionHouseCommoditiesResponseSchema, + auctionHouseResponseSchema, +} from '../../../generated/schemas/wow/auction-house'; describe('wow auction-house integration', () => { - it('fetches auctions and commodities index', async ({ expect }) => { + it('validates auctions and commodities responses', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); @@ -20,9 +25,19 @@ describe('wow auction-house integration', () => { if (!realmId) { throw new Error('No realm ID found for testing auction house'); } + const auctions = await client.sendRequest(wow.auctions(Number.parseInt(realmId))); - expect(auctions).toBeTruthy(); + const parsedAuctions = auctionHouseResponseSchema.safeParse(auctions); + if (!parsedAuctions.success) { + console.error('Auctions validation failed:', treeifyError(parsedAuctions.error)); + } + expect(parsedAuctions.success).toBe(true); + const commodities = await client.sendRequest(wow.commodities()); - expect(commodities).toBeTruthy(); + const parsedCommodities = auctionHouseCommoditiesResponseSchema.safeParse(commodities); + if (!parsedCommodities.success) { + console.error('Commodities validation failed:', treeifyError(parsedCommodities.error)); + } + expect(parsedCommodities.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/azerite-essence.integration.test.ts b/packages/integration-tests/wow/azerite-essence.integration.test.ts index 25580cb6..ec49d76f 100644 --- a/packages/integration-tests/wow/azerite-essence.integration.test.ts +++ b/packages/integration-tests/wow/azerite-essence.integration.test.ts @@ -1,18 +1,33 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + azeriteEssenceIndexResponseSchema, + azeriteEssenceSearchResponseItemSchema, +} from '../../../generated/schemas/wow/azerite-essence'; describe('wow azerite-essence integration', () => { - it('fetches azerite essence index and search', async ({ expect }) => { + it('validates azerite essence index and search', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); + const index = await client.sendRequest(wow.azeriteEssenceIndex()); - expect(index).toBeTruthy(); + const parsedIndex = azeriteEssenceIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Azerite essence index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + const search = await client.sendRequest(wow.azeriteEssenceSearch({ _page: 1 })); - expect(search).toBeTruthy(); + const parsedSearch = azeriteEssenceSearchResponseItemSchema.safeParse(search); + if (!parsedSearch.success) { + console.error('Azerite essence search validation failed:', treeifyError(parsedSearch.error)); + } + expect(parsedSearch.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-achievements.integration.test.ts b/packages/integration-tests/wow/character-achievements.integration.test.ts index 2ed78851..06206ed9 100644 --- a/packages/integration-tests/wow/character-achievements.integration.test.ts +++ b/packages/integration-tests/wow/character-achievements.integration.test.ts @@ -1,20 +1,35 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + characterAchievementsSummaryResponseSchema, + characterAchievementStatisticsResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-achievements integration', () => { - it('fetches character achievements summary and statistics for putro', async ({ expect }) => { + it('validates character achievements summary and statistics for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const realm = 'laughing-skull'; const character = 'putro'; + const summary = await client.sendRequest(wow.characterAchievementsSummary(realm, character)); - expect(summary).toBeTruthy(); + const parsedSummary = characterAchievementsSummaryResponseSchema.safeParse(summary); + if (!parsedSummary.success) { + console.error('Character achievements summary validation failed:', treeifyError(parsedSummary.error)); + } + expect(parsedSummary.success).toBe(true); + const stats = await client.sendRequest(wow.characterAchievementStatistics(realm, character)); - expect(stats).toBeTruthy(); + const parsedStats = characterAchievementStatisticsResponseSchema.safeParse(stats); + if (!parsedStats.success) { + console.error('Character achievement statistics validation failed:', treeifyError(parsedStats.error)); + } + expect(parsedStats.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-appearance.integration.test.ts b/packages/integration-tests/wow/character-appearance.integration.test.ts index df8d828c..e8e3fdcd 100644 --- a/packages/integration-tests/wow/character-appearance.integration.test.ts +++ b/packages/integration-tests/wow/character-appearance.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterAppearanceResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-appearance integration', () => { - it('fetches character appearance for putro', async ({ expect }) => { + it('validates character appearance for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-appearance integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterAppearanceSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterAppearanceResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character appearance validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-collections.integration.test.ts b/packages/integration-tests/wow/character-collections.integration.test.ts index 9f9e0217..1fe7efef 100644 --- a/packages/integration-tests/wow/character-collections.integration.test.ts +++ b/packages/integration-tests/wow/character-collections.integration.test.ts @@ -1,20 +1,35 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + characterCollectionsIndexResponseSchema, + characterTransmogCollectionSummaryResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-collections integration', () => { - it('fetches collections indices and summaries for putro', async ({ expect }) => { + it('validates collections indices and summaries for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const realm = 'laughing-skull'; const character = 'putro'; + const index = await client.sendRequest(wow.characterCollectionsIndex(realm, character)); - expect(index).toBeTruthy(); + const parsedIndex = characterCollectionsIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Character collections index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + const transmog = await client.sendRequest(wow.characterTransmogCollectionSummary(realm, character)); - expect(transmog).toBeTruthy(); + const parsedTransmog = characterTransmogCollectionSummaryResponseSchema.safeParse(transmog); + if (!parsedTransmog.success) { + console.error('Character transmog collection validation failed:', treeifyError(parsedTransmog.error)); + } + expect(parsedTransmog.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-encounters.integration.test.ts b/packages/integration-tests/wow/character-encounters.integration.test.ts index d18283d5..e790537a 100644 --- a/packages/integration-tests/wow/character-encounters.integration.test.ts +++ b/packages/integration-tests/wow/character-encounters.integration.test.ts @@ -1,18 +1,24 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterEncountersSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-encounters integration', () => { - it('fetches character encounters for putro', async ({ expect }) => { + it('validates character encounters for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const realm = 'laughing-skull'; const character = 'putro'; const encounters = await client.sendRequest(wow.characterEncountersSummary(realm, character)); - expect(encounters).toBeTruthy(); + const parsed = characterEncountersSummaryResponseSchema.safeParse(encounters); + if (!parsed.success) { + console.error('Character encounters validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts index 02693b07..d26ff2f2 100644 --- a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts +++ b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterHunterPetsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-hunter-pets integration', () => { - it('fetches character hunter pets for putro', async ({ expect }) => { + it('validates character hunter pets for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-hunter-pets integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterHunterPetsSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterHunterPetsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character hunter pets validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts index 8f6d5df1..48f394d8 100644 --- a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterMythicKeystoneProfileIndexResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-mythic-keystone-profile integration', () => { - it('fetches mythic keystone profile index for putro', async ({ expect }) => { + it('validates mythic keystone profile index for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-mythic-keystone-profile integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const index = await client.sendRequest(wow.characterMythicKeystoneProfileIndex(realm, character)); - expect(index).toBeTruthy(); + const parsed = characterMythicKeystoneProfileIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Character mythic keystone profile index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-professions.integration.test.ts b/packages/integration-tests/wow/character-professions.integration.test.ts index 7f96a5ef..b95c4105 100644 --- a/packages/integration-tests/wow/character-professions.integration.test.ts +++ b/packages/integration-tests/wow/character-professions.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterProfessionsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-professions integration', () => { - it('fetches character professions for putro', async ({ expect }) => { + it('validates character professions for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-professions integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterProfessionsSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterProfessionsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character professions validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-profile.integration.test.ts b/packages/integration-tests/wow/character-profile.integration.test.ts index 9b49f59c..c8bcbe7e 100644 --- a/packages/integration-tests/wow/character-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-profile.integration.test.ts @@ -1,10 +1,15 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + characterProfileStatusResponseSchema, + characterProfileSummaryResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-profile integration', () => { - it('fetches character profile summary and status for putro', async ({ expect }) => { + it('validates character profile summary and status for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -12,9 +17,19 @@ describe('wow character-profile integration', () => { }); const realm = 'laughing-skull'; const character = 'putro'; + const summary = await client.sendRequest(wow.characterProfileSummary(realm, character)); - expect(summary).toBeTruthy(); + const parsedSummary = characterProfileSummaryResponseSchema.safeParse(summary); + if (!parsedSummary.success) { + console.error('Character profile summary validation failed:', treeifyError(parsedSummary.error)); + } + expect(parsedSummary.success).toBe(true); + const status = await client.sendRequest(wow.characterProfileStatus(realm, character)); - expect(status).toBeTruthy(); + const parsedStatus = characterProfileStatusResponseSchema.safeParse(status); + if (!parsedStatus.success) { + console.error('Character profile status validation failed:', treeifyError(parsedStatus.error)); + } + expect(parsedStatus.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-pvp.integration.test.ts b/packages/integration-tests/wow/character-pvp.integration.test.ts index 06a0c34a..efc944e7 100644 --- a/packages/integration-tests/wow/character-pvp.integration.test.ts +++ b/packages/integration-tests/wow/character-pvp.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterPvpSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-pvp integration', () => { - it('fetches character pvp summary for putro', async ({ expect }) => { + it('validates character pvp summary for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-pvp integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterPvpSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterPvpSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character pvp summary validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-quests.integration.test.ts b/packages/integration-tests/wow/character-quests.integration.test.ts index 18ed47c1..9fa59d25 100644 --- a/packages/integration-tests/wow/character-quests.integration.test.ts +++ b/packages/integration-tests/wow/character-quests.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterQuestsResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-quests integration', () => { - it('fetches character quests for putro', async ({ expect }) => { + it('validates character quests for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-quests integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterQuests(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterQuestsResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character quests validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-reputations.integration.test.ts b/packages/integration-tests/wow/character-reputations.integration.test.ts index c359e8ba..16f06603 100644 --- a/packages/integration-tests/wow/character-reputations.integration.test.ts +++ b/packages/integration-tests/wow/character-reputations.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterReputationsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-reputations integration', () => { - it('fetches character reputations for putro', async ({ expect }) => { + it('validates character reputations for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-reputations integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterReputationsSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterReputationsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character reputations validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-soulbinds.integration.test.ts b/packages/integration-tests/wow/character-soulbinds.integration.test.ts index 6c2cb19e..e265f0a4 100644 --- a/packages/integration-tests/wow/character-soulbinds.integration.test.ts +++ b/packages/integration-tests/wow/character-soulbinds.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterSoulbindsResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-soulbinds integration', () => { - it('fetches character soulbinds for putro', async ({ expect }) => { + it('validates character soulbinds for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-soulbinds integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterSoulbinds(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterSoulbindsResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character soulbinds validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-specializations.integration.test.ts b/packages/integration-tests/wow/character-specializations.integration.test.ts index 4787dd68..ed4ea2a2 100644 --- a/packages/integration-tests/wow/character-specializations.integration.test.ts +++ b/packages/integration-tests/wow/character-specializations.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterSpecializationsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-specializations integration', () => { - it('fetches character specializations for putro', async ({ expect }) => { + it('validates character specializations for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-specializations integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterSpecializationsSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterSpecializationsSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character specializations validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/character-titles.integration.test.ts b/packages/integration-tests/wow/character-titles.integration.test.ts index bf54257f..48fd5539 100644 --- a/packages/integration-tests/wow/character-titles.integration.test.ts +++ b/packages/integration-tests/wow/character-titles.integration.test.ts @@ -1,10 +1,12 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { characterTitlesSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-titles integration', () => { - it('fetches character titles for putro', async ({ expect }) => { + it('validates character titles for putro', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -13,6 +15,10 @@ describe('wow character-titles integration', () => { const realm = 'laughing-skull'; const character = 'putro'; const resp = await client.sendRequest(wow.characterTitlesSummary(realm, character)); - expect(resp).toBeTruthy(); + const parsed = characterTitlesSummaryResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Character titles validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/covenant.integration.test.ts b/packages/integration-tests/wow/covenant.integration.test.ts index 3a81b8e0..011f5cc6 100644 --- a/packages/integration-tests/wow/covenant.integration.test.ts +++ b/packages/integration-tests/wow/covenant.integration.test.ts @@ -1,18 +1,44 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + covenantIndexResponseSchema, + covenantResponseSchema, + soulbindIndexResponseSchema, +} from '../../../generated/schemas/wow/covenant'; describe('wow covenant integration', () => { - it('fetches covenant and soulbind indices', async ({ expect }) => { + it('validates covenant and soulbind indices and fetches detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); + const covIndex = await client.sendRequest(wow.covenantIndex()); - expect(covIndex).toBeTruthy(); + const parsedCov = covenantIndexResponseSchema.safeParse(covIndex); + if (!parsedCov.success) { + console.error('Covenant index validation failed:', treeifyError(parsedCov.error)); + } + expect(parsedCov.success).toBe(true); + + const firstCov = parsedCov.success ? parsedCov.data.covenants[0] : undefined; + if (firstCov) { + const covenant = await client.sendRequest(wow.covenant(firstCov.id)); + const parsedDetail = covenantResponseSchema.safeParse(covenant); + if (!parsedDetail.success) { + console.error('Covenant detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } + const soulIndex = await client.sendRequest(wow.soulbindIndex()); - expect(soulIndex).toBeTruthy(); + const parsedSoul = soulbindIndexResponseSchema.safeParse(soulIndex); + if (!parsedSoul.success) { + console.error('Soulbind index validation failed:', treeifyError(parsedSoul.error)); + } + expect(parsedSoul.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/heirloom.integration.test.ts b/packages/integration-tests/wow/heirloom.integration.test.ts index e63ce66c..39a73d37 100644 --- a/packages/integration-tests/wow/heirloom.integration.test.ts +++ b/packages/integration-tests/wow/heirloom.integration.test.ts @@ -1,16 +1,32 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { heirloomIndexResponseSchema, heirloomResponseSchema } from '../../../generated/schemas/wow/heirloom'; describe('wow heirloom integration', () => { - it('fetches heirloom index', async ({ expect }) => { + it('validates heirloom index and fetches heirloom detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.heirloomIndex()); - expect(index).toBeTruthy(); + const parsed = heirloomIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Heirloom index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.heirlooms[0] : undefined; + if (first) { + const item = await client.sendRequest(wow.heirloom(first.id)); + const parsedItem = heirloomResponseSchema.safeParse(item); + if (!parsedItem.success) { + console.error('Heirloom detail validation failed:', treeifyError(parsedItem.error)); + } + expect(parsedItem.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/journal.integration.test.ts b/packages/integration-tests/wow/journal.integration.test.ts index 0c68835b..9af205b7 100644 --- a/packages/integration-tests/wow/journal.integration.test.ts +++ b/packages/integration-tests/wow/journal.integration.test.ts @@ -1,18 +1,54 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + journalEncounterIndexResponseSchema, + journalEncounterResponseSchema, + journalExpansionIndexResponseSchema, + journalExpansionResponseSchema, +} from '../../../generated/schemas/wow/journal'; describe('wow journal integration', () => { - it('fetches journal encounter index and expansion index', async ({ expect }) => { + it('validates journal encounter index and expansion index with details', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); const enc = await client.sendRequest(wow.journalEncounterIndex()); - expect(enc).toBeTruthy(); + const parsedEnc = journalEncounterIndexResponseSchema.safeParse(enc); + if (!parsedEnc.success) { + console.error('Journal encounter index validation failed:', treeifyError(parsedEnc.error)); + } + expect(parsedEnc.success).toBe(true); + + const firstEnc = parsedEnc.success ? parsedEnc.data.encounters[0] : undefined; + if (firstEnc) { + const encDetail = await client.sendRequest(wow.journalEncounter(firstEnc.id)); + const parsedEncDetail = journalEncounterResponseSchema.safeParse(encDetail); + if (!parsedEncDetail.success) { + console.error('Journal encounter detail validation failed:', treeifyError(parsedEncDetail.error)); + } + expect(parsedEncDetail.success).toBe(true); + } + const exp = await client.sendRequest(wow.journalExpansionIndex()); - expect(exp).toBeTruthy(); + const parsedExp = journalExpansionIndexResponseSchema.safeParse(exp); + if (!parsedExp.success) { + console.error('Journal expansion index validation failed:', treeifyError(parsedExp.error)); + } + expect(parsedExp.success).toBe(true); + + const firstExp = parsedExp.success ? parsedExp.data.tiers[0] : undefined; + if (firstExp) { + const expDetail = await client.sendRequest(wow.journalExpansion(firstExp.id)); + const parsedExpDetail = journalExpansionResponseSchema.safeParse(expDetail); + if (!parsedExpDetail.success) { + console.error('Journal expansion detail validation failed:', treeifyError(parsedExpDetail.error)); + } + expect(parsedExpDetail.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/modified-crafting.integration.test.ts b/packages/integration-tests/wow/modified-crafting.integration.test.ts index d8c61325..bcb0393f 100644 --- a/packages/integration-tests/wow/modified-crafting.integration.test.ts +++ b/packages/integration-tests/wow/modified-crafting.integration.test.ts @@ -1,16 +1,35 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + modifiedCraftingCategoryIndexResponseSchema, + modifiedCraftingCategoryResponseSchema, +} from '../../../generated/schemas/wow/modified-crafting'; describe('wow modified-crafting integration', () => { - it('fetches modified crafting category index', async ({ expect }) => { + it('validates modified crafting category index and fetches detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.modifiedCraftingCategoryIndex()); - expect(index).toBeTruthy(); + const parsed = modifiedCraftingCategoryIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Modified crafting category index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.categories[0] : undefined; + if (first) { + const category = await client.sendRequest(wow.modifiedCraftingCategory(first.id)); + const parsedCategory = modifiedCraftingCategoryResponseSchema.safeParse(category); + if (!parsedCategory.success) { + console.error('Modified crafting category detail validation failed:', treeifyError(parsedCategory.error)); + } + expect(parsedCategory.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts index 0794956b..f2082665 100644 --- a/packages/integration-tests/wow/mount.integration.test.ts +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -1,16 +1,32 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { mountIndexResponseSchema, mountResponseSchema } from '../../../generated/schemas/wow/mount'; describe('wow mount integration', () => { - it('fetches mount index', async ({ expect }) => { + it('validates mount index and fetches mount detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.mountIndex()); - expect(index).toBeTruthy(); + const parsed = mountIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Mount index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.mounts[0] : undefined; + if (first) { + const mount = await client.sendRequest(wow.mount(first.id)); + const parsedMount = mountResponseSchema.safeParse(mount); + if (!parsedMount.success) { + console.error('Mount detail validation failed:', treeifyError(parsedMount.error)); + } + expect(parsedMount.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/pet.integration.test.ts b/packages/integration-tests/wow/pet.integration.test.ts index 2c873bc9..434e03b0 100644 --- a/packages/integration-tests/wow/pet.integration.test.ts +++ b/packages/integration-tests/wow/pet.integration.test.ts @@ -1,16 +1,32 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { petIndexResponseSchema, petResponseSchema } from '../../../generated/schemas/wow/pet'; describe('wow pet integration', () => { - it('fetches pet index', async ({ expect }) => { + it('validates pet index and fetches pet detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.petIndex()); - expect(index).toBeTruthy(); + const parsed = petIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Pet index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.pets[0] : undefined; + if (first) { + const pet = await client.sendRequest(wow.pet(first.id)); + const parsedPet = petResponseSchema.safeParse(pet); + if (!parsedPet.success) { + console.error('Pet detail validation failed:', treeifyError(parsedPet.error)); + } + expect(parsedPet.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts index 29193956..57aedbd3 100644 --- a/packages/integration-tests/wow/playable-specialization.integration.test.ts +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -1,16 +1,34 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + playableSpecializationIndexResponseSchema, + playableSpecializationResponseSchema, +} from '../../../generated/schemas/wow/playable-specialization'; describe('wow playable-specialization integration', () => { - it('fetches playable specialization index', async ({ expect }) => { + it('validates playable specialization index and fetches detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.playableSpecializationIndex()); - expect(index).toBeTruthy(); + const parsed = playableSpecializationIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Playable specialization index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + for (const specialization of index.character_specializations) { + const spec = await client.sendRequest(wow.playableSpecialization(specialization.id)); + const parsedSpec = playableSpecializationResponseSchema.safeParse(spec); + if (!parsedSpec.success) { + console.error('Playable specialization detail validation failed:', treeifyError(parsedSpec.error)); + } + expect(parsedSpec.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/profession.integration.test.ts b/packages/integration-tests/wow/profession.integration.test.ts index 495c11cc..381feb92 100644 --- a/packages/integration-tests/wow/profession.integration.test.ts +++ b/packages/integration-tests/wow/profession.integration.test.ts @@ -1,18 +1,32 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { professionIndexResponseSchema, professionResponseSchema } from '../../../generated/schemas/wow/profession'; describe('wow profession integration', () => { - it('fetches profession index and a recipe search', async ({ expect }) => { + it('validates profession index and fetches profession detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.professionIndex()); - expect(index).toBeTruthy(); - const search = await client.sendRequest(wow.recipe(index.professions[0]?.id)); - expect(search).toBeTruthy(); + const parsedIndex = professionIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Profession index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const first = parsedIndex.success ? parsedIndex.data.professions[0] : undefined; + if (first) { + const prof = await client.sendRequest(wow.profession(first.id)); + const parsedProf = professionResponseSchema.safeParse(prof); + if (!parsedProf.success) { + console.error('Profession detail validation failed:', treeifyError(parsedProf.error)); + } + expect(parsedProf.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/pvp.integration.test.ts b/packages/integration-tests/wow/pvp.integration.test.ts index c253f80d..db197a81 100644 --- a/packages/integration-tests/wow/pvp.integration.test.ts +++ b/packages/integration-tests/wow/pvp.integration.test.ts @@ -1,18 +1,33 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + pvpLeaderboardIndexResponseSchema, + pvpSeasonIndexResponseSchema, +} from '../../../generated/schemas/wow/pvp-season'; describe('wow pvp integration', () => { - it('fetches pvp leaderboard index and season index', async ({ expect }) => { + it('validates pvp leaderboard and season indices', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); - const lb = await client.sendRequest(wow.pvpLeaderboardIndex()); - expect(lb).toBeTruthy(); + const season = await client.sendRequest(wow.pvpSeasonIndex()); - expect(season).toBeTruthy(); + const parsedSeason = pvpSeasonIndexResponseSchema.safeParse(season); + if (!parsedSeason.success) { + console.error('PVP season index validation failed:', treeifyError(parsedSeason.error)); + } + expect(parsedSeason.success).toBe(true); + + const lb = await client.sendRequest(wow.pvpLeaderboardIndex(season.current_season.id)); + const parsedLb = pvpLeaderboardIndexResponseSchema.safeParse(lb); + if (!parsedLb.success) { + console.error('PVP leaderboard index validation failed:', treeifyError(parsedLb.error)); + } + expect(parsedLb.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/quest.integration.test.ts b/packages/integration-tests/wow/quest.integration.test.ts index d0953624..9867e65c 100644 --- a/packages/integration-tests/wow/quest.integration.test.ts +++ b/packages/integration-tests/wow/quest.integration.test.ts @@ -1,18 +1,30 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { questIndexResponseSchema, questResponseSchema } from '../../../generated/schemas/wow/quest'; describe('wow quest integration', () => { - it('fetches quest index and area index', async ({ expect }) => { + it('validates quest index and fetches quest detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.questIndex()); - expect(index).toBeTruthy(); - const area = await client.sendRequest(wow.questAreaIndex()); - expect(area).toBeTruthy(); + const parsed = questIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Quest index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const quest = await client.sendRequest(wow.quest(32_370)); + const parsedQuest = questResponseSchema.safeParse(quest); + if (!parsedQuest.success) { + console.error('Quest detail validation failed:', treeifyError(parsedQuest.error)); + } + expect(parsedQuest.success).toBe(true); }, 30_000); + //TODO Do more quest tests }); diff --git a/packages/integration-tests/wow/realm.integration.test.ts b/packages/integration-tests/wow/realm.integration.test.ts index 1a8bffd4..c5823fcd 100644 --- a/packages/integration-tests/wow/realm.integration.test.ts +++ b/packages/integration-tests/wow/realm.integration.test.ts @@ -3,13 +3,13 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { realmIndexResponseSchema } from '../../../generated/schemas/wow'; +import { realmIndexResponseSchema, realmResponseSchema } from '../../../generated/schemas/wow/realm'; describe('wow realm integration', () => { - it('validates realm index', async ({ expect }) => { + it('validates realm index and fetches realm detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); @@ -19,5 +19,15 @@ describe('wow realm integration', () => { console.error('Realm index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.realms[0] : undefined; + if (first) { + const realm = await client.sendRequest(wow.realm(first.slug)); + const parsedRealm = realmResponseSchema.safeParse(realm); + if (!parsedRealm.success) { + console.error('Realm detail validation failed:', treeifyError(parsedRealm.error)); + } + expect(parsedRealm.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/spell.integration.test.ts b/packages/integration-tests/wow/spell.integration.test.ts index 0da884d0..80b92a0b 100644 --- a/packages/integration-tests/wow/spell.integration.test.ts +++ b/packages/integration-tests/wow/spell.integration.test.ts @@ -1,18 +1,41 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + spellMediaResponseSchema, + spellResponseSchema, + spellSearchResponseItemSchema, +} from '../../../generated/schemas/wow/spell'; describe('wow spell integration', () => { - it('fetches spell search and media', async ({ expect }) => { + it('validates spell search and media responses', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', secret: environment.blizzardClientSecret, }); + + const spell = await client.sendRequest(wow.spell(217_200)); + const parsedSpell = spellResponseSchema.safeParse(spell); + if (!parsedSpell.success) { + console.error('Spell detail validation failed:', treeifyError(parsedSpell.error)); + } + expect(parsedSpell.success).toBe(true); + const search = await client.sendRequest(wow.spellSearch({ locale: 'en_GB', name: 'fire' })); - expect(search).toBeTruthy(); - const index = await client.sendRequest(wow.spellMedia(1)); - expect(index).toBeTruthy(); + const parsedSearch = spellSearchResponseItemSchema.safeParse(search); + if (!parsedSearch.success) { + console.error('Spell search validation failed:', treeifyError(parsedSearch.error)); + } + expect(parsedSearch.success).toBe(true); + + const media = await client.sendRequest(wow.spellMedia(1)); + const parsedMedia = spellMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Spell media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/title.integration.test.ts b/packages/integration-tests/wow/title.integration.test.ts index 0add9951..ce040562 100644 --- a/packages/integration-tests/wow/title.integration.test.ts +++ b/packages/integration-tests/wow/title.integration.test.ts @@ -1,16 +1,32 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { titleIndexResponseSchema, titleResponseSchema } from '../../../generated/schemas/wow/title'; describe('wow title integration', () => { - it('fetches title index', async ({ expect }) => { + it('validates title index and fetches title detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.titleIndex()); - expect(index).toBeTruthy(); + const parsed = titleIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Title index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const first = parsed.success ? parsed.data.titles[0] : undefined; + if (first) { + const title = await client.sendRequest(wow.title(first.id)); + const parsedTitle = titleResponseSchema.safeParse(title); + if (!parsedTitle.success) { + console.error('Title detail validation failed:', treeifyError(parsedTitle.error)); + } + expect(parsedTitle.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/toy.integration.test.ts b/packages/integration-tests/wow/toy.integration.test.ts index 71ae0ac7..5eb05167 100644 --- a/packages/integration-tests/wow/toy.integration.test.ts +++ b/packages/integration-tests/wow/toy.integration.test.ts @@ -1,16 +1,42 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { toyIndexResponseSchema, toyResponseSchema } from '../../../generated/schemas/wow/toy'; describe('wow toy integration', () => { - it('fetches toy index', async ({ expect }) => { + it('validates toy index and fetches toy detail', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const index = await client.sendRequest(wow.toyIndex()); - expect(index).toBeTruthy(); + const parsed = toyIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Toy index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + // Pick up to 5 toys at random from the index to fetch details + const toys = parsed.success ? parsed.data.toys : []; + const sampleSize = Math.min(5, toys.length); + const sampled = + toys.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + toys.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : toys.slice(0, sampleSize); + + for (const t of sampled) { + const toy = await client.sendRequest(wow.toy(t.id)); + const parsedToy = toyResponseSchema.safeParse(toy); + if (!parsedToy.success) { + console.error('Toy detail validation failed for id', t.id, treeifyError(parsedToy.error)); + } + console.log('paredToy', parsedToy.error); + console.log('toy', toy); + expect(parsedToy.success).toBe(true); + } }, 30_000); }); diff --git a/packages/integration-tests/wow/wow-token.integration.test.ts b/packages/integration-tests/wow/wow-token.integration.test.ts index 6f52b841..a8b8a5b0 100644 --- a/packages/integration-tests/wow/wow-token.integration.test.ts +++ b/packages/integration-tests/wow/wow-token.integration.test.ts @@ -1,16 +1,22 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { wowTokenResponseSchema } from '../../../generated/schemas/wow/wow-token'; describe('wow wow-token integration', () => { - it('fetches wow token info', async ({ expect }) => { + it('validates wow token response', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); const token = await client.sendRequest(wow.wowToken()); - expect(token).toBeTruthy(); + const parsed = wowTokenResponseSchema.safeParse(token); + if (!parsed.success) { + console.error('Wow token validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); }, 30_000); }); diff --git a/packages/wow/src/quest/types.ts b/packages/wow/src/quest/types.ts index c1f9a939..22c2c558 100644 --- a/packages/wow/src/quest/types.ts +++ b/packages/wow/src/quest/types.ts @@ -51,7 +51,8 @@ export interface QuestIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface QuestResponse extends ResponseBase { - area: NameIdKey; + area?: NameIdKey; + category: NameIdKey; description: string; id: number; requirements: Requirements; @@ -87,10 +88,16 @@ interface Reputation { value: number; } +interface ReputationRequirement { + faction: NameIdKey; + min_reputation: number; +} + interface Requirements { faction: Faction; max_character_level: number; min_character_level: number; + reputations: Array; } interface Rewards { diff --git a/packages/wow/src/toy/types.ts b/packages/wow/src/toy/types.ts index b0c73164..c3adcb2b 100644 --- a/packages/wow/src/toy/types.ts +++ b/packages/wow/src/toy/types.ts @@ -16,8 +16,9 @@ export interface ToyResponse extends ResponseBase { id: number; item: NameIdKey; media: Media; + should_exclude_if_uncollected?: boolean; source: Source; - source_description: string; + source_description?: string; } interface Media extends KeyBase { From c630af00c56448af92f7edaec8cc5da911a06771 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 20:21:28 +0100 Subject: [PATCH 41/52] Update title and toy types and test --- generated/schemas/wow/title.ts | 16 ++++++++++++++++ .../wow/title.integration.test.ts | 16 ++++++++++++---- .../wow/toy.integration.test.ts | 2 -- packages/wow/src/title/types.ts | 7 +++++++ 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/generated/schemas/wow/title.ts b/generated/schemas/wow/title.ts index bdcab987..e4af6d1c 100644 --- a/generated/schemas/wow/title.ts +++ b/generated/schemas/wow/title.ts @@ -6,6 +6,22 @@ export const titleIndexResponseSchema = responseBaseSchema.extend({ titles: z.array(nameIdKeySchema), }); +const titleSourceSchema = z.strictObject({ + achievements: z.array(nameIdKeySchema).optional(), + quests: z.array(nameIdKeySchema).optional(), + type: z.union([ + z.strictObject({ + name: z.literal('Achievement'), + type: z.literal('ACHIEVEMENT'), + }), + z.strictObject({ + name: z.literal('Quest'), + type: z.literal('QUEST'), + }), + ]), +}); + export const titleResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_name: genderNameSchema, + source: titleSourceSchema.optional(), }); diff --git a/packages/integration-tests/wow/title.integration.test.ts b/packages/integration-tests/wow/title.integration.test.ts index ce040562..23b46b67 100644 --- a/packages/integration-tests/wow/title.integration.test.ts +++ b/packages/integration-tests/wow/title.integration.test.ts @@ -19,12 +19,20 @@ describe('wow title integration', () => { } expect(parsed.success).toBe(true); - const first = parsed.success ? parsed.data.titles[0] : undefined; - if (first) { - const title = await client.sendRequest(wow.title(first.id)); + // Pick up to 5 titles at random from the index to fetch details + const titles = parsed.success ? parsed.data.titles : []; + const sampleSize = Math.min(5, titles.length); + const sampled = + titles.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + titles.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : titles.slice(0, sampleSize); + + for (const t of sampled) { + const title = await client.sendRequest(wow.title(t.id)); const parsedTitle = titleResponseSchema.safeParse(title); if (!parsedTitle.success) { - console.error('Title detail validation failed:', treeifyError(parsedTitle.error)); + console.error('Title detail validation failed for id', t.id, treeifyError(parsedTitle.error)); } expect(parsedTitle.success).toBe(true); } diff --git a/packages/integration-tests/wow/toy.integration.test.ts b/packages/integration-tests/wow/toy.integration.test.ts index 5eb05167..3d861ded 100644 --- a/packages/integration-tests/wow/toy.integration.test.ts +++ b/packages/integration-tests/wow/toy.integration.test.ts @@ -34,8 +34,6 @@ describe('wow toy integration', () => { if (!parsedToy.success) { console.error('Toy detail validation failed for id', t.id, treeifyError(parsedToy.error)); } - console.log('paredToy', parsedToy.error); - console.log('toy', toy); expect(parsedToy.success).toBe(true); } }, 30_000); diff --git a/packages/wow/src/title/types.ts b/packages/wow/src/title/types.ts index e5184e84..d002d605 100644 --- a/packages/wow/src/title/types.ts +++ b/packages/wow/src/title/types.ts @@ -14,4 +14,11 @@ export interface TitleIndexResponse extends ResponseBase { */ export interface TitleResponse extends NameId, ResponseBase { gender_name: GenderName; + source?: TitleSource; +} + +interface TitleSource { + achievements?: Array; + quests?: Array; + type: { name: 'Achievement'; type: 'ACHIEVEMENT' } | { name: 'Quest'; type: 'QUEST' }; } From 06b75d9606478026a77b652977f7d630d26c7386 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Tue, 3 Feb 2026 23:40:23 +0100 Subject: [PATCH 42/52] [WoW/Core] Introduce new types for search results for various WoW APIs --- .changeset/metal-zebras-type.md | 7 +++ .../schemas/classic-wow/connected-realm.ts | 15 +++++- generated/schemas/classic-wow/creature.ts | 7 ++- generated/schemas/classic-wow/item.ts | 7 ++- generated/schemas/classic-wow/media-search.ts | 13 ++++- generated/schemas/classic-wow/realm.ts | 7 ++- generated/schemas/core/index.ts | 1 + generated/schemas/core/search.ts | 10 ++++ generated/schemas/wow/azerite-essence.ts | 7 ++- generated/schemas/wow/connected-realm.ts | 15 +++++- generated/schemas/wow/creature.ts | 7 ++- generated/schemas/wow/item.ts | 7 ++- generated/schemas/wow/journal.ts | 51 ++++++++++--------- generated/schemas/wow/media-search.ts | 11 +++- generated/schemas/wow/mount.ts | 7 ++- generated/schemas/wow/realm.ts | 7 ++- generated/schemas/wow/spell.ts | 7 ++- .../src/connected-realm/connected-realm.ts | 8 +-- .../classic-wow/src/connected-realm/types.ts | 15 +++++- packages/classic-wow/src/creature/creature.ts | 8 +-- packages/classic-wow/src/creature/types.ts | 33 ++++++++---- packages/classic-wow/src/item/item.ts | 8 +-- packages/classic-wow/src/item/types.ts | 42 ++++++++------- .../src/media-search/media-search.ts | 8 +-- .../classic-wow/src/media-search/types.ts | 7 ++- packages/classic-wow/src/realm/realm.ts | 8 +-- packages/classic-wow/src/realm/types.ts | 31 ++++++----- packages/core/src/search.ts | 4 +- ...character-achievements.integration.test.ts | 2 +- .../character-appearance.integration.test.ts | 2 +- .../character-collections.integration.test.ts | 2 +- .../character-encounters.integration.test.ts | 2 +- .../character-hunter-pets.integration.test.ts | 2 +- ...ythic-keystone-profile.integration.test.ts | 2 +- .../character-professions.integration.test.ts | 2 +- .../wow/character-profile.integration.test.ts | 2 +- .../wow/character-pvp.integration.test.ts | 2 +- .../wow/character-quests.integration.test.ts | 2 +- .../character-reputations.integration.test.ts | 2 +- .../character-soulbinds.integration.test.ts | 2 +- ...racter-specializations.integration.test.ts | 2 +- .../wow/character-titles.integration.test.ts | 2 +- .../wow/spell.integration.test.ts | 8 +-- .../src/azerite-essence/azerite-essence.ts | 8 +-- packages/wow/src/azerite-essence/types.ts | 6 ++- .../src/connected-realm/connected-realm.ts | 8 +-- packages/wow/src/connected-realm/types.ts | 15 +++++- packages/wow/src/creature/creature.ts | 8 +-- packages/wow/src/creature/types.ts | 32 ++++++++---- packages/wow/src/item/item.ts | 8 +-- packages/wow/src/item/types.ts | 41 ++++++++------- packages/wow/src/journal/journal.ts | 11 ++-- packages/wow/src/journal/types.ts | 27 ++++++---- packages/wow/src/media-search/media-search.ts | 10 ++-- packages/wow/src/media-search/types.ts | 6 ++- packages/wow/src/mount/mount.ts | 8 +-- packages/wow/src/mount/types.ts | 24 ++++++--- packages/wow/src/realm/realm.ts | 10 ++-- packages/wow/src/realm/types.ts | 29 ++++++----- packages/wow/src/spell/spell.ts | 8 +-- packages/wow/src/spell/types.ts | 24 ++++++--- 61 files changed, 440 insertions(+), 237 deletions(-) create mode 100644 .changeset/metal-zebras-type.md create mode 100644 generated/schemas/core/search.ts diff --git a/.changeset/metal-zebras-type.md b/.changeset/metal-zebras-type.md new file mode 100644 index 00000000..1f8be657 --- /dev/null +++ b/.changeset/metal-zebras-type.md @@ -0,0 +1,7 @@ +--- +'@blizzard-api/classic-wow': minor +'@blizzard-api/core': minor +'@blizzard-api/wow': minor +--- + +Introduce new types for search results for various WoW APIs diff --git a/generated/schemas/classic-wow/connected-realm.ts b/generated/schemas/classic-wow/connected-realm.ts index 4e42447c..baddb500 100644 --- a/generated/schemas/classic-wow/connected-realm.ts +++ b/generated/schemas/classic-wow/connected-realm.ts @@ -1,6 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + responseBaseSchema, + searchResponseWithoutResultsSchema, +} from '../core'; export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ connected_realms: z.array( @@ -115,7 +122,7 @@ export const connectedRealmResponseSchema = responseBaseSchema.extend({ }), }); -export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ +const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ has_queue: z.boolean(), id: z.number(), @@ -124,3 +131,7 @@ export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ status: searchRealmStatusSchema, }), }); + +export const connectedRealmSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(connectedRealmSearchResponseItemSchema), +}); diff --git a/generated/schemas/classic-wow/creature.ts b/generated/schemas/classic-wow/creature.ts index 20e73097..725214c2 100644 --- a/generated/schemas/classic-wow/creature.ts +++ b/generated/schemas/classic-wow/creature.ts @@ -7,6 +7,7 @@ import { mediaAssetSchema, nameIdKeySchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; const displayMediaAssetSchema = z.strictObject({ @@ -36,7 +37,7 @@ export const creatureSearchParametersSchema = baseSearchParametersSchema.extend( name: z.string(), }); -export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ +const creatureSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ creature_displays: z.array( z.strictObject({ @@ -88,3 +89,7 @@ export const creatureResponseSchema = responseBaseSchema.extend({ name: z.string(), type: nameIdKeySchema, }); + +export const creatureSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(creatureSearchResponseItemSchema), +}); diff --git a/generated/schemas/classic-wow/item.ts b/generated/schemas/classic-wow/item.ts index f6666b48..3bda0309 100644 --- a/generated/schemas/classic-wow/item.ts +++ b/generated/schemas/classic-wow/item.ts @@ -9,6 +9,7 @@ import { nameIdKeySchema, nameIdSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const itemClassIndexResponseSchema = responseBaseSchema.extend({ @@ -72,7 +73,7 @@ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -export const itemSearchResponseItemSchema = keyBaseSchema.extend({ +const itemSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ id: z.number(), inventory_type: inventoryTypeSchema, @@ -177,6 +178,10 @@ const statTypeCapitalizedSchema = z.union([ z.literal('VERSATILITY'), ]); +export const itemSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(itemSearchResponseItemSchema), +}); + const statSchema = z.strictObject({ display: displaySchema, is_negated: z.boolean().optional(), diff --git a/generated/schemas/classic-wow/media-search.ts b/generated/schemas/classic-wow/media-search.ts index 6051b458..60194dcf 100644 --- a/generated/schemas/classic-wow/media-search.ts +++ b/generated/schemas/classic-wow/media-search.ts @@ -1,14 +1,23 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema, mediaAssetSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + mediaAssetSchema, + searchResponseWithoutResultsSchema, +} from '../core'; export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); -export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ +const mediaSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ assets: z.array(mediaAssetSchema), id: z.number(), }), }); + +export const mediaSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(mediaSearchResponseItemSchema), +}); diff --git a/generated/schemas/classic-wow/realm.ts b/generated/schemas/classic-wow/realm.ts index b182591d..ceccdb2a 100644 --- a/generated/schemas/classic-wow/realm.ts +++ b/generated/schemas/classic-wow/realm.ts @@ -8,6 +8,7 @@ import { nameIdSchema, realmSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const realmCategorySchema = z.union([ @@ -64,7 +65,7 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ timezone: realmTimezoneSchema.optional(), }); -export const realmSearchResponseItemSchema = keyBaseSchema.extend({ +const realmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), @@ -99,3 +100,7 @@ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) type: realmTypeCapitalizedSchema, }), }); + +export const realmSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(realmSearchResponseItemSchema), +}); diff --git a/generated/schemas/core/index.ts b/generated/schemas/core/index.ts index 558aeeb7..d0f236a5 100644 --- a/generated/schemas/core/index.ts +++ b/generated/schemas/core/index.ts @@ -1,3 +1,4 @@ export * from './base'; export * from './locales'; export * from './namespace'; +export * from './search'; diff --git a/generated/schemas/core/search.ts b/generated/schemas/core/search.ts new file mode 100644 index 00000000..03ab6aca --- /dev/null +++ b/generated/schemas/core/search.ts @@ -0,0 +1,10 @@ +// Generated by ts-to-zod +import { z } from 'zod'; + +export const searchResponseWithoutResultsSchema = z.strictObject({ + maxPageSize: z.number(), + page: z.number(), + pageCount: z.number(), + pageSize: z.number(), + resultCountCapped: z.boolean().optional(), +}); diff --git a/generated/schemas/wow/azerite-essence.ts b/generated/schemas/wow/azerite-essence.ts index c6572546..8946e349 100644 --- a/generated/schemas/wow/azerite-essence.ts +++ b/generated/schemas/wow/azerite-essence.ts @@ -8,6 +8,7 @@ import { nameIdKeySchema, nameIdSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const azeriteEssenceIndexResponseSchema = responseBaseSchema.extend({ @@ -34,7 +35,7 @@ export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.e 'allowed_specializations.id': z.number().optional(), }); -export const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ +const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ allowed_specializations: z.array(nameIdSchema), name: z.record(localesSchema, z.string()), @@ -46,3 +47,7 @@ export const azeriteEssenceResponseSchema = nameIdSchema.extend(responseBaseSche media: mediaSchema, powers: z.array(powerSchema), }); + +export const azeriteEssenceSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(azeriteEssenceSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/connected-realm.ts b/generated/schemas/wow/connected-realm.ts index 4e42447c..baddb500 100644 --- a/generated/schemas/wow/connected-realm.ts +++ b/generated/schemas/wow/connected-realm.ts @@ -1,6 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema, localesSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + localesSchema, + nameIdKeySchema, + responseBaseSchema, + searchResponseWithoutResultsSchema, +} from '../core'; export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ connected_realms: z.array( @@ -115,7 +122,7 @@ export const connectedRealmResponseSchema = responseBaseSchema.extend({ }), }); -export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ +const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ has_queue: z.boolean(), id: z.number(), @@ -124,3 +131,7 @@ export const connectedRealmSearchResponseItemSchema = keyBaseSchema.extend({ status: searchRealmStatusSchema, }), }); + +export const connectedRealmSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(connectedRealmSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/creature.ts b/generated/schemas/wow/creature.ts index 20e73097..725214c2 100644 --- a/generated/schemas/wow/creature.ts +++ b/generated/schemas/wow/creature.ts @@ -7,6 +7,7 @@ import { mediaAssetSchema, nameIdKeySchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; const displayMediaAssetSchema = z.strictObject({ @@ -36,7 +37,7 @@ export const creatureSearchParametersSchema = baseSearchParametersSchema.extend( name: z.string(), }); -export const creatureSearchResponseItemSchema = keyBaseSchema.extend({ +const creatureSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ creature_displays: z.array( z.strictObject({ @@ -88,3 +89,7 @@ export const creatureResponseSchema = responseBaseSchema.extend({ name: z.string(), type: nameIdKeySchema, }); + +export const creatureSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(creatureSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/item.ts b/generated/schemas/wow/item.ts index 323fb11a..40819057 100644 --- a/generated/schemas/wow/item.ts +++ b/generated/schemas/wow/item.ts @@ -9,6 +9,7 @@ import { nameIdKeySchema, nameIdSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const itemClassIndexResponseSchema = responseBaseSchema.extend({ @@ -72,7 +73,7 @@ export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -export const itemSearchResponseItemSchema = keyBaseSchema.extend({ +const itemSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ id: z.number(), inventory_type: inventoryTypeSchema, @@ -186,6 +187,10 @@ const statTypeCapitalizedSchema = z.union([ z.literal('VERSATILITY'), ]); +export const itemSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(itemSearchResponseItemSchema), +}); + export const itemSetResponseSchema = responseBaseSchema.extend({ effects: z.array(effectSchema), id: z.number(), diff --git a/generated/schemas/wow/journal.ts b/generated/schemas/wow/journal.ts index 4cb99e13..642b4d92 100644 --- a/generated/schemas/wow/journal.ts +++ b/generated/schemas/wow/journal.ts @@ -8,6 +8,7 @@ import { nameIdKeySchema, nameIdSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const journalEncounterIndexResponseSchema = responseBaseSchema.extend({ @@ -24,24 +25,6 @@ export const journalEncounterSearchParametersSchema = baseSearchParametersSchema locale: localesSchema, }); -const journalEncounterSearchCreatureSchema = z.strictObject({ - creature_display: z.strictObject({ - id: z.number(), - }), - id: z.number(), - name: z.record(localesSchema, z.string()), -}); - -const journalEncounterSearchItemSchema = z.strictObject({ - id: z.number(), - item: z.strictObject({ - id: z.number(), - name: z.record(localesSchema, z.string()), - }), -}); - -const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); - export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ tiers: z.array(nameIdKeySchema), }); @@ -70,6 +53,28 @@ const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), }); +const encounterModeSchema = z.union([z.literal('HEROIC'), z.literal('LFR'), z.literal('MYTHIC'), z.literal('NORMAL')]); + +const journalEncounterSearchCreatureSchema = z.strictObject({ + creature_display: z.strictObject({ + id: z.number(), + }), + id: z.number(), + name: z.record(localesSchema, z.string()), +}); + +const journalEncounterSearchItemSchema = z.strictObject({ + id: z.number(), + item: z.strictObject({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), +}); + +const categorySchema = z.strictObject({ + type: encounterCategorySchema, +}); + const journalSubSection4Schema = z.strictObject({ body_text: z.string().optional(), creature_display: creatureDisplaySchema.optional(), @@ -107,10 +112,6 @@ const modeSchema = z.strictObject({ type: modeTypeSchema, }); -const categorySchema = z.strictObject({ - type: encounterCategorySchema, -}); - const creatureSchema = nameIdSchema.extend({ creature_display: creatureDisplaySchema, description: z.string().optional(), @@ -176,7 +177,7 @@ const journalSectionSchema = z.strictObject({ title: z.string(), }); -export const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ +const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ category: categorySchema, creatures: z.array(journalEncounterSearchCreatureSchema), @@ -209,3 +210,7 @@ export const journalEncounterResponseSchema = nameIdSchema.extend(responseBaseSc modes: z.array(modeSchema).optional(), sections: z.array(journalSectionSchema), }); + +export const journalEncounterSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(journalEncounterSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/media-search.ts b/generated/schemas/wow/media-search.ts index 6051b458..a138102f 100644 --- a/generated/schemas/wow/media-search.ts +++ b/generated/schemas/wow/media-search.ts @@ -1,6 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { baseSearchParametersSchema, keyBaseSchema, mediaAssetSchema } from '../core'; +import { + baseSearchParametersSchema, + keyBaseSchema, + mediaAssetSchema, + searchResponseWithoutResultsSchema, +} from '../core'; export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), @@ -12,3 +17,7 @@ export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ id: z.number(), }), }); + +export const mediaSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(mediaSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/mount.ts b/generated/schemas/wow/mount.ts index 7d3f3d8f..00427613 100644 --- a/generated/schemas/wow/mount.ts +++ b/generated/schemas/wow/mount.ts @@ -7,6 +7,7 @@ import { localesSchema, nameIdKeySchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const mountIndexResponseSchema = responseBaseSchema.extend({ @@ -27,7 +28,7 @@ export const mountSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -export const mountSearchResponseItemSchema = keyBaseSchema.extend({ +const mountSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ creature_displays: z.array( z.strictObject({ @@ -57,3 +58,7 @@ export const mountResponseSchema = responseBaseSchema.extend({ should_exclude_if_uncollected: z.boolean(), source: sourceSchema, }); + +export const mountSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(mountSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/realm.ts b/generated/schemas/wow/realm.ts index b182591d..ceccdb2a 100644 --- a/generated/schemas/wow/realm.ts +++ b/generated/schemas/wow/realm.ts @@ -8,6 +8,7 @@ import { nameIdSchema, realmSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const realmCategorySchema = z.union([ @@ -64,7 +65,7 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ timezone: realmTimezoneSchema.optional(), }); -export const realmSearchResponseItemSchema = keyBaseSchema.extend({ +const realmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ category: z.record(localesSchema, z.union([z.string(), z.undefined()])), id: z.number(), @@ -99,3 +100,7 @@ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) type: realmTypeCapitalizedSchema, }), }); + +export const realmSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(realmSearchResponseItemSchema), +}); diff --git a/generated/schemas/wow/spell.ts b/generated/schemas/wow/spell.ts index abc462cd..544f9cb5 100644 --- a/generated/schemas/wow/spell.ts +++ b/generated/schemas/wow/spell.ts @@ -7,6 +7,7 @@ import { mediaAssetSchema, nameIdSchema, responseBaseSchema, + searchResponseWithoutResultsSchema, } from '../core'; export const spellMediaResponseSchema = responseBaseSchema.extend({ @@ -23,7 +24,7 @@ export const spellSearchParametersSchema = baseSearchParametersSchema.extend({ name: z.string(), }); -export const spellSearchResponseItemSchema = keyBaseSchema.extend({ +const spellSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ id: z.number(), media: z.strictObject({ @@ -37,3 +38,7 @@ export const spellResponseSchema = nameIdSchema.extend(responseBaseSchema.shape) description: z.string().nullable(), media: mediaSchema, }); + +export const spellSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ + results: z.array(spellSearchResponseItemSchema), +}); diff --git a/packages/classic-wow/src/connected-realm/connected-realm.ts b/packages/classic-wow/src/connected-realm/connected-realm.ts index 85326ef8..587b1109 100644 --- a/packages/classic-wow/src/connected-realm/connected-realm.ts +++ b/packages/classic-wow/src/connected-realm/connected-realm.ts @@ -1,10 +1,10 @@ import { wowBasePath } from '@blizzard-api/core'; -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { ConnectedRealmIndexResponse, ConnectedRealmResponse, ConnectedRealmSearchParameters, - ConnectedRealmSearchResponseItem, + ConnectedRealmSearchResponse, } from './types'; /** @@ -39,12 +39,12 @@ export function connectedRealmIndex( * Performs a search of connected realms. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param options The search parameters. See {@link ConnectedRealmSearchParameters}. - * @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}. + * @returns The search results. See {@link ConnectedRealmSearchResponse}. */ export function connectedRealmSearch( namespace: Extract, options: ConnectedRealmSearchParameters, -): Resource, ConnectedRealmSearchParameters> { +): Resource { return { namespace, parameters: { diff --git a/packages/classic-wow/src/connected-realm/types.ts b/packages/classic-wow/src/connected-realm/types.ts index a78841b3..385b2ddc 100644 --- a/packages/classic-wow/src/connected-realm/types.ts +++ b/packages/classic-wow/src/connected-realm/types.ts @@ -1,4 +1,11 @@ -import type { BaseSearchParameters, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + NameIdKey, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; /** @@ -37,7 +44,11 @@ export interface ConnectedRealmSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface ConnectedRealmSearchResponseItem extends KeyBase { +export interface ConnectedRealmSearchResponse extends SearchResponseWithoutResults { + results: Array; +} + +interface ConnectedRealmSearchResponseItem extends KeyBase { data: { has_queue: boolean; id: number; diff --git a/packages/classic-wow/src/creature/creature.ts b/packages/classic-wow/src/creature/creature.ts index f9f2eeba..5b22b27d 100644 --- a/packages/classic-wow/src/creature/creature.ts +++ b/packages/classic-wow/src/creature/creature.ts @@ -1,5 +1,5 @@ import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { CreatureDisplayMediaResponse, CreatureFamilyIndexResponse, @@ -7,7 +7,7 @@ import type { CreatureFamilyResponse, CreatureResponse, CreatureSearchParameters, - CreatureSearchResponseItem, + CreatureSearchResponse, CreatureTypeIndexResponse, CreatureTypeResponse, } from './types'; @@ -89,12 +89,12 @@ export function creatureFamilyMedia( * Performs a search of creatures. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param options The creature search parameters. See {@link CreatureSearchParameters}. - * @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}. + * @returns The creature search results. See {@link CreatureSearchResponse}. */ export function creatureSearch( namespace: Extract, options: CreatureSearchParameters, -): Resource, Omit> { +): Resource> { return { namespace, parameters: { diff --git a/packages/classic-wow/src/creature/types.ts b/packages/classic-wow/src/creature/types.ts index bddba7c1..cf8ab050 100644 --- a/packages/classic-wow/src/creature/types.ts +++ b/packages/classic-wow/src/creature/types.ts @@ -1,4 +1,12 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + MediaAsset, + NameIdKey, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; /** * The response for creature display media. @@ -65,17 +73,9 @@ export interface CreatureSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface CreatureSearchResponseItem extends KeyBase { - data: { - creature_displays: Array<{ id: number }>; - family?: { id: number; name: Record }; - id: number; - is_tameable: boolean; - name: Record; - type: { id: number; name: Record }; - }; +export interface CreatureSearchResponse extends SearchResponseWithoutResults { + results: Array; } - /** * The response for a creature type index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -97,6 +97,17 @@ interface CreatureDisplay extends KeyBase { id: number; } +interface CreatureSearchResponseItem extends KeyBase { + data: { + creature_displays: Array<{ id: number }>; + family?: { id: number; name: Record }; + id: number; + is_tameable: boolean; + name: Record; + type: { id: number; name: Record }; + }; +} + interface DisplayMediaAsset { key: string; value: string; diff --git a/packages/classic-wow/src/item/item.ts b/packages/classic-wow/src/item/item.ts index c979c1b4..6ef77498 100644 --- a/packages/classic-wow/src/item/item.ts +++ b/packages/classic-wow/src/item/item.ts @@ -1,12 +1,12 @@ import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import type { ItemClassIndexResponse, ItemClassResponse, ItemMediaResponse, ItemResponse, ItemSearchParameters, - ItemSearchResponseItem, + ItemSearchResponse, ItemSubClassResponse, } from './types'; @@ -72,12 +72,12 @@ export function itemMedia( * Search for items. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param options The search parameters. See {@link ItemSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link ItemSearchResponse}. */ export function itemSearch( namespace: Extract, options: ItemSearchParameters, -): Resource, Omit> { +): Resource> { return { namespace, parameters: { diff --git a/packages/classic-wow/src/item/types.ts b/packages/classic-wow/src/item/types.ts index d821748c..e71790ed 100644 --- a/packages/classic-wow/src/item/types.ts +++ b/packages/classic-wow/src/item/types.ts @@ -7,6 +7,7 @@ import type { NameId, NameIdKey, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -72,26 +73,9 @@ export interface ItemSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface ItemSearchResponseItem extends KeyBase { - data: { - id: number; - inventory_type: InventoryType; - is_equippable: boolean; - is_stackable: boolean; - item_class: { id: number; name: Record }; - item_subclass: { id: number; name: Record }; - level: number; - max_count: number; - media: { id: number }; - name: Record; - purchase_price: number; - purchase_quantity: number; - quality: ItemQuality; - required_level: number; - sell_price: number; - }; +export interface ItemSearchResponse extends SearchResponseWithoutResults { + results: Array; } - /** * The response for an item subclass. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -158,6 +142,26 @@ interface ItemQuality { type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; } +interface ItemSearchResponseItem extends KeyBase { + data: { + id: number; + inventory_type: InventoryType; + is_equippable: boolean; + is_stackable: boolean; + item_class: { id: number; name: Record }; + item_subclass: { id: number; name: Record }; + level: number; + max_count: number; + media: { id: number }; + name: Record; + purchase_price: number; + purchase_quantity: number; + quality: ItemQuality; + required_level: number; + sell_price: number; + }; +} + interface Media extends KeyBase { id: number; } diff --git a/packages/classic-wow/src/media-search/media-search.ts b/packages/classic-wow/src/media-search/media-search.ts index dfb986e0..b8423b11 100644 --- a/packages/classic-wow/src/media-search/media-search.ts +++ b/packages/classic-wow/src/media-search/media-search.ts @@ -1,17 +1,17 @@ import { wowSearchBasePath } from '@blizzard-api/core'; -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import type { MediaSearchParameters, MediaSearchResponseItem } from './types'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; +import type { MediaSearchParameters, MediaSearchResponse } from './types'; /** * Search for media. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param options The search parameters. See {@link MediaSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link MediaSearchResponse}. */ export function mediaSearch( namespace: Extract, options: MediaSearchParameters, -): Resource, MediaSearchParameters> { +): Resource { return { namespace, parameters: { diff --git a/packages/classic-wow/src/media-search/types.ts b/packages/classic-wow/src/media-search/types.ts index 1fe748d1..8e9a0f3c 100644 --- a/packages/classic-wow/src/media-search/types.ts +++ b/packages/classic-wow/src/media-search/types.ts @@ -1,4 +1,4 @@ -import type { BaseSearchParameters, KeyBase, MediaAsset } from '@blizzard-api/core'; +import type { BaseSearchParameters, KeyBase, MediaAsset, SearchResponseWithoutResults } from '@blizzard-api/core'; /** * The search parameters for media. @@ -14,7 +14,10 @@ export interface MediaSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface MediaSearchResponseItem extends KeyBase { +export interface MediaSearchResponse extends SearchResponseWithoutResults { + results: Array; +} +interface MediaSearchResponseItem extends KeyBase { data: { assets: Array; id: number; diff --git a/packages/classic-wow/src/realm/realm.ts b/packages/classic-wow/src/realm/realm.ts index 3663b6c9..c5faf5e1 100644 --- a/packages/classic-wow/src/realm/realm.ts +++ b/packages/classic-wow/src/realm/realm.ts @@ -1,6 +1,6 @@ import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { BlizzardNamespaces, Resource, SearchResponse } from '@blizzard-api/core'; -import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponseItem } from './types'; +import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; +import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponse } from './types'; /** * Get a realm by slug. @@ -34,12 +34,12 @@ export function realmIndex( * Search for realms. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param options The search parameters. See {@link RealmSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link RealmSearchResponse}. */ export function realmSearch( namespace: Extract, options: RealmSearchParameters, -): Resource, RealmSearchParameters> { +): Resource { return { namespace, parameters: { diff --git a/packages/classic-wow/src/realm/types.ts b/packages/classic-wow/src/realm/types.ts index 93e0bada..d8c4c9c5 100644 --- a/packages/classic-wow/src/realm/types.ts +++ b/packages/classic-wow/src/realm/types.ts @@ -6,6 +6,7 @@ import type { NameIdKey, Realm, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -78,18 +79,8 @@ export interface RealmSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface RealmSearchResponseItem extends KeyBase { - data: { - category: Record; - id: number; - is_tournament: boolean; - locale: RealmLocales; - name: Record; - region: { id: number; name: Record }; - slug: string; - timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; - }; +export interface RealmSearchResponse extends SearchResponseWithoutResults { + results: Array; } /** @@ -110,8 +101,22 @@ export type RealmTimezone = */ export type RealmType = 'Normal' | 'Roleplaying'; +export type RealmTypeCapitalized = 'NORMAL' | 'RP'; + /** * The type of a realm, capitalized and shortended). */ -export type RealmTypeCapitalized = 'NORMAL' | 'RP'; +interface RealmSearchResponseItem extends KeyBase { + data: { + category: Record; + id: number; + is_tournament: boolean; + locale: RealmLocales; + name: Record; + region: { id: number; name: Record }; + slug: string; + timezone: RealmTimezone; + type: { name: RealmType; type: RealmTypeCapitalized }; + }; +} diff --git a/packages/core/src/search.ts b/packages/core/src/search.ts index 28d97e29..69a5485b 100644 --- a/packages/core/src/search.ts +++ b/packages/core/src/search.ts @@ -11,14 +11,12 @@ * pageSize: 20, * maxPageSize: 100, * pageCount: 10, - * results: [], * }; */ -export interface SearchResponse { +export interface SearchResponseWithoutResults { maxPageSize: number; page: number; pageCount: number; pageSize: number; resultCountCapped?: boolean; - results: Array; } diff --git a/packages/integration-tests/wow/character-achievements.integration.test.ts b/packages/integration-tests/wow/character-achievements.integration.test.ts index 06206ed9..bdbd2427 100644 --- a/packages/integration-tests/wow/character-achievements.integration.test.ts +++ b/packages/integration-tests/wow/character-achievements.integration.test.ts @@ -9,7 +9,7 @@ import { } from '../../../generated/schemas/wow'; describe('wow character-achievements integration', () => { - it('validates character achievements summary and statistics for putro', async ({ expect }) => { + it('validates character achievements summary and statistics', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-appearance.integration.test.ts b/packages/integration-tests/wow/character-appearance.integration.test.ts index e8e3fdcd..21b6e87d 100644 --- a/packages/integration-tests/wow/character-appearance.integration.test.ts +++ b/packages/integration-tests/wow/character-appearance.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterAppearanceResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-appearance integration', () => { - it('validates character appearance for putro', async ({ expect }) => { + it('validates character appearance', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-collections.integration.test.ts b/packages/integration-tests/wow/character-collections.integration.test.ts index 1fe7efef..b2d88c70 100644 --- a/packages/integration-tests/wow/character-collections.integration.test.ts +++ b/packages/integration-tests/wow/character-collections.integration.test.ts @@ -9,7 +9,7 @@ import { } from '../../../generated/schemas/wow'; describe('wow character-collections integration', () => { - it('validates collections indices and summaries for putro', async ({ expect }) => { + it('validates collections indices and summaries', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-encounters.integration.test.ts b/packages/integration-tests/wow/character-encounters.integration.test.ts index e790537a..4398c788 100644 --- a/packages/integration-tests/wow/character-encounters.integration.test.ts +++ b/packages/integration-tests/wow/character-encounters.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterEncountersSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-encounters integration', () => { - it('validates character encounters for putro', async ({ expect }) => { + it('validates character encounters', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts index d26ff2f2..d573e31b 100644 --- a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts +++ b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterHunterPetsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-hunter-pets integration', () => { - it('validates character hunter pets for putro', async ({ expect }) => { + it('validates character hunter pets', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts index 48f394d8..4525bdc6 100644 --- a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterMythicKeystoneProfileIndexResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-mythic-keystone-profile integration', () => { - it('validates mythic keystone profile index for putro', async ({ expect }) => { + it('validates mythic keystone profile index', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-professions.integration.test.ts b/packages/integration-tests/wow/character-professions.integration.test.ts index b95c4105..2c2be25e 100644 --- a/packages/integration-tests/wow/character-professions.integration.test.ts +++ b/packages/integration-tests/wow/character-professions.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterProfessionsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-professions integration', () => { - it('validates character professions for putro', async ({ expect }) => { + it('validates character professions', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-profile.integration.test.ts b/packages/integration-tests/wow/character-profile.integration.test.ts index c8bcbe7e..8f4d84c6 100644 --- a/packages/integration-tests/wow/character-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-profile.integration.test.ts @@ -9,7 +9,7 @@ import { } from '../../../generated/schemas/wow'; describe('wow character-profile integration', () => { - it('validates character profile summary and status for putro', async ({ expect }) => { + it('validates character profile summary and status', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-pvp.integration.test.ts b/packages/integration-tests/wow/character-pvp.integration.test.ts index efc944e7..ac11bd90 100644 --- a/packages/integration-tests/wow/character-pvp.integration.test.ts +++ b/packages/integration-tests/wow/character-pvp.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterPvpSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-pvp integration', () => { - it('validates character pvp summary for putro', async ({ expect }) => { + it('validates character pvp summary', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-quests.integration.test.ts b/packages/integration-tests/wow/character-quests.integration.test.ts index 9fa59d25..2a3171e7 100644 --- a/packages/integration-tests/wow/character-quests.integration.test.ts +++ b/packages/integration-tests/wow/character-quests.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterQuestsResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-quests integration', () => { - it('validates character quests for putro', async ({ expect }) => { + it('validates character quests', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-reputations.integration.test.ts b/packages/integration-tests/wow/character-reputations.integration.test.ts index 16f06603..263043c2 100644 --- a/packages/integration-tests/wow/character-reputations.integration.test.ts +++ b/packages/integration-tests/wow/character-reputations.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterReputationsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-reputations integration', () => { - it('validates character reputations for putro', async ({ expect }) => { + it('validates character reputations', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-soulbinds.integration.test.ts b/packages/integration-tests/wow/character-soulbinds.integration.test.ts index e265f0a4..09f2bd3a 100644 --- a/packages/integration-tests/wow/character-soulbinds.integration.test.ts +++ b/packages/integration-tests/wow/character-soulbinds.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterSoulbindsResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-soulbinds integration', () => { - it('validates character soulbinds for putro', async ({ expect }) => { + it('validates character soulbinds', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-specializations.integration.test.ts b/packages/integration-tests/wow/character-specializations.integration.test.ts index ed4ea2a2..b580ef37 100644 --- a/packages/integration-tests/wow/character-specializations.integration.test.ts +++ b/packages/integration-tests/wow/character-specializations.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterSpecializationsSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-specializations integration', () => { - it('validates character specializations for putro', async ({ expect }) => { + it('validates character specializations', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/character-titles.integration.test.ts b/packages/integration-tests/wow/character-titles.integration.test.ts index 48fd5539..ab7dccc6 100644 --- a/packages/integration-tests/wow/character-titles.integration.test.ts +++ b/packages/integration-tests/wow/character-titles.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { characterTitlesSummaryResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-titles integration', () => { - it('validates character titles for putro', async ({ expect }) => { + it('validates character titles', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', diff --git a/packages/integration-tests/wow/spell.integration.test.ts b/packages/integration-tests/wow/spell.integration.test.ts index 80b92a0b..f1d6c358 100644 --- a/packages/integration-tests/wow/spell.integration.test.ts +++ b/packages/integration-tests/wow/spell.integration.test.ts @@ -6,7 +6,7 @@ import { environment } from '../../../environment'; import { spellMediaResponseSchema, spellResponseSchema, - spellSearchResponseItemSchema, + spellSearchResponseSchema, } from '../../../generated/schemas/wow/spell'; describe('wow spell integration', () => { @@ -24,14 +24,14 @@ describe('wow spell integration', () => { } expect(parsedSpell.success).toBe(true); - const search = await client.sendRequest(wow.spellSearch({ locale: 'en_GB', name: 'fire' })); - const parsedSearch = spellSearchResponseItemSchema.safeParse(search); + const search = await client.sendRequest(wow.spellSearch({ locale: 'en_GB', name: 'Barbed' })); + const parsedSearch = spellSearchResponseSchema.safeParse(search); if (!parsedSearch.success) { console.error('Spell search validation failed:', treeifyError(parsedSearch.error)); } expect(parsedSearch.success).toBe(true); - const media = await client.sendRequest(wow.spellMedia(1)); + const media = await client.sendRequest(wow.spellMedia(1_264_781)); const parsedMedia = spellMediaResponseSchema.safeParse(media); if (!parsedMedia.success) { console.error('Spell media validation failed:', treeifyError(parsedMedia.error)); diff --git a/packages/wow/src/azerite-essence/azerite-essence.ts b/packages/wow/src/azerite-essence/azerite-essence.ts index 7346eb9a..9fafe1c6 100644 --- a/packages/wow/src/azerite-essence/azerite-essence.ts +++ b/packages/wow/src/azerite-essence/azerite-essence.ts @@ -1,11 +1,11 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { AzeriteEssenceIndexResponse, AzeriteEssenceMediaResponse, AzeriteEssenceResponse, AzeriteEssenceSearchParameters, - AzeriteEssenceSearchResponseItem, + AzeriteEssenceSearchResponse, } from './types'; /** @@ -40,11 +40,11 @@ export function azeriteEssenceMedia(azeriteEssenceId: number): Resource, AzeriteEssenceSearchParameters> { +): Resource { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index 68fd57d6..cd81da46 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -6,6 +6,7 @@ import type { NameId, NameIdKey, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -49,7 +50,10 @@ export interface AzeriteEssenceSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface AzeriteEssenceSearchResponseItem extends KeyBase { +export interface AzeriteEssenceSearchResponse extends SearchResponseWithoutResults { + results: Array; +} +interface AzeriteEssenceSearchResponseItem extends KeyBase { data: { allowed_specializations: Array; name: Record; diff --git a/packages/wow/src/connected-realm/connected-realm.ts b/packages/wow/src/connected-realm/connected-realm.ts index 331c3df4..a2ab31e3 100644 --- a/packages/wow/src/connected-realm/connected-realm.ts +++ b/packages/wow/src/connected-realm/connected-realm.ts @@ -1,10 +1,10 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath } from '@blizzard-api/core'; import type { ConnectedRealmIndexResponse, ConnectedRealmResponse, ConnectedRealmSearchParameters, - ConnectedRealmSearchResponseItem, + ConnectedRealmSearchResponse, } from './types'; /** @@ -31,11 +31,11 @@ export function connectedRealmIndex(): Resource { /** * Search for connected realms. * @param options The search parameters. See {@link ConnectedRealmSearchParameters}. - * @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}. + * @returns The search results. See {@link ConnectedRealmSearchResponse}. */ export function connectedRealmSearch( options: ConnectedRealmSearchParameters, -): Resource, ConnectedRealmSearchParameters> { +): Resource { return { namespace: 'dynamic', parameters: { diff --git a/packages/wow/src/connected-realm/types.ts b/packages/wow/src/connected-realm/types.ts index 806ce540..e2aabe78 100644 --- a/packages/wow/src/connected-realm/types.ts +++ b/packages/wow/src/connected-realm/types.ts @@ -1,4 +1,11 @@ -import type { BaseSearchParameters, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + NameIdKey, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; /** @@ -37,7 +44,11 @@ export interface ConnectedRealmSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface ConnectedRealmSearchResponseItem extends KeyBase { +export interface ConnectedRealmSearchResponse extends SearchResponseWithoutResults { + results: Array; +} + +interface ConnectedRealmSearchResponseItem extends KeyBase { data: { has_queue: boolean; id: number; diff --git a/packages/wow/src/creature/creature.ts b/packages/wow/src/creature/creature.ts index 02a7ff25..00799dde 100644 --- a/packages/wow/src/creature/creature.ts +++ b/packages/wow/src/creature/creature.ts @@ -1,4 +1,4 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { CreatureDisplayMediaResponse, @@ -7,7 +7,7 @@ import type { CreatureFamilyResponse, CreatureResponse, CreatureSearchParameters, - CreatureSearchResponseItem, + CreatureSearchResponse, CreatureTypeIndexResponse, CreatureTypeResponse, } from './types'; @@ -69,11 +69,11 @@ export function creatureFamilyMedia(creatureFamilyId: number): Resource, Omit> { +): Resource> { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/creature/types.ts b/packages/wow/src/creature/types.ts index bddba7c1..d1a3d349 100644 --- a/packages/wow/src/creature/types.ts +++ b/packages/wow/src/creature/types.ts @@ -1,4 +1,12 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + MediaAsset, + NameIdKey, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; /** * The response for creature display media. @@ -65,15 +73,8 @@ export interface CreatureSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface CreatureSearchResponseItem extends KeyBase { - data: { - creature_displays: Array<{ id: number }>; - family?: { id: number; name: Record }; - id: number; - is_tameable: boolean; - name: Record; - type: { id: number; name: Record }; - }; +export interface CreatureSearchResponse extends SearchResponseWithoutResults { + results: Array; } /** @@ -97,6 +98,17 @@ interface CreatureDisplay extends KeyBase { id: number; } +interface CreatureSearchResponseItem extends KeyBase { + data: { + creature_displays: Array<{ id: number }>; + family?: { id: number; name: Record }; + id: number; + is_tameable: boolean; + name: Record; + type: { id: number; name: Record }; + }; +} + interface DisplayMediaAsset { key: string; value: string; diff --git a/packages/wow/src/item/item.ts b/packages/wow/src/item/item.ts index cb390a52..400d50b5 100644 --- a/packages/wow/src/item/item.ts +++ b/packages/wow/src/item/item.ts @@ -1,4 +1,4 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { ItemClassIndexResponse, @@ -6,7 +6,7 @@ import type { ItemMediaResponse, ItemResponse, ItemSearchParameters, - ItemSearchResponseItem, + ItemSearchResponse, ItemSetIndexResponse, ItemSetResponse, ItemSubClassResponse, @@ -58,11 +58,11 @@ export function itemMedia(itemId: number): Resource { /** * Search for items. * @param options The search parameters. See {@link ItemSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link ItemSearchResponse}. */ export function itemSearch( options: ItemSearchParameters, -): Resource, Omit> { +): Resource> { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index 3d4bf67b..fa8457f9 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -7,6 +7,7 @@ import type { NameId, NameIdKey, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -73,24 +74,8 @@ export interface ItemSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface ItemSearchResponseItem extends KeyBase { - data: { - id: number; - inventory_type: InventoryType; - is_equippable: boolean; - is_stackable: boolean; - item_class: { id: number; name: Record }; - item_subclass: { id: number; name: Record }; - level: number; - max_count: number; - media: { id: number }; - name: Record; - purchase_price: number; - purchase_quantity: number; - quality: ItemQuality; - required_level: number; - sell_price: number; - }; +export interface ItemSearchResponse extends SearchResponseWithoutResults { + results: Array; } /** @@ -183,6 +168,26 @@ interface ItemQuality { type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; } +interface ItemSearchResponseItem extends KeyBase { + data: { + id: number; + inventory_type: InventoryType; + is_equippable: boolean; + is_stackable: boolean; + item_class: { id: number; name: Record }; + item_subclass: { id: number; name: Record }; + level: number; + max_count: number; + media: { id: number }; + name: Record; + purchase_price: number; + purchase_quantity: number; + quality: ItemQuality; + required_level: number; + sell_price: number; + }; +} + interface Media extends KeyBase { id: number; } diff --git a/packages/wow/src/journal/journal.ts b/packages/wow/src/journal/journal.ts index 21a849db..1c72e441 100644 --- a/packages/wow/src/journal/journal.ts +++ b/packages/wow/src/journal/journal.ts @@ -1,10 +1,10 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; import type { JournalEncounterIndexResponse, JournalEncounterResponse, JournalEncounterSearchParameters, - JournalEncounterSearchResponseItem, + JournalEncounterSearchResponse, JournalExpansionIndexResponse, JournalExpansionResponse, JournalInstanceIndexResponse, @@ -36,14 +36,11 @@ export function journalEncounterIndex(): Resource /** * Search for journal encounters. * @param options The search parameters. See {@link JournalEncounterSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link JournalEncounterSearchResponse}. */ export function journalEncounterSearch( options: JournalEncounterSearchParameters, -): Resource< - SearchResponse, - Omit -> { +): Resource> { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 1b940985..1f453d87 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -6,6 +6,7 @@ import type { NameId, NameIdKey, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -45,17 +46,8 @@ export interface JournalEncounterSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface JournalEncounterSearchResponseItem extends KeyBase { - data: { - category: Category; - creatures: Array; - id: number; - instance: { id: number; name: Record }; - items: Array; - modes?: Array<{ name: Record; type: EncounterMode }>; - name: Record; - sections: Array; - }; +export interface JournalEncounterSearchResponse extends SearchResponseWithoutResults { + results: Array; } /** @@ -147,6 +139,19 @@ interface JournalEncounterSearchItem { item: { id: number; name: Record }; } +interface JournalEncounterSearchResponseItem extends KeyBase { + data: { + category: Category; + creatures: Array; + id: number; + instance: { id: number; name: Record }; + items: Array; + modes?: Array<{ name: Record; type: EncounterMode }>; + name: Record; + sections: Array; + }; +} + interface JournalSection { body_text?: string; creature_display?: CreatureDisplay; diff --git a/packages/wow/src/media-search/media-search.ts b/packages/wow/src/media-search/media-search.ts index 2bb4976c..356ac37e 100644 --- a/packages/wow/src/media-search/media-search.ts +++ b/packages/wow/src/media-search/media-search.ts @@ -1,15 +1,13 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowSearchBasePath } from '@blizzard-api/core'; -import type { MediaSearchParameters, MediaSearchResponseItem } from './types'; +import type { MediaSearchParameters, MediaSearchResponse } from './types'; /** * Search for media. * @param options The search parameters. See {@link MediaSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link MediaSearchResponse}. */ -export function mediaSearch( - options: MediaSearchParameters, -): Resource, MediaSearchParameters> { +export function mediaSearch(options: MediaSearchParameters): Resource { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/media-search/types.ts b/packages/wow/src/media-search/types.ts index 1fe748d1..49d70542 100644 --- a/packages/wow/src/media-search/types.ts +++ b/packages/wow/src/media-search/types.ts @@ -1,4 +1,4 @@ -import type { BaseSearchParameters, KeyBase, MediaAsset } from '@blizzard-api/core'; +import type { BaseSearchParameters, KeyBase, MediaAsset, SearchResponseWithoutResults } from '@blizzard-api/core'; /** * The search parameters for media. @@ -14,6 +14,10 @@ export interface MediaSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ +export interface MediaSearchResponse extends SearchResponseWithoutResults { + results: Array; +} + export interface MediaSearchResponseItem extends KeyBase { data: { assets: Array; diff --git a/packages/wow/src/mount/mount.ts b/packages/wow/src/mount/mount.ts index b1844aac..0109f0e4 100644 --- a/packages/wow/src/mount/mount.ts +++ b/packages/wow/src/mount/mount.ts @@ -1,6 +1,6 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { MountIndexResponse, MountResponse, MountSearchParameters, MountSearchResponseItem } from './types'; +import type { MountIndexResponse, MountResponse, MountSearchParameters, MountSearchResponse } from './types'; /** * Get a mount by ID. @@ -26,11 +26,11 @@ export function mountIndex(): Resource { /** * Get a mount search. * @param options The search parameters. See {@link MountSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link MountSearchResponse}. */ export function mountSearch( options: MountSearchParameters, -): Resource, Omit> { +): Resource> { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index 227bfbeb..c7dd5a9c 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -1,4 +1,12 @@ -import type { BaseSearchParameters, Factions, KeyBase, Locales, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + Factions, + KeyBase, + Locales, + NameIdKey, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; /** * The response for a mount index. @@ -36,7 +44,15 @@ export interface MountSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface MountSearchResponseItem extends KeyBase { +export interface MountSearchResponse extends SearchResponseWithoutResults { + results: Array; +} + +interface CreatureDisplay extends KeyBase { + id: number; +} + +interface MountSearchResponseItem extends KeyBase { data: { creature_displays: Array<{ id: number }>; faction?: { name: Record; type: Factions }; @@ -46,10 +62,6 @@ export interface MountSearchResponseItem extends KeyBase { }; } -interface CreatureDisplay extends KeyBase { - id: number; -} - interface Source { name: string; type: string; diff --git a/packages/wow/src/realm/realm.ts b/packages/wow/src/realm/realm.ts index 557313ac..0ff8ddf6 100644 --- a/packages/wow/src/realm/realm.ts +++ b/packages/wow/src/realm/realm.ts @@ -1,6 +1,6 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponseItem } from './types'; +import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSearchResponse } from './types'; /** * Get a realm by slug. @@ -26,11 +26,9 @@ export function realmIndex(): Resource { /** * Search for realms. * @param options The search parameters. See {@link RealmSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * @returns The search results. See {@link RealmSearchResponse}. */ -export function realmSearch( - options: RealmSearchParameters, -): Resource, RealmSearchParameters> { +export function realmSearch(options: RealmSearchParameters): Resource { return { namespace: 'dynamic', parameters: { diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index b18db842..02309c2e 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -6,6 +6,7 @@ import type { NameIdKey, Realm, ResponseBase, + SearchResponseWithoutResults, } from '@blizzard-api/core'; /** @@ -78,18 +79,8 @@ export interface RealmSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface RealmSearchResponseItem extends KeyBase { - data: { - category: Record; - id: number; - is_tournament: boolean; - locale: RealmLocales; - name: Record; - region: { id: number; name: Record }; - slug: string; - timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; - }; +export interface RealmSearchResponse extends SearchResponseWithoutResults { + results: Array; } /** @@ -114,3 +105,17 @@ export type RealmType = 'Normal' | 'Roleplaying'; * The type of a realm, capitalized and shortended). */ export type RealmTypeCapitalized = 'NORMAL' | 'RP'; + +interface RealmSearchResponseItem extends KeyBase { + data: { + category: Record; + id: number; + is_tournament: boolean; + locale: RealmLocales; + name: Record; + region: { id: number; name: Record }; + slug: string; + timezone: RealmTimezone; + type: { name: RealmType; type: RealmTypeCapitalized }; + }; +} diff --git a/packages/wow/src/spell/spell.ts b/packages/wow/src/spell/spell.ts index ad31a2ed..ebf15756 100644 --- a/packages/wow/src/spell/spell.ts +++ b/packages/wow/src/spell/spell.ts @@ -1,6 +1,6 @@ -import type { Resource, SearchResponse } from '@blizzard-api/core'; +import type { Resource } from '@blizzard-api/core'; import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core'; -import type { SpellMediaResponse, SpellResponse, SpellSearchParameters, SpellSearchResponseItem } from './types'; +import type { SpellMediaResponse, SpellResponse, SpellSearchParameters, SpellSearchResponse } from './types'; /** * Get a spell by ID. @@ -27,11 +27,11 @@ export function spellMedia(spellId: number): Resource { /** * Get a spell search. * @param options The spell search options. See {@link SpellSearchParameters}. - * @returns The spell search. See {@link SearchResponse}. + * @returns The spell search. See {@link SpellSearchResponse}. */ export function spellSearch( options: SpellSearchParameters, -): Resource, Omit> { +): Resource> { return { namespace: 'static', parameters: { diff --git a/packages/wow/src/spell/types.ts b/packages/wow/src/spell/types.ts index 783787e2..047dcd5f 100644 --- a/packages/wow/src/spell/types.ts +++ b/packages/wow/src/spell/types.ts @@ -1,4 +1,12 @@ -import type { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, ResponseBase } from '@blizzard-api/core'; +import type { + BaseSearchParameters, + KeyBase, + Locales, + MediaAsset, + NameId, + ResponseBase, + SearchResponseWithoutResults, +} from '@blizzard-api/core'; /** * The response for a spell media. @@ -33,14 +41,18 @@ export interface SpellSearchParameters extends BaseSearchParameters { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search} */ -export interface SpellSearchResponseItem extends KeyBase { +export interface SpellSearchResponse extends SearchResponseWithoutResults { + results: Array; +} + +interface Media extends KeyBase { + id: number; +} + +interface SpellSearchResponseItem extends KeyBase { data: { id: number; media: { id: number }; name: Record; }; } - -interface Media extends KeyBase { - id: number; -} From f240182f7d10ad0e7f8bccd326fea1e1c36aa26c Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 00:02:33 +0100 Subject: [PATCH 43/52] Fix a series of wow retail types and tests --- generated/schemas/wow/mount.ts | 15 +++++++-- generated/schemas/wow/pet.ts | 8 ++--- .../schemas/wow/playable-specialization.ts | 3 +- generated/schemas/wow/pvp-season.ts | 9 ++++- .../media-search.integration.test.ts | 4 +-- .../wow/mount.integration.test.ts | 24 ++++++++++---- .../wow/pet.integration.test.ts | 16 ++++++--- ...layable-specialization.integration.test.ts | 1 + .../wow/pvp-season.integration.test.ts | 28 +++++++++++----- .../wow/pvp.integration.test.ts | 33 ------------------- packages/wow/src/mount/types.ts | 9 +++-- packages/wow/src/pet/types.ts | 8 ++--- .../wow/src/playable-specialization/types.ts | 3 +- packages/wow/src/pvp-season/types.ts | 2 +- 14 files changed, 90 insertions(+), 73 deletions(-) delete mode 100644 packages/integration-tests/wow/pvp.integration.test.ts diff --git a/generated/schemas/wow/mount.ts b/generated/schemas/wow/mount.ts index 00427613..cd51d39d 100644 --- a/generated/schemas/wow/mount.ts +++ b/generated/schemas/wow/mount.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { baseSearchParametersSchema, + factionSchema, factionsSchema, keyBaseSchema, localesSchema, @@ -52,11 +53,19 @@ const mountSearchResponseItemSchema = keyBaseSchema.extend({ export const mountResponseSchema = responseBaseSchema.extend({ creature_displays: z.array(creatureDisplaySchema), - description: z.string(), + description: z.string().nullable(), + faction: factionSchema.optional(), id: z.number(), name: z.string(), - should_exclude_if_uncollected: z.boolean(), - source: sourceSchema, + requirements: z + .strictObject({ + classes: z.array(nameIdKeySchema).optional(), + faction: factionSchema.optional(), + races: z.array(nameIdKeySchema).optional(), + }) + .optional(), + should_exclude_if_uncollected: z.boolean().optional(), + source: sourceSchema.optional(), }); export const mountSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ diff --git a/generated/schemas/wow/pet.ts b/generated/schemas/wow/pet.ts index bf22486d..cd60a62d 100644 --- a/generated/schemas/wow/pet.ts +++ b/generated/schemas/wow/pet.ts @@ -46,10 +46,10 @@ export const petAbilityResponseSchema = nameIdSchema.extend(responseBaseSchema.s }); export const petResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - abilities: z.array(abilitySchema), + abilities: z.array(abilitySchema).optional(), battle_pet_type: battlePetTypeSchema, creature: nameIdKeySchema, - description: z.string(), + description: z.string().nullable(), icon: z.string(), is_alliance_only: z.boolean(), is_battlepet: z.boolean(), @@ -58,6 +58,6 @@ export const petResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).e is_random_creature_display: z.boolean(), is_tradable: z.boolean(), media: mediaSchema, - should_exclude_if_uncollected: z.boolean(), - source: sourceSchema, + should_exclude_if_uncollected: z.boolean().optional(), + source: sourceSchema.optional(), }); diff --git a/generated/schemas/wow/playable-specialization.ts b/generated/schemas/wow/playable-specialization.ts index dfe1c233..5b75d1a3 100644 --- a/generated/schemas/wow/playable-specialization.ts +++ b/generated/schemas/wow/playable-specialization.ts @@ -36,7 +36,7 @@ const spellTooltipSchema = z.strictObject({ cast_time: z.string(), cooldown: z.string().optional(), description: z.string(), - power_cost: z.string().optional(), + power_cost: z.string().optional().nullable(), range: z.string().optional(), }); @@ -47,6 +47,7 @@ const pvpTalentSchema = z.strictObject({ export const playableSpecializationResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ gender_description: genderNameSchema, + hero_talent_trees: z.array(nameIdKeySchema), media: mediaSchema, playable_class: nameIdKeySchema, power_type: nameIdKeySchema, diff --git a/generated/schemas/wow/pvp-season.ts b/generated/schemas/wow/pvp-season.ts index 37b85687..9cfbd8b4 100644 --- a/generated/schemas/wow/pvp-season.ts +++ b/generated/schemas/wow/pvp-season.ts @@ -59,7 +59,14 @@ const seasonMatchStatisticsSchema = z.strictObject({ }); export const pvpLeaderboardIndexResponseSchema = responseBaseSchema.extend({ - leaderboards: z.array(nameIdKeySchema), + leaderboards: z.array( + keyBaseSchema.and( + z.strictObject({ + id: z.number().optional(), + name: z.string(), + }), + ), + ), season: seasonSchema, }); diff --git a/packages/integration-tests/classic-wow/media-search.integration.test.ts b/packages/integration-tests/classic-wow/media-search.integration.test.ts index a6396b81..0206078f 100644 --- a/packages/integration-tests/classic-wow/media-search.integration.test.ts +++ b/packages/integration-tests/classic-wow/media-search.integration.test.ts @@ -3,7 +3,7 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { mediaSearchResponseItemSchema } from '../../../generated/schemas/classic-wow'; +import { mediaSearchResponseSchema } from '../../../generated/schemas/classic-wow'; describe('classic-wow media search integration', () => { it('performs a media search and validates items', async ({ expect }) => { @@ -18,7 +18,7 @@ describe('classic-wow media search integration', () => { // `resp` is a SearchResponse; validate first item if present const first = Array.isArray(resp.results) ? resp.results[0] : undefined; if (first) { - const parsed = mediaSearchResponseItemSchema.safeParse(first); + const parsed = mediaSearchResponseSchema.safeParse(first); if (!parsed.success) { console.error('Media search item validation failed:', treeifyError(parsed.error)); } diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts index f2082665..1effaed9 100644 --- a/packages/integration-tests/wow/mount.integration.test.ts +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -19,14 +19,24 @@ describe('wow mount integration', () => { } expect(parsed.success).toBe(true); - const first = parsed.success ? parsed.data.mounts[0] : undefined; - if (first) { - const mount = await client.sendRequest(wow.mount(first.id)); - const parsedMount = mountResponseSchema.safeParse(mount); - if (!parsedMount.success) { - console.error('Mount detail validation failed:', treeifyError(parsedMount.error)); + // Pick up to 5 mounts at random from the index to fetch details + const mounts = parsed.success ? parsed.data.mounts : []; + const sampleSize = Math.min(500, mounts.length); + const sampled = + mounts.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + mounts.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : mounts.slice(0, sampleSize); + + for (const t of sampled) { + const mount = await client.sendRequest(wow.mount(t.id)); + const parsedmount = mountResponseSchema.safeParse(mount); + if (!parsedmount.success) { + console.error('mount detail validation failed for id', t.id, treeifyError(parsedmount.error)); + console.log('mount', mount); + console.log('parsedmount.error', parsedmount.error); } - expect(parsedMount.success).toBe(true); + expect(parsedmount.success).toBe(true); } }, 30_000); }); diff --git a/packages/integration-tests/wow/pet.integration.test.ts b/packages/integration-tests/wow/pet.integration.test.ts index 434e03b0..9db8561a 100644 --- a/packages/integration-tests/wow/pet.integration.test.ts +++ b/packages/integration-tests/wow/pet.integration.test.ts @@ -19,12 +19,20 @@ describe('wow pet integration', () => { } expect(parsed.success).toBe(true); - const first = parsed.success ? parsed.data.pets[0] : undefined; - if (first) { - const pet = await client.sendRequest(wow.pet(first.id)); + // Pick up to 5 pets at random from the index to fetch details + const pets = parsed.success ? parsed.data.pets : []; + const sampleSize = Math.min(5, pets.length); + const sampled = + pets.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + pets.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : pets.slice(0, sampleSize); + + for (const t of sampled) { + const pet = await client.sendRequest(wow.pet(t.id)); const parsedPet = petResponseSchema.safeParse(pet); if (!parsedPet.success) { - console.error('Pet detail validation failed:', treeifyError(parsedPet.error)); + console.error('Pet detail validation failed for id', t.id, treeifyError(parsedPet.error)); } expect(parsedPet.success).toBe(true); } diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts index 57aedbd3..bac6309c 100644 --- a/packages/integration-tests/wow/playable-specialization.integration.test.ts +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -28,6 +28,7 @@ describe('wow playable-specialization integration', () => { if (!parsedSpec.success) { console.error('Playable specialization detail validation failed:', treeifyError(parsedSpec.error)); } + expect(parsedSpec.success).toBe(true); } }, 30_000); diff --git a/packages/integration-tests/wow/pvp-season.integration.test.ts b/packages/integration-tests/wow/pvp-season.integration.test.ts index a6ccb30b..12a94109 100644 --- a/packages/integration-tests/wow/pvp-season.integration.test.ts +++ b/packages/integration-tests/wow/pvp-season.integration.test.ts @@ -3,21 +3,31 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { pvpSeasonIndexResponseSchema } from '../../../generated/schemas/wow'; +import { + pvpLeaderboardIndexResponseSchema, + pvpSeasonIndexResponseSchema, +} from '../../../generated/schemas/wow/pvp-season'; -describe('wow pvp season integration', () => { - it('validates pvp season index', async ({ expect }) => { +describe('wow pvp integration', () => { + it('validates pvp leaderboard and season indices', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); - const resp = await client.sendRequest(wow.pvpSeasonIndex()); - const parsed = pvpSeasonIndexResponseSchema.safeParse(resp); - if (!parsed.success) { - console.error('PvP season index validation failed:', treeifyError(parsed.error)); + const season = await client.sendRequest(wow.pvpSeasonIndex()); + const parsedSeason = pvpSeasonIndexResponseSchema.safeParse(season); + if (!parsedSeason.success) { + console.error('PVP season index validation failed:', treeifyError(parsedSeason.error)); } - expect(parsed.success).toBe(true); + expect(parsedSeason.success).toBe(true); + + const leaderboard = await client.sendRequest(wow.pvpLeaderboardIndex(season.current_season.id)); + const parsedLeaderboard = pvpLeaderboardIndexResponseSchema.safeParse(leaderboard); + if (!parsedLeaderboard.success) { + console.error('PVP leaderboard index validation failed:', treeifyError(parsedLeaderboard.error)); + } + expect(parsedLeaderboard.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/pvp.integration.test.ts b/packages/integration-tests/wow/pvp.integration.test.ts deleted file mode 100644 index db197a81..00000000 --- a/packages/integration-tests/wow/pvp.integration.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { createBlizzardApiClient } from '@blizzard-api/client'; -import * as wow from '@blizzard-api/wow'; -import { describe, it } from 'vitest'; -import { treeifyError } from 'zod'; -import { environment } from '../../../environment'; -import { - pvpLeaderboardIndexResponseSchema, - pvpSeasonIndexResponseSchema, -} from '../../../generated/schemas/wow/pvp-season'; - -describe('wow pvp integration', () => { - it('validates pvp leaderboard and season indices', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'eu', - secret: environment.blizzardClientSecret, - }); - - const season = await client.sendRequest(wow.pvpSeasonIndex()); - const parsedSeason = pvpSeasonIndexResponseSchema.safeParse(season); - if (!parsedSeason.success) { - console.error('PVP season index validation failed:', treeifyError(parsedSeason.error)); - } - expect(parsedSeason.success).toBe(true); - - const lb = await client.sendRequest(wow.pvpLeaderboardIndex(season.current_season.id)); - const parsedLb = pvpLeaderboardIndexResponseSchema.safeParse(lb); - if (!parsedLb.success) { - console.error('PVP leaderboard index validation failed:', treeifyError(parsedLb.error)); - } - expect(parsedLb.success).toBe(true); - }, 30_000); -}); diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index c7dd5a9c..1d5e9b97 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -1,5 +1,6 @@ import type { BaseSearchParameters, + Faction, Factions, KeyBase, Locales, @@ -22,11 +23,13 @@ export interface MountIndexResponse extends ResponseBase { */ export interface MountResponse extends ResponseBase { creature_displays: Array; - description: string; + description: null | string; + faction?: Faction; id: number; name: string; - should_exclude_if_uncollected: boolean; - source: Source; + requirements?: { classes?: Array; faction?: Faction; races?: Array }; + should_exclude_if_uncollected?: boolean; + source?: Source; } /** diff --git a/packages/wow/src/pet/types.ts b/packages/wow/src/pet/types.ts index 2de8e62a..e6bbdc77 100644 --- a/packages/wow/src/pet/types.ts +++ b/packages/wow/src/pet/types.ts @@ -49,10 +49,10 @@ export interface PetMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface PetResponse extends NameId, ResponseBase { - abilities: Array; + abilities?: Array; battle_pet_type: BattlePetType; creature: NameIdKey; - description: string; + description: null | string; icon: string; is_alliance_only: boolean; is_battlepet: boolean; @@ -61,8 +61,8 @@ export interface PetResponse extends NameId, ResponseBase { is_random_creature_display: boolean; is_tradable: boolean; media: Media; - should_exclude_if_uncollected: boolean; - source: Source; + should_exclude_if_uncollected?: boolean; + source?: Source; } interface Ability { diff --git a/packages/wow/src/playable-specialization/types.ts b/packages/wow/src/playable-specialization/types.ts index b30de186..0731ba3e 100644 --- a/packages/wow/src/playable-specialization/types.ts +++ b/packages/wow/src/playable-specialization/types.ts @@ -24,6 +24,7 @@ export interface PlayableSpecializationMediaResponse extends ResponseBase { */ export interface PlayableSpecializationResponse extends NameId, ResponseBase { gender_description: GenderName; + hero_talent_trees: Array; media: Media; playable_class: NameIdKey; power_type: NameIdKey; @@ -55,6 +56,6 @@ interface SpellTooltip { cast_time: string; cooldown?: string; description: string; - power_cost?: string; + power_cost?: null | string; range?: string; } diff --git a/packages/wow/src/pvp-season/types.ts b/packages/wow/src/pvp-season/types.ts index 9864e400..9d1bf6f4 100644 --- a/packages/wow/src/pvp-season/types.ts +++ b/packages/wow/src/pvp-season/types.ts @@ -5,7 +5,7 @@ import type { Faction, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface PvpLeaderboardIndexResponse extends ResponseBase { - leaderboards: Array; + leaderboards: Array; season: Season; } From 1323223785cbcbe49126655447aec9f01b417662 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 00:05:39 +0100 Subject: [PATCH 44/52] Fix type issue in azerite essence test --- .../integration-tests/wow/azerite-essence.integration.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/wow/azerite-essence.integration.test.ts b/packages/integration-tests/wow/azerite-essence.integration.test.ts index ec49d76f..9ed2372f 100644 --- a/packages/integration-tests/wow/azerite-essence.integration.test.ts +++ b/packages/integration-tests/wow/azerite-essence.integration.test.ts @@ -5,7 +5,7 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { azeriteEssenceIndexResponseSchema, - azeriteEssenceSearchResponseItemSchema, + azeriteEssenceSearchResponseSchema, } from '../../../generated/schemas/wow/azerite-essence'; describe('wow azerite-essence integration', () => { @@ -24,7 +24,7 @@ describe('wow azerite-essence integration', () => { expect(parsedIndex.success).toBe(true); const search = await client.sendRequest(wow.azeriteEssenceSearch({ _page: 1 })); - const parsedSearch = azeriteEssenceSearchResponseItemSchema.safeParse(search); + const parsedSearch = azeriteEssenceSearchResponseSchema.safeParse(search); if (!parsedSearch.success) { console.error('Azerite essence search validation failed:', treeifyError(parsedSearch.error)); } From c7ffea91ed982ccd83a47d75e6ff6ed78c7b4541 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 00:20:03 +0100 Subject: [PATCH 45/52] [Chore] Update dependencies to fix vulnerability --- pnpm-lock.yaml | 1357 ++++++++++++++++++++---------------------------- 1 file changed, 557 insertions(+), 800 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a69c1dc..9a7b90c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 2.29.8(@types/node@24.10.10) '@putstack/eslint-config-typescript': specifier: 4.14.0 - version: 4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3) + version: 4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript-eslint@8.54.0(eslint@9.39.2)(typescript@5.9.3))(typescript@5.9.3) '@putstack/prettier-config': specifier: 2.0.0 version: 2.0.0(prettier@3.8.1) @@ -28,10 +28,10 @@ importers: version: 4.0.18(vitest@4.0.18) eslint: specifier: 9.39.2 - version: 9.39.2(jiti@2.6.1) + version: 9.39.2 eslint-plugin-jsdoc: specifier: 62.5.0 - version: 62.5.0(eslint@9.39.2(jiti@2.6.1)) + version: 62.5.0(eslint@9.39.2) husky: specifier: 9.1.7 version: 9.1.7 @@ -67,10 +67,10 @@ importers: version: 5.9.3 typescript-eslint: specifier: 8.54.0 - version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + version: 8.54.0(eslint@9.39.2)(typescript@5.9.3) vitest: specifier: 4.0.18 - version: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + version: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(tsx@4.21.0)(yaml@2.8.2) zod: specifier: 4.3.6 version: 4.3.6 @@ -158,46 +158,46 @@ importers: packages: - '@babel/generator@8.0.0-beta.4': - resolution: {integrity: sha512-5xRfRZk6wx1BRu2XnTE8cTh2mx1ixrZ3/vpn7p/RCJpgctL6pexVVHE3eqtwlYvHhPAuOYCAlnsAyXpBdmfh5Q==} + '@babel/generator@8.0.0-rc.1': + resolution: {integrity: sha512-3ypWOOiC4AYHKr8vYRVtWtWmyvcoItHtVqF8paFax+ydpmUdPsJpLBkBBs5ItmhdrwC3a0ZSqqFAdzls4ODP3w==} engines: {node: ^20.19.0 || >=22.12.0} '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@8.0.0-beta.4': - resolution: {integrity: sha512-FGwbdQ/I2nJXXfyxa7dT0Fr/zPWwgX7m+hNVj0HrIHYJtyLxSQeQY1Kd8QkAYviQJV3OWFlRLuGd5epF03bdQg==} + '@babel/helper-string-parser@8.0.0-rc.1': + resolution: {integrity: sha512-vi/pfmbrOtQmqgfboaBhaCU50G7mcySVu69VU8z+lYoPPB6WzI9VgV7WQfL908M4oeSH5fDkmoupIqoE0SdApw==} engines: {node: ^20.19.0 || >=22.12.0} '@babel/helper-validator-identifier@7.28.5': resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@8.0.0-beta.4': - resolution: {integrity: sha512-6t0IaUEzlinbLmsGIvBZIHEJGjuchx+cMj+FbS78zL17tucYervgbwO07V5/CgBenVraontpmyMCTVyqCfxhFQ==} + '@babel/helper-validator-identifier@8.0.0-rc.1': + resolution: {integrity: sha512-I4YnARytXC2RzkLNVnf5qFNFMzp679qZpmtw/V3Jt2uGnWiIxyJtaukjG7R8pSx8nG2NamICpGfljQsogj+FbQ==} engines: {node: ^20.19.0 || >=22.12.0} - '@babel/parser@7.28.5': - resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==} + '@babel/parser@7.29.0': + resolution: {integrity: sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@8.0.0-beta.4': - resolution: {integrity: sha512-fBcUqUN3eenLyg25QFkOwY1lmV6L0RdG92g6gxyS2CVCY8kHdibkQz1+zV3bLzxcvNnfHoi3i9n5Dci+g93acg==} + '@babel/parser@8.0.0-rc.1': + resolution: {integrity: sha512-6HyyU5l1yK/7h9Ki52i5h6mDAx4qJdiLQO4FdCyJNoB/gy3T3GGJdhQzzbZgvgZCugYBvwtQiWRt94QKedHnkA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - '@babel/runtime@7.28.4': - resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==} + '@babel/runtime@7.28.6': + resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} engines: {node: '>=6.9.0'} - '@babel/types@7.28.5': - resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} + '@babel/types@7.29.0': + resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} - '@babel/types@8.0.0-beta.4': - resolution: {integrity: sha512-xjk2xqYp25ePzAs0I08hN2lrbUDDQFfCjwq6MIEa8HwHa0WK8NfNtdvtXod8Ku2CbE1iui7qwWojGvjQiyrQeA==} + '@babel/types@8.0.0-rc.1': + resolution: {integrity: sha512-ubmJ6TShyaD69VE9DQrlXcdkvJbmwWPB8qYj0H2kaJi29O7vJT9ajSdBd2W8CG34pwL9pYA74fi7RHC1qbLoVQ==} engines: {node: ^20.19.0 || >=22.12.0} '@bcoe/v8-coverage@1.0.2': @@ -265,11 +265,11 @@ packages: '@clack/prompts@1.0.0-alpha.4': resolution: {integrity: sha512-KnmtDF2xQGoI5AlBme9akHtvCRV0RKAARUXHBQO2tMwnY8B08/4zPWigT7uLK25UPrMCEqnyQPkKRjNdhPbf8g==} - '@emnapi/core@1.7.1': - resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} + '@emnapi/core@1.8.1': + resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==} - '@emnapi/runtime@1.7.1': - resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + '@emnapi/runtime@1.8.1': + resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} '@emnapi/wasi-threads@1.1.0': resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} @@ -282,314 +282,158 @@ packages: resolution: {integrity: sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==} engines: {node: '>=10'} - '@esbuild/aix-ppc64@0.25.12': - resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + '@esbuild/aix-ppc64@0.27.2': + resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.27.1': - resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.25.12': - resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm64@0.27.1': - resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==} + '@esbuild/android-arm64@0.27.2': + resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.12': - resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-arm@0.27.1': - resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==} + '@esbuild/android-arm@0.27.2': + resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.12': - resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + '@esbuild/android-x64@0.27.2': + resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/android-x64@0.27.1': - resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.25.12': - resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.27.1': - resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==} + '@esbuild/darwin-arm64@0.27.2': + resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.12': - resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.27.1': - resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==} + '@esbuild/darwin-x64@0.27.2': + resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.12': - resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + '@esbuild/freebsd-arm64@0.27.2': + resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.27.1': - resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.25.12': - resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.27.1': - resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==} + '@esbuild/freebsd-x64@0.27.2': + resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.12': - resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm64@0.27.1': - resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==} + '@esbuild/linux-arm64@0.27.2': + resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.12': - resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + '@esbuild/linux-arm@0.27.2': + resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.27.1': - resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.25.12': - resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + '@esbuild/linux-ia32@0.27.2': + resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.27.1': - resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.25.12': - resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + '@esbuild/linux-loong64@0.27.2': + resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.27.1': - resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.25.12': - resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.27.1': - resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==} + '@esbuild/linux-mips64el@0.27.2': + resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.12': - resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.27.1': - resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==} + '@esbuild/linux-ppc64@0.27.2': + resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.12': - resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + '@esbuild/linux-riscv64@0.27.2': + resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.27.1': - resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.25.12': - resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-s390x@0.27.1': - resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==} + '@esbuild/linux-s390x@0.27.2': + resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.12': - resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + '@esbuild/linux-x64@0.27.2': + resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.27.1': - resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-arm64@0.25.12': - resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - - '@esbuild/netbsd-arm64@0.27.1': - resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==} + '@esbuild/netbsd-arm64@0.27.2': + resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.12': - resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.27.1': - resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==} + '@esbuild/netbsd-x64@0.27.2': + resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.12': - resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + '@esbuild/openbsd-arm64@0.27.2': + resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.27.1': - resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.25.12': - resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + '@esbuild/openbsd-x64@0.27.2': + resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.1': - resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openharmony-arm64@0.25.12': - resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - - '@esbuild/openharmony-arm64@0.27.1': - resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==} + '@esbuild/openharmony-arm64@0.27.2': + resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.25.12': - resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + '@esbuild/sunos-x64@0.27.2': + resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.27.1': - resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.25.12': - resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-arm64@0.27.1': - resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==} + '@esbuild/win32-arm64@0.27.2': + resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.12': - resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.27.1': - resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==} + '@esbuild/win32-ia32@0.27.2': + resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.12': - resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@esbuild/win32-x64@0.27.1': - resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==} + '@esbuild/win32-x64@0.27.2': + resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -632,8 +476,8 @@ packages: resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@gerrit0/mini-shiki@3.19.0': - resolution: {integrity: sha512-ZSlWfLvr8Nl0T4iA3FF/8VH8HivYF82xQts2DY0tJxZd4wtXJ8AA0nmdW9lmO4hlrh3f9xNwEPtOgqETPqKwDA==} + '@gerrit0/mini-shiki@3.22.0': + resolution: {integrity: sha512-jMpciqEVUBKE1QwU64S4saNMzpsSza6diNCk4MWAeCxO2+LFi2FIFmL2S0VDLzEJCxuvCbU783xi8Hp/gkM5CQ==} '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} @@ -664,8 +508,8 @@ packages: resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} engines: {node: 20 || >=22} - '@isaacs/brace-expansion@5.0.0': - resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==} + '@isaacs/brace-expansion@5.0.1': + resolution: {integrity: sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==} engines: {node: 20 || >=22} '@jridgewell/gen-mapping@0.3.13': @@ -813,127 +657,142 @@ packages: '@rolldown/pluginutils@1.0.0-rc.1': resolution: {integrity: sha512-UTBjtTxVOhodhzFVp/ayITaTETRHPUPYZPXQe0WU0wOgxghMojXxYjOiPOauKIYNWJAWS2fd7gJgGQK8GU8vDA==} - '@rollup/rollup-android-arm-eabi@4.53.3': - resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} + '@rollup/rollup-android-arm-eabi@4.57.1': + resolution: {integrity: sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.53.3': - resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==} + '@rollup/rollup-android-arm64@4.57.1': + resolution: {integrity: sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.53.3': - resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==} + '@rollup/rollup-darwin-arm64@4.57.1': + resolution: {integrity: sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.53.3': - resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==} + '@rollup/rollup-darwin-x64@4.57.1': + resolution: {integrity: sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.53.3': - resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==} + '@rollup/rollup-freebsd-arm64@4.57.1': + resolution: {integrity: sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.53.3': - resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==} + '@rollup/rollup-freebsd-x64@4.57.1': + resolution: {integrity: sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.53.3': - resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==} + '@rollup/rollup-linux-arm-gnueabihf@4.57.1': + resolution: {integrity: sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.53.3': - resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==} + '@rollup/rollup-linux-arm-musleabihf@4.57.1': + resolution: {integrity: sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.53.3': - resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==} + '@rollup/rollup-linux-arm64-gnu@4.57.1': + resolution: {integrity: sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.53.3': - resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==} + '@rollup/rollup-linux-arm64-musl@4.57.1': + resolution: {integrity: sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.53.3': - resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==} + '@rollup/rollup-linux-loong64-gnu@4.57.1': + resolution: {integrity: sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.57.1': + resolution: {integrity: sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.53.3': - resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==} + '@rollup/rollup-linux-ppc64-gnu@4.57.1': + resolution: {integrity: sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.57.1': + resolution: {integrity: sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.53.3': - resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==} + '@rollup/rollup-linux-riscv64-gnu@4.57.1': + resolution: {integrity: sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.53.3': - resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==} + '@rollup/rollup-linux-riscv64-musl@4.57.1': + resolution: {integrity: sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.53.3': - resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==} + '@rollup/rollup-linux-s390x-gnu@4.57.1': + resolution: {integrity: sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.53.3': - resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==} + '@rollup/rollup-linux-x64-gnu@4.57.1': + resolution: {integrity: sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.53.3': - resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==} + '@rollup/rollup-linux-x64-musl@4.57.1': + resolution: {integrity: sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.53.3': - resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==} + '@rollup/rollup-openbsd-x64@4.57.1': + resolution: {integrity: sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.57.1': + resolution: {integrity: sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.53.3': - resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==} + '@rollup/rollup-win32-arm64-msvc@4.57.1': + resolution: {integrity: sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.53.3': - resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==} + '@rollup/rollup-win32-ia32-msvc@4.57.1': + resolution: {integrity: sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.53.3': - resolution: {integrity: sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==} + '@rollup/rollup-win32-x64-gnu@4.57.1': + resolution: {integrity: sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.53.3': - resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==} + '@rollup/rollup-win32-x64-msvc@4.57.1': + resolution: {integrity: sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==} cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.19.0': - resolution: {integrity: sha512-1hRxtYIJfJSZeM5ivbUXv9hcJP3PWRo5prG/V2sWwiubUKTa+7P62d2qxCW8jiVFX4pgRHhnHNp+qeR7Xl+6kg==} + '@shikijs/engine-oniguruma@3.22.0': + resolution: {integrity: sha512-DyXsOG0vGtNtl7ygvabHd7Mt5EY8gCNqR9Y7Lpbbd/PbJvgWrqaKzH1JW6H6qFkuUa8aCxoiYVv8/YfFljiQxA==} - '@shikijs/langs@3.19.0': - resolution: {integrity: sha512-dBMFzzg1QiXqCVQ5ONc0z2ebyoi5BKz+MtfByLm0o5/nbUu3Iz8uaTCa5uzGiscQKm7lVShfZHU1+OG3t5hgwg==} + '@shikijs/langs@3.22.0': + resolution: {integrity: sha512-x/42TfhWmp6H00T6uwVrdTJGKgNdFbrEdhaDwSR5fd5zhQ1Q46bHq9EO61SCEWJR0HY7z2HNDMaBZp8JRmKiIA==} - '@shikijs/themes@3.19.0': - resolution: {integrity: sha512-H36qw+oh91Y0s6OlFfdSuQ0Ld+5CgB/VE6gNPK+Hk4VRbVG/XQgkjnt4KzfnnoO6tZPtKJKHPjwebOCfjd6F8A==} + '@shikijs/themes@3.22.0': + resolution: {integrity: sha512-o+tlOKqsr6FE4+mYJG08tfCFDS+3CG20HbldXeVoyP+cYSUxDhrFf3GPjE60U55iOkkjbpY2uC3It/eeja35/g==} - '@shikijs/types@3.19.0': - resolution: {integrity: sha512-Z2hdeEQlzuntf/BZpFG8a+Fsw9UVXdML7w0o3TgSXV3yNESGon+bs9ITkQb3Ki7zxoXOOu5oJWqZ2uto06V9iQ==} + '@shikijs/types@3.22.0': + resolution: {integrity: sha512-491iAekgKDBFE67z70Ok5a8KBMsQ2IJwOWw3us/7ffQkIBCyOQfm/aNwVMBUriP02QshIfgHCBSIYAl3u2eWjg==} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -942,8 +801,8 @@ packages: resolution: {integrity: sha512-TeheYy0ILzBEI/CO55CP6zJCSdSWeRtGnHy8U8dWSUH4I68iqTsy7HkMktR4xakThc9jotkPQUXT4ITdbV7cHA==} engines: {node: '>=18'} - '@standard-schema/spec@1.0.0': - resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} @@ -1248,8 +1107,8 @@ packages: resolution: {integrity: sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw==} engines: {node: '>=20.19.0'} - ast-v8-to-istanbul@0.3.10: - resolution: {integrity: sha512-p4K7vMz2ZSk3wN8l5o3y2bJAoZXT3VuJI5OLTATY/01CYWumWvwkUw0SqDBnNq6IiTO3qDa1eSQDibAV8g7XOQ==} + ast-v8-to-istanbul@0.3.11: + resolution: {integrity: sha512-Qya9fkoofMjCBNVdWINMjB5KZvkYfaO9/anwkWnjxibpWUxo5iHl2sOdP7/uAqaRuUYuoo8rDwnbaaKVFxoUvw==} async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -1257,8 +1116,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - baseline-browser-mapping@2.9.2: - resolution: {integrity: sha512-PxSsosKQjI38iXkmb3d0Y32efqyA0uW4s41u4IVBsLlWLhCiYNpH/AfNOVWRqCQBlD8TFJTz6OUWNd4DFJCnmw==} + baseline-browser-mapping@2.9.19: + resolution: {integrity: sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==} hasBin: true better-path-resolve@1.0.0: @@ -1303,11 +1162,11 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001759: - resolution: {integrity: sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==} + caniuse-lite@1.0.30001767: + resolution: {integrity: sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==} - chai@6.2.1: - resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} chalk@4.1.2: @@ -1328,8 +1187,8 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - ci-info@4.3.1: - resolution: {integrity: sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==} + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} engines: {node: '>=8'} clean-regexp@1.0.0: @@ -1362,8 +1221,8 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - commander@14.0.2: - resolution: {integrity: sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==} + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} engines: {node: '>=20'} comment-parser@1.4.5: @@ -1373,8 +1232,8 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - core-js-compat@3.47.0: - resolution: {integrity: sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==} + core-js-compat@3.48.0: + resolution: {integrity: sha512-OM4cAF3D6VtH/WkLtWvyNC56EZVXsZdU3iqaMG2B4WvYrlqU831pc4UtG5yp0sE9z8Y02wVN7PjW5Zf9Gt0f1Q==} cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} @@ -1417,8 +1276,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.266: - resolution: {integrity: sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg==} + electron-to-chromium@1.5.286: + resolution: {integrity: sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -1445,13 +1304,8 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - esbuild@0.25.12: - resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} - engines: {node: '>=18'} - hasBin: true - - esbuild@0.27.1: - resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==} + esbuild@0.27.2: + resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} engines: {node: '>=18'} hasBin: true @@ -1592,11 +1446,11 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - eventemitter3@5.0.1: - resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + eventemitter3@5.0.4: + resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} - expect-type@1.2.2: - resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} extendable-error@0.1.7: @@ -1615,8 +1469,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fastq@1.19.1: - resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} @@ -1684,8 +1538,8 @@ packages: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} - get-tsconfig@4.13.0: - resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} + get-tsconfig@4.13.1: + resolution: {integrity: sha512-EoY1N2xCn44xU6750Sx7OjOIT59FkmstNc3X6y5xpz7D5cBtZRe/3pSlTkDJgqsOk3WwZPkWfonhhUJfttQo3w==} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -1732,8 +1586,8 @@ packages: engines: {node: '>=18'} hasBin: true - iconv-lite@0.7.0: - resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} engines: {node: '>=0.10.0'} ignore@5.3.2: @@ -1832,12 +1686,8 @@ packages: engines: {node: '>=10'} hasBin: true - jiti@2.6.1: - resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} - hasBin: true - - js-tokens@9.0.1: - resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} js-yaml@3.14.2: resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} @@ -1961,6 +1811,10 @@ packages: resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==} engines: {node: 20 || >=22} + minimatch@10.1.2: + resolution: {integrity: sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==} + engines: {node: 20 || >=22} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -1972,8 +1826,8 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - module-replacements@2.10.1: - resolution: {integrity: sha512-qkKuLpMHDqRSM676OPL7HUpCiiP3NSxgf8NNR1ga2h/iJLNKTsOSjMEwrcT85DMSti2vmOqxknOVBGWj6H6etQ==} + module-replacements@2.11.0: + resolution: {integrity: sha512-j5sNQm3VCpQQ7nTqGeOZtoJtV3uKERgCBm9QRhmGRiXiqkf7iRFOkfxdJRZWLkqYY8PNf4cDQF/WfXUYLENrRA==} mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -2205,8 +2059,8 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rolldown-plugin-dts@0.21.7: - resolution: {integrity: sha512-u6mHPTxLzC/eU3hbFqu1Hd47if1zXITvNtbro5PRVqMe3tLzUkdeur87wRg8Y/bX5PYUUtPuGO815uHp8zi9uQ==} + rolldown-plugin-dts@0.21.9: + resolution: {integrity: sha512-macIh4TtSv84N33YcI8SbULUPbMOgwPHDLweUKgzb+LV2OrVzrXihb2pC33xR0Hoh+hz07Un9/EuUeqMiPsePw==} engines: {node: '>=20.19.0'} peerDependencies: '@ts-macro/tsc': ^0.3.6 @@ -2229,8 +2083,8 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.53.3: - resolution: {integrity: sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==} + rollup@4.57.1: + resolution: {integrity: sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2328,8 +2182,8 @@ packages: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - string-width@8.1.0: - resolution: {integrity: sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==} + string-width@8.1.1: + resolution: {integrity: sha512-KpqHIdDL9KwYk22wEOg/VIqYbrnLeSApsKT/bSj6Ez7pn3CftUiLAv2Lccpq1ALcpLV9UX1Ppn92npZWu2w/aw==} engines: {node: '>=20'} strip-ansi@6.0.1: @@ -2364,68 +2218,68 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} - text-camel-case@1.2.9: - resolution: {integrity: sha512-wKYs9SgRxYizJE1mneR7BbLNlGw2IYzJAS8XwkWIry0CTbO1gvvPkFsx5Z1/hr+VqUaBqx9q3yKd30HpZLdMsQ==} + text-camel-case@1.2.10: + resolution: {integrity: sha512-KNrWeZzQT+gh73V1LnmgTkjK7V+tMRjLCc6VrGwkqbiRdnGVIWBUgIvVnvnaVCxIvZ/2Ke8DCmgPirlQcCqD3Q==} - text-capital-case@1.2.9: - resolution: {integrity: sha512-X5zV8U8pxtq2xS2t46lgAWqZdDbgWMKq03MQSNwY2CJdQCsdTNh144E2Q/q9wBxWzSBUXn+jRc9kF+Gs8/pGhA==} + text-capital-case@1.2.10: + resolution: {integrity: sha512-yvViUJKSSQcRO58je224bhPHg/Hij9MEY43zuKShtFzrPwW/fOAarUJ5UkTMSB81AOO1m8q+JiFdxMF4etKZbA==} - text-case@1.2.9: - resolution: {integrity: sha512-zZVdA8rMcjx9zhekdUuOPZShc25UTV7W8/ddKbgbPtfCEvIiToPtWiSd2lXLSuiGMovNhJ4+Tw49xll9o9ts+Q==} + text-case@1.2.10: + resolution: {integrity: sha512-5bY3Ks/u7OJ5YO69iyXrG5Xf2wUZeyko7U78nPUnYoSeuNeAfA5uAix5hTspfkl6smm3yCBObrex+kFvzeIcJg==} - text-constant-case@1.2.9: - resolution: {integrity: sha512-Vosm6nC7Gag+JFakJHwqS9AXRNgl07j5KZ7srU9cYuKRzYwrxzeJ4RpEogRBNHw7CfmOm0j5FGEznblWtu7pIw==} + text-constant-case@1.2.10: + resolution: {integrity: sha512-/OfU798O2wrwKN9kQf71WhJeAlklGnbby0Tupp+Ez9NXymW+6oF9LWDRTkN+OreTmHucdvp4WQd6O5Rah5zj8A==} - text-dot-case@1.2.9: - resolution: {integrity: sha512-N83hsnvGdSO9q9AfNSB9Cy1LFDNN2MCx53LcxtaPoDWPUTk47fv0JlvIY1tgY0wyzCiThF03kVj3jworvAOScA==} + text-dot-case@1.2.10: + resolution: {integrity: sha512-vf4xguy5y6e39RlDZeWZFMDf2mNkR23VTSVb9e68dUSpfJscG9/1YWWpW3n8TinzQxBZlsn5sT5olL33MvvQXw==} - text-header-case@1.2.9: - resolution: {integrity: sha512-TqryEKcYisQAfWLbtT3xPnZlMZ/mySO1uS+LUg+B0eNuqgETrSzVpXIUj5E6Zf/EyJHgpZf4VndbAXtOMJuT4w==} + text-header-case@1.2.10: + resolution: {integrity: sha512-sVb1NY9bwxtu+Z7CVyWbr+I0AkWtF0kEHL/Zz5V2u/WdkjK5tKBwl5nXf0NGy9da4ZUYTBb+TmQpOIqihzvFMQ==} - text-is-lower-case@1.2.9: - resolution: {integrity: sha512-cEurrWSnYVYqL8FSwl5cK4mdfqF7qNDCcKJgXI3NnfTesiB8umxAhdlQoErrRYI1xEvYr2WN0MI333EehUhQjg==} + text-is-lower-case@1.2.10: + resolution: {integrity: sha512-dMTeTgrdWWfYf3fKxvjMkDPuXWv96cWbd1Uym6Zjv9H855S1uHxjkFsGbTYJ2tEK0NvAylRySTQlI6axlcMc4w==} - text-is-upper-case@1.2.9: - resolution: {integrity: sha512-HxsWr3VCsXXiLlhD0c+Ey+mS2lOTCiSJbkepjaXNHl2bp33KiscQaiG0qLwQmmpZQm4SJCg2s9FkndxS0RNDLQ==} + text-is-upper-case@1.2.10: + resolution: {integrity: sha512-PGD/cXoXECGAY1HVZxDdmpJUW2ZUAKQ6DTamDfCHC9fc/z4epOz0pB/ThBnjJA3fz+d2ApkMjAfZDjuZFcodzg==} - text-kebab-case@1.2.9: - resolution: {integrity: sha512-nOUyNR5Ej2B9D/wyyXfwUEv26+pQuOb1pEX+ojE37mCIWo8QeOxw5y6nxuqDmG7NrEPzbO6265UMV+EICH13Cw==} + text-kebab-case@1.2.10: + resolution: {integrity: sha512-3XZJAApx5JQpUO7eXo7GQ2TyRcGw3OVbqxz6QJb2h+N8PbLLbz3zJVeXdGrhTkoUIbkSZ6PmHx6LRDaHXTdMcA==} - text-lower-case-first@1.2.9: - resolution: {integrity: sha512-iiphHTV7PVH0MljrEQUA9iBE7jfDpXoi4RQju3WzZU3BRVbS6540cNZgxR19hWa0z6z/7cJTH0Ls9LPBaiUfKg==} + text-lower-case-first@1.2.10: + resolution: {integrity: sha512-Oro84jZPDLD9alfdZWmtFHYTvCaaSz2o4thPtjMsK4GAkTyVg9juYXWj0y0YFyjLYGH69muWsBe4/MR5S7iolw==} - text-lower-case@1.2.9: - resolution: {integrity: sha512-53AOnDrhPpiAUQkgY1SHleKUXp/u7GsqRX13NcCREZscmtjLLJ099uxMRjkK7q2KwHkFYVPl9ytkQlTkTQLS0w==} + text-lower-case@1.2.10: + resolution: {integrity: sha512-c9j5pIAN3ObAp1+4R7970e1bgtahTRF/5ZQdX2aJBuBngYTYZZIck0NwFXUKk5BnYpLGsre5KFHvpqvf4IYKgg==} - text-no-case@1.2.9: - resolution: {integrity: sha512-IcCt328KaapimSrytP4ThfC8URmHZb2DgOqCL9BYvGjpxY2lDiqCkIQk9sClZtwcELs2gTnq83a7jNc573FTLA==} + text-no-case@1.2.10: + resolution: {integrity: sha512-4/m79pzQrywrwEG5lCULY1lQvFY+EKjhH9xSMT6caPK5plqzm9Y7rXyv+UXPd3s9qH6QODZnvsAYWW3M0JgxRA==} - text-param-case@1.2.9: - resolution: {integrity: sha512-nR/Ju9amY3aQS1en2CUCgqN/ZiZIVdDyjlJ3xX5J92ChBevGuA4o9K10fh3JGMkbzK97Vcb+bWQJ4Q+Svz+GyQ==} + text-param-case@1.2.10: + resolution: {integrity: sha512-hkavcLsRRzZcGryPAshct1AwIOMj/FexYjMaLpGZCYYBn1lcZEeyMzJZPSckzkOYpq35LYSQr3xZto9XU5OAsw==} - text-pascal-case@1.2.9: - resolution: {integrity: sha512-o6ZxMGjWDTUW54pcghpXes+C2PqbYRMdU5mHrIhueb6z6nq1NueiIOeCUdrSjN/3wXfhCmnFjK7/d9aRGZNqSg==} + text-pascal-case@1.2.10: + resolution: {integrity: sha512-/kynZD8vTYOmm/RECjIDaz3qYEUZc/N/bnC79XuAFxwXjdNVjj/jGovKJLRzqsYK/39N22XpGcVmGg7yIrbk6w==} - text-path-case@1.2.9: - resolution: {integrity: sha512-s8cJ6r5TkJp5ticXMgtxd7f12odEN4d1CfX5u4aoz6jcUtBR2lDqzIhVimkqWFMJ4UKPSrmilUha8Xc2BPi+ow==} + text-path-case@1.2.10: + resolution: {integrity: sha512-vbKdRCaVEeOaW6sm24QP9NbH7TS9S4ZQ3u19H8eylDox7m2HtFwYIBjAPv+v3z4I/+VjrMy9LB54lNP1uEqRHw==} - text-sentence-case@1.2.9: - resolution: {integrity: sha512-/G/Yi5kZfUa1edFRV4O3lGZAkbDZTFvlwW8CYfH7szkEGe2k2MYEYbOyAkGRVQEGV6V6JiuUAaP3VS9c1tB6nQ==} + text-sentence-case@1.2.10: + resolution: {integrity: sha512-NO4MRlbfxFhl9QgQLuCL4xHmvE7PUWHVPWsZxQ5nzRtDjXOUllWvtsvl8CP5tBEvBmzg0kwfflxfhRtr5vBQGg==} - text-snake-case@1.2.9: - resolution: {integrity: sha512-+ZrqK19ynF/TLQZ7ynqVrL2Dy04uu9syYZwsm8PhzUdsY3XrwPy6QiRqhIEFqhyWbShPcfyfmheer5UEQqFxlw==} + text-snake-case@1.2.10: + resolution: {integrity: sha512-6ttMZ+B9jkHKun908HYr4xSvEtlbfJJ4MvpQ06JEKRGhwjMI0x8t2Wywp+MEzN6142O6E/zKhra18KyBL6cvXA==} - text-swap-case@1.2.9: - resolution: {integrity: sha512-g5fp12ldktYKK9wdHRMvvtSCQrZYNv/D+ZGLumDsvAY4q9T5bCMO2IWMkIP1F5gVQrysdHH6Xv877P/pjUq1iw==} + text-swap-case@1.2.10: + resolution: {integrity: sha512-vO3jwInIk0N77oEFakYZ2Hn/llTmRwf2c3RvkX/LfvmLWVp+3QcIc6bwUEtbqGQ5Xh2okjFhYrfkHZstVc3N4Q==} - text-title-case@1.2.9: - resolution: {integrity: sha512-RAtC9cdmPp41ns5/HXZBsaQg71BsHT7uZpj2ojTtuFa8o2dNuRYYOrSmy5YdLRIAJQ6WK5hQVpV3jHuq7a+4Tw==} + text-title-case@1.2.10: + resolution: {integrity: sha512-bqA+WWexUMWu9A3fdNar+3GXXW+c5xOvMyuK5hOx/w0AlqhyQptyCrMFjGB8Fd9dxbryBNmJ+5rWtC1OBDxlaA==} - text-upper-case-first@1.2.9: - resolution: {integrity: sha512-wEDD1B6XqJmEV+xEnBJd+2sBCHZ+7fvA/8Rv/o8+dAsp05YWjYP/kjB8sPH6zqzW0s6jtehIg4IlcKjcYxk2CQ==} + text-upper-case-first@1.2.10: + resolution: {integrity: sha512-VXs7j7BbpKwvolDh5fwpYRmMrUHGkxbY8E90fhBzKUoKfadvWmPT/jFieoZ4UPLzr208pXvQEFbb2zO9Qzs9Fg==} - text-upper-case@1.2.9: - resolution: {integrity: sha512-K/0DNT7a4z8eah2spARtoJllTZyrNTo6Uc0ujhN/96Ir9uJ/slpahfs13y46H9osL3daaLl3O7iXOkW4xtX6bg==} + text-upper-case@1.2.10: + resolution: {integrity: sha512-L1AtZ8R+jtSMTq0Ffma9R4Rzbrc3iuYW89BmWFH41AwnDfRmEBlBOllm1ZivRLQ/6pEu2p+3XKBHx9fsMl2CWg==} tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -2603,8 +2457,8 @@ packages: synckit: optional: true - update-browserslist-db@1.2.2: - resolution: {integrity: sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==} + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -2612,8 +2466,8 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - vite@7.2.6: - resolution: {integrity: sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==} + vite@7.3.1: + resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2734,10 +2588,10 @@ packages: snapshots: - '@babel/generator@8.0.0-beta.4': + '@babel/generator@8.0.0-rc.1': dependencies: - '@babel/parser': 8.0.0-beta.4 - '@babel/types': 8.0.0-beta.4 + '@babel/parser': 8.0.0-rc.1 + '@babel/types': 8.0.0-rc.1 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 '@types/jsesc': 2.5.1 @@ -2745,31 +2599,31 @@ snapshots: '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-string-parser@8.0.0-beta.4': {} + '@babel/helper-string-parser@8.0.0-rc.1': {} '@babel/helper-validator-identifier@7.28.5': {} - '@babel/helper-validator-identifier@8.0.0-beta.4': {} + '@babel/helper-validator-identifier@8.0.0-rc.1': {} - '@babel/parser@7.28.5': + '@babel/parser@7.29.0': dependencies: - '@babel/types': 7.28.5 + '@babel/types': 7.29.0 - '@babel/parser@8.0.0-beta.4': + '@babel/parser@8.0.0-rc.1': dependencies: - '@babel/types': 8.0.0-beta.4 + '@babel/types': 8.0.0-rc.1 - '@babel/runtime@7.28.4': {} + '@babel/runtime@7.28.6': {} - '@babel/types@7.28.5': + '@babel/types@7.29.0': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 - '@babel/types@8.0.0-beta.4': + '@babel/types@8.0.0-rc.1': dependencies: - '@babel/helper-string-parser': 8.0.0-beta.4 - '@babel/helper-validator-identifier': 8.0.0-beta.4 + '@babel/helper-string-parser': 8.0.0-rc.1 + '@babel/helper-validator-identifier': 8.0.0-rc.1 '@bcoe/v8-coverage@1.0.2': {} @@ -2928,13 +2782,13 @@ snapshots: picocolors: 1.1.1 sisteransi: 1.0.5 - '@emnapi/core@1.7.1': + '@emnapi/core@1.8.1': dependencies: '@emnapi/wasi-threads': 1.1.0 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.7.1': + '@emnapi/runtime@1.8.1': dependencies: tslib: 2.8.1 optional: true @@ -2954,165 +2808,87 @@ snapshots: '@es-joy/resolve.exports@1.2.0': {} - '@esbuild/aix-ppc64@0.25.12': - optional: true - - '@esbuild/aix-ppc64@0.27.1': - optional: true - - '@esbuild/android-arm64@0.25.12': - optional: true - - '@esbuild/android-arm64@0.27.1': - optional: true - - '@esbuild/android-arm@0.25.12': - optional: true - - '@esbuild/android-arm@0.27.1': - optional: true - - '@esbuild/android-x64@0.25.12': - optional: true - - '@esbuild/android-x64@0.27.1': - optional: true - - '@esbuild/darwin-arm64@0.25.12': - optional: true - - '@esbuild/darwin-arm64@0.27.1': - optional: true - - '@esbuild/darwin-x64@0.25.12': + '@esbuild/aix-ppc64@0.27.2': optional: true - '@esbuild/darwin-x64@0.27.1': + '@esbuild/android-arm64@0.27.2': optional: true - '@esbuild/freebsd-arm64@0.25.12': + '@esbuild/android-arm@0.27.2': optional: true - '@esbuild/freebsd-arm64@0.27.1': + '@esbuild/android-x64@0.27.2': optional: true - '@esbuild/freebsd-x64@0.25.12': + '@esbuild/darwin-arm64@0.27.2': optional: true - '@esbuild/freebsd-x64@0.27.1': + '@esbuild/darwin-x64@0.27.2': optional: true - '@esbuild/linux-arm64@0.25.12': + '@esbuild/freebsd-arm64@0.27.2': optional: true - '@esbuild/linux-arm64@0.27.1': + '@esbuild/freebsd-x64@0.27.2': optional: true - '@esbuild/linux-arm@0.25.12': + '@esbuild/linux-arm64@0.27.2': optional: true - '@esbuild/linux-arm@0.27.1': + '@esbuild/linux-arm@0.27.2': optional: true - '@esbuild/linux-ia32@0.25.12': + '@esbuild/linux-ia32@0.27.2': optional: true - '@esbuild/linux-ia32@0.27.1': + '@esbuild/linux-loong64@0.27.2': optional: true - '@esbuild/linux-loong64@0.25.12': + '@esbuild/linux-mips64el@0.27.2': optional: true - '@esbuild/linux-loong64@0.27.1': + '@esbuild/linux-ppc64@0.27.2': optional: true - '@esbuild/linux-mips64el@0.25.12': + '@esbuild/linux-riscv64@0.27.2': optional: true - '@esbuild/linux-mips64el@0.27.1': + '@esbuild/linux-s390x@0.27.2': optional: true - '@esbuild/linux-ppc64@0.25.12': + '@esbuild/linux-x64@0.27.2': optional: true - '@esbuild/linux-ppc64@0.27.1': + '@esbuild/netbsd-arm64@0.27.2': optional: true - '@esbuild/linux-riscv64@0.25.12': + '@esbuild/netbsd-x64@0.27.2': optional: true - '@esbuild/linux-riscv64@0.27.1': + '@esbuild/openbsd-arm64@0.27.2': optional: true - '@esbuild/linux-s390x@0.25.12': + '@esbuild/openbsd-x64@0.27.2': optional: true - '@esbuild/linux-s390x@0.27.1': + '@esbuild/openharmony-arm64@0.27.2': optional: true - '@esbuild/linux-x64@0.25.12': + '@esbuild/sunos-x64@0.27.2': optional: true - '@esbuild/linux-x64@0.27.1': + '@esbuild/win32-arm64@0.27.2': optional: true - '@esbuild/netbsd-arm64@0.25.12': + '@esbuild/win32-ia32@0.27.2': optional: true - '@esbuild/netbsd-arm64@0.27.1': + '@esbuild/win32-x64@0.27.2': optional: true - '@esbuild/netbsd-x64@0.25.12': - optional: true - - '@esbuild/netbsd-x64@0.27.1': - optional: true - - '@esbuild/openbsd-arm64@0.25.12': - optional: true - - '@esbuild/openbsd-arm64@0.27.1': - optional: true - - '@esbuild/openbsd-x64@0.25.12': - optional: true - - '@esbuild/openbsd-x64@0.27.1': - optional: true - - '@esbuild/openharmony-arm64@0.25.12': - optional: true - - '@esbuild/openharmony-arm64@0.27.1': - optional: true - - '@esbuild/sunos-x64@0.25.12': - optional: true - - '@esbuild/sunos-x64@0.27.1': - optional: true - - '@esbuild/win32-arm64@0.25.12': - optional: true - - '@esbuild/win32-arm64@0.27.1': - optional: true - - '@esbuild/win32-ia32@0.25.12': - optional: true - - '@esbuild/win32-ia32@0.27.1': - optional: true - - '@esbuild/win32-x64@0.25.12': - optional: true - - '@esbuild/win32-x64@0.27.1': - optional: true - - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2)': dependencies: - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} @@ -3156,12 +2932,12 @@ snapshots: '@eslint/core': 0.17.0 levn: 0.4.1 - '@gerrit0/mini-shiki@3.19.0': + '@gerrit0/mini-shiki@3.22.0': dependencies: - '@shikijs/engine-oniguruma': 3.19.0 - '@shikijs/langs': 3.19.0 - '@shikijs/themes': 3.19.0 - '@shikijs/types': 3.19.0 + '@shikijs/engine-oniguruma': 3.22.0 + '@shikijs/langs': 3.22.0 + '@shikijs/themes': 3.22.0 + '@shikijs/types': 3.22.0 '@shikijs/vscode-textmate': 10.0.2 '@humanfs/core@0.19.1': {} @@ -3178,13 +2954,13 @@ snapshots: '@inquirer/external-editor@1.0.3(@types/node@24.10.10)': dependencies: chardet: 2.1.1 - iconv-lite: 0.7.0 + iconv-lite: 0.7.2 optionalDependencies: '@types/node': 24.10.10 '@isaacs/balanced-match@4.0.1': {} - '@isaacs/brace-expansion@5.0.0': + '@isaacs/brace-expansion@5.0.1': dependencies: '@isaacs/balanced-match': 4.0.1 @@ -3204,14 +2980,14 @@ snapshots: '@manypkg/find-root@1.1.0': dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -3220,15 +2996,15 @@ snapshots: '@napi-rs/wasm-runtime@0.2.12': dependencies: - '@emnapi/core': 1.7.1 - '@emnapi/runtime': 1.7.1 + '@emnapi/core': 1.8.1 + '@emnapi/runtime': 1.8.1 '@tybys/wasm-util': 0.10.1 optional: true '@napi-rs/wasm-runtime@1.1.1': dependencies: - '@emnapi/core': 1.7.1 - '@emnapi/runtime': 1.7.1 + '@emnapi/core': 1.8.1 + '@emnapi/runtime': 1.8.1 '@tybys/wasm-util': 0.10.1 optional: true @@ -3242,7 +3018,7 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.19.1 + fastq: 1.20.1 '@oclif/core@4.8.0': dependencies: @@ -3269,20 +3045,20 @@ snapshots: '@polka/url@1.0.0-next.29': {} - '@putstack/eslint-config-typescript@4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(typescript@5.9.3)': + '@putstack/eslint-config-typescript@4.14.0(@eslint/js@9.39.2)(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript-eslint@8.54.0(eslint@9.39.2)(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.2 - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) + eslint: 9.39.2 + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2))(eslint@9.39.2) + eslint-plugin-de-morgan: 2.0.0(eslint@9.39.2) eslint-plugin-depend: 1.4.0 - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-perfectionist: 5.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-sonarjs: 3.0.6(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2) + eslint-plugin-perfectionist: 5.4.0(eslint@9.39.2)(typescript@5.9.3) + eslint-plugin-sonarjs: 3.0.6(eslint@9.39.2) + eslint-plugin-unicorn: 62.0.0(eslint@9.39.2) typescript: 5.9.3 - typescript-eslint: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.54.0(eslint@9.39.2)(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-node - eslint-plugin-import @@ -3339,86 +3115,95 @@ snapshots: '@rolldown/pluginutils@1.0.0-rc.1': {} - '@rollup/rollup-android-arm-eabi@4.53.3': + '@rollup/rollup-android-arm-eabi@4.57.1': optional: true - '@rollup/rollup-android-arm64@4.53.3': + '@rollup/rollup-android-arm64@4.57.1': optional: true - '@rollup/rollup-darwin-arm64@4.53.3': + '@rollup/rollup-darwin-arm64@4.57.1': optional: true - '@rollup/rollup-darwin-x64@4.53.3': + '@rollup/rollup-darwin-x64@4.57.1': optional: true - '@rollup/rollup-freebsd-arm64@4.53.3': + '@rollup/rollup-freebsd-arm64@4.57.1': optional: true - '@rollup/rollup-freebsd-x64@4.53.3': + '@rollup/rollup-freebsd-x64@4.57.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.53.3': + '@rollup/rollup-linux-arm-gnueabihf@4.57.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.53.3': + '@rollup/rollup-linux-arm-musleabihf@4.57.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.53.3': + '@rollup/rollup-linux-arm64-gnu@4.57.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.53.3': + '@rollup/rollup-linux-arm64-musl@4.57.1': optional: true - '@rollup/rollup-linux-loong64-gnu@4.53.3': + '@rollup/rollup-linux-loong64-gnu@4.57.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.53.3': + '@rollup/rollup-linux-loong64-musl@4.57.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.53.3': + '@rollup/rollup-linux-ppc64-gnu@4.57.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.53.3': + '@rollup/rollup-linux-ppc64-musl@4.57.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.53.3': + '@rollup/rollup-linux-riscv64-gnu@4.57.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.53.3': + '@rollup/rollup-linux-riscv64-musl@4.57.1': optional: true - '@rollup/rollup-linux-x64-musl@4.53.3': + '@rollup/rollup-linux-s390x-gnu@4.57.1': optional: true - '@rollup/rollup-openharmony-arm64@4.53.3': + '@rollup/rollup-linux-x64-gnu@4.57.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.53.3': + '@rollup/rollup-linux-x64-musl@4.57.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.53.3': + '@rollup/rollup-openbsd-x64@4.57.1': optional: true - '@rollup/rollup-win32-x64-gnu@4.53.3': + '@rollup/rollup-openharmony-arm64@4.57.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.53.3': + '@rollup/rollup-win32-arm64-msvc@4.57.1': optional: true - '@shikijs/engine-oniguruma@3.19.0': + '@rollup/rollup-win32-ia32-msvc@4.57.1': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.57.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.57.1': + optional: true + + '@shikijs/engine-oniguruma@3.22.0': dependencies: - '@shikijs/types': 3.19.0 + '@shikijs/types': 3.22.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@3.19.0': + '@shikijs/langs@3.22.0': dependencies: - '@shikijs/types': 3.19.0 + '@shikijs/types': 3.22.0 - '@shikijs/themes@3.19.0': + '@shikijs/themes@3.22.0': dependencies: - '@shikijs/types': 3.19.0 + '@shikijs/types': 3.22.0 - '@shikijs/types@3.19.0': + '@shikijs/types@3.22.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -3427,7 +3212,7 @@ snapshots: '@sindresorhus/base62@1.0.0': {} - '@standard-schema/spec@1.0.0': {} + '@standard-schema/spec@1.1.0': {} '@tybys/wasm-util@0.10.1': dependencies: @@ -3459,15 +3244,15 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.54.0(eslint@9.39.2)(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.54.0 - '@typescript-eslint/type-utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/type-utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.54.0 - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 ignore: 7.0.5 natural-compare: 1.4.0 ts-api-utils: 2.4.0(typescript@5.9.3) @@ -3475,14 +3260,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.54.0(eslint@9.39.2)(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.54.0 '@typescript-eslint/types': 8.54.0 '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.54.0 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -3505,13 +3290,13 @@ snapshots: dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.54.0(eslint@9.39.2)(typescript@5.9.3)': dependencies: '@typescript-eslint/types': 8.54.0 '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: @@ -3534,13 +3319,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2) '@typescript-eslint/scope-manager': 8.54.0 '@typescript-eslint/types': 8.54.0 '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -3620,7 +3405,7 @@ snapshots: dependencies: '@bcoe/v8-coverage': 1.0.2 '@vitest/utils': 4.0.18 - ast-v8-to-istanbul: 0.3.10 + ast-v8-to-istanbul: 0.3.11 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-reports: 3.2.0 @@ -3628,24 +3413,24 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(tsx@4.21.0)(yaml@2.8.2) '@vitest/expect@4.0.18': dependencies: - '@standard-schema/spec': 1.0.0 + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 '@vitest/spy': 4.0.18 '@vitest/utils': 4.0.18 - chai: 6.2.1 + chai: 6.2.2 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.18(vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.18(vite@7.3.1(@types/node@24.10.10)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 4.0.18 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.10)(tsx@4.21.0)(yaml@2.8.2) '@vitest/pretty-format@4.0.18': dependencies: @@ -3673,7 +3458,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(tsx@4.21.0)(yaml@2.8.2) '@vitest/utils@4.0.18': dependencies: @@ -3731,21 +3516,21 @@ snapshots: ast-kit@3.0.0-beta.1: dependencies: - '@babel/parser': 8.0.0-beta.4 + '@babel/parser': 8.0.0-rc.1 estree-walker: 3.0.3 pathe: 2.0.3 - ast-v8-to-istanbul@0.3.10: + ast-v8-to-istanbul@0.3.11: dependencies: '@jridgewell/trace-mapping': 0.3.31 estree-walker: 3.0.3 - js-tokens: 9.0.1 + js-tokens: 10.0.0 async@3.2.6: {} balanced-match@1.0.2: {} - baseline-browser-mapping@2.9.2: {} + baseline-browser-mapping@2.9.19: {} better-path-resolve@1.0.0: dependencies: @@ -3768,11 +3553,11 @@ snapshots: browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.9.2 - caniuse-lite: 1.0.30001759 - electron-to-chromium: 1.5.266 + baseline-browser-mapping: 2.9.19 + caniuse-lite: 1.0.30001767 + electron-to-chromium: 1.5.286 node-releases: 2.0.27 - update-browserslist-db: 1.2.2(browserslist@4.28.1) + update-browserslist-db: 1.2.3(browserslist@4.28.1) builtin-modules@3.3.0: {} @@ -3784,9 +3569,9 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001759: {} + caniuse-lite@1.0.30001767: {} - chai@6.2.1: {} + chai@6.2.2: {} chalk@4.1.2: dependencies: @@ -3803,7 +3588,7 @@ snapshots: ci-info@3.9.0: {} - ci-info@4.3.1: {} + ci-info@4.4.0: {} clean-regexp@1.0.0: dependencies: @@ -3822,7 +3607,7 @@ snapshots: cli-truncate@5.1.1: dependencies: slice-ansi: 7.1.2 - string-width: 8.1.0 + string-width: 8.1.1 color-convert@2.0.1: dependencies: @@ -3832,13 +3617,13 @@ snapshots: colorette@2.0.20: {} - commander@14.0.2: {} + commander@14.0.3: {} comment-parser@1.4.5: {} concat-map@0.0.1: {} - core-js-compat@3.47.0: + core-js-compat@3.48.0: dependencies: browserslist: 4.28.1 @@ -3870,7 +3655,7 @@ snapshots: dependencies: jake: 10.9.4 - electron-to-chromium@1.5.266: {} + electron-to-chromium@1.5.286: {} emoji-regex@10.6.0: {} @@ -3889,63 +3674,34 @@ snapshots: es-module-lexer@1.7.0: {} - esbuild@0.25.12: + esbuild@0.27.2: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.12 - '@esbuild/android-arm': 0.25.12 - '@esbuild/android-arm64': 0.25.12 - '@esbuild/android-x64': 0.25.12 - '@esbuild/darwin-arm64': 0.25.12 - '@esbuild/darwin-x64': 0.25.12 - '@esbuild/freebsd-arm64': 0.25.12 - '@esbuild/freebsd-x64': 0.25.12 - '@esbuild/linux-arm': 0.25.12 - '@esbuild/linux-arm64': 0.25.12 - '@esbuild/linux-ia32': 0.25.12 - '@esbuild/linux-loong64': 0.25.12 - '@esbuild/linux-mips64el': 0.25.12 - '@esbuild/linux-ppc64': 0.25.12 - '@esbuild/linux-riscv64': 0.25.12 - '@esbuild/linux-s390x': 0.25.12 - '@esbuild/linux-x64': 0.25.12 - '@esbuild/netbsd-arm64': 0.25.12 - '@esbuild/netbsd-x64': 0.25.12 - '@esbuild/openbsd-arm64': 0.25.12 - '@esbuild/openbsd-x64': 0.25.12 - '@esbuild/openharmony-arm64': 0.25.12 - '@esbuild/sunos-x64': 0.25.12 - '@esbuild/win32-arm64': 0.25.12 - '@esbuild/win32-ia32': 0.25.12 - '@esbuild/win32-x64': 0.25.12 - - esbuild@0.27.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.27.1 - '@esbuild/android-arm': 0.27.1 - '@esbuild/android-arm64': 0.27.1 - '@esbuild/android-x64': 0.27.1 - '@esbuild/darwin-arm64': 0.27.1 - '@esbuild/darwin-x64': 0.27.1 - '@esbuild/freebsd-arm64': 0.27.1 - '@esbuild/freebsd-x64': 0.27.1 - '@esbuild/linux-arm': 0.27.1 - '@esbuild/linux-arm64': 0.27.1 - '@esbuild/linux-ia32': 0.27.1 - '@esbuild/linux-loong64': 0.27.1 - '@esbuild/linux-mips64el': 0.27.1 - '@esbuild/linux-ppc64': 0.27.1 - '@esbuild/linux-riscv64': 0.27.1 - '@esbuild/linux-s390x': 0.27.1 - '@esbuild/linux-x64': 0.27.1 - '@esbuild/netbsd-arm64': 0.27.1 - '@esbuild/netbsd-x64': 0.27.1 - '@esbuild/openbsd-arm64': 0.27.1 - '@esbuild/openbsd-x64': 0.27.1 - '@esbuild/openharmony-arm64': 0.27.1 - '@esbuild/sunos-x64': 0.27.1 - '@esbuild/win32-arm64': 0.27.1 - '@esbuild/win32-ia32': 0.27.1 - '@esbuild/win32-x64': 0.27.1 + '@esbuild/aix-ppc64': 0.27.2 + '@esbuild/android-arm': 0.27.2 + '@esbuild/android-arm64': 0.27.2 + '@esbuild/android-x64': 0.27.2 + '@esbuild/darwin-arm64': 0.27.2 + '@esbuild/darwin-x64': 0.27.2 + '@esbuild/freebsd-arm64': 0.27.2 + '@esbuild/freebsd-x64': 0.27.2 + '@esbuild/linux-arm': 0.27.2 + '@esbuild/linux-arm64': 0.27.2 + '@esbuild/linux-ia32': 0.27.2 + '@esbuild/linux-loong64': 0.27.2 + '@esbuild/linux-mips64el': 0.27.2 + '@esbuild/linux-ppc64': 0.27.2 + '@esbuild/linux-riscv64': 0.27.2 + '@esbuild/linux-s390x': 0.27.2 + '@esbuild/linux-x64': 0.27.2 + '@esbuild/netbsd-arm64': 0.27.2 + '@esbuild/netbsd-x64': 0.27.2 + '@esbuild/openbsd-arm64': 0.27.2 + '@esbuild/openbsd-x64': 0.27.2 + '@esbuild/openharmony-arm64': 0.27.2 + '@esbuild/sunos-x64': 0.27.2 + '@esbuild/win32-arm64': 0.27.2 + '@esbuild/win32-ia32': 0.27.2 + '@esbuild/win32-x64': 0.27.2 escalade@3.2.0: {} @@ -3955,54 +3711,54 @@ snapshots: eslint-import-context@0.1.9(unrs-resolver@1.11.1): dependencies: - get-tsconfig: 4.13.0 + get-tsconfig: 4.13.1 stable-hash-x: 0.2.0 optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2))(eslint@9.39.2): dependencies: debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 eslint-import-context: 0.1.9(unrs-resolver@1.11.1) - get-tsconfig: 4.13.0 + get-tsconfig: 4.13.1 is-bun-module: 2.0.0 stable-hash-x: 0.2.0 tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2) transitivePeerDependencies: - supports-color - eslint-plugin-de-morgan@2.0.0(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-de-morgan@2.0.0(eslint@9.39.2): dependencies: - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 eslint-plugin-depend@1.4.0: dependencies: empathic: 2.0.0 - module-replacements: 2.10.1 + module-replacements: 2.11.0 semver: 7.7.3 - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2): dependencies: '@typescript-eslint/types': 8.54.0 comment-parser: 1.4.5 debug: 4.4.3(supports-color@8.1.1) - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 - minimatch: 10.1.1 + minimatch: 10.1.2 semver: 7.7.3 stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@62.5.0(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-jsdoc@62.5.0(eslint@9.39.2): dependencies: '@es-joy/jsdoccomment': 0.83.0 '@es-joy/resolve.exports': 1.2.0 @@ -4010,7 +3766,7 @@ snapshots: comment-parser: 1.4.5 debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 espree: 11.1.0 esquery: 1.7.0 html-entities: 2.6.0 @@ -4022,21 +3778,21 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-perfectionist@5.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@5.4.0(eslint@9.39.2)(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.2(jiti@2.6.1) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) + eslint: 9.39.2 natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-sonarjs@3.0.6(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-sonarjs@3.0.6(eslint@9.39.2): dependencies: '@eslint-community/regexpp': 4.12.2 builtin-modules: 3.3.0 bytes: 3.1.2 - eslint: 9.39.2(jiti@2.6.1) + eslint: 9.39.2 functional-red-black-tree: 1.0.1 jsx-ast-utils-x: 0.1.0 lodash.merge: 4.6.2 @@ -4045,16 +3801,16 @@ snapshots: semver: 7.7.3 typescript: 5.9.3 - eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-unicorn@62.0.0(eslint@9.39.2): dependencies: '@babel/helper-validator-identifier': 7.28.5 - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2) '@eslint/plugin-kit': 0.4.1 change-case: 5.4.4 - ci-info: 4.3.1 + ci-info: 4.4.0 clean-regexp: 1.0.0 - core-js-compat: 3.47.0 - eslint: 9.39.2(jiti@2.6.1) + core-js-compat: 3.48.0 + eslint: 9.39.2 esquery: 1.7.0 find-up-simple: 1.0.1 globals: 16.5.0 @@ -4078,9 +3834,9 @@ snapshots: eslint-visitor-keys@5.0.0: {} - eslint@9.39.2(jiti@2.6.1): + eslint@9.39.2: dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 @@ -4114,8 +3870,6 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - optionalDependencies: - jiti: 2.6.1 transitivePeerDependencies: - supports-color @@ -4149,9 +3903,9 @@ snapshots: esutils@2.0.3: {} - eventemitter3@5.0.1: {} + eventemitter3@5.0.4: {} - expect-type@1.2.2: {} + expect-type@1.3.0: {} extendable-error@0.1.7: {} @@ -4169,7 +3923,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fastq@1.19.1: + fastq@1.20.1: dependencies: reusify: 1.1.0 @@ -4231,7 +3985,7 @@ snapshots: get-package-type@0.1.0: {} - get-tsconfig@4.13.0: + get-tsconfig@4.13.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -4270,7 +4024,7 @@ snapshots: husky@9.1.7: {} - iconv-lite@0.7.0: + iconv-lite@0.7.2: dependencies: safer-buffer: 2.1.2 @@ -4348,10 +4102,7 @@ snapshots: filelist: 1.0.4 picocolors: 1.1.1 - jiti@2.6.1: - optional: true - - js-tokens@9.0.1: {} + js-tokens@10.0.0: {} js-yaml@3.14.2: dependencies: @@ -4399,7 +4150,7 @@ snapshots: lint-staged@16.2.7: dependencies: - commander: 14.0.2 + commander: 14.0.3 listr2: 9.0.5 micromatch: 4.0.8 nano-spawn: 2.0.0 @@ -4411,7 +4162,7 @@ snapshots: dependencies: cli-truncate: 5.1.1 colorette: 2.0.20 - eventemitter3: 5.0.1 + eventemitter3: 5.0.4 log-update: 6.1.0 rfdc: 1.4.1 wrap-ansi: 9.0.2 @@ -4444,8 +4195,8 @@ snapshots: magicast@0.5.1: dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 + '@babel/parser': 7.29.0 + '@babel/types': 7.29.0 source-map-js: 1.2.1 make-dir@4.0.0: @@ -4476,7 +4227,11 @@ snapshots: minimatch@10.1.1: dependencies: - '@isaacs/brace-expansion': 5.0.0 + '@isaacs/brace-expansion': 5.0.1 + + minimatch@10.1.2: + dependencies: + '@isaacs/brace-expansion': 5.0.1 minimatch@3.1.2: dependencies: @@ -4490,7 +4245,7 @@ snapshots: dependencies: brace-expansion: 2.0.2 - module-replacements@2.10.1: {} + module-replacements@2.11.0: {} mri@1.2.0: {} @@ -4668,15 +4423,15 @@ snapshots: rfdc@1.4.1: {} - rolldown-plugin-dts@0.21.7(rolldown@1.0.0-rc.1)(typescript@5.9.3): + rolldown-plugin-dts@0.21.9(rolldown@1.0.0-rc.1)(typescript@5.9.3): dependencies: - '@babel/generator': 8.0.0-beta.4 - '@babel/parser': 8.0.0-beta.4 - '@babel/types': 8.0.0-beta.4 + '@babel/generator': 8.0.0-rc.1 + '@babel/parser': 8.0.0-rc.1 + '@babel/types': 8.0.0-rc.1 ast-kit: 3.0.0-beta.1 birpc: 4.0.0 dts-resolver: 2.1.3 - get-tsconfig: 4.13.0 + get-tsconfig: 4.13.1 obug: 2.1.1 rolldown: 1.0.0-rc.1 optionalDependencies: @@ -4703,32 +4458,35 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.1 '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.1 - rollup@4.53.3: + rollup@4.57.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.53.3 - '@rollup/rollup-android-arm64': 4.53.3 - '@rollup/rollup-darwin-arm64': 4.53.3 - '@rollup/rollup-darwin-x64': 4.53.3 - '@rollup/rollup-freebsd-arm64': 4.53.3 - '@rollup/rollup-freebsd-x64': 4.53.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.53.3 - '@rollup/rollup-linux-arm-musleabihf': 4.53.3 - '@rollup/rollup-linux-arm64-gnu': 4.53.3 - '@rollup/rollup-linux-arm64-musl': 4.53.3 - '@rollup/rollup-linux-loong64-gnu': 4.53.3 - '@rollup/rollup-linux-ppc64-gnu': 4.53.3 - '@rollup/rollup-linux-riscv64-gnu': 4.53.3 - '@rollup/rollup-linux-riscv64-musl': 4.53.3 - '@rollup/rollup-linux-s390x-gnu': 4.53.3 - '@rollup/rollup-linux-x64-gnu': 4.53.3 - '@rollup/rollup-linux-x64-musl': 4.53.3 - '@rollup/rollup-openharmony-arm64': 4.53.3 - '@rollup/rollup-win32-arm64-msvc': 4.53.3 - '@rollup/rollup-win32-ia32-msvc': 4.53.3 - '@rollup/rollup-win32-x64-gnu': 4.53.3 - '@rollup/rollup-win32-x64-msvc': 4.53.3 + '@rollup/rollup-android-arm-eabi': 4.57.1 + '@rollup/rollup-android-arm64': 4.57.1 + '@rollup/rollup-darwin-arm64': 4.57.1 + '@rollup/rollup-darwin-x64': 4.57.1 + '@rollup/rollup-freebsd-arm64': 4.57.1 + '@rollup/rollup-freebsd-x64': 4.57.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.57.1 + '@rollup/rollup-linux-arm-musleabihf': 4.57.1 + '@rollup/rollup-linux-arm64-gnu': 4.57.1 + '@rollup/rollup-linux-arm64-musl': 4.57.1 + '@rollup/rollup-linux-loong64-gnu': 4.57.1 + '@rollup/rollup-linux-loong64-musl': 4.57.1 + '@rollup/rollup-linux-ppc64-gnu': 4.57.1 + '@rollup/rollup-linux-ppc64-musl': 4.57.1 + '@rollup/rollup-linux-riscv64-gnu': 4.57.1 + '@rollup/rollup-linux-riscv64-musl': 4.57.1 + '@rollup/rollup-linux-s390x-gnu': 4.57.1 + '@rollup/rollup-linux-x64-gnu': 4.57.1 + '@rollup/rollup-linux-x64-musl': 4.57.1 + '@rollup/rollup-openbsd-x64': 4.57.1 + '@rollup/rollup-openharmony-arm64': 4.57.1 + '@rollup/rollup-win32-arm64-msvc': 4.57.1 + '@rollup/rollup-win32-ia32-msvc': 4.57.1 + '@rollup/rollup-win32-x64-gnu': 4.57.1 + '@rollup/rollup-win32-x64-msvc': 4.57.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4812,7 +4570,7 @@ snapshots: get-east-asian-width: 1.4.0 strip-ansi: 7.1.2 - string-width@8.1.0: + string-width@8.1.1: dependencies: get-east-asian-width: 1.4.0 strip-ansi: 7.1.2 @@ -4841,98 +4599,98 @@ snapshots: term-size@2.2.1: {} - text-camel-case@1.2.9: + text-camel-case@1.2.10: dependencies: - text-pascal-case: 1.2.9 + text-pascal-case: 1.2.10 - text-capital-case@1.2.9: + text-capital-case@1.2.10: dependencies: - text-no-case: 1.2.9 - text-upper-case-first: 1.2.9 + text-no-case: 1.2.10 + text-upper-case-first: 1.2.10 - text-case@1.2.9: + text-case@1.2.10: dependencies: - text-camel-case: 1.2.9 - text-capital-case: 1.2.9 - text-constant-case: 1.2.9 - text-dot-case: 1.2.9 - text-header-case: 1.2.9 - text-is-lower-case: 1.2.9 - text-is-upper-case: 1.2.9 - text-kebab-case: 1.2.9 - text-lower-case: 1.2.9 - text-lower-case-first: 1.2.9 - text-no-case: 1.2.9 - text-param-case: 1.2.9 - text-pascal-case: 1.2.9 - text-path-case: 1.2.9 - text-sentence-case: 1.2.9 - text-snake-case: 1.2.9 - text-swap-case: 1.2.9 - text-title-case: 1.2.9 - text-upper-case: 1.2.9 - text-upper-case-first: 1.2.9 + text-camel-case: 1.2.10 + text-capital-case: 1.2.10 + text-constant-case: 1.2.10 + text-dot-case: 1.2.10 + text-header-case: 1.2.10 + text-is-lower-case: 1.2.10 + text-is-upper-case: 1.2.10 + text-kebab-case: 1.2.10 + text-lower-case: 1.2.10 + text-lower-case-first: 1.2.10 + text-no-case: 1.2.10 + text-param-case: 1.2.10 + text-pascal-case: 1.2.10 + text-path-case: 1.2.10 + text-sentence-case: 1.2.10 + text-snake-case: 1.2.10 + text-swap-case: 1.2.10 + text-title-case: 1.2.10 + text-upper-case: 1.2.10 + text-upper-case-first: 1.2.10 - text-constant-case@1.2.9: + text-constant-case@1.2.10: dependencies: - text-no-case: 1.2.9 - text-upper-case: 1.2.9 + text-no-case: 1.2.10 + text-upper-case: 1.2.10 - text-dot-case@1.2.9: + text-dot-case@1.2.10: dependencies: - text-no-case: 1.2.9 + text-no-case: 1.2.10 - text-header-case@1.2.9: + text-header-case@1.2.10: dependencies: - text-capital-case: 1.2.9 + text-capital-case: 1.2.10 - text-is-lower-case@1.2.9: {} + text-is-lower-case@1.2.10: {} - text-is-upper-case@1.2.9: {} + text-is-upper-case@1.2.10: {} - text-kebab-case@1.2.9: + text-kebab-case@1.2.10: dependencies: - text-no-case: 1.2.9 + text-no-case: 1.2.10 - text-lower-case-first@1.2.9: {} + text-lower-case-first@1.2.10: {} - text-lower-case@1.2.9: {} + text-lower-case@1.2.10: {} - text-no-case@1.2.9: + text-no-case@1.2.10: dependencies: - text-lower-case: 1.2.9 + text-lower-case: 1.2.10 - text-param-case@1.2.9: + text-param-case@1.2.10: dependencies: - text-dot-case: 1.2.9 + text-dot-case: 1.2.10 - text-pascal-case@1.2.9: + text-pascal-case@1.2.10: dependencies: - text-no-case: 1.2.9 + text-no-case: 1.2.10 - text-path-case@1.2.9: + text-path-case@1.2.10: dependencies: - text-dot-case: 1.2.9 + text-dot-case: 1.2.10 - text-sentence-case@1.2.9: + text-sentence-case@1.2.10: dependencies: - text-no-case: 1.2.9 - text-upper-case-first: 1.2.9 + text-no-case: 1.2.10 + text-upper-case-first: 1.2.10 - text-snake-case@1.2.9: + text-snake-case@1.2.10: dependencies: - text-dot-case: 1.2.9 + text-dot-case: 1.2.10 - text-swap-case@1.2.9: {} + text-swap-case@1.2.10: {} - text-title-case@1.2.9: + text-title-case@1.2.10: dependencies: - text-no-case: 1.2.9 - text-upper-case-first: 1.2.9 + text-no-case: 1.2.10 + text-upper-case-first: 1.2.10 - text-upper-case-first@1.2.9: {} + text-upper-case-first@1.2.10: {} - text-upper-case@1.2.9: {} + text-upper-case@1.2.10: {} tinybench@2.9.0: {} @@ -4970,7 +4728,7 @@ snapshots: chokidar: 4.0.3 listr2: 9.0.5 slash: 5.1.0 - text-case: 1.2.9 + text-case: 1.2.10 tslib: 2.8.1 tsutils: 3.21.0(typescript@5.9.3) typescript: 5.9.3 @@ -4989,7 +4747,7 @@ snapshots: obug: 2.1.1 picomatch: 4.0.3 rolldown: 1.0.0-rc.1 - rolldown-plugin-dts: 0.21.7(rolldown@1.0.0-rc.1)(typescript@5.9.3) + rolldown-plugin-dts: 0.21.9(rolldown@1.0.0-rc.1)(typescript@5.9.3) semver: 7.7.3 tinyexec: 1.0.2 tinyglobby: 0.2.15 @@ -5016,8 +4774,8 @@ snapshots: tsx@4.21.0: dependencies: - esbuild: 0.27.1 - get-tsconfig: 4.13.0 + esbuild: 0.27.2 + get-tsconfig: 4.13.1 optionalDependencies: fsevents: 2.3.3 @@ -5060,20 +4818,20 @@ snapshots: typedoc@0.28.16(typescript@5.9.3): dependencies: - '@gerrit0/mini-shiki': 3.19.0 + '@gerrit0/mini-shiki': 3.22.0 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 typescript: 5.9.3 yaml: 2.8.2 - typescript-eslint@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.54.0(eslint@9.39.2)(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/parser': 8.54.0(eslint@9.39.2)(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.54.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - eslint: 9.39.2(jiti@2.6.1) + '@typescript-eslint/utils': 8.54.0(eslint@9.39.2)(typescript@5.9.3) + eslint: 9.39.2 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -5119,7 +4877,7 @@ snapshots: dependencies: rolldown: 1.0.0-rc.1 - update-browserslist-db@1.2.2(browserslist@4.28.1): + update-browserslist-db@1.2.3(browserslist@4.28.1): dependencies: browserslist: 4.28.1 escalade: 3.2.0 @@ -5129,32 +4887,31 @@ snapshots: dependencies: punycode: 2.3.1 - vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.3.1(@types/node@24.10.10)(tsx@4.21.0)(yaml@2.8.2): dependencies: - esbuild: 0.25.12 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.53.3 + rollup: 4.57.1 tinyglobby: 0.2.15 optionalDependencies: '@types/node': 24.10.10 fsevents: 2.3.3 - jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.18(@types/node@24.10.10)(@vitest/ui@4.0.18)(tsx@4.21.0)(yaml@2.8.2): dependencies: '@vitest/expect': 4.0.18 - '@vitest/mocker': 4.0.18(vite@7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 4.0.18(vite@7.3.1(@types/node@24.10.10)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 4.0.18 '@vitest/runner': 4.0.18 '@vitest/snapshot': 4.0.18 '@vitest/spy': 4.0.18 '@vitest/utils': 4.0.18 es-module-lexer: 1.7.0 - expect-type: 1.2.2 + expect-type: 1.3.0 magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 @@ -5164,7 +4921,7 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.2.6(@types/node@24.10.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.10)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.10.10 From b3f932ed6b9885f496a66e00fbbe6223dee9c7a7 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:24:22 +0100 Subject: [PATCH 46/52] Speed up tests and fix modified crafting types --- generated/schemas/wow/modified-crafting.ts | 16 +++++++++-- .../playable-class.integration.test.ts | 28 +++++++++++++++---- .../wow/modified-crafting.integration.test.ts | 19 +++++++++++-- .../wow/mount.integration.test.ts | 11 ++++++-- .../wow/pet.integration.test.ts | 9 ++++-- ...layable-specialization.integration.test.ts | 6 +++- .../wow/title.integration.test.ts | 9 ++++-- .../wow/toy.integration.test.ts | 9 ++++-- packages/wow/src/modified-crafting/types.ts | 9 ++++-- 9 files changed, 91 insertions(+), 25 deletions(-) diff --git a/generated/schemas/wow/modified-crafting.ts b/generated/schemas/wow/modified-crafting.ts index c60c6e3d..4661bbf8 100644 --- a/generated/schemas/wow/modified-crafting.ts +++ b/generated/schemas/wow/modified-crafting.ts @@ -1,12 +1,22 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const modifiedCraftingCategoryIndexResponseSchema = responseBaseSchema.extend({ - categories: z.array(nameIdKeySchema), + categories: z.array( + keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ), + ), }); -export const modifiedCraftingCategoryResponseSchema = nameIdSchema.extend(responseBaseSchema.shape); +export const modifiedCraftingCategoryResponseSchema = responseBaseSchema.extend({ + id: z.number(), + name: z.string().optional(), +}); export const modifiedCraftingIndexResponseSchema = responseBaseSchema.extend({ categories: z.strictObject({ diff --git a/packages/integration-tests/classic-wow/playable-class.integration.test.ts b/packages/integration-tests/classic-wow/playable-class.integration.test.ts index 2a835f72..f9ac3e19 100644 --- a/packages/integration-tests/classic-wow/playable-class.integration.test.ts +++ b/packages/integration-tests/classic-wow/playable-class.integration.test.ts @@ -15,16 +15,24 @@ describe('classic-wow playable class integration', () => { const indices = await client.sendRequest(classicWow.playableClassIndex('static-classic1x')); + const classRequests = []; + const mediaRequests = []; for (const playerClass of indices.classes) { - const resp = await client.sendRequest(classicWow.playableClass('static-classic1x', playerClass.id)); + classRequests.push(client.sendRequest(classicWow.playableClass('static-classic1x', playerClass.id))); + mediaRequests.push(client.sendRequest(classicWow.playableClassMedia('static-classic1x', playerClass.id))); + } + const responses = await Promise.all(classRequests); + for (const resp of responses) { const parsed = playableClassResponseSchema.safeParse(resp); if (!parsed.success) { console.error('Playable class validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - - const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic1x', playerClass.id)); + } + const mediaResponses = await Promise.all(mediaRequests); + for (const mediaResp of mediaResponses) { const mediaParsed = playableClassMediaResponseSchema.safeParse(mediaResp); + if (!mediaParsed.success) { console.error('Playable class media validation failed:', treeifyError(mediaParsed.error)); } @@ -40,16 +48,24 @@ describe('classic-wow playable class integration', () => { const indices = await client.sendRequest(classicWow.playableClassIndex('static-classic')); + const classRequests = []; + const mediaRequests = []; for (const playerClass of indices.classes) { - const resp = await client.sendRequest(classicWow.playableClass('static-classic', playerClass.id)); + classRequests.push(client.sendRequest(classicWow.playableClass('static-classic', playerClass.id))); + mediaRequests.push(client.sendRequest(classicWow.playableClassMedia('static-classic', playerClass.id))); + } + const responses = await Promise.all(classRequests); + for (const resp of responses) { const parsed = playableClassResponseSchema.safeParse(resp); if (!parsed.success) { console.error('Playable class validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - - const mediaResp = await client.sendRequest(classicWow.playableClassMedia('static-classic', playerClass.id)); + } + const mediaResponses = await Promise.all(mediaRequests); + for (const mediaResp of mediaResponses) { const mediaParsed = playableClassMediaResponseSchema.safeParse(mediaResp); + if (!mediaParsed.success) { console.error('Playable class media validation failed:', treeifyError(mediaParsed.error)); } diff --git a/packages/integration-tests/wow/modified-crafting.integration.test.ts b/packages/integration-tests/wow/modified-crafting.integration.test.ts index bcb0393f..fea184ac 100644 --- a/packages/integration-tests/wow/modified-crafting.integration.test.ts +++ b/packages/integration-tests/wow/modified-crafting.integration.test.ts @@ -22,9 +22,22 @@ describe('wow modified-crafting integration', () => { } expect(parsed.success).toBe(true); - const first = parsed.success ? parsed.data.categories[0] : undefined; - if (first) { - const category = await client.sendRequest(wow.modifiedCraftingCategory(first.id)); + // Pick up to 5 categories at random from the index to fetch details + const categories = parsed.success ? parsed.data.categories : []; + const sampleSize = Math.min(5, categories.length); + const sampled = + categories.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + categories.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : categories.slice(0, sampleSize); + + const requests = []; + + for (const c of sampled) { + requests.push(client.sendRequest(wow.modifiedCraftingCategory(c.id))); + } + const responses = await Promise.all(requests); + for (const category of responses) { const parsedCategory = modifiedCraftingCategoryResponseSchema.safeParse(category); if (!parsedCategory.success) { console.error('Modified crafting category detail validation failed:', treeifyError(parsedCategory.error)); diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts index 1effaed9..d8b2784b 100644 --- a/packages/integration-tests/wow/mount.integration.test.ts +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -21,18 +21,23 @@ describe('wow mount integration', () => { // Pick up to 5 mounts at random from the index to fetch details const mounts = parsed.success ? parsed.data.mounts : []; - const sampleSize = Math.min(500, mounts.length); + const sampleSize = Math.min(5, mounts.length); const sampled = mounts.length > sampleSize ? // eslint-disable-next-line sonarjs/pseudo-random mounts.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) : mounts.slice(0, sampleSize); + const requests = []; + for (const t of sampled) { - const mount = await client.sendRequest(wow.mount(t.id)); + requests.push(client.sendRequest(wow.mount(t.id))); + } + const responses = await Promise.all(requests); + for (const mount of responses) { const parsedmount = mountResponseSchema.safeParse(mount); if (!parsedmount.success) { - console.error('mount detail validation failed for id', t.id, treeifyError(parsedmount.error)); + console.error('mount detail validation failed for id', mount.id, treeifyError(parsedmount.error)); console.log('mount', mount); console.log('parsedmount.error', parsedmount.error); } diff --git a/packages/integration-tests/wow/pet.integration.test.ts b/packages/integration-tests/wow/pet.integration.test.ts index 9db8561a..d967bada 100644 --- a/packages/integration-tests/wow/pet.integration.test.ts +++ b/packages/integration-tests/wow/pet.integration.test.ts @@ -28,11 +28,16 @@ describe('wow pet integration', () => { pets.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) : pets.slice(0, sampleSize); + const requests = []; + for (const t of sampled) { - const pet = await client.sendRequest(wow.pet(t.id)); + requests.push(client.sendRequest(wow.pet(t.id))); + } + const responses = await Promise.all(requests); + for (const pet of responses) { const parsedPet = petResponseSchema.safeParse(pet); if (!parsedPet.success) { - console.error('Pet detail validation failed for id', t.id, treeifyError(parsedPet.error)); + console.error('Pet detail validation failed for id', pet.id, treeifyError(parsedPet.error)); } expect(parsedPet.success).toBe(true); } diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts index bac6309c..4c5c6918 100644 --- a/packages/integration-tests/wow/playable-specialization.integration.test.ts +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -22,8 +22,12 @@ describe('wow playable-specialization integration', () => { } expect(parsed.success).toBe(true); + const requests = []; for (const specialization of index.character_specializations) { - const spec = await client.sendRequest(wow.playableSpecialization(specialization.id)); + requests.push(client.sendRequest(wow.playableSpecialization(specialization.id))); + } + const responses = await Promise.all(requests); + for (const spec of responses) { const parsedSpec = playableSpecializationResponseSchema.safeParse(spec); if (!parsedSpec.success) { console.error('Playable specialization detail validation failed:', treeifyError(parsedSpec.error)); diff --git a/packages/integration-tests/wow/title.integration.test.ts b/packages/integration-tests/wow/title.integration.test.ts index 23b46b67..a8398b79 100644 --- a/packages/integration-tests/wow/title.integration.test.ts +++ b/packages/integration-tests/wow/title.integration.test.ts @@ -28,11 +28,16 @@ describe('wow title integration', () => { titles.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) : titles.slice(0, sampleSize); + const requests = []; + for (const t of sampled) { - const title = await client.sendRequest(wow.title(t.id)); + requests.push(client.sendRequest(wow.title(t.id))); + } + const responses = await Promise.all(requests); + for (const title of responses) { const parsedTitle = titleResponseSchema.safeParse(title); if (!parsedTitle.success) { - console.error('Title detail validation failed for id', t.id, treeifyError(parsedTitle.error)); + console.error('Title detail validation failed for id', title.id, treeifyError(parsedTitle.error)); } expect(parsedTitle.success).toBe(true); } diff --git a/packages/integration-tests/wow/toy.integration.test.ts b/packages/integration-tests/wow/toy.integration.test.ts index 3d861ded..08d102a7 100644 --- a/packages/integration-tests/wow/toy.integration.test.ts +++ b/packages/integration-tests/wow/toy.integration.test.ts @@ -28,11 +28,16 @@ describe('wow toy integration', () => { toys.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) : toys.slice(0, sampleSize); + const requests = []; + for (const t of sampled) { - const toy = await client.sendRequest(wow.toy(t.id)); + requests.push(client.sendRequest(wow.toy(t.id))); + } + const responses = await Promise.all(requests); + for (const toy of responses) { const parsedToy = toyResponseSchema.safeParse(toy); if (!parsedToy.success) { - console.error('Toy detail validation failed for id', t.id, treeifyError(parsedToy.error)); + console.error('Toy detail validation failed for id', toy.id, treeifyError(parsedToy.error)); } expect(parsedToy.success).toBe(true); } diff --git a/packages/wow/src/modified-crafting/types.ts b/packages/wow/src/modified-crafting/types.ts index 498f16fc..f682b83e 100644 --- a/packages/wow/src/modified-crafting/types.ts +++ b/packages/wow/src/modified-crafting/types.ts @@ -1,18 +1,21 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a modified crafting category index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface ModifiedCraftingCategoryIndexResponse extends ResponseBase { - categories: Array; + categories: Array; } /** * The response for a modified crafting category. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface ModifiedCraftingCategoryResponse extends NameId, ResponseBase {} +export interface ModifiedCraftingCategoryResponse extends ResponseBase { + id: number; + name?: string; +} /** * The response for a modified crafting index. From 42b18ab2ab0129fea16945e8e72a0f0c497238a1 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:57:05 +0100 Subject: [PATCH 47/52] Fix up types for media-search and journal requests --- generated/schemas/core/base.ts | 2 +- generated/schemas/wow/journal.ts | 151 +++++++++++++----- generated/schemas/wow/media-search.ts | 4 +- packages/core/src/base.ts | 2 +- .../media-search.integration.test.ts | 27 ++-- .../playable-class.integration.test.ts | 2 +- .../wow/journal.integration.test.ts | 117 ++++++++++++-- .../wow/media-search.integration.test.ts | 17 +- .../wow/playable-class.integration.test.ts | 2 +- packages/wow/src/journal/types.ts | 86 ++++++---- packages/wow/src/media-search/types.ts | 4 +- 11 files changed, 296 insertions(+), 118 deletions(-) diff --git a/generated/schemas/core/base.ts b/generated/schemas/core/base.ts index fa68190d..aa0d8feb 100644 --- a/generated/schemas/core/base.ts +++ b/generated/schemas/core/base.ts @@ -34,7 +34,7 @@ export const keyBaseSchema = z.strictObject({ }); export const mediaAssetSchema = z.strictObject({ - file_data_id: z.number(), + file_data_id: z.number().optional(), key: z.string(), value: z.string(), }); diff --git a/generated/schemas/wow/journal.ts b/generated/schemas/wow/journal.ts index 642b4d92..542478f1 100644 --- a/generated/schemas/wow/journal.ts +++ b/generated/schemas/wow/journal.ts @@ -32,6 +32,7 @@ export const journalExpansionIndexResponseSchema = responseBaseSchema.extend({ export const journalExpansionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ dungeons: z.array(nameIdKeySchema), raids: z.array(nameIdKeySchema), + world_bosses: z.array(nameIdKeySchema).optional(), }); export const journalInstanceIndexResponseSchema = responseBaseSchema.extend({ @@ -47,7 +48,12 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const encounterCategorySchema = z.union([z.literal('DUNGEON'), z.literal('RAID'), z.literal('WORLD_BOSS')]); +const encounterCategorySchema = z.union([ + z.literal('DUNGEON'), + z.literal('EVENT'), + z.literal('RAID'), + z.literal('WORLD_BOSS'), +]); const creatureDisplaySchema = keyBaseSchema.extend({ id: z.number(), @@ -72,15 +78,22 @@ const journalEncounterSearchItemSchema = z.strictObject({ }); const categorySchema = z.strictObject({ - type: encounterCategorySchema, + type: encounterCategorySchema.optional(), }); -const journalSubSection4Schema = z.strictObject({ - body_text: z.string().optional(), +const journalSubSection6Schema = z.strictObject({ + body_text: z.string().optional().nullable(), creature_display: creatureDisplaySchema.optional(), id: z.number(), - spell: nameIdKeySchema.optional(), - title: z.string(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); const modeNameSchema = z.union([ @@ -122,59 +135,120 @@ export const journalInstanceMediaResponseSchema = responseBaseSchema.extend({ }); const modeElementSchema = z.strictObject({ + is_timewalking: z.boolean().optional(), is_tracked: z.boolean(), mode: modeSchema, players: z.number(), }); -const journalSubSection3Schema = z.strictObject({ - body_text: z.string().optional(), +const journalSubSection5Schema = z.strictObject({ + body_text: z.string().optional().nullable(), creature_display: creatureDisplaySchema.optional(), id: z.number(), - sections: z.array(journalSubSection4Schema).optional(), - spell: nameIdKeySchema.optional(), - title: z.string(), + sections: z.array(journalSubSection6Schema).optional(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); export const journalInstanceResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - area: nameIdSchema, + area: nameIdSchema.optional(), category: categorySchema, - description: z.string(), + description: z.string().optional(), encounters: z.array(nameIdKeySchema), - expansion: nameIdKeySchema, - location: nameIdSchema, - map: nameIdSchema, + expansion: nameIdKeySchema.optional(), + location: nameIdSchema.optional(), + map: nameIdSchema.optional(), media: mediaSchema, - minimum_level: z.number(), - modes: z.array(modeElementSchema), - order_index: z.number(), + minimum_level: z.number().optional(), + modes: z.array(modeElementSchema).optional(), + order_index: z.number().optional(), +}); + +const journalSubSection4Schema = z.strictObject({ + body_text: z.string().optional().nullable(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSection5Schema).optional(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), +}); + +const journalSubSection3Schema = z.strictObject({ + body_text: z.string().optional().nullable(), + creature_display: creatureDisplaySchema.optional(), + id: z.number(), + sections: z.array(journalSubSection4Schema).optional(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); const journalSubSection2Schema = z.strictObject({ - body_text: z.string().optional(), + body_text: z.string().optional().nullable(), creature_display: creatureDisplaySchema.optional(), id: z.number(), sections: z.array(journalSubSection3Schema).optional(), - spell: nameIdKeySchema.optional(), - title: z.string(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); const journalSubSectionSchema = z.strictObject({ - body_text: z.string().optional(), + body_text: z.string().optional().nullable(), creature_display: creatureDisplaySchema.optional(), id: z.number(), sections: z.array(journalSubSection2Schema).optional(), - spell: nameIdKeySchema.optional(), - title: z.string(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); const journalSectionSchema = z.strictObject({ - body_text: z.string().optional(), + body_text: z.string().optional().nullable(), creature_display: creatureDisplaySchema.optional(), id: z.number(), sections: z.array(journalSubSectionSchema).optional(), - spell: nameIdKeySchema.optional(), - title: z.string(), + spell: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + title: z.string().optional(), }); const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ @@ -184,9 +258,9 @@ const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ id: z.number(), instance: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.string()), + name: z.record(localesSchema, z.string()).optional(), }), - items: z.array(journalEncounterSearchItemSchema), + items: z.array(journalEncounterSearchItemSchema).optional(), modes: z .array( z.strictObject({ @@ -196,19 +270,24 @@ const journalEncounterSearchResponseItemSchema = keyBaseSchema.extend({ ) .optional(), name: z.record(localesSchema, z.string()), - sections: z.array(journalSectionSchema), + sections: z.array(journalSectionSchema).optional(), }), }); export const journalEncounterResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: categorySchema, - creatures: z.array(creatureSchema), - description: z.string(), + creatures: z.array(creatureSchema).optional(), + description: z.string().optional(), faction: factionSchema.optional(), - instance: nameIdKeySchema, - items: z.array(itemSchema), + instance: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ), + items: z.array(itemSchema).optional(), modes: z.array(modeSchema).optional(), - sections: z.array(journalSectionSchema), + sections: z.array(journalSectionSchema).optional(), }); export const journalEncounterSearchResponseSchema = searchResponseWithoutResultsSchema.extend({ diff --git a/generated/schemas/wow/media-search.ts b/generated/schemas/wow/media-search.ts index a138102f..2a0c88de 100644 --- a/generated/schemas/wow/media-search.ts +++ b/generated/schemas/wow/media-search.ts @@ -11,10 +11,10 @@ export const mediaSearchParametersSchema = baseSearchParametersSchema.extend({ tags: z.string().optional(), }); -export const mediaSearchResponseItemSchema = keyBaseSchema.extend({ +const mediaSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ assets: z.array(mediaAssetSchema), - id: z.number(), + id: z.number().optional(), }), }); diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts index 3838c3b1..b85b7c07 100644 --- a/packages/core/src/base.ts +++ b/packages/core/src/base.ts @@ -108,7 +108,7 @@ export interface KeyBase { * The media asset associated with a character or entity in World of Warcraft. */ export interface MediaAsset { - file_data_id: number; + file_data_id?: number; key: string; value: string; } diff --git a/packages/integration-tests/classic-wow/media-search.integration.test.ts b/packages/integration-tests/classic-wow/media-search.integration.test.ts index 0206078f..be3b647d 100644 --- a/packages/integration-tests/classic-wow/media-search.integration.test.ts +++ b/packages/integration-tests/classic-wow/media-search.integration.test.ts @@ -9,23 +9,22 @@ describe('classic-wow media search integration', () => { it('performs a media search and validates items', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, - origin: 'us', + origin: 'eu', secret: environment.blizzardClientSecret, }); - // Use a minimal search (skipped by default; may require tuning) - const resp = await client.sendRequest(classicWow.mediaSearch('static-classic1x', { _page: 1 })); - // `resp` is a SearchResponse; validate first item if present - const first = Array.isArray(resp.results) ? resp.results[0] : undefined; - if (first) { - const parsed = mediaSearchResponseSchema.safeParse(first); - if (!parsed.success) { - console.error('Media search item validation failed:', treeifyError(parsed.error)); - } - expect(parsed.success).toBe(true); - } else { - // No results is acceptable for a generic search; assert shape - expect(resp).toBeDefined(); + const search = await client.sendRequest(classicWow.mediaSearch('static-classic', { _page: 1 })); + const parsedSearch = mediaSearchResponseSchema.safeParse(search); + if (!parsedSearch.success) { + console.error('Media search validation failed:', treeifyError(parsedSearch.error)); } + expect(parsedSearch.success).toBe(true); + + const eraSearch = await client.sendRequest(classicWow.mediaSearch('static-classic1x', { _page: 1 })); + const parsedEraSearch = mediaSearchResponseSchema.safeParse(eraSearch); + if (!parsedEraSearch.success) { + console.error('Media search validation failed:', treeifyError(parsedEraSearch.error)); + } + expect(parsedEraSearch.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/classic-wow/playable-class.integration.test.ts b/packages/integration-tests/classic-wow/playable-class.integration.test.ts index f9ac3e19..1099276e 100644 --- a/packages/integration-tests/classic-wow/playable-class.integration.test.ts +++ b/packages/integration-tests/classic-wow/playable-class.integration.test.ts @@ -5,7 +5,7 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { playableClassMediaResponseSchema, playableClassResponseSchema } from '../../../generated/schemas/classic-wow'; -describe('classic-wow playable class integration', () => { +describe.concurrent('classic-wow playable class integration', () => { it('fetches playable class and media by id for classic era', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, diff --git a/packages/integration-tests/wow/journal.integration.test.ts b/packages/integration-tests/wow/journal.integration.test.ts index 9af205b7..37437b4a 100644 --- a/packages/integration-tests/wow/journal.integration.test.ts +++ b/packages/integration-tests/wow/journal.integration.test.ts @@ -8,10 +8,12 @@ import { journalEncounterResponseSchema, journalExpansionIndexResponseSchema, journalExpansionResponseSchema, + journalInstanceIndexResponseSchema, + journalInstanceResponseSchema, } from '../../../generated/schemas/wow/journal'; -describe('wow journal integration', () => { - it('validates journal encounter index and expansion index with details', async ({ expect }) => { +describe.concurrent('wow journal integration', () => { + it('validates journal encounter index and details', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'eu', @@ -24,15 +26,39 @@ describe('wow journal integration', () => { } expect(parsedEnc.success).toBe(true); - const firstEnc = parsedEnc.success ? parsedEnc.data.encounters[0] : undefined; - if (firstEnc) { - const encDetail = await client.sendRequest(wow.journalEncounter(firstEnc.id)); - const parsedEncDetail = journalEncounterResponseSchema.safeParse(encDetail); - if (!parsedEncDetail.success) { - console.error('Journal encounter detail validation failed:', treeifyError(parsedEncDetail.error)); + // Pick up to 5 encounters at random from the index to fetch details + const encounters = parsedEnc.success ? parsedEnc.data.encounters : []; + const sampleSize = Math.min(5, encounters.length); + const sampledEncounters = + encounters.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + encounters.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : encounters.slice(0, sampleSize); + + const encounterRequests = []; + + for (const encounter of sampledEncounters) { + encounterRequests.push(client.sendRequest(wow.journalEncounter(encounter.id))); + } + const encounterResponses = await Promise.all(encounterRequests); + for (const encounter of encounterResponses) { + const parsedEncounter = journalEncounterResponseSchema.safeParse(encounter); + if (!parsedEncounter.success) { + console.error( + 'Journal encounter detail validation failed for id', + encounter.id, + treeifyError(parsedEncounter.error), + ); } - expect(parsedEncDetail.success).toBe(true); + expect(parsedEncounter.success).toBe(true); } + }, 30_000); + it('validates journal expansion index and details', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); const exp = await client.sendRequest(wow.journalExpansionIndex()); const parsedExp = journalExpansionIndexResponseSchema.safeParse(exp); @@ -41,14 +67,73 @@ describe('wow journal integration', () => { } expect(parsedExp.success).toBe(true); - const firstExp = parsedExp.success ? parsedExp.data.tiers[0] : undefined; - if (firstExp) { - const expDetail = await client.sendRequest(wow.journalExpansion(firstExp.id)); - const parsedExpDetail = journalExpansionResponseSchema.safeParse(expDetail); - if (!parsedExpDetail.success) { - console.error('Journal expansion detail validation failed:', treeifyError(parsedExpDetail.error)); + // Pick up to 5 expansions at random from the index to fetch details + const expansions = parsedExp.success ? parsedExp.data.tiers : []; + const sampleSize = Math.min(5, expansions.length); + const sampledExpansions = + expansions.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + expansions.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : expansions.slice(0, sampleSize); + + const expansionRequests = []; + + for (const expansion of sampledExpansions) { + expansionRequests.push(client.sendRequest(wow.journalExpansion(expansion.id))); + } + const expansionResponses = await Promise.all(expansionRequests); + for (const expansion of expansionResponses) { + const parsedExpansion = journalExpansionResponseSchema.safeParse(expansion); + if (!parsedExpansion.success) { + console.error( + 'Journal expansion detail validation failed for id', + expansion.id, + treeifyError(parsedExpansion.error), + ); + } + expect(parsedExpansion.success).toBe(true); + } + }, 30_000); + + it('validates journal instance index and details', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const instanceResp = await client.sendRequest(wow.journalInstanceIndex()); + const parsedExp = journalInstanceIndexResponseSchema.safeParse(instanceResp); + if (!parsedExp.success) { + console.error('Journal instance index validation failed:', treeifyError(parsedExp.error)); + } + expect(parsedExp.success).toBe(true); + + // Pick up to 5 instances at random from the index to fetch details + const instances = parsedExp.success ? parsedExp.data.instances : []; + const sampleSize = Math.min(5, instances.length); + const sampledInstances = + instances.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + instances.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : instances.slice(0, sampleSize); + + const instanceRequests = []; + + for (const instance of sampledInstances) { + instanceRequests.push(client.sendRequest(wow.journalInstance(instance.id))); + } + const instanceResponses = await Promise.all(instanceRequests); + for (const instance of instanceResponses) { + const parsedInstance = journalInstanceResponseSchema.safeParse(instance); + if (!parsedInstance.success) { + console.error( + 'Journal instance detail validation failed for id', + instance.id, + treeifyError(parsedInstance.error), + ); } - expect(parsedExpDetail.success).toBe(true); + expect(parsedInstance.success).toBe(true); } }, 30_000); }); diff --git a/packages/integration-tests/wow/media-search.integration.test.ts b/packages/integration-tests/wow/media-search.integration.test.ts index 16d02008..df89eba4 100644 --- a/packages/integration-tests/wow/media-search.integration.test.ts +++ b/packages/integration-tests/wow/media-search.integration.test.ts @@ -3,7 +3,7 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { mediaSearchResponseItemSchema } from '../../../generated/schemas/wow'; +import { mediaSearchResponseSchema } from '../../../generated/schemas/wow'; describe('wow media search integration', () => { it('performs a media search and validates items', async ({ expect }) => { @@ -13,16 +13,11 @@ describe('wow media search integration', () => { secret: environment.blizzardClientSecret, }); - const resp = await client.sendRequest(wow.mediaSearch({ _page: 1 })); - const first = Array.isArray(resp.results) ? resp.results[0] : undefined; - if (first) { - const parsed = mediaSearchResponseItemSchema.safeParse(first); - if (!parsed.success) { - console.error('Media search item validation failed:', treeifyError(parsed.error)); - } - expect(parsed.success).toBe(true); - } else { - expect(resp).toBeDefined(); + const search = await client.sendRequest(wow.mediaSearch({ _page: 1 })); + const parsedSearch = mediaSearchResponseSchema.safeParse(search); + if (!parsedSearch.success) { + console.error('Media search validation failed:', treeifyError(parsedSearch.error)); } + expect(parsedSearch.success).toBe(true); }, 30_000); }); diff --git a/packages/integration-tests/wow/playable-class.integration.test.ts b/packages/integration-tests/wow/playable-class.integration.test.ts index fb21dbb9..5a3d0019 100644 --- a/packages/integration-tests/wow/playable-class.integration.test.ts +++ b/packages/integration-tests/wow/playable-class.integration.test.ts @@ -8,7 +8,7 @@ import { playableClassResponseSchema, } from '../../../generated/schemas/wow/playable-class'; -describe('wow playable class integration', () => { +describe.concurrent('wow playable class integration', () => { it('fetches playable class and media by id', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 1f453d87..757bf50d 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -23,13 +23,13 @@ export interface JournalEncounterIndexResponse extends ResponseBase { */ export interface JournalEncounterResponse extends NameId, ResponseBase { category: Category; - creatures: Array; - description: string; + creatures?: Array; + description?: string; faction?: Faction; - instance: NameIdKey; - items: Array; + instance: KeyBase & { id: number; name?: string }; + items?: Array; modes?: Array; - sections: Array; + sections?: Array; } /** @@ -65,6 +65,7 @@ export interface JournalExpansionIndexResponse extends ResponseBase { export interface JournalExpansionResponse extends NameId, ResponseBase { dungeons: Array; raids: Array; + world_bosses?: Array; } /** @@ -88,17 +89,17 @@ export interface JournalInstanceMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface JournalInstanceResponse extends NameId, ResponseBase { - area: NameId; + area?: NameId; category: Category; - description: string; + description?: string; encounters: Array; - expansion: NameIdKey; - location: NameId; - map: NameId; + expansion?: NameIdKey; + location?: NameId; + map?: NameId; media: Media; - minimum_level: number; - modes: Array; - order_index: number; + minimum_level?: number; + modes?: Array; + order_index?: number; } interface Asset { @@ -107,7 +108,7 @@ interface Asset { } interface Category { - type: EncounterCategory; + type?: EncounterCategory; } interface Creature extends NameId { @@ -119,7 +120,7 @@ interface CreatureDisplay extends KeyBase { id: number; } -type EncounterCategory = 'DUNGEON' | 'RAID' | 'WORLD_BOSS'; +type EncounterCategory = 'DUNGEON' | 'EVENT' | 'RAID' | 'WORLD_BOSS'; type EncounterMode = 'HEROIC' | 'LFR' | 'MYTHIC' | 'NORMAL'; @@ -144,56 +145,74 @@ interface JournalEncounterSearchResponseItem extends KeyBase { category: Category; creatures: Array; id: number; - instance: { id: number; name: Record }; - items: Array; + instance: { id: number; name?: Record }; + items?: Array; modes?: Array<{ name: Record; type: EncounterMode }>; name: Record; - sections: Array; + sections?: Array; }; } interface JournalSection { - body_text?: string; + body_text?: null | string; creature_display?: CreatureDisplay; id: number; sections?: Array; - spell?: NameIdKey; - title: string; + spell?: KeyBase & { id: number; name?: string }; + title?: string; } interface JournalSubSection { - body_text?: string; + body_text?: null | string; creature_display?: CreatureDisplay; id: number; sections?: Array; - spell?: NameIdKey; - title: string; + spell?: KeyBase & { id: number; name?: string }; + title?: string; } interface JournalSubSection2 { - body_text?: string; + body_text?: null | string; creature_display?: CreatureDisplay; id: number; sections?: Array; - spell?: NameIdKey; - title: string; + spell?: KeyBase & { id: number; name?: string }; + title?: string; } interface JournalSubSection3 { - body_text?: string; + body_text?: null | string; creature_display?: CreatureDisplay; id: number; sections?: Array; - spell?: NameIdKey; - title: string; + spell?: KeyBase & { id: number; name?: string }; + title?: string; } interface JournalSubSection4 { - body_text?: string; + body_text?: null | string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: KeyBase & { id: number; name?: string }; + title?: string; +} + +interface JournalSubSection5 { + body_text?: null | string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: KeyBase & { id: number; name?: string }; + title?: string; +} + +interface JournalSubSection6 { + body_text?: null | string; creature_display?: CreatureDisplay; id: number; - spell?: NameIdKey; - title: string; + spell?: KeyBase & { id: number; name?: string }; + title?: string; } interface Media extends KeyBase { @@ -206,6 +225,7 @@ interface Mode { } interface ModeElement { + is_timewalking?: boolean; is_tracked: boolean; mode: Mode; players: number; diff --git a/packages/wow/src/media-search/types.ts b/packages/wow/src/media-search/types.ts index 49d70542..d95c5aed 100644 --- a/packages/wow/src/media-search/types.ts +++ b/packages/wow/src/media-search/types.ts @@ -18,9 +18,9 @@ export interface MediaSearchResponse extends SearchResponseWithoutResults { results: Array; } -export interface MediaSearchResponseItem extends KeyBase { +interface MediaSearchResponseItem extends KeyBase { data: { assets: Array; - id: number; + id?: number; }; } From 647393668a0a610d9358327fdc639815875a9e1a Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 19:21:48 +0100 Subject: [PATCH 48/52] Fix more retail wow responses --- .../schemas/wow/character-specializations.ts | 54 +++++++++---- generated/schemas/wow/character-statistics.ts | 8 +- generated/schemas/wow/character-titles.ts | 12 +-- generated/schemas/wow/covenant.ts | 33 ++++---- .../wow/covenant.integration.test.ts | 77 ++++++++++++++++--- .../src/character-specializations/types.ts | 20 ++--- .../wow/src/character-statistics/types.ts | 8 +- packages/wow/src/character-titles/types.ts | 2 +- packages/wow/src/covenant/types.ts | 19 ++--- 9 files changed, 157 insertions(+), 76 deletions(-) diff --git a/generated/schemas/wow/character-specializations.ts b/generated/schemas/wow/character-specializations.ts index 4d34b6bc..3b3c0f48 100644 --- a/generated/schemas/wow/character-specializations.ts +++ b/generated/schemas/wow/character-specializations.ts @@ -1,18 +1,20 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { characterSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const spellTooltipSchema = z.strictObject({ - cast_time: z.union([ - z.literal('1.5 sec cast'), - z.literal('2.5 sec cast'), - z.literal('3 sec cast'), - z.literal('Channeled'), - z.literal('Instant'), - z.literal('Passive'), - ]), + cast_time: z + .union([ + z.literal('1.5 sec cast'), + z.literal('2.5 sec cast'), + z.literal('3 sec cast'), + z.literal('Channeled'), + z.literal('Instant'), + z.literal('Passive'), + ]) + .optional(), cooldown: z.string().optional(), - description: z.string(), + description: z.string().optional(), power_cost: z.string().optional(), range: z .union([ @@ -26,12 +28,22 @@ const spellTooltipSchema = z.strictObject({ z.literal('Melee Range'), ]) .optional(), - spell: nameIdKeySchema, + spell: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ), }); const selectedSchema = z.strictObject({ spell_tooltip: spellTooltipSchema, - talent: nameIdKeySchema, + talent: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ), }); const pvpTalentSlotSchema = z.strictObject({ @@ -43,14 +55,24 @@ const selectedTalentSchema = z.strictObject({ default_points: z.number().optional(), id: z.number(), rank: z.number(), - tooltip: selectedSchema, + tooltip: selectedSchema.optional(), }); const loadoutSchema = z.strictObject({ is_active: z.boolean(), - selected_class_talent_tree: nameIdKeySchema, + selected_class_talent_tree: keyBaseSchema.and( + z.strictObject({ + name: z.string(), + }), + ), selected_class_talents: z.array(selectedTalentSchema), - selected_spec_talent_tree: nameIdKeySchema, + selected_hero_talent_tree: nameIdKeySchema, + selected_hero_talents: z.array(selectedTalentSchema), + selected_spec_talent_tree: keyBaseSchema.and( + z.strictObject({ + name: z.string(), + }), + ), selected_spec_talents: z.array(selectedTalentSchema).optional(), talent_loadout_code: z.string(), }); @@ -63,7 +85,7 @@ const specializationSchema = z.strictObject({ }); export const characterSpecializationsSummaryResponseSchema = responseBaseSchema.extend({ - active_hero_talent: nameIdKeySchema, + active_hero_talent_tree: nameIdKeySchema, active_specialization: nameIdKeySchema, character: characterSchema, specializations: z.array(specializationSchema), diff --git a/generated/schemas/wow/character-statistics.ts b/generated/schemas/wow/character-statistics.ts index 91e20af4..ec20e6d8 100644 --- a/generated/schemas/wow/character-statistics.ts +++ b/generated/schemas/wow/character-statistics.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { characterSchema, responseBaseSchema } from '../core'; +import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; const baseEffectiveStatSchema = z.strictObject({ base: z.number(), @@ -8,13 +8,13 @@ const baseEffectiveStatSchema = z.strictObject({ }); const ratingSchema = z.strictObject({ - rating: z.number(), rating_bonus: z.number(), + rating_normalized: z.number(), }); const ratingWithValueSchema = z.strictObject({ - rating: z.number(), rating_bonus: z.number(), + rating_normalized: z.number(), value: z.number(), }); @@ -45,7 +45,7 @@ export const characterStatisticsSummaryResponseSchema = responseBaseSchema.exten off_hand_speed: z.number(), parry: ratingWithValueSchema, power: z.number(), - power_type: characterSchema, + power_type: nameIdKeySchema, ranged_crit: ratingWithValueSchema, ranged_haste: ratingWithValueSchema, speed: ratingSchema, diff --git a/generated/schemas/wow/character-titles.ts b/generated/schemas/wow/character-titles.ts index 8d218933..37b3daa0 100644 --- a/generated/schemas/wow/character-titles.ts +++ b/generated/schemas/wow/character-titles.ts @@ -3,11 +3,13 @@ import { z } from 'zod'; import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const characterTitlesSummaryResponseSchema = responseBaseSchema.extend({ - active_title: nameIdKeySchema.and( - z.strictObject({ - display_string: z.string(), - }), - ), + active_title: nameIdKeySchema + .and( + z.strictObject({ + display_string: z.string(), + }), + ) + .optional(), character: characterSchema, titles: z.array(nameIdKeySchema), }); diff --git a/generated/schemas/wow/covenant.ts b/generated/schemas/wow/covenant.ts index 668f2a6a..a7bafeff 100644 --- a/generated/schemas/wow/covenant.ts +++ b/generated/schemas/wow/covenant.ts @@ -1,15 +1,11 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const conduitIndexResponseSchema = responseBaseSchema.extend({ conduits: z.array(nameIdKeySchema), }); -const itemSchema = keyBaseSchema.extend({ - id: z.number(), -}); - const socketTypeSchema = z.strictObject({ name: z.string(), type: z.string(), @@ -28,13 +24,6 @@ const renownRewardSchema = z.strictObject({ reward: nameIdKeySchema, }); -export const covenantResponseSchema = responseBaseSchema.extend({ - description: z.string(), - id: z.number(), - name: z.string(), - renown_rewards: z.array(renownRewardSchema), -}); - export const soulbindIndexResponseSchema = responseBaseSchema.extend({ soulbinds: z.array(nameIdKeySchema), }); @@ -42,7 +31,7 @@ export const soulbindIndexResponseSchema = responseBaseSchema.extend({ export const soulbindResponseSchema = responseBaseSchema.extend({ covenant: nameIdKeySchema, creature: nameIdKeySchema, - follower: nameIdKeySchema, + follower: nameIdSchema, id: z.number(), name: z.string(), talent_tree: nameIdKeySchema, @@ -60,13 +49,14 @@ const classAbilitySpellTooltipSchema = z.strictObject({ const spellTooltipSchema = z.strictObject({ cast_time: z.string(), description: z.string(), - spell: itemSchema, + spell: nameIdKeySchema, }); const signatureAbilitySpellTooltipSchema = z.strictObject({ cast_time: z.string(), - cooldown: z.string(), + cooldown: z.string().optional(), description: z.string(), + range: z.string().optional(), spell: nameIdKeySchema, }); @@ -87,9 +77,20 @@ const signatureAbilitySchema = z.strictObject({ spell_tooltip: signatureAbilitySpellTooltipSchema, }); +export const covenantResponseSchema = responseBaseSchema.extend({ + class_abilities: z.array(classAbilitySchema).optional(), + description: z.string(), + id: z.number(), + media: mediaSchema.optional(), + name: z.string(), + renown_rewards: z.array(renownRewardSchema), + signature_ability: signatureAbilitySchema.optional(), + soulbinds: z.array(nameIdKeySchema).optional(), +}); + export const conduitResponseSchema = responseBaseSchema.extend({ id: z.number(), - item: itemSchema, + item: nameIdKeySchema, name: z.string(), ranks: z.array(rankSchema), socket_type: socketTypeSchema, diff --git a/packages/integration-tests/wow/covenant.integration.test.ts b/packages/integration-tests/wow/covenant.integration.test.ts index 011f5cc6..b53ae939 100644 --- a/packages/integration-tests/wow/covenant.integration.test.ts +++ b/packages/integration-tests/wow/covenant.integration.test.ts @@ -4,19 +4,21 @@ import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { + conduitIndexResponseSchema, + conduitResponseSchema, covenantIndexResponseSchema, covenantResponseSchema, soulbindIndexResponseSchema, + soulbindResponseSchema, } from '../../../generated/schemas/wow/covenant'; -describe('wow covenant integration', () => { - it('validates covenant and soulbind indices and fetches detail', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'eu', - secret: environment.blizzardClientSecret, - }); - +describe.concurrent('wow covenant integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + it('validates covenant index and fetches details', async ({ expect }) => { const covIndex = await client.sendRequest(wow.covenantIndex()); const parsedCov = covenantIndexResponseSchema.safeParse(covIndex); if (!parsedCov.success) { @@ -24,21 +26,72 @@ describe('wow covenant integration', () => { } expect(parsedCov.success).toBe(true); - const firstCov = parsedCov.success ? parsedCov.data.covenants[0] : undefined; - if (firstCov) { - const covenant = await client.sendRequest(wow.covenant(firstCov.id)); + const requests = []; + + for (const cov of parsedCov.success ? parsedCov.data.covenants : []) { + requests.push(client.sendRequest(wow.covenant(cov.id))); + } + const responses = await Promise.all(requests); + for (const covenant of responses) { const parsedDetail = covenantResponseSchema.safeParse(covenant); if (!parsedDetail.success) { console.error('Covenant detail validation failed:', treeifyError(parsedDetail.error)); } expect(parsedDetail.success).toBe(true); } - + }, 30_000); + it('validates soulbind index and fetches details', async ({ expect }) => { const soulIndex = await client.sendRequest(wow.soulbindIndex()); const parsedSoul = soulbindIndexResponseSchema.safeParse(soulIndex); if (!parsedSoul.success) { console.error('Soulbind index validation failed:', treeifyError(parsedSoul.error)); } expect(parsedSoul.success).toBe(true); + + const requests = []; + for (const soul of parsedSoul.success ? parsedSoul.data.soulbinds : []) { + requests.push(client.sendRequest(wow.soulbind(soul.id))); + } + const responses = await Promise.all(requests); + + for (const soulbind of responses) { + const parsedDetail = soulbindResponseSchema.safeParse(soulbind); + if (!parsedDetail.success) { + console.error('Soulbind detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } + }, 30_000); + + it('validates conduit index and fetches details', async ({ expect }) => { + const conduitIndex = await client.sendRequest(wow.conduitIndex()); + const parsedConduit = conduitIndexResponseSchema.safeParse(conduitIndex); + if (!parsedConduit.success) { + console.error('Conduit index validation failed:', treeifyError(parsedConduit.error)); + } + expect(parsedConduit.success).toBe(true); + + // Pick up to 5 conduits at random from the index to fetch details + const conduits = parsedConduit.success ? parsedConduit.data.conduits : []; + const sampleSize = Math.min(5, conduits.length); + const sampled = + conduits.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + conduits.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : conduits.slice(0, sampleSize); + + const requests = []; + for (const conduit of sampled) { + requests.push(client.sendRequest(wow.conduit(conduit.id))); + } + const responses = await Promise.all(requests); + + for (const conduit of responses) { + const parsedDetail = conduitResponseSchema.safeParse(conduit); + if (!parsedDetail.success) { + console.error('Conduit detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + } }, 30_000); }); diff --git a/packages/wow/src/character-specializations/types.ts b/packages/wow/src/character-specializations/types.ts index e75609b9..f569c371 100644 --- a/packages/wow/src/character-specializations/types.ts +++ b/packages/wow/src/character-specializations/types.ts @@ -1,7 +1,7 @@ -import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Character, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterSpecializationsSummaryResponse extends ResponseBase { - active_hero_talent: NameIdKey; + active_hero_talent_tree: NameIdKey; active_specialization: NameIdKey; character: Character; specializations: Array; @@ -9,9 +9,11 @@ export interface CharacterSpecializationsSummaryResponse extends ResponseBase { interface Loadout { is_active: boolean; - selected_class_talent_tree: NameIdKey; + selected_class_talent_tree: KeyBase & { name: string }; selected_class_talents: Array; - selected_spec_talent_tree: NameIdKey; + selected_hero_talent_tree: NameIdKey; + selected_hero_talents: Array; + selected_spec_talent_tree: KeyBase & { name: string }; selected_spec_talents?: Array; talent_loadout_code: string; } @@ -23,14 +25,14 @@ interface PvpTalentSlot { interface Selected { spell_tooltip: SpellTooltip; - talent: NameIdKey; + talent: KeyBase & { id: number; name?: string }; } interface SelectedTalent { default_points?: number; id: number; rank: number; - tooltip: Selected; + tooltip?: Selected; } interface Specialization { @@ -41,9 +43,9 @@ interface Specialization { } interface SpellTooltip { - cast_time: '1.5 sec cast' | '2.5 sec cast' | '3 sec cast' | 'Channeled' | 'Instant' | 'Passive'; + cast_time?: '1.5 sec cast' | '2.5 sec cast' | '3 sec cast' | 'Channeled' | 'Instant' | 'Passive'; cooldown?: string; - description: string; + description?: string; power_cost?: string; range?: | '8-30 yd range' @@ -54,5 +56,5 @@ interface SpellTooltip { | '55 yd range' | '100 yd range' | 'Melee Range'; - spell: NameIdKey; + spell: KeyBase & { id: number; name?: string }; } diff --git a/packages/wow/src/character-statistics/types.ts b/packages/wow/src/character-statistics/types.ts index b5ae6276..02284e6d 100644 --- a/packages/wow/src/character-statistics/types.ts +++ b/packages/wow/src/character-statistics/types.ts @@ -1,4 +1,4 @@ -import type { Character, ResponseBase } from '@blizzard-api/core'; +import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterStatisticsSummaryResponse extends ResponseBase { agility: BaseEffectiveStat; @@ -27,7 +27,7 @@ export interface CharacterStatisticsSummaryResponse extends ResponseBase { off_hand_speed: number; parry: RatingWithValue; power: number; - power_type: Character; + power_type: NameIdKey; ranged_crit: RatingWithValue; ranged_haste: RatingWithValue; speed: Rating; @@ -49,12 +49,12 @@ interface BaseEffectiveStat { } interface Rating { - rating: number; rating_bonus: number; + rating_normalized: number; } interface RatingWithValue { - rating: number; rating_bonus: number; + rating_normalized: number; value: number; } diff --git a/packages/wow/src/character-titles/types.ts b/packages/wow/src/character-titles/types.ts index ff30ee05..3ee1c740 100644 --- a/packages/wow/src/character-titles/types.ts +++ b/packages/wow/src/character-titles/types.ts @@ -1,7 +1,7 @@ import type { Character, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface CharacterTitlesSummaryResponse extends ResponseBase { - active_title: NameIdKey & { display_string: string }; + active_title?: NameIdKey & { display_string: string }; character: Character; titles: Array; } diff --git a/packages/wow/src/covenant/types.ts b/packages/wow/src/covenant/types.ts index 662dc670..93667c32 100644 --- a/packages/wow/src/covenant/types.ts +++ b/packages/wow/src/covenant/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the conduit index endpoint. @@ -14,7 +14,7 @@ export interface ConduitIndexResponse extends ResponseBase { */ export interface ConduitResponse extends ResponseBase { id: number; - item: Item; + item: NameIdKey; name: string; ranks: Array; socket_type: SocketType; @@ -48,10 +48,14 @@ export interface CovenantMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface CovenantResponse extends ResponseBase { + class_abilities?: Array; description: string; id: number; + media?: Media; name: string; renown_rewards: Array; + signature_ability?: SignatureAbility; + soulbinds?: Array; } /** @@ -69,7 +73,7 @@ export interface SoulbindIndexResponse extends ResponseBase { export interface SoulbindResponse extends ResponseBase { covenant: NameIdKey; creature: NameIdKey; - follower: NameIdKey; + follower: NameId; id: number; name: string; talent_tree: NameIdKey; @@ -90,10 +94,6 @@ interface ClassAbilitySpellTooltip { spell: NameIdKey; } -interface Item extends KeyBase { - id: number; -} - interface Media extends KeyBase { id: number; } @@ -116,8 +116,9 @@ interface SignatureAbility { interface SignatureAbilitySpellTooltip { cast_time: string; - cooldown: string; + cooldown?: string; description: string; + range?: string; spell: NameIdKey; } @@ -129,5 +130,5 @@ interface SocketType { interface SpellTooltip { cast_time: string; description: string; - spell: Item; + spell: NameIdKey; } From 7734fe9d33d8e29f6178060100d197b3091fe8e3 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:28:59 +0100 Subject: [PATCH 49/52] Finish wow retail type updates --- .changeset/new-pens-sit.md | 7 ++ generated/schemas/wow/achievements.ts | 81 +++++++++++++++++-- generated/schemas/wow/auction-house.ts | 24 +++--- generated/schemas/wow/azerite-essence.ts | 9 ++- .../schemas/wow/character-achievements.ts | 6 +- generated/schemas/wow/character-appearance.ts | 7 +- .../schemas/wow/character-collections.ts | 28 +++++-- generated/schemas/wow/character-equipment.ts | 7 +- generated/schemas/wow/character-profile.ts | 13 +-- .../schemas/wow/character-reputations.ts | 3 +- .../wow/achievements.integration.test.ts | 35 +++++--- .../character-collections.integration.test.ts | 63 ++++++++++++--- .../wow/mount.integration.test.ts | 2 - packages/wow/src/achievements/types.ts | 65 +++++++++++++-- packages/wow/src/auction-house/types.ts | 12 ++- packages/wow/src/azerite-essence/types.ts | 4 +- .../wow/src/character-achievements/types.ts | 6 +- .../wow/src/character-appearance/types.ts | 7 +- .../wow/src/character-collections/types.ts | 5 +- packages/wow/src/character-equipment/types.ts | 7 +- packages/wow/src/character-profile/types.ts | 3 +- .../wow/src/character-reputations/types.ts | 3 +- 22 files changed, 312 insertions(+), 85 deletions(-) create mode 100644 .changeset/new-pens-sit.md diff --git a/.changeset/new-pens-sit.md b/.changeset/new-pens-sit.md new file mode 100644 index 00000000..aa2bb24e --- /dev/null +++ b/.changeset/new-pens-sit.md @@ -0,0 +1,7 @@ +--- +'@blizzard-api/classic-wow': major +'@blizzard-api/core': major +'@blizzard-api/wow': major +--- + +Many types have had keys added, removed, made nullable or otherwise edited to better reflect the possible return values of the API. This update is the largest pass of all the response types since the library was first published. diff --git a/generated/schemas/wow/achievements.ts b/generated/schemas/wow/achievements.ts index 2cc87ece..f9299cf9 100644 --- a/generated/schemas/wow/achievements.ts +++ b/generated/schemas/wow/achievements.ts @@ -1,6 +1,13 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { + factionSchema, + keyBaseSchema, + mediaAssetSchema, + nameIdKeySchema, + nameIdSchema, + responseBaseSchema, +} from '../core'; export const achievementCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array(nameIdKeySchema), @@ -34,16 +41,76 @@ export const achievementMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); +const operatorSchema = z.strictObject({ + name: z.string(), + type: z.union([z.literal('AND'), z.literal('COMPLETE_AT_LEAST')]), +}); + +const childCriteria3Schema = z.strictObject({ + achievement: nameIdKeySchema.optional(), + amount: z.number(), + description: z.string().nullable(), + faction: factionSchema.optional(), + id: z.number(), + is_gold: z.boolean().optional(), + operator: operatorSchema.optional(), + show_progress_bar: z.boolean().optional(), +}); + +const childCriteria2Schema = z.strictObject({ + achievement: nameIdKeySchema.optional(), + amount: z.number(), + child_criteria: z.array(childCriteria3Schema).optional(), + description: z.string().nullable(), + faction: factionSchema.optional(), + id: z.number(), + is_gold: z.boolean().optional(), + operator: operatorSchema.optional(), + show_progress_bar: z.boolean().optional(), +}); + +const childCriteriaSchema = z.strictObject({ + achievement: nameIdKeySchema.optional(), + amount: z.number(), + child_criteria: z.array(childCriteria2Schema).optional(), + description: z.string().nullable(), + faction: factionSchema.optional(), + id: z.number(), + is_gold: z.boolean().optional(), + operator: operatorSchema.optional(), + show_progress_bar: z.boolean().optional(), +}); + +const criteriaSchema = z.strictObject({ + amount: z.number(), + child_criteria: z.array(childCriteriaSchema).optional(), + description: z.string().nullable(), + faction: factionSchema.optional(), + id: z.number(), + operator: operatorSchema.optional(), + show_progress_bar: z.boolean().optional(), +}); + export const achievementResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: nameIdKeySchema, - criteria: z.strictObject({ - amount: z.number(), - description: z.string(), - id: z.number(), - }), + criteria: criteriaSchema.optional(), description: z.string(), display_order: z.number(), + guild_reward_items: z.array(nameIdKeySchema).optional(), is_account_wide: z.boolean(), - media: keyBaseSchema, + media: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + }), + ), + next_achievement: nameIdKeySchema.optional(), points: z.number(), + prerequisite_achievement: nameIdKeySchema.optional(), + requirements: z + .strictObject({ + faction: factionSchema, + }) + .optional(), + reward_description: z.string().optional(), + reward_item: nameIdKeySchema.optional(), }); diff --git a/generated/schemas/wow/auction-house.ts b/generated/schemas/wow/auction-house.ts index af9ea7e2..7ec503f5 100644 --- a/generated/schemas/wow/auction-house.ts +++ b/generated/schemas/wow/auction-house.ts @@ -10,19 +10,25 @@ const auctionHouseTimeLeftSchema = z.union([ ]); const auctionHousePostingSchema = z.strictObject({ - bid: z.number(), + bid: z.number().optional(), buyout: z.number(), id: z.number(), item: z.strictObject({ - bonus_lists: z.array(z.number()), - context: z.number(), + bonus_lists: z.array(z.number()).optional(), + context: z.number().optional(), id: z.number(), - modifiers: z.array( - z.strictObject({ - type: z.number(), - value: z.number(), - }), - ), + modifiers: z + .array( + z.strictObject({ + type: z.number(), + value: z.number(), + }), + ) + .optional(), + pet_breed_id: z.number().optional(), + pet_level: z.number().optional(), + pet_quality_id: z.number().optional(), + pet_species_id: z.number().optional(), }), quantity: z.number(), time_left: auctionHouseTimeLeftSchema, diff --git a/generated/schemas/wow/azerite-essence.ts b/generated/schemas/wow/azerite-essence.ts index 8946e349..1d7f84fb 100644 --- a/generated/schemas/wow/azerite-essence.ts +++ b/generated/schemas/wow/azerite-essence.ts @@ -37,8 +37,13 @@ export const azeriteEssenceSearchParametersSchema = baseSearchParametersSchema.e const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ - allowed_specializations: z.array(nameIdSchema), - name: z.record(localesSchema, z.string()), + allowed_specializations: z.array( + z.strictObject({ + id: z.number(), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + }), + ), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), }), }); diff --git a/generated/schemas/wow/character-achievements.ts b/generated/schemas/wow/character-achievements.ts index aede544c..359acfe2 100644 --- a/generated/schemas/wow/character-achievements.ts +++ b/generated/schemas/wow/character-achievements.ts @@ -34,10 +34,10 @@ const childCriterum3Schema = z.strictObject({ }); const categorySchema = z.strictObject({ - id: z.number(), + id: z.number().optional(), name: z.string(), - statistics: z.array(statisticSchema), - sub_categories: z.array(subCategorySchema), + statistics: z.array(statisticSchema).optional(), + sub_categories: z.array(subCategorySchema).optional(), }); const childCriterum2Schema = z.strictObject({ diff --git a/generated/schemas/wow/character-appearance.ts b/generated/schemas/wow/character-appearance.ts index 1e4fdb1d..08d20ad3 100644 --- a/generated/schemas/wow/character-appearance.ts +++ b/generated/schemas/wow/character-appearance.ts @@ -15,12 +15,15 @@ const itemSchema = z.strictObject({ enchant: z.number(), id: z.number(), internal_slot_id: z.number(), - item_appearance_modifier_id: z.number(), + item_appearance_modifier_id: z.number().optional(), + secondary_id: z.number().optional(), + secondary_item_appearance_modifier_id: z.number().optional(), + secondary_subclass: z.number().optional(), slot: z.strictObject({ name: z.string(), type: z.string(), }), - subclass: z.number(), + subclass: z.number().optional(), }); const rgbWithIdSchema = z.strictObject({ diff --git a/generated/schemas/wow/character-collections.ts b/generated/schemas/wow/character-collections.ts index 2eb5b4e8..5d6218c1 100644 --- a/generated/schemas/wow/character-collections.ts +++ b/generated/schemas/wow/character-collections.ts @@ -4,6 +4,7 @@ import { characterSchema, hrefSchema, keyBaseSchema, nameIdKeySchema, responseBa export const characterCollectionsIndexResponseSchema = responseBaseSchema.extend({ character: characterSchema, + decors: hrefSchema, heirlooms: hrefSchema, mounts: hrefSchema, pets: hrefSchema, @@ -30,11 +31,6 @@ const toySchema = z.strictObject({ toy: nameIdKeySchema, }); -const slotSchema = z.strictObject({ - name: z.string(), - type: z.string(), -}); - const qualitySchema = z.strictObject({ name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), @@ -47,6 +43,11 @@ const statsSchema = z.strictObject({ speed: z.number(), }); +const slotSlotSchema = z.strictObject({ + name: z.string(), + type: z.string(), +}); + export const characterHeirloomsCollectionSummaryResponseSchema = responseBaseSchema.extend({ heirlooms: z.array(heirloomSchema), }); @@ -78,12 +79,23 @@ export const characterToysCollectionSummaryResponseSchema = responseBaseSchema.e toys: z.array(toySchema), }); -export const characterTransmogCollectionSummaryResponseSchema = responseBaseSchema.extend({ - appearance_sets: z.array(nameIdKeySchema), - slots: z.array(slotSchema), +const slotSchema = z.strictObject({ + appearances: z.array( + keyBaseSchema.and( + z.strictObject({ + id: z.number(), + }), + ), + ), + slot: slotSlotSchema, }); export const characterPetsCollectionSummaryResponseSchema = responseBaseSchema.extend({ pets: z.array(petSchema), unlocked_battle_pet_slots: z.number(), }); + +export const characterTransmogCollectionSummaryResponseSchema = responseBaseSchema.extend({ + appearance_sets: z.array(nameIdKeySchema), + slots: z.array(slotSchema), +}); diff --git a/generated/schemas/wow/character-equipment.ts b/generated/schemas/wow/character-equipment.ts index 03e7f31e..781d4877 100644 --- a/generated/schemas/wow/character-equipment.ts +++ b/generated/schemas/wow/character-equipment.ts @@ -59,6 +59,8 @@ const sellPriceSchema = z.strictObject({ }); const socketSchema = z.strictObject({ + context: z.number().optional(), + display_color: colorSchema.optional(), display_string: z.string(), item: nameIdKeySchema, media: keyBaseSchema.and( @@ -88,8 +90,9 @@ const transmogSchema = z.strictObject({ item_modified_appearance_id: z.number(), }); -const itemElementSchema = nameIdKeySchema.extend({ +const itemElementSchema = z.strictObject({ is_equipped: z.boolean().optional(), + item: nameIdKeySchema, }); const playableClassesSchema = z.strictObject({ @@ -149,7 +152,7 @@ const equippedItemSchema = z.strictObject({ modified_appearance_id: z.number().optional(), modified_crafting_stat: z.array(modifiedCraftingStatSchema).optional(), name: z.string(), - name_description: nameDescriptionSchema, + name_description: nameDescriptionSchema.optional(), quality: nameTypeSchema, quantity: z.number(), requirements: requirementsSchema.optional(), diff --git a/generated/schemas/wow/character-profile.ts b/generated/schemas/wow/character-profile.ts index ea1b9506..8532b12e 100644 --- a/generated/schemas/wow/character-profile.ts +++ b/generated/schemas/wow/character-profile.ts @@ -23,11 +23,13 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ achievements: hrefSchema, achievements_statistics: hrefSchema, active_spec: nameIdKeySchema, - active_title: nameIdKeySchema.and( - z.strictObject({ - display_string: z.string(), - }), - ), + active_title: nameIdKeySchema + .and( + z.strictObject({ + display_string: z.string(), + }), + ) + .optional(), appearance: hrefSchema, average_item_level: z.number(), character_class: nameIdKeySchema, @@ -42,6 +44,7 @@ export const characterProfileSummaryResponseSchema = responseBaseSchema.extend({ guild: guildSchema, hunter_pets: hrefSchema, id: z.number(), + is_remix: z.boolean(), last_login_timestamp: z.number(), level: z.number(), media: hrefSchema, diff --git a/generated/schemas/wow/character-reputations.ts b/generated/schemas/wow/character-reputations.ts index 1a5148cf..61feb122 100644 --- a/generated/schemas/wow/character-reputations.ts +++ b/generated/schemas/wow/character-reputations.ts @@ -12,7 +12,8 @@ const standingSchema = z.strictObject({ max: z.number(), name: z.string(), raw: z.number(), - tier: z.number(), + renown_level: z.number().optional(), + tier: z.number().optional(), value: z.number(), }); diff --git a/packages/integration-tests/wow/achievements.integration.test.ts b/packages/integration-tests/wow/achievements.integration.test.ts index 884f0f27..27863f42 100644 --- a/packages/integration-tests/wow/achievements.integration.test.ts +++ b/packages/integration-tests/wow/achievements.integration.test.ts @@ -19,15 +19,32 @@ describe('wow achievements integration', () => { } expect(parsed.success).toBe(true); - // call a single achievement by id from the index - const first = parsed.success ? parsed.data.achievements[0] : undefined; - if (first) { - const ach = await client.sendRequest(wow.achievement(first.id)); - const parsedAch = achievementResponseSchema.safeParse(ach); - if (!parsedAch.success) { - console.error('Achievement detail validation failed:', treeifyError(parsedAch.error)); + // Pick up to 5 achievements at random from the index to fetch details + const achievements = parsed.success ? parsed.data.achievements : []; + const sampleSize = Math.min(5, achievements.length); + const sampled = + achievements.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + achievements.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : achievements.slice(0, sampleSize); + + const requests = []; + for (const achievement of sampled) { + requests.push(client.sendRequest(wow.achievement(achievement.id))); + } + + const responses = await Promise.all(requests); + + for (const achievement of responses) { + const parsedAchievement = achievementResponseSchema.safeParse(achievement); + if (!parsedAchievement.success) { + console.error( + 'Achievement detail validation failed for id', + achievement.id, + treeifyError(parsedAchievement.error), + ); } - expect(parsedAch.success).toBe(true); + expect(parsedAchievement.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-collections.integration.test.ts b/packages/integration-tests/wow/character-collections.integration.test.ts index b2d88c70..7a094541 100644 --- a/packages/integration-tests/wow/character-collections.integration.test.ts +++ b/packages/integration-tests/wow/character-collections.integration.test.ts @@ -5,31 +5,72 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { characterCollectionsIndexResponseSchema, + characterHeirloomsCollectionSummaryResponseSchema, + characterMountsCollectionSummaryResponseSchema, + characterPetsCollectionSummaryResponseSchema, + characterToysCollectionSummaryResponseSchema, characterTransmogCollectionSummaryResponseSchema, } from '../../../generated/schemas/wow'; -describe('wow character-collections integration', () => { - it('validates collections indices and summaries', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'eu', - secret: environment.blizzardClientSecret, - }); - const realm = 'laughing-skull'; - const character = 'putro'; - +describe.concurrent('wow character-collections integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + it('validates collections indices', async ({ expect }) => { const index = await client.sendRequest(wow.characterCollectionsIndex(realm, character)); const parsedIndex = characterCollectionsIndexResponseSchema.safeParse(index); if (!parsedIndex.success) { console.error('Character collections index validation failed:', treeifyError(parsedIndex.error)); } expect(parsedIndex.success).toBe(true); + }); + + it('validates heirlooms collection summary', async ({ expect }) => { + const heirlooms = await client.sendRequest(wow.characterHeirloomsCollectionSummary(realm, character)); + const parsedHeirlooms = characterHeirloomsCollectionSummaryResponseSchema.safeParse(heirlooms); + if (!parsedHeirlooms.success) { + console.error('Character heirlooms collection validation failed:', treeifyError(parsedHeirlooms.error)); + } + expect(parsedHeirlooms.success).toBe(true); + }); + + it('validates mounts collection summary', async ({ expect }) => { + const mounts = await client.sendRequest(wow.characterMountsCollectionSummary(realm, character)); + const parsedMounts = characterMountsCollectionSummaryResponseSchema.safeParse(mounts); + if (!parsedMounts.success) { + console.error('Character mounts collection validation failed:', treeifyError(parsedMounts.error)); + } + expect(parsedMounts.success).toBe(true); + }); + + it('validates pets collection summary', async ({ expect }) => { + const pets = await client.sendRequest(wow.characterPetsCollectionSummary(realm, character)); + const parsedPets = characterPetsCollectionSummaryResponseSchema.safeParse(pets); + if (!parsedPets.success) { + console.error('Character pets collection validation failed:', treeifyError(parsedPets.error)); + } + expect(parsedPets.success).toBe(true); + }); + + it('validates toys collection summary', async ({ expect }) => { + const toys = await client.sendRequest(wow.characterToysCollectionSummary(realm, character)); + const parsedToys = characterToysCollectionSummaryResponseSchema.safeParse(toys); + if (!parsedToys.success) { + console.error('Character toys collection validation failed:', treeifyError(parsedToys.error)); + } + expect(parsedToys.success).toBe(true); + }); + it('validates transmog collection summary', async ({ expect }) => { const transmog = await client.sendRequest(wow.characterTransmogCollectionSummary(realm, character)); const parsedTransmog = characterTransmogCollectionSummaryResponseSchema.safeParse(transmog); if (!parsedTransmog.success) { console.error('Character transmog collection validation failed:', treeifyError(parsedTransmog.error)); } expect(parsedTransmog.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts index d8b2784b..47d69944 100644 --- a/packages/integration-tests/wow/mount.integration.test.ts +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -38,8 +38,6 @@ describe('wow mount integration', () => { const parsedmount = mountResponseSchema.safeParse(mount); if (!parsedmount.success) { console.error('mount detail validation failed for id', mount.id, treeifyError(parsedmount.error)); - console.log('mount', mount); - console.log('parsedmount.error', parsedmount.error); } expect(parsedmount.success).toBe(true); } diff --git a/packages/wow/src/achievements/types.ts b/packages/wow/src/achievements/types.ts index 93112fa8..5af559c1 100644 --- a/packages/wow/src/achievements/types.ts +++ b/packages/wow/src/achievements/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Faction, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the achievement category index endpoint. @@ -54,14 +54,65 @@ export interface AchievementMediaResponse extends ResponseBase { */ export interface AchievementResponse extends NameId, ResponseBase { category: NameIdKey; - criteria: { - amount: number; - description: string; - id: number; - }; + criteria?: Criteria; description: string; display_order: number; + guild_reward_items?: Array; is_account_wide: boolean; - media: KeyBase; + media: KeyBase & { id: number }; + next_achievement?: NameIdKey; points: number; + prerequisite_achievement?: NameIdKey; + requirements?: { faction: Faction }; + reward_description?: string; + reward_item?: NameIdKey; +} + +interface ChildCriteria { + achievement?: NameIdKey; + amount: number; + child_criteria?: Array; + description: null | string; + faction?: Faction; + id: number; + is_gold?: boolean; + operator?: Operator; + show_progress_bar?: boolean; +} + +interface ChildCriteria2 { + achievement?: NameIdKey; + amount: number; + child_criteria?: Array; + description: null | string; + faction?: Faction; + id: number; + is_gold?: boolean; + operator?: Operator; + show_progress_bar?: boolean; +} + +interface ChildCriteria3 { + achievement?: NameIdKey; + amount: number; + description: null | string; + faction?: Faction; + id: number; + is_gold?: boolean; + operator?: Operator; + show_progress_bar?: boolean; +} + +interface Criteria { + amount: number; + child_criteria?: Array; + description: null | string; + faction?: Faction; + id: number; + operator?: Operator; + show_progress_bar?: boolean; +} +interface Operator { + name: string; + type: 'AND' | 'COMPLETE_AT_LEAST'; } diff --git a/packages/wow/src/auction-house/types.ts b/packages/wow/src/auction-house/types.ts index 3a05fed0..80da267b 100644 --- a/packages/wow/src/auction-house/types.ts +++ b/packages/wow/src/auction-house/types.ts @@ -31,14 +31,18 @@ interface AuctionHouseCommodity { } interface AuctionHousePosting { - bid: number; + bid?: number; buyout: number; id: number; item: { - bonus_lists: Array; - context: number; + bonus_lists?: Array; + context?: number; id: number; - modifiers: Array<{ type: number; value: number }>; + modifiers?: Array<{ type: number; value: number }>; + pet_breed_id?: number; + pet_level?: number; + pet_quality_id?: number; + pet_species_id?: number; }; quantity: number; time_left: AuctionHouseTimeLeft; diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index cd81da46..7938d53a 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -55,8 +55,8 @@ export interface AzeriteEssenceSearchResponse extends SearchResponseWithoutResul } interface AzeriteEssenceSearchResponseItem extends KeyBase { data: { - allowed_specializations: Array; - name: Record; + allowed_specializations: Array<{ id: number; name: Record }>; + name: Record; }; } diff --git a/packages/wow/src/character-achievements/types.ts b/packages/wow/src/character-achievements/types.ts index 79ea25e2..117947b6 100644 --- a/packages/wow/src/character-achievements/types.ts +++ b/packages/wow/src/character-achievements/types.ts @@ -23,10 +23,10 @@ interface Achievement { } interface Category { - id: number; + id?: number; name: string; - statistics: Array; - sub_categories: Array; + statistics?: Array; + sub_categories?: Array; } interface CategoryProgress { diff --git a/packages/wow/src/character-appearance/types.ts b/packages/wow/src/character-appearance/types.ts index a6da4bb0..edd9b187 100644 --- a/packages/wow/src/character-appearance/types.ts +++ b/packages/wow/src/character-appearance/types.ts @@ -39,9 +39,12 @@ interface Item { enchant: number; id: number; internal_slot_id: number; - item_appearance_modifier_id: number; + item_appearance_modifier_id?: number; + secondary_id?: number; + secondary_item_appearance_modifier_id?: number; + secondary_subclass?: number; slot: { name: string; type: string }; - subclass: number; + subclass?: number; } interface RGBWithId { diff --git a/packages/wow/src/character-collections/types.ts b/packages/wow/src/character-collections/types.ts index 27ef99d3..e849fbea 100644 --- a/packages/wow/src/character-collections/types.ts +++ b/packages/wow/src/character-collections/types.ts @@ -2,6 +2,7 @@ import type { Character, Href, KeyBase, NameIdKey, ResponseBase } from '@blizzar export interface CharacterCollectionsIndexResponse extends ResponseBase { character: Character; + decors: Href; heirlooms: Href; mounts: Href; pets: Href; @@ -63,10 +64,10 @@ interface Quality { interface Slot { appearances: Array; - slot: Slot; + slot: SlotSlot; } -interface Slot { +interface SlotSlot { name: string; type: string; } diff --git a/packages/wow/src/character-equipment/types.ts b/packages/wow/src/character-equipment/types.ts index 9fabd038..b605753a 100644 --- a/packages/wow/src/character-equipment/types.ts +++ b/packages/wow/src/character-equipment/types.ts @@ -67,7 +67,7 @@ interface EquippedItem { modified_appearance_id?: number; modified_crafting_stat?: Array; name: string; - name_description: NameDescription; + name_description?: NameDescription; quality: NameType; quantity: number; requirements?: Requirements; @@ -82,8 +82,9 @@ interface EquippedItem { weapon?: Weapon; } -interface ItemElement extends NameIdKey { +interface ItemElement { is_equipped?: boolean; + item: NameIdKey; } interface ModifiedCraftingStat { @@ -125,6 +126,8 @@ interface Set { } interface Socket { + context?: number; + display_color?: Color; display_string: string; item: NameIdKey; media: KeyBase & { id: number }; diff --git a/packages/wow/src/character-profile/types.ts b/packages/wow/src/character-profile/types.ts index 4a5f4852..1deef20c 100644 --- a/packages/wow/src/character-profile/types.ts +++ b/packages/wow/src/character-profile/types.ts @@ -10,7 +10,7 @@ export interface CharacterProfileSummaryResponse extends ResponseBase { achievements: Href; achievements_statistics: Href; active_spec: NameIdKey; - active_title: NameIdKey & { display_string: string }; + active_title?: NameIdKey & { display_string: string }; appearance: Href; average_item_level: number; character_class: NameIdKey; @@ -25,6 +25,7 @@ export interface CharacterProfileSummaryResponse extends ResponseBase { guild: Guild; hunter_pets: Href; id: number; + is_remix: boolean; last_login_timestamp: number; level: number; media: Href; diff --git a/packages/wow/src/character-reputations/types.ts b/packages/wow/src/character-reputations/types.ts index f51ba031..6802ca55 100644 --- a/packages/wow/src/character-reputations/types.ts +++ b/packages/wow/src/character-reputations/types.ts @@ -21,6 +21,7 @@ interface Standing { max: number; name: string; raw: number; - tier: number; + renown_level?: number; + tier?: number; value: number; } From fe65fcb1c88182438f0555aa708da75f9b662b06 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 4 Feb 2026 22:30:05 +0100 Subject: [PATCH 50/52] Added more retail wow integration tests and update types --- .../schemas/wow/mythic-keystone-affix.ts | 19 ++- .../wow/mythic-keystone-leaderboard.ts | 8 +- generated/schemas/wow/reputations.ts | 27 +++-- generated/schemas/wow/talent.ts | 57 +++++++-- generated/schemas/wow/tech-talent.ts | 27 ++++- .../mythic-keystone-affix.integration.test.ts | 61 ++++++++++ ...ythic-keystone-dungeon.integration.test.ts | 48 ++++++++ ...c-keystone-leaderboard.integration.test.ts | 33 ++++++ ...ythic-raid-leaderboard.integration.test.ts | 23 ++++ .../wow/pvp-tier.integration.test.ts | 60 ++++++++++ .../wow/reputations.integration.test.ts | 80 +++++++++++++ .../wow/talent.integration.test.ts | 109 ++++++++++++++++++ .../wow/tech-talent.integration.test.ts | 93 +++++++++++++++ .../wow/src/mythic-keystone-affix/types.ts | 12 +- .../src/mythic-keystone-leaderboard/types.ts | 8 +- packages/wow/src/reputations/types.ts | 23 ++-- packages/wow/src/talent/types.ts | 39 +++++-- packages/wow/src/tech-talent/types.ts | 17 ++- 18 files changed, 681 insertions(+), 63 deletions(-) create mode 100644 packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts create mode 100644 packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts create mode 100644 packages/integration-tests/wow/mythic-keystone-leaderboard.integration.test.ts create mode 100644 packages/integration-tests/wow/mythic-raid-leaderboard.integration.test.ts create mode 100644 packages/integration-tests/wow/pvp-tier.integration.test.ts create mode 100644 packages/integration-tests/wow/reputations.integration.test.ts create mode 100644 packages/integration-tests/wow/talent.integration.test.ts create mode 100644 packages/integration-tests/wow/tech-talent.integration.test.ts diff --git a/generated/schemas/wow/mythic-keystone-affix.ts b/generated/schemas/wow/mythic-keystone-affix.ts index a0059956..b54c0e64 100644 --- a/generated/schemas/wow/mythic-keystone-affix.ts +++ b/generated/schemas/wow/mythic-keystone-affix.ts @@ -1,13 +1,20 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { keyBaseSchema, mediaAssetSchema, responseBaseSchema } from '../core'; export const mythicKeystoneAffixIndexResponseSchema = responseBaseSchema.extend({ - affixes: z.array(nameIdKeySchema), + affixes: z.array( + keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().nullable(), + }), + ), + ), }); export const mythicKeystoneAffixMediaResponseSchema = responseBaseSchema.extend({ - assets: z.array(mediaAssetSchema), + assets: z.array(mediaAssetSchema).optional(), id: z.number(), }); @@ -15,7 +22,9 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -export const mythicKeystoneAffixResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - description: z.string(), +export const mythicKeystoneAffixResponseSchema = responseBaseSchema.extend({ + description: z.string().nullable(), + id: z.number(), media: mediaSchema, + name: z.string().nullable(), }); diff --git a/generated/schemas/wow/mythic-keystone-leaderboard.ts b/generated/schemas/wow/mythic-keystone-leaderboard.ts index 3213cdc7..600802f2 100644 --- a/generated/schemas/wow/mythic-keystone-leaderboard.ts +++ b/generated/schemas/wow/mythic-keystone-leaderboard.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { colorSchema, factionsSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { factionsSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const mythicKeystoneLeaderboardIndexResponseSchema = responseBaseSchema.extend({ current_leaderboards: z.array(nameIdKeySchema), @@ -11,11 +11,6 @@ const keystoneAffixElementSchema = z.strictObject({ starting_level: z.number(), }); -const mythicRatingSchema = z.strictObject({ - color: colorSchema, - rating: z.number(), -}); - const specializationSchema = keyBaseSchema.extend({ id: z.number(), }); @@ -42,7 +37,6 @@ const leadingGroupSchema = z.strictObject({ duration: z.number(), keystone_level: z.number(), members: z.array(memberSchema), - mythic_rating: mythicRatingSchema, ranking: z.number(), }); diff --git a/generated/schemas/wow/reputations.ts b/generated/schemas/wow/reputations.ts index affb5885..65b09aef 100644 --- a/generated/schemas/wow/reputations.ts +++ b/generated/schemas/wow/reputations.ts @@ -1,14 +1,16 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { factionSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const reputationFactionIndexResponseSchema = responseBaseSchema.extend({ factions: z.array(nameIdKeySchema), root_factions: z.array(nameIdKeySchema), }); -const reputationTiersSchema = keyBaseSchema.extend({ - id: z.number(), +const renownTierSchema = z.strictObject({ + level: z.number(), + name: z.string(), + rewards: z.array(nameIdKeySchema), }); const reputationTierSchema = keyBaseSchema.extend({ @@ -16,6 +18,10 @@ const reputationTierSchema = keyBaseSchema.extend({ name: z.string().optional(), }); +export const reputationTiersIndexResponseSchema = responseBaseSchema.extend({ + reputation_tiers: z.array(reputationTierSchema), +}); + const tierSchema = z.strictObject({ id: z.number(), max_value: z.number(), @@ -24,14 +30,17 @@ const tierSchema = z.strictObject({ }); export const reputationFactionResponseSchema = responseBaseSchema.extend({ - description: z.string(), + can_paragon: z.boolean().optional(), + description: z.string().optional(), + factions: z.array(nameIdKeySchema).optional(), + header_shows_bar: z.boolean().optional(), id: z.number(), + is_header: z.boolean().optional(), + is_renown: z.boolean().optional(), name: z.string(), - reputation_tiers: reputationTiersSchema, -}); - -export const reputationTiersIndexResponseSchema = responseBaseSchema.extend({ - reputation_tiers: z.array(reputationTierSchema), + player_faction: factionSchema.optional(), + renown_tiers: z.array(renownTierSchema).optional(), + reputation_tiers: reputationTierSchema.optional(), }); export const reputationTiersResponseSchema = responseBaseSchema.extend({ diff --git a/generated/schemas/wow/talent.ts b/generated/schemas/wow/talent.ts index 555e3ebb..50228630 100644 --- a/generated/schemas/wow/talent.ts +++ b/generated/schemas/wow/talent.ts @@ -10,6 +10,7 @@ export const pvpTalentResponseSchema = responseBaseSchema.extend({ compatible_slots: z.array(z.number()), description: z.string(), id: z.number(), + overrides_spell: nameIdKeySchema.optional(), playable_specialization: nameIdKeySchema, spell: nameIdKeySchema, unlock_player_level: z.number(), @@ -19,12 +20,8 @@ export const talentIndexResponseSchema = responseBaseSchema.extend({ talents: z.array(nameIdKeySchema), }); -const playableClassSchema = keyBaseSchema.extend({ - id: z.number(), -}); - const rankDescriptionSchema = z.strictObject({ - description: z.null(), + description: z.string().nullable(), rank: z.number(), }); @@ -69,13 +66,23 @@ const tooltipSpellTooltipSchema = z.strictObject({ export const talentResponseSchema = responseBaseSchema.extend({ id: z.number(), - playable_class: playableClassSchema, - rank_descriptions: z.array(rankDescriptionSchema), - spell: nameIdKeySchema, + overrides_spell: nameIdKeySchema.optional(), + playable_class: keyBaseSchema + .and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ) + .optional(), + playable_specialization: nameIdKeySchema.optional(), + rank_descriptions: z.array(rankDescriptionSchema).optional(), + spell: nameIdKeySchema.optional(), }); export const talentTreeIndexResponseSchema = responseBaseSchema.extend({ class_talent_trees: z.array(talentTreeSchema), + hero_talent_trees: z.array(nameIdKeySchema), spec_talent_trees: z.array(talentTreeSchema), }); @@ -86,6 +93,7 @@ const tooltipSchema = z.strictObject({ const rankSchema = z.strictObject({ choice_of_tooltips: z.array(tooltipSchema).optional(), + default_points: z.number().optional(), rank: z.number(), tooltip: tooltipSchema.optional(), }); @@ -100,10 +108,12 @@ const talentNodeSchema = z.strictObject({ display_col: z.number(), display_row: z.number(), id: z.number(), + locked_by: z.array(z.number()).optional(), node_type: nodeTypeSchema, ranks: z.array(rankSchema), raw_position_x: z.number(), raw_position_y: z.number(), + unlocks: z.array(z.number()).optional(), }); export const talentTreeNodesResponseSchema = responseBaseSchema.extend({ @@ -131,6 +141,21 @@ const classTalentNodeRankSchema = z.strictObject({ tooltip: tooltipSchema.optional(), }); +const heroTalentTreeNodeSchema = z.strictObject({ + display_col: z.number(), + display_row: z.number(), + id: z.number(), + locked_by: z.array(z.number()).optional(), + node_type: z.strictObject({ + id: z.number(), + type: z.union([z.literal('ACTIVE'), z.literal('CHOICE'), z.literal('PASSIVE')]), + }), + ranks: z.array(rankSchema), + raw_position_x: z.number(), + raw_position_y: z.number(), + unlocks: z.array(z.number()).optional(), +}); + const classTalentNodeSchema = z.strictObject({ display_col: z.number(), display_row: z.number(), @@ -143,11 +168,21 @@ const classTalentNodeSchema = z.strictObject({ unlocks: z.array(z.number()).optional(), }); +const heroTalentTreeSchema = nameIdSchema.extend({ + hero_talent_nodes: z.array(heroTalentTreeNodeSchema), + media: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + }), + ), + playable_class: nameIdKeySchema, + playable_specializations: z.array(nameIdKeySchema), +}); + export const talentTreeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ class_talent_nodes: z.array(classTalentNodeSchema), - media: z.strictObject({ - href: z.string(), - }), + hero_talent_trees: z.array(heroTalentTreeSchema), + media: keyBaseSchema, playable_class: nameIdKeySchema, playable_specialization: nameIdKeySchema, restriction_lines: z.array(restrictionLineSchema), diff --git a/generated/schemas/wow/tech-talent.ts b/generated/schemas/wow/tech-talent.ts index f2dbb3a1..202a7567 100644 --- a/generated/schemas/wow/tech-talent.ts +++ b/generated/schemas/wow/tech-talent.ts @@ -14,6 +14,15 @@ const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); +const spellTooltipSchema = z.strictObject({ + cast_time: z.string(), + cooldown: z.string().optional(), + description: z.string().nullable(), + power_cost: z.string().optional().nullable(), + range: z.string().optional(), + spell: nameIdKeySchema, +}); + const talentTreeSchema = keyBaseSchema.extend({ id: z.number(), name: z.string().optional(), @@ -22,14 +31,28 @@ const talentTreeSchema = keyBaseSchema.extend({ export const techTalentTreeResponseSchema = responseBaseSchema.extend({ id: z.number(), max_tiers: z.number(), - playable_class: nameIdKeySchema, + playable_class: nameIdKeySchema.optional(), talents: z.array(nameIdKeySchema), }); export const techTalentResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + description: z.string().optional(), display_order: z.number(), media: mediaSchema, - talent_tree: mediaSchema, + prerequisite_talent: nameIdKeySchema.optional(), + socket_type: z + .strictObject({ + name: z.string(), + type: z.union([z.literal('ENDURANCE'), z.literal('FINESSE'), z.literal('POTENCY')]), + }) + .optional(), + spell_tooltip: spellTooltipSchema.optional(), + talent_tree: keyBaseSchema.and( + z.strictObject({ + id: z.number(), + name: z.string().optional(), + }), + ), tier: z.number(), }); diff --git a/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts b/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts new file mode 100644 index 00000000..e628a3a8 --- /dev/null +++ b/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts @@ -0,0 +1,61 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + mythicKeystoneAffixIndexResponseSchema, + mythicKeystoneAffixMediaResponseSchema, + mythicKeystoneAffixResponseSchema, +} from '../../../generated/schemas/wow/mythic-keystone-affix'; + +describe('wow mythic-keystone-affix integration', () => { + it('validates index, detail and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.mythicKeystoneAffixIndex()); + const parsedIndex = mythicKeystoneAffixIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Mythic keystone affix index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const affixes = parsedIndex.success ? parsedIndex.data.affixes : []; + const sampleSize = Math.min(5, affixes.length); + const sampled = + affixes.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + affixes.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : affixes.slice(0, sampleSize); + + const detailRequests = []; + const mediaRequests = []; + + for (const a of sampled) { + detailRequests.push(client.sendRequest(wow.mythicKeystoneAffix(a.id))); + mediaRequests.push(client.sendRequest(wow.mythicKeystoneAffixMedia(a.id))); + } + + const details = await Promise.all(detailRequests); + for (const d of details) { + const parsed = mythicKeystoneAffixResponseSchema.safeParse(d); + if (!parsed.success) { + console.error('Mythic keystone affix detail validation failed for id', d.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + + const medias = await Promise.all(mediaRequests); + for (const m of medias) { + const parsed = mythicKeystoneAffixMediaResponseSchema.safeParse(m); + if (!parsed.success) { + console.error('Mythic keystone affix media validation failed for id', m.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts b/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts new file mode 100644 index 00000000..1f182634 --- /dev/null +++ b/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts @@ -0,0 +1,48 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + mythicKeystoneDungeonIndexResponseSchema, + mythicKeystoneDungeonResponseSchema, +} from '../../../generated/schemas/wow/mythic-keystone-dungeon'; + +describe('wow mythic-keystone-dungeon integration', () => { + it('validates dungeon index and details', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.mythicKeystoneDungeonIndex()); + const parsed = mythicKeystoneDungeonIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Mythic keystone dungeon index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const dungeons = parsed.success ? parsed.data.dungeons : []; + const sampleSize = Math.min(5, dungeons.length); + const sampled = + dungeons.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + dungeons.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : dungeons.slice(0, sampleSize); + + const requests = []; + for (const d of sampled) { + requests.push(client.sendRequest(wow.mythicKeystoneDungeon(d.id))); + } + + const responses = await Promise.all(requests); + for (const r of responses) { + const parsedResp = mythicKeystoneDungeonResponseSchema.safeParse(r); + if (!parsedResp.success) { + console.error('Mythic keystone dungeon detail validation failed for id', r.id, treeifyError(parsedResp.error)); + } + expect(parsedResp.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/mythic-keystone-leaderboard.integration.test.ts b/packages/integration-tests/wow/mythic-keystone-leaderboard.integration.test.ts new file mode 100644 index 00000000..513234c0 --- /dev/null +++ b/packages/integration-tests/wow/mythic-keystone-leaderboard.integration.test.ts @@ -0,0 +1,33 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + mythicKeystoneLeaderboardIndexResponseSchema, + mythicKeystoneLeaderboardResponseSchema, +} from '../../../generated/schemas/wow/mythic-keystone-leaderboard'; + +describe('wow mythic-keystone-leaderboard integration', () => { + it('fetches leaderboard index and a leaderboard for a connected realm', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.mythicKeystoneLeaderboardIndex(11)); + const parsedIndex = mythicKeystoneLeaderboardIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Mythic keystone leaderboard index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const leaderboard = await client.sendRequest(wow.mythicKeystoneLeaderboard(11, 197, 641)); + const parsedLeaderboard = mythicKeystoneLeaderboardResponseSchema.safeParse(leaderboard); + if (!parsedLeaderboard.success) { + console.error('Mythic keystone leaderboard validation failed:', treeifyError(parsedLeaderboard.error)); + } + expect(parsedLeaderboard.success).toBe(true); + }); +}); diff --git a/packages/integration-tests/wow/mythic-raid-leaderboard.integration.test.ts b/packages/integration-tests/wow/mythic-raid-leaderboard.integration.test.ts new file mode 100644 index 00000000..cea64c83 --- /dev/null +++ b/packages/integration-tests/wow/mythic-raid-leaderboard.integration.test.ts @@ -0,0 +1,23 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { mythicRaidLeaderboardResponseSchema } from '../../../generated/schemas/wow/mythic-raid-leaderboard'; + +describe('wow mythic-raid-leaderboard integration', () => { + it('fetches a raid leaderboard for a known instance slug', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(wow.mythicRaidLeaderboard('uldir', 'alliance')); + const parsedResp = mythicRaidLeaderboardResponseSchema.safeParse(resp); + if (!parsedResp.success) { + console.error('Mythic raid leaderboard validation failed for uldir', treeifyError(parsedResp.error)); + } + expect(parsedResp.success).toBe(true); + }); +}); diff --git a/packages/integration-tests/wow/pvp-tier.integration.test.ts b/packages/integration-tests/wow/pvp-tier.integration.test.ts new file mode 100644 index 00000000..f0880416 --- /dev/null +++ b/packages/integration-tests/wow/pvp-tier.integration.test.ts @@ -0,0 +1,60 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + pvpTierIndexResponseSchema, + pvpTierMediaResponseSchema, + pvpTierResponseSchema, +} from '../../../generated/schemas/wow/pvp-tier'; + +describe('wow pvp-tier integration', () => { + it('validates pvp tier index, detail and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.pvpTierIndex()); + const parsedIndex = pvpTierIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('PvP tier index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const tiers = parsedIndex.success ? parsedIndex.data.tiers : []; + const sampleSize = Math.min(5, tiers.length); + const sampled = + tiers.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + tiers.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : tiers.slice(0, sampleSize); + + const detailRequests = []; + const mediaRequests = []; + for (const t of sampled) { + detailRequests.push(client.sendRequest(wow.pvpTier(t.id))); + mediaRequests.push(client.sendRequest(wow.pvpTierMedia(t.id))); + } + + const details = await Promise.all(detailRequests); + for (const d of details) { + const parsed = pvpTierResponseSchema.safeParse(d); + if (!parsed.success) { + console.error('PvP tier detail validation failed for id', d.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + + const medias = await Promise.all(mediaRequests); + for (const m of medias) { + const parsed = pvpTierMediaResponseSchema.safeParse(m); + if (!parsed.success) { + console.error('PvP tier media validation failed for id', m.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }, 30_000); +}); diff --git a/packages/integration-tests/wow/reputations.integration.test.ts b/packages/integration-tests/wow/reputations.integration.test.ts new file mode 100644 index 00000000..b1354932 --- /dev/null +++ b/packages/integration-tests/wow/reputations.integration.test.ts @@ -0,0 +1,80 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + reputationFactionIndexResponseSchema, + reputationFactionResponseSchema, + reputationTiersIndexResponseSchema, + reputationTiersResponseSchema, +} from '../../../generated/schemas/wow/reputations'; + +describe('wow reputations integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + it('validates reputation factions', async ({ expect }) => { + const factions = await client.sendRequest(wow.reputationFactionIndex()); + const parsedFactions = reputationFactionIndexResponseSchema.safeParse(factions); + if (!parsedFactions.success) { + console.error('Reputation faction index validation failed:', treeifyError(parsedFactions.error)); + } + expect(parsedFactions.success).toBe(true); + + const factionItems = parsedFactions.success ? parsedFactions.data.factions : []; + const sampleSize = Math.min(5, factionItems.length); + const sampled = + factionItems.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + factionItems.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : factionItems.slice(0, sampleSize); + + const factionRequests = []; + for (const f of sampled) { + factionRequests.push(client.sendRequest(wow.reputationFaction(f.id))); + } + + const factionResponses = await Promise.all(factionRequests); + for (const fr of factionResponses) { + const parsed = reputationFactionResponseSchema.safeParse(fr); + if (!parsed.success) { + console.error('Reputation faction validation failed for id', fr.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); + it('validates reputation tiers', async ({ expect }) => { + const tiers = await client.sendRequest(wow.reputationTiersIndex()); + const parsedTiers = reputationTiersIndexResponseSchema.safeParse(tiers); + if (!parsedTiers.success) { + console.error('Reputation tiers index validation failed:', treeifyError(parsedTiers.error)); + } + expect(parsedTiers.success).toBe(true); + + const tierItems = parsedTiers.success ? parsedTiers.data.reputation_tiers : []; + const sampleSize = Math.min(5, tierItems.length); + const sampled = + tierItems.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + tierItems.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : tierItems.slice(0, sampleSize); + + const tierRequests = []; + for (const t of sampled) { + tierRequests.push(client.sendRequest(wow.reputationTiers(t.id))); + } + const tierResponses = await Promise.all(tierRequests); + for (const tr of tierResponses) { + const parsed = reputationTiersResponseSchema.safeParse(tr); + if (!parsed.success) { + console.error('Reputation tiers validation failed for id', tr.id, treeifyError(parsed.error)); + console.log('fr', tr); + console.log('parsed.error', parsed.error); + } + expect(parsed.success).toBe(true); + } + }); +}); diff --git a/packages/integration-tests/wow/talent.integration.test.ts b/packages/integration-tests/wow/talent.integration.test.ts new file mode 100644 index 00000000..4d5d2b83 --- /dev/null +++ b/packages/integration-tests/wow/talent.integration.test.ts @@ -0,0 +1,109 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + pvpTalentIndexResponseSchema, + pvpTalentResponseSchema, + talentIndexResponseSchema, + talentResponseSchema, + talentTreeIndexResponseSchema, + talentTreeNodesResponseSchema, + talentTreeResponseSchema, +} from '../../../generated/schemas/wow/talent'; + +describe.concurrent('wow talent integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + it('validates pvp talents', async ({ expect }) => { + const pvpIndex = await client.sendRequest(wow.pvpTalentIndex()); + const parsedPvpIndex = pvpTalentIndexResponseSchema.safeParse(pvpIndex); + if (!parsedPvpIndex.success) { + console.error('PvP talent index validation failed:', treeifyError(parsedPvpIndex.error)); + } + expect(parsedPvpIndex.success).toBe(true); + + const pvpTalents = parsedPvpIndex.success ? parsedPvpIndex.data.pvp_talents : []; + const sampleSize = Math.min(5, pvpTalents.length); + const sampled = + pvpTalents.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + pvpTalents.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : pvpTalents.slice(0, sampleSize); + + const requests = []; + for (const t of sampled) { + requests.push(client.sendRequest(wow.pvpTalent(t.id))); + } + const responses = await Promise.all(requests); + for (const resp of responses) { + const parsed = pvpTalentResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('PvP talent validation failed for id', resp.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); + it('validates talents', async ({ expect }) => { + const talentIndex = await client.sendRequest(wow.talentIndex()); + const parsedTalentIndex = talentIndexResponseSchema.safeParse(talentIndex); + if (!parsedTalentIndex.success) { + console.error('Talent index validation failed:', treeifyError(parsedTalentIndex.error)); + } + expect(parsedTalentIndex.success).toBe(true); + + const talents = parsedTalentIndex.success ? parsedTalentIndex.data.talents : []; + const sampleSize = Math.min(5, talents.length); + const sampled = + talents.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + talents.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : talents.slice(0, sampleSize); + const requests = []; + for (const t of sampled) { + requests.push(client.sendRequest(wow.talent(t.id))); + } + const responses = await Promise.all(requests); + for (const resp of responses) { + const parsed = talentResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Talent validation failed for id', resp.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); + it('validates talent trees', async ({ expect }) => { + const treeIndex = await client.sendRequest(wow.talentTreeIndex()); + const parsedTreeIndex = talentTreeIndexResponseSchema.safeParse(treeIndex); + if (!parsedTreeIndex.success) { + console.error('Talent tree index validation failed:', treeifyError(parsedTreeIndex.error)); + } + expect(parsedTreeIndex.success).toBe(true); + + const hunterSpecHeroCombinations = [ + { specId: 253, treeId: 774 }, + { specId: 254, treeId: 774 }, + { specId: 255, treeId: 774 }, + ]; + + for (const combo of hunterSpecHeroCombinations) { + const talentTree = await client.sendRequest(wow.talentTree(combo.treeId, combo.specId)); + const parsedTrees = talentTreeResponseSchema.safeParse(talentTree); + if (!parsedTrees.success) { + console.error('Talent tree validation failed for combo', combo, treeifyError(parsedTrees.error)); + } + expect(parsedTrees.success).toBe(true); + + const nodes = await client.sendRequest(wow.talentTreeNodes(combo.treeId)); + const parsedNodes = talentTreeNodesResponseSchema.safeParse(nodes); + if (!parsedNodes.success) { + console.error('Talent tree nodes validation failed for treeId', combo.treeId, treeifyError(parsedNodes.error)); + } + expect(parsedNodes.success).toBe(true); + } + }); +}); diff --git a/packages/integration-tests/wow/tech-talent.integration.test.ts b/packages/integration-tests/wow/tech-talent.integration.test.ts new file mode 100644 index 00000000..c25b02d4 --- /dev/null +++ b/packages/integration-tests/wow/tech-talent.integration.test.ts @@ -0,0 +1,93 @@ +import { createBlizzardApiClient } from '@blizzard-api/client'; +import * as wow from '@blizzard-api/wow'; +import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; +import { environment } from '../../../environment'; +import { + techTalentIndexResponseSchema, + techTalentMediaResponseSchema, + techTalentResponseSchema, + techTalentTreeIndexResponseSchema, + techTalentTreeResponseSchema, +} from '../../../generated/schemas/wow/tech-talent'; + +describe('wow tech-talent integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + it('validates tech talent index, detail, and media', async ({ expect }) => { + const index = await client.sendRequest(wow.techTalentIndex()); + const parsedIndex = techTalentIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Tech talent index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const talents = parsedIndex.success ? parsedIndex.data.talents : []; + const sampleSize = Math.min(5, talents.length); + const sampled = + talents.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + talents.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : talents.slice(0, sampleSize); + + const detailRequests = []; + const mediaRequests = []; + for (const t of sampled) { + detailRequests.push(client.sendRequest(wow.techTalent(t.id))); + mediaRequests.push(client.sendRequest(wow.techTalentMedia(t.id))); + } + + const details = await Promise.all(detailRequests); + for (const d of details) { + const parsed = techTalentResponseSchema.safeParse(d); + if (!parsed.success) { + console.error('Tech talent detail validation failed for id', d.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + + const medias = await Promise.all(mediaRequests); + for (const m of medias) { + const parsed = techTalentMediaResponseSchema.safeParse(m); + if (!parsed.success) { + console.error('Tech talent media validation failed for id', m, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); + it('validates tech talent trees', async ({ expect }) => { + const treeIndex = await client.sendRequest(wow.techTalentTreeIndex()); + const parsedTreeIndex = techTalentTreeIndexResponseSchema.safeParse(treeIndex); + if (!parsedTreeIndex.success) { + console.error('Tech talent tree index validation failed:', treeifyError(parsedTreeIndex.error)); + } + expect(parsedTreeIndex.success).toBe(true); + + const techTalentTrees = parsedTreeIndex.success ? parsedTreeIndex.data.talent_trees : []; + const sampleSize = Math.min(5, techTalentTrees.length); + + const sampled = + techTalentTrees.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + techTalentTrees.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : techTalentTrees.slice(0, sampleSize); + + const detailRequests = []; + + for (const t of sampled) { + detailRequests.push(client.sendRequest(wow.techTalentTree(t.id))); + } + + const details = await Promise.all(detailRequests); + for (const d of details) { + const parsed = techTalentTreeResponseSchema.safeParse(d); + if (!parsed.success) { + console.error('Tech talent tree validation failed for id', d.id, treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); +}); diff --git a/packages/wow/src/mythic-keystone-affix/types.ts b/packages/wow/src/mythic-keystone-affix/types.ts index 671d7ff7..252f2692 100644 --- a/packages/wow/src/mythic-keystone-affix/types.ts +++ b/packages/wow/src/mythic-keystone-affix/types.ts @@ -1,11 +1,11 @@ -import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { KeyBase, MediaAsset, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone affix index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface MythicKeystoneAffixIndexResponse extends ResponseBase { - affixes: Array; + affixes: Array; } /** @@ -13,7 +13,7 @@ export interface MythicKeystoneAffixIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface MythicKeystoneAffixMediaResponse extends ResponseBase { - assets: Array; + assets?: Array; id: number; } @@ -21,9 +21,11 @@ export interface MythicKeystoneAffixMediaResponse extends ResponseBase { * The response for a Mythic Keystone affix. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface MythicKeystoneAffixResponse extends NameId, ResponseBase { - description: string; +export interface MythicKeystoneAffixResponse extends ResponseBase { + description: null | string; + id: number; media: Media; + name: null | string; } interface Media extends KeyBase { diff --git a/packages/wow/src/mythic-keystone-leaderboard/types.ts b/packages/wow/src/mythic-keystone-leaderboard/types.ts index f0a61d29..09960075 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/types.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/types.ts @@ -1,4 +1,4 @@ -import type { Color, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone leaderboard index. @@ -34,7 +34,6 @@ interface LeadingGroup { duration: number; keystone_level: number; members: Array; - mythic_rating: MythicRating; ranking: number; } @@ -44,11 +43,6 @@ interface Member { specialization: Specialization; } -interface MythicRating { - color: Color; - rating: number; -} - interface Profile extends NameId { realm: Realm; } diff --git a/packages/wow/src/reputations/types.ts b/packages/wow/src/reputations/types.ts index 7f037289..73647a39 100644 --- a/packages/wow/src/reputations/types.ts +++ b/packages/wow/src/reputations/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Faction, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a reputation faction index. @@ -14,10 +14,17 @@ export interface ReputationFactionIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface ReputationFactionResponse extends ResponseBase { - description: string; + can_paragon?: boolean; + description?: string; + factions?: Array; + header_shows_bar?: boolean; id: number; + is_header?: boolean; + is_renown?: boolean; name: string; - reputation_tiers: ReputationTiers; + player_faction?: Faction; + renown_tiers?: Array; + reputation_tiers?: ReputationTier; } /** @@ -38,13 +45,15 @@ export interface ReputationTiersResponse extends ResponseBase { tiers: Array; } -interface ReputationTier extends KeyBase { - id: number; - name?: string; +interface RenownTier { + level: number; + name: string; + rewards: Array; } -interface ReputationTiers extends KeyBase { +interface ReputationTier extends KeyBase { id: number; + name?: string; } interface Tier { diff --git a/packages/wow/src/talent/types.ts b/packages/wow/src/talent/types.ts index 29e254d9..4ae36e60 100644 --- a/packages/wow/src/talent/types.ts +++ b/packages/wow/src/talent/types.ts @@ -16,6 +16,7 @@ export interface PvpTalentResponse extends ResponseBase { compatible_slots: Array; description: string; id: number; + overrides_spell?: NameIdKey; playable_specialization: NameIdKey; spell: NameIdKey; unlock_player_level: number; @@ -35,9 +36,11 @@ export interface TalentIndexResponse extends ResponseBase { */ export interface TalentResponse extends ResponseBase { id: number; - playable_class: PlayableClass; - rank_descriptions: Array; - spell: NameIdKey; + overrides_spell?: NameIdKey; + playable_class?: KeyBase & { id: number; name?: string }; + playable_specialization?: NameIdKey; + rank_descriptions?: Array; + spell?: NameIdKey; } /** @@ -46,6 +49,7 @@ export interface TalentResponse extends ResponseBase { */ export interface TalentTreeIndexResponse extends ResponseBase { class_talent_trees: Array; + hero_talent_trees: Array; spec_talent_trees: Array; } @@ -65,7 +69,8 @@ export interface TalentTreeNodesResponse extends ResponseBase { */ export interface TalentTreeResponse extends NameId, ResponseBase { class_talent_nodes: Array; - media: { href: string }; + hero_talent_trees: Array; + media: KeyBase; playable_class: NameIdKey; playable_specialization: NameIdKey; restriction_lines: Array; @@ -96,13 +101,28 @@ interface ClassTalentNodeRank { tooltip?: Tooltip; } -interface NodeType { +interface HeroTalentTree extends NameId { + hero_talent_nodes: Array; + media: KeyBase & { id: number }; + playable_class: NameIdKey; + playable_specializations: Array; +} + +interface HeroTalentTreeNode { + display_col: number; + display_row: number; id: number; - type: 'ACTIVE' | 'CHOICE' | 'PASSIVE'; + locked_by?: Array; + node_type: { id: number; type: 'ACTIVE' | 'CHOICE' | 'PASSIVE' }; + ranks: Array; + raw_position_x: number; + raw_position_y: number; + unlocks?: Array; } -interface PlayableClass extends KeyBase { +interface NodeType { id: number; + type: 'ACTIVE' | 'CHOICE' | 'PASSIVE'; } interface PurpleSpellTooltip { @@ -113,12 +133,13 @@ interface PurpleSpellTooltip { interface Rank { choice_of_tooltips?: Array; + default_points?: number; rank: number; tooltip?: Tooltip; } interface RankDescription { - description: null; + description: null | string; rank: number; } @@ -154,10 +175,12 @@ interface TalentNode { display_col: number; display_row: number; id: number; + locked_by?: Array; node_type: NodeType; ranks: Array; raw_position_x: number; raw_position_y: number; + unlocks?: Array; } interface TalentTree extends KeyBase { diff --git a/packages/wow/src/tech-talent/types.ts b/packages/wow/src/tech-talent/types.ts index 0ddc6e9f..3ab68c5a 100644 --- a/packages/wow/src/tech-talent/types.ts +++ b/packages/wow/src/tech-talent/types.ts @@ -21,9 +21,13 @@ export interface TechTalentMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface TechTalentResponse extends NameId, ResponseBase { + description?: string; display_order: number; media: Media; - talent_tree: Media; + prerequisite_talent?: NameIdKey; + socket_type?: { name: string; type: 'ENDURANCE' | 'FINESSE' | 'POTENCY' }; + spell_tooltip?: SpellTooltip; + talent_tree: KeyBase & { id: number; name?: string }; tier: number; } @@ -42,7 +46,7 @@ export interface TechTalentTreeIndexResponse extends ResponseBase { export interface TechTalentTreeResponse extends ResponseBase { id: number; max_tiers: number; - playable_class: NameIdKey; + playable_class?: NameIdKey; talents: Array; } @@ -50,6 +54,15 @@ interface Media extends KeyBase { id: number; } +interface SpellTooltip { + cast_time: string; + cooldown?: string; + description: null | string; + power_cost?: null | string; + range?: string; + spell: NameIdKey; +} + interface TalentTree extends KeyBase { id: number; name?: string; From c5fe9663f512460da653e5a995abc9089d730945 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 5 Feb 2026 01:28:27 +0100 Subject: [PATCH 51/52] Update integration tests for classic wow and retail wow, and update many types --- .../schemas/classic-wow/auction-house.ts | 6 +- .../schemas/classic-wow/connected-realm.ts | 38 +--- generated/schemas/classic-wow/creature.ts | 8 +- generated/schemas/classic-wow/item.ts | 10 +- .../schemas/classic-wow/playable-class.ts | 5 +- .../schemas/classic-wow/playable-race.ts | 1 + generated/schemas/classic-wow/pvp-season.ts | 10 +- generated/schemas/classic-wow/realm.ts | 17 +- generated/schemas/classic-wow/region.ts | 8 +- generated/schemas/core/base.ts | 10 +- generated/schemas/core/locales.ts | 2 - generated/schemas/d3/game-data.ts | 18 +- generated/schemas/wow/account-profile.ts | 2 +- generated/schemas/wow/achievements.ts | 5 +- generated/schemas/wow/azerite-essence.ts | 4 +- .../schemas/wow/character-collections.ts | 2 +- generated/schemas/wow/character-encounters.ts | 19 +- .../wow/character-mythic-keystone-profile.ts | 2 +- generated/schemas/wow/connected-realm.ts | 39 +--- generated/schemas/wow/covenant.ts | 27 +-- generated/schemas/wow/creature.ts | 4 +- generated/schemas/wow/guild.ts | 15 +- generated/schemas/wow/item.ts | 194 ++++++++++-------- generated/schemas/wow/modified-crafting.ts | 10 +- .../schemas/wow/mythic-keystone-dungeon.ts | 10 +- .../wow/mythic-keystone-leaderboard.ts | 6 +- generated/schemas/wow/pet.ts | 1 + generated/schemas/wow/playable-class.ts | 5 +- generated/schemas/wow/playable-race.ts | 1 + generated/schemas/wow/profession.ts | 20 +- generated/schemas/wow/pvp-season.ts | 14 +- generated/schemas/wow/quest.ts | 14 +- generated/schemas/wow/realm.ts | 17 +- generated/schemas/wow/region.ts | 8 +- generated/schemas/wow/spell.ts | 2 +- .../classic-wow/src/auction-house/types.ts | 4 +- .../classic-wow/src/connected-realm/types.ts | 23 ++- packages/classic-wow/src/creature/types.ts | 8 +- packages/classic-wow/src/item/types.ts | 10 +- .../classic-wow/src/playable-class/types.ts | 4 +- .../classic-wow/src/playable-race/types.ts | 1 + packages/classic-wow/src/pvp-season/types.ts | 6 +- packages/classic-wow/src/realm/types.ts | 18 +- packages/classic-wow/src/region/types.ts | 4 +- packages/core/src/base.ts | 10 +- packages/core/src/blizzard-api.ts | 8 +- packages/core/src/locales.ts | 2 - packages/d3/src/game-data/types.ts | 8 +- .../auction-house.integration.test.ts | 2 +- ...character-achievements.integration.test.ts | 2 +- .../character-equipment.integration.test.ts | 2 +- .../character-hunter-pets.integration.test.ts | 2 +- .../character-media.integration.test.ts | 2 +- .../character-profile.integration.test.ts | 2 +- ...aracter-specialization.integration.test.ts | 4 +- .../character-statistics.integration.test.ts | 2 +- .../connected-realm.integration.test.ts | 24 ++- .../classic-wow/creature.integration.test.ts | 175 ++++++++++++++-- .../guild-crest.integration.test.ts | 2 +- .../classic-wow/guild.integration.test.ts | 2 +- .../classic-wow/item.integration.test.ts | 2 +- .../media-search.integration.test.ts | 2 +- .../playable-class.integration.test.ts | 4 +- .../playable-race.integration.test.ts | 56 ++++- .../power-type.integration.test.ts | 2 +- .../pvp-season.integration.test.ts | 2 +- .../classic-wow/realm.integration.test.ts | 2 +- .../classic-wow/region.integration.test.ts | 2 +- .../wow/achievements.integration.test.ts | 68 +++++- .../wow/auction-house.integration.test.ts | 2 +- .../wow/azerite-essence.integration.test.ts | 38 +++- ...character-achievements.integration.test.ts | 2 +- .../character-appearance.integration.test.ts | 2 +- .../character-encounters.integration.test.ts | 23 ++- .../character-equipment.integration.test.ts | 2 +- .../character-hunter-pets.integration.test.ts | 2 +- .../wow/character-media.integration.test.ts | 2 +- ...ythic-keystone-profile.integration.test.ts | 34 ++- .../character-professions.integration.test.ts | 2 +- .../wow/character-profile.integration.test.ts | 2 +- .../wow/character-pvp.integration.test.ts | 24 ++- .../wow/character-quests.integration.test.ts | 21 +- .../character-reputations.integration.test.ts | 2 +- .../character-soulbinds.integration.test.ts | 2 +- ...racter-specializations.integration.test.ts | 2 +- .../character-statistics.integration.test.ts | 2 +- .../wow/character-titles.integration.test.ts | 2 +- .../wow/connected-realm.integration.test.ts | 19 +- .../wow/covenant.integration.test.ts | 16 +- .../wow/creature.integration.test.ts | 28 ++- .../wow/guild-crest.integration.test.ts | 2 +- .../wow/guild.integration.test.ts | 34 ++- .../wow/heirloom.integration.test.ts | 2 +- .../wow/item.integration.test.ts | 94 +++++++-- .../wow/journal.integration.test.ts | 50 ++++- .../wow/media-search.integration.test.ts | 2 +- .../wow/modified-crafting.integration.test.ts | 43 +++- .../wow/mount.integration.test.ts | 25 ++- .../mythic-keystone-affix.integration.test.ts | 2 +- ...ythic-keystone-dungeon.integration.test.ts | 2 +- .../wow/pet.integration.test.ts | 81 +++++++- .../wow/playable-class.integration.test.ts | 18 +- .../wow/playable-race.integration.test.ts | 22 +- ...layable-specialization.integration.test.ts | 10 +- .../wow/power-type.integration.test.ts | 14 +- .../wow/profession.integration.test.ts | 70 ++++++- .../wow/pvp-season.integration.test.ts | 37 +++- .../wow/pvp-tier.integration.test.ts | 2 +- .../wow/quest.integration.test.ts | 73 ++++++- .../wow/realm.integration.test.ts | 25 ++- .../wow/region.integration.test.ts | 2 +- .../wow/spell.integration.test.ts | 2 +- .../wow/title.integration.test.ts | 2 +- .../wow/toy.integration.test.ts | 2 +- .../wow/wow-token.integration.test.ts | 2 +- packages/wow/src/account-profile/types.ts | 2 +- packages/wow/src/achievements/types.ts | 5 +- packages/wow/src/azerite-essence/types.ts | 4 +- .../wow/src/character-collections/types.ts | 2 +- .../wow/src/character-encounters/types.ts | 16 +- .../types.ts | 2 +- packages/wow/src/connected-realm/types.ts | 23 ++- packages/wow/src/covenant/types.ts | 11 +- packages/wow/src/creature/types.ts | 4 +- packages/wow/src/guild/types.ts | 21 +- packages/wow/src/item/types.ts | 105 ++++++---- packages/wow/src/modified-crafting/types.ts | 6 +- .../wow/src/mythic-keystone-dungeon/types.ts | 6 +- .../src/mythic-keystone-leaderboard/types.ts | 4 +- packages/wow/src/pet/types.ts | 1 + packages/wow/src/playable-class/types.ts | 4 +- packages/wow/src/playable-race/types.ts | 1 + packages/wow/src/profession/types.ts | 13 +- packages/wow/src/pvp-season/types.ts | 11 +- packages/wow/src/quest/types.ts | 8 +- packages/wow/src/realm/types.ts | 20 +- packages/wow/src/region/types.ts | 4 +- packages/wow/src/spell/types.ts | 2 +- 138 files changed, 1533 insertions(+), 610 deletions(-) diff --git a/generated/schemas/classic-wow/auction-house.ts b/generated/schemas/classic-wow/auction-house.ts index 44505370..4225a2c5 100644 --- a/generated/schemas/classic-wow/auction-house.ts +++ b/generated/schemas/classic-wow/auction-house.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { hrefSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({ auctions: z.array(nameIdKeySchema), @@ -21,7 +21,5 @@ const auctionSchema = z.strictObject({ export const auctionsResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ auctions: z.array(auctionSchema), - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, }); diff --git a/generated/schemas/classic-wow/connected-realm.ts b/generated/schemas/classic-wow/connected-realm.ts index baddb500..0c7fa49f 100644 --- a/generated/schemas/classic-wow/connected-realm.ts +++ b/generated/schemas/classic-wow/connected-realm.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { baseSearchParametersSchema, + hrefSchema, keyBaseSchema, localesSchema, nameIdKeySchema, @@ -10,16 +11,13 @@ import { } from '../core'; export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ - connected_realms: z.array( - z.strictObject({ - href: z.string(), - }), - ), + connected_realms: z.array(hrefSchema), }); const realmPopulationCapitalizedSchema = z.union([ z.literal('FULL'), z.literal('HIGH'), + z.literal('LOCKED'), z.literal('LOW'), z.literal('MEDIUM'), z.literal('RECOMMENDED'), @@ -50,15 +48,11 @@ const realmCategorySchema = z.any(); const realmLocalesSchema = z.any(); -const realmTypeSchema = z.any(); - const realmTypeCapitalizedSchema = z.any(); const realmSchema = z.strictObject({ category: realmCategorySchema, - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, @@ -67,7 +61,7 @@ const realmSchema = z.strictObject({ slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.string(), type: realmTypeCapitalizedSchema, }), }); @@ -78,42 +72,32 @@ export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.e }); const searchRealmSchema = z.strictObject({ - category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + category: z.record(localesSchema, z.string()), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, name: z.record(localesSchema, z.union([z.string(), z.undefined()])), region: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), type: realmTypeCapitalizedSchema, }), }); export const connectedRealmResponseSchema = responseBaseSchema.extend({ - auctions: z.strictObject({ - href: z.string(), - }), + auctions: hrefSchema, has_queue: z.boolean(), id: z.number(), - mythic_leaderboards: z.strictObject({ - href: z.string(), - }), population: z.strictObject({ - name: z.union([ - z.literal('Full'), - z.literal('High'), - z.literal('Low'), - z.literal('Medium'), - z.literal('New Players'), - ]), + name: z.string(), type: realmPopulationCapitalizedSchema, }), + pvp_season: hrefSchema.optional(), realm_locked_status: realmLockedStatusSchema.optional(), realms: z.array(realmSchema), status: z.strictObject({ diff --git a/generated/schemas/classic-wow/creature.ts b/generated/schemas/classic-wow/creature.ts index 725214c2..72b00b58 100644 --- a/generated/schemas/classic-wow/creature.ts +++ b/generated/schemas/classic-wow/creature.ts @@ -47,7 +47,7 @@ const creatureSearchResponseItemSchema = keyBaseSchema.extend({ family: z .strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }) .optional(), id: z.number(), @@ -55,7 +55,7 @@ const creatureSearchResponseItemSchema = keyBaseSchema.extend({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), }), }); @@ -76,9 +76,9 @@ export const creatureDisplayMediaResponseSchema = responseBaseSchema.extend({ export const creatureFamilyResponseSchema = responseBaseSchema.extend({ id: z.number(), - media: mediaSchema, + media: mediaSchema.optional(), name: z.string(), - specialization: nameIdKeySchema, + specialization: nameIdKeySchema.optional(), }); export const creatureResponseSchema = responseBaseSchema.extend({ diff --git a/generated/schemas/classic-wow/item.ts b/generated/schemas/classic-wow/item.ts index 3bda0309..0019ce98 100644 --- a/generated/schemas/classic-wow/item.ts +++ b/generated/schemas/classic-wow/item.ts @@ -28,7 +28,7 @@ export const itemMediaResponseSchema = responseBaseSchema.extend({ }); const inventoryTypeSchema = z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), type: z.union([ z.literal('BACK'), z.literal('BAG'), @@ -55,7 +55,7 @@ const mediaSchema = keyBaseSchema.extend({ }); const itemQualitySchema = z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), type: z.union([ z.literal('ARTIFACT'), z.literal('COMMON'), @@ -81,18 +81,18 @@ const itemSearchResponseItemSchema = keyBaseSchema.extend({ is_stackable: z.boolean(), item_class: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), item_subclass: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), level: z.number(), max_count: z.number(), media: z.strictObject({ id: z.number(), }), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), purchase_price: z.number(), purchase_quantity: z.number(), quality: itemQualitySchema, diff --git a/generated/schemas/classic-wow/playable-class.ts b/generated/schemas/classic-wow/playable-class.ts index 4f1c7af1..8206a837 100644 --- a/generated/schemas/classic-wow/playable-class.ts +++ b/generated/schemas/classic-wow/playable-class.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { genderNameSchema, + hrefSchema, keyBaseSchema, mediaAssetSchema, nameIdKeySchema, @@ -28,8 +29,6 @@ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchem media: mediaSchema, playable_races: z.array(nameIdKeySchema), power_type: nameIdKeySchema, - pvp_talent_slots: z.strictObject({ - href: z.string(), - }), + pvp_talent_slots: hrefSchema, specializations: z.array(nameIdKeySchema).optional(), }); diff --git a/generated/schemas/classic-wow/playable-race.ts b/generated/schemas/classic-wow/playable-race.ts index bae69103..f356444e 100644 --- a/generated/schemas/classic-wow/playable-race.ts +++ b/generated/schemas/classic-wow/playable-race.ts @@ -12,4 +12,5 @@ export const playableRaceResponseSchema = nameIdSchema.extend(responseBaseSchema is_allied_race: z.boolean(), is_selectable: z.boolean(), playable_classes: z.array(nameIdKeySchema), + racial_spells: z.array(nameIdKeySchema), }); diff --git a/generated/schemas/classic-wow/pvp-season.ts b/generated/schemas/classic-wow/pvp-season.ts index ba4b7e4a..cdeb4986 100644 --- a/generated/schemas/classic-wow/pvp-season.ts +++ b/generated/schemas/classic-wow/pvp-season.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, responseBaseSchema } from '../core'; +import { hrefSchema, keyBaseSchema, responseBaseSchema } from '../core'; const seasonSchema = keyBaseSchema.extend({ id: z.number(), @@ -8,12 +8,8 @@ const seasonSchema = keyBaseSchema.extend({ export const pvpSeasonResponseSchema = responseBaseSchema.extend({ id: z.number(), - leaderboards: z.strictObject({ - href: z.string(), - }), - rewards: z.strictObject({ - href: z.string(), - }), + leaderboards: hrefSchema, + rewards: hrefSchema, season_name: z.string().optional(), season_start_timestamp: z.number(), }); diff --git a/generated/schemas/classic-wow/realm.ts b/generated/schemas/classic-wow/realm.ts index ceccdb2a..e1941b6d 100644 --- a/generated/schemas/classic-wow/realm.ts +++ b/generated/schemas/classic-wow/realm.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { baseSearchParametersSchema, + hrefSchema, keyBaseSchema, localesSchema, nameIdKeySchema, @@ -57,8 +58,6 @@ export const realmTimezoneSchema = z.union([ z.literal('Europe/Paris'), ]); -export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplaying')]); - export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ @@ -67,19 +66,19 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ const realmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ - category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + category: z.record(localesSchema, z.string()), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), region: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.string(), type: realmTypeCapitalizedSchema, }), }), @@ -87,16 +86,14 @@ const realmSearchResponseItemSchema = keyBaseSchema.extend({ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: realmCategorySchema, - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, is_tournament: z.boolean(), locale: realmLocalesSchema, region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.string(), type: realmTypeCapitalizedSchema, }), }); diff --git a/generated/schemas/classic-wow/region.ts b/generated/schemas/classic-wow/region.ts index 38363d3d..aff525ba 100644 --- a/generated/schemas/classic-wow/region.ts +++ b/generated/schemas/classic-wow/region.ts @@ -1,13 +1,9 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { nameIdSchema, responseBaseSchema } from '../core'; +import { hrefSchema, nameIdSchema, responseBaseSchema } from '../core'; export const regionIndexResponseSchema = responseBaseSchema.extend({ - regions: z.array( - z.strictObject({ - href: z.string(), - }), - ), + regions: z.array(hrefSchema), }); export const regionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ diff --git a/generated/schemas/core/base.ts b/generated/schemas/core/base.ts index aa0d8feb..08668e76 100644 --- a/generated/schemas/core/base.ts +++ b/generated/schemas/core/base.ts @@ -13,10 +13,10 @@ export const colorSchema = z.strictObject({ r: z.number(), }); -export const factionsSchema = z.union([z.literal('ALLIANCE'), z.literal('HORDE')]); +export const factionsSchema = z.union([z.literal('ALLIANCE'), z.literal('HORDE'), z.literal('NEUTRAL')]); export const genderSchema = z.strictObject({ - name: z.union([z.literal('Female'), z.literal('Male')]), + name: z.string(), type: z.union([z.literal('FEMALE'), z.literal('MALE')]), }); @@ -46,7 +46,9 @@ export const nameIdSchema = z.strictObject({ export const nameIdKeySchema = keyBaseSchema.extend(nameIdSchema.shape); -export const realmSchema = nameIdKeySchema.extend({ +export const realmSchema = keyBaseSchema.extend({ + id: z.number(), + name: z.string().optional(), slug: z.string(), }); @@ -61,6 +63,6 @@ export const characterSchema = nameIdKeySchema.extend({ }); export const factionSchema = z.strictObject({ - name: z.union([z.literal('Alliance'), z.literal('Horde')]), + name: z.string(), type: factionsSchema, }); diff --git a/generated/schemas/core/locales.ts b/generated/schemas/core/locales.ts index 14dd0b57..764f5546 100644 --- a/generated/schemas/core/locales.ts +++ b/generated/schemas/core/locales.ts @@ -10,9 +10,7 @@ export const localesSchema = z.union([ z.literal('fr_FR'), z.literal('it_IT'), z.literal('ko_KR'), - z.literal('multi'), z.literal('pt_BR'), - z.literal('pt_PT'), z.literal('ru_RU'), z.literal('zh_CN'), z.literal('zh_TW'), diff --git a/generated/schemas/d3/game-data.ts b/generated/schemas/d3/game-data.ts index df58a56b..cd470489 100644 --- a/generated/schemas/d3/game-data.ts +++ b/generated/schemas/d3/game-data.ts @@ -1,14 +1,10 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { responseBaseSchema } from '../core'; +import { hrefSchema, responseBaseSchema } from '../core'; export const eraIndexResponseSchema = responseBaseSchema.extend({ current_era: z.number(), - era: z.array( - z.strictObject({ - href: z.string(), - }), - ), + era: z.array(hrefSchema), generated_by: z.string(), last_update_time: z.string(), }); @@ -17,11 +13,7 @@ export const seasonIndexResponseSchema = responseBaseSchema.extend({ current_season: z.number(), generated_by: z.string(), last_update_time: z.string(), - season: z.array( - z.strictObject({ - href: z.string(), - }), - ), + season: z.array(hrefSchema), service_current_season: z.number(), service_season_state: z.string(), }); @@ -29,9 +21,7 @@ export const seasonIndexResponseSchema = responseBaseSchema.extend({ const leaderboardSchema = z.strictObject({ hardcore: z.boolean().optional(), hero_class_string: z.string().optional(), - ladder: z.strictObject({ - href: z.string(), - }), + ladder: hrefSchema, team_size: z.number().optional(), }); diff --git a/generated/schemas/wow/account-profile.ts b/generated/schemas/wow/account-profile.ts index 555d7cea..5da584d6 100644 --- a/generated/schemas/wow/account-profile.ts +++ b/generated/schemas/wow/account-profile.ts @@ -72,7 +72,7 @@ const characterSchema = z.strictObject({ }); const qualitySchema = z.strictObject({ - name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + name: z.string(), type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), }); diff --git a/generated/schemas/wow/achievements.ts b/generated/schemas/wow/achievements.ts index f9299cf9..2e05a12a 100644 --- a/generated/schemas/wow/achievements.ts +++ b/generated/schemas/wow/achievements.ts @@ -28,8 +28,9 @@ export const achievementCategoryResponseSchema = nameIdSchema.extend(responseBas }), }), display_order: z.number(), - isGuildCategory: z.boolean(), - parent_category: nameIdKeySchema, + is_guild_category: z.boolean(), + parent_category: nameIdKeySchema.optional(), + subcategories: z.array(nameIdKeySchema).optional(), }); export const achievementIndexResponseSchema = responseBaseSchema.extend({ diff --git a/generated/schemas/wow/azerite-essence.ts b/generated/schemas/wow/azerite-essence.ts index 1d7f84fb..ee4afa62 100644 --- a/generated/schemas/wow/azerite-essence.ts +++ b/generated/schemas/wow/azerite-essence.ts @@ -40,10 +40,10 @@ const azeriteEssenceSearchResponseItemSchema = keyBaseSchema.extend({ allowed_specializations: z.array( z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), ), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), }); diff --git a/generated/schemas/wow/character-collections.ts b/generated/schemas/wow/character-collections.ts index 5d6218c1..d3769854 100644 --- a/generated/schemas/wow/character-collections.ts +++ b/generated/schemas/wow/character-collections.ts @@ -32,7 +32,7 @@ const toySchema = z.strictObject({ }); const qualitySchema = z.strictObject({ - name: z.union([z.literal('Common'), z.literal('Poor'), z.literal('Rare'), z.literal('Uncommon')]), + name: z.string(), type: z.union([z.literal('COMMON'), z.literal('POOR'), z.literal('RARE'), z.literal('UNCOMMON')]), }); diff --git a/generated/schemas/wow/character-encounters.ts b/generated/schemas/wow/character-encounters.ts index 1765c855..8599050f 100644 --- a/generated/schemas/wow/character-encounters.ts +++ b/generated/schemas/wow/character-encounters.ts @@ -9,12 +9,14 @@ export const characterEncountersSummaryResponseSchema = responseBaseSchema.exten }); const dungeonDifficultiesSchema = z.strictObject({ - name: z.union([z.literal('Heroic'), z.literal('Mythic'), z.literal('Mythic+ Dungeons'), z.literal('Normal')]), - type: z.union([z.literal('HEROIC'), z.literal('MYTHIC'), z.literal('MYTHIC_KEYSTONE'), z.literal('NORMAL')]), + name: z.string().optional(), + type: z + .union([z.literal('HEROIC'), z.literal('MYTHIC'), z.literal('MYTHIC_KEYSTONE'), z.literal('NORMAL')]) + .optional(), }); const statusSchema = z.strictObject({ - name: z.union([z.literal('Complete'), z.literal('In Progress')]), + name: z.string(), type: z.union([z.literal('COMPLETE'), z.literal('IN_PROGRESS')]), }); @@ -31,16 +33,7 @@ const progressSchema = z.strictObject({ }); const raidDifficultiesSchema = z.strictObject({ - name: z.union([ - z.literal('10 Player'), - z.literal('10 Player (Heroic)'), - z.literal('25 Player'), - z.literal('25 Player (Heroic)'), - z.literal('Heroic'), - z.literal('Mythic'), - z.literal('Normal'), - z.literal('Raid Finder'), - ]), + name: z.string(), type: z.union([ z.literal('HEROIC'), z.literal('LEGACY_10_MAN'), diff --git a/generated/schemas/wow/character-mythic-keystone-profile.ts b/generated/schemas/wow/character-mythic-keystone-profile.ts index db5fc49f..4270bf91 100644 --- a/generated/schemas/wow/character-mythic-keystone-profile.ts +++ b/generated/schemas/wow/character-mythic-keystone-profile.ts @@ -59,7 +59,7 @@ const bestRunSchema = z.strictObject({ export const characterMythicKeystoneSeasonDetailsResponseSchema = responseBaseSchema.extend({ best_runs: z.array(bestRunSchema), - character: nameIdKeySchema, + character: characterSchema, mythic_rating: mythicRatingSchema, season: keyBaseSchema.and( z.strictObject({ diff --git a/generated/schemas/wow/connected-realm.ts b/generated/schemas/wow/connected-realm.ts index baddb500..e183ec96 100644 --- a/generated/schemas/wow/connected-realm.ts +++ b/generated/schemas/wow/connected-realm.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { baseSearchParametersSchema, + hrefSchema, keyBaseSchema, localesSchema, nameIdKeySchema, @@ -10,11 +11,7 @@ import { } from '../core'; export const connectedRealmIndexResponseSchema = responseBaseSchema.extend({ - connected_realms: z.array( - z.strictObject({ - href: z.string(), - }), - ), + connected_realms: z.array(hrefSchema), }); const realmPopulationCapitalizedSchema = z.union([ @@ -50,15 +47,11 @@ const realmCategorySchema = z.any(); const realmLocalesSchema = z.any(); -const realmTypeSchema = z.any(); - const realmTypeCapitalizedSchema = z.any(); const realmSchema = z.strictObject({ category: realmCategorySchema, - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, @@ -67,7 +60,7 @@ const realmSchema = z.strictObject({ slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.string(), type: realmTypeCapitalizedSchema, }), }); @@ -78,40 +71,30 @@ export const connectedRealmSearchParametersSchema = baseSearchParametersSchema.e }); const searchRealmSchema = z.strictObject({ - category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + category: z.record(localesSchema, z.string()), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), region: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), type: realmTypeCapitalizedSchema, }), }); export const connectedRealmResponseSchema = responseBaseSchema.extend({ - auctions: z.strictObject({ - href: z.string(), - }), + auctions: hrefSchema, has_queue: z.boolean(), id: z.number(), - mythic_leaderboards: z.strictObject({ - href: z.string(), - }), + mythic_leaderboards: hrefSchema, population: z.strictObject({ - name: z.union([ - z.literal('Full'), - z.literal('High'), - z.literal('Low'), - z.literal('Medium'), - z.literal('New Players'), - ]), + name: z.string(), type: realmPopulationCapitalizedSchema, }), realm_locked_status: realmLockedStatusSchema.optional(), diff --git a/generated/schemas/wow/covenant.ts b/generated/schemas/wow/covenant.ts index a7bafeff..f807ada8 100644 --- a/generated/schemas/wow/covenant.ts +++ b/generated/schemas/wow/covenant.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { keyBaseSchema, mediaAssetSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const conduitIndexResponseSchema = responseBaseSchema.extend({ conduits: z.array(nameIdKeySchema), @@ -15,6 +15,10 @@ export const covenantIndexResponseSchema = responseBaseSchema.extend({ covenants: z.array(nameIdKeySchema), }); +export const covenantMediaResponseSchema = responseBaseSchema.extend({ + assets: z.array(mediaAssetSchema).optional(), +}); + const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); @@ -77,17 +81,6 @@ const signatureAbilitySchema = z.strictObject({ spell_tooltip: signatureAbilitySpellTooltipSchema, }); -export const covenantResponseSchema = responseBaseSchema.extend({ - class_abilities: z.array(classAbilitySchema).optional(), - description: z.string(), - id: z.number(), - media: mediaSchema.optional(), - name: z.string(), - renown_rewards: z.array(renownRewardSchema), - signature_ability: signatureAbilitySchema.optional(), - soulbinds: z.array(nameIdKeySchema).optional(), -}); - export const conduitResponseSchema = responseBaseSchema.extend({ id: z.number(), item: nameIdKeySchema, @@ -96,13 +89,13 @@ export const conduitResponseSchema = responseBaseSchema.extend({ socket_type: socketTypeSchema, }); -export const covenantMediaResponseSchema = responseBaseSchema.extend({ - class_abilities: z.array(classAbilitySchema), +export const covenantResponseSchema = responseBaseSchema.extend({ + class_abilities: z.array(classAbilitySchema).optional(), description: z.string(), id: z.number(), - media: mediaSchema, + media: mediaSchema.optional(), name: z.string(), renown_rewards: z.array(renownRewardSchema), - signature_ability: signatureAbilitySchema, - soulbinds: z.array(nameIdKeySchema), + signature_ability: signatureAbilitySchema.optional(), + soulbinds: z.array(nameIdKeySchema).optional(), }); diff --git a/generated/schemas/wow/creature.ts b/generated/schemas/wow/creature.ts index 725214c2..9dcd136e 100644 --- a/generated/schemas/wow/creature.ts +++ b/generated/schemas/wow/creature.ts @@ -47,7 +47,7 @@ const creatureSearchResponseItemSchema = keyBaseSchema.extend({ family: z .strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }) .optional(), id: z.number(), @@ -55,7 +55,7 @@ const creatureSearchResponseItemSchema = keyBaseSchema.extend({ name: z.record(localesSchema, z.union([z.string(), z.undefined()])), type: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), }), }); diff --git a/generated/schemas/wow/guild.ts b/generated/schemas/wow/guild.ts index 2ec6d9d5..63d6fd43 100644 --- a/generated/schemas/wow/guild.ts +++ b/generated/schemas/wow/guild.ts @@ -4,6 +4,7 @@ import { characterSchema, colorSchema, factionSchema, + factionsSchema, hrefSchema, keyBaseSchema, nameIdKeySchema, @@ -32,6 +33,14 @@ const characterAchievementSchema = z.strictObject({ character: characterSchema, }); +const encounterActivitySchema = z.strictObject({ + encounter: nameIdKeySchema, + mode: z.strictObject({ + name: z.string(), + type: z.literal('MYTHIC'), + }), +}); + const rgbWithIdSchema = z.strictObject({ id: z.number(), rgba: colorSchema, @@ -65,6 +74,9 @@ const playableSchema = keyBaseSchema.extend({ }); const rosterMemberCharacterSchema = characterSchema.extend({ + faction: z.strictObject({ + type: factionsSchema, + }), level: z.number(), playable_class: playableSchema, playable_race: playableSchema, @@ -81,7 +93,8 @@ const activityElementSchema = z.strictObject({ activity: z.strictObject({ type: z.string(), }), - character_achievement: characterAchievementSchema, + character_achievement: characterAchievementSchema.optional(), + encounter_completed: encounterActivitySchema.optional(), timestamp: z.number(), }); diff --git a/generated/schemas/wow/item.ts b/generated/schemas/wow/item.ts index 40819057..320bfbf2 100644 --- a/generated/schemas/wow/item.ts +++ b/generated/schemas/wow/item.ts @@ -27,80 +27,15 @@ export const itemMediaResponseSchema = responseBaseSchema.extend({ id: z.number(), }); -const inventoryTypeSchema = z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.union([ - z.literal('BACK'), - z.literal('BAG'), - z.literal('CHEST'), - z.literal('FEET'), - z.literal('FINGER'), - z.literal('HANDS'), - z.literal('HEAD'), - z.literal('LEGS'), - z.literal('NECK'), - z.literal('NON_EQUIP'), - z.literal('SHIRT'), - z.literal('SHOULDER'), - z.literal('TABARD'), - z.literal('TRINKET'), - z.literal('TWOHWEAPON'), - z.literal('WAIST'), - z.literal('WRIST'), - ]), -}); - const mediaSchema = keyBaseSchema.extend({ id: z.number(), }); -const itemQualitySchema = z.strictObject({ - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - type: z.union([ - z.literal('ARTIFACT'), - z.literal('COMMON'), - z.literal('EPIC'), - z.literal('HEIRLOOM'), - z.literal('LEGENDARY'), - z.literal('POOR'), - z.literal('RARE'), - z.literal('UNCOMMON'), - ]), -}); - export const itemSearchParametersSchema = baseSearchParametersSchema.extend({ locale: localesSchema, name: z.string(), }); -const itemSearchResponseItemSchema = keyBaseSchema.extend({ - data: z.strictObject({ - id: z.number(), - inventory_type: inventoryTypeSchema, - is_equippable: z.boolean(), - is_stackable: z.boolean(), - item_class: z.strictObject({ - id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - }), - item_subclass: z.strictObject({ - id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - }), - level: z.number(), - max_count: z.number(), - media: z.strictObject({ - id: z.number(), - }), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), - purchase_price: z.number(), - purchase_quantity: z.number(), - quality: itemQualitySchema, - required_level: z.number(), - sell_price: z.number(), - }), -}); - export const itemSetIndexResponseSchema = responseBaseSchema.extend({ item_sets: z.array(nameIdKeySchema), }); @@ -113,9 +48,9 @@ const effectSchema = z.strictObject({ export const itemSubClassResponseSchema = responseBaseSchema.extend({ class_id: z.number(), display_name: z.string(), - hide_subclass_in_tooltips: z.boolean(), + hide_subclass_in_tooltips: z.boolean().optional(), subclass_id: z.number(), - verbose_name: z.string(), + verbose_name: z.string().optional(), }); const displaySchema = z.strictObject({ @@ -138,11 +73,103 @@ const durabilitySchema = z.strictObject({ value: z.number(), }); +const inventoryTypeSchema = z.union([ + z.literal('BACK'), + z.literal('CHEST'), + z.literal('FEET'), + z.literal('FINGER'), + z.literal('HAND'), + z.literal('HANDS'), + z.literal('HEAD'), + z.literal('LEGS'), + z.literal('NECK'), + z.literal('SHOULDER'), + z.literal('THROWN'), + z.literal('TRINKET'), + z.literal('WAIST'), + z.literal('WRIST'), + z.literal('RANGED'), + z.literal('TWOHWEAPON'), + z.literal('WEAPON'), + z.literal('WEAPONMAINHAND'), + z.literal('WEAPONOFFHAND'), + z.literal('BAG'), + z.literal('NON_EQUIP'), + z.literal('SHIRT'), + z.literal('TABARD'), +]); + +const inventoryTypeNameSchema = z.strictObject({ + name: z.string(), + type: inventoryTypeSchema, +}); + +const inventoryTypeNameFromSearchSchema = z.strictObject({ + name: z.record(localesSchema, z.string()), + type: inventoryTypeSchema, +}); + +const itemQualityTypeSchema = z.union([ + z.literal('ARTIFACT'), + z.literal('COMMON'), + z.literal('EPIC'), + z.literal('HEIRLOOM'), + z.literal('LEGENDARY'), + z.literal('POOR'), + z.literal('RARE'), + z.literal('UNCOMMON'), +]); + +const itemQualityFromSearchSchema = z.strictObject({ + name: z.record(localesSchema, z.string()), + type: itemQualityTypeSchema, +}); + +const itemSearchResponseItemSchema = keyBaseSchema.extend({ + data: z.strictObject({ + appearances: z + .array( + z.strictObject({ + id: z.number(), + }), + ) + .optional(), + id: z.number(), + inventory_type: inventoryTypeNameFromSearchSchema, + is_equippable: z.boolean(), + is_stackable: z.boolean(), + item_class: z.strictObject({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), + item_subclass: z.strictObject({ + id: z.number(), + name: z.record(localesSchema, z.string()), + }), + level: z.number(), + max_count: z.number(), + media: z.strictObject({ + id: z.number(), + }), + name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + purchase_price: z.number(), + purchase_quantity: z.number(), + quality: itemQualityFromSearchSchema, + required_level: z.number(), + sell_price: z.number(), + }), +}); + const armorSchema = z.strictObject({ display: displaySchema, value: z.number(), }); +const itemQualitySchema = z.strictObject({ + name: z.string(), + type: itemQualityTypeSchema, +}); + const requirementsSchema = z.strictObject({ level: durabilitySchema, }); @@ -165,23 +192,17 @@ const recipeItemDisplayStringsSchema = z.strictObject({ silver: z.string(), }); -const statTypeSchema = z.union([ - z.literal('Agility'), - z.literal('Critical Strike'), - z.literal('Haste'), - z.literal('Intellect'), - z.literal('Mastery'), - z.literal('Stamina'), - z.literal('Strength'), - z.literal('Versatility'), -]); - const statTypeCapitalizedSchema = z.union([ z.literal('AGILITY'), + z.literal('ARCANE_RESISTANCE'), z.literal('CRIT_RATING'), + z.literal('FIRE_RESISTANCE'), + z.literal('FROST_RESISTANCE'), z.literal('HASTE_RATING'), z.literal('INTELLECT'), z.literal('MASTERY'), + z.literal('NATURE_RESISTANCE'), + z.literal('SHADOW_RESISTANCE'), z.literal('STAMINA'), z.literal('STRENGTH'), z.literal('VERSATILITY'), @@ -202,7 +223,7 @@ const statSchema = z.strictObject({ display: displaySchema, is_negated: z.boolean().optional(), type: z.strictObject({ - name: statTypeSchema, + name: z.string(), type: statTypeCapitalizedSchema, }), value: z.number(), @@ -215,7 +236,7 @@ const recipeItemSchema = z.strictObject({ type: z.string(), }), durability: durabilitySchema, - inventory_type: inventoryTypeSchema, + inventory_type: inventoryTypeNameSchema, item: mediaSchema, item_class: nameIdKeySchema, item_subclass: nameIdKeySchema, @@ -258,7 +279,7 @@ const previewItemSchema = z.strictObject({ crafting_reagent: z.string().optional(), description: z.string().optional(), durability: durabilitySchema.optional(), - inventory_type: inventoryTypeSchema, + inventory_type: inventoryTypeNameSchema, is_subclass_hidden: z.boolean().optional(), item: mediaSchema, item_class: nameIdKeySchema, @@ -278,8 +299,17 @@ const previewItemSchema = z.strictObject({ }); export const itemResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ + appearances: z + .array( + keyBaseSchema.and( + z.strictObject({ + id: z.number(), + }), + ), + ) + .optional(), description: z.string().optional(), - inventory_type: inventoryTypeSchema, + inventory_type: inventoryTypeNameSchema, is_equippable: z.boolean(), is_stackable: z.boolean(), item_class: nameIdKeySchema, diff --git a/generated/schemas/wow/modified-crafting.ts b/generated/schemas/wow/modified-crafting.ts index 4661bbf8..609b7421 100644 --- a/generated/schemas/wow/modified-crafting.ts +++ b/generated/schemas/wow/modified-crafting.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { hrefSchema, keyBaseSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const modifiedCraftingCategoryIndexResponseSchema = responseBaseSchema.extend({ categories: z.array( @@ -19,12 +19,8 @@ export const modifiedCraftingCategoryResponseSchema = responseBaseSchema.extend( }); export const modifiedCraftingIndexResponseSchema = responseBaseSchema.extend({ - categories: z.strictObject({ - href: z.string(), - }), - slot_types: z.strictObject({ - href: z.string(), - }), + categories: hrefSchema, + slot_types: hrefSchema, }); const slotTypeSchema = keyBaseSchema.extend({ diff --git a/generated/schemas/wow/mythic-keystone-dungeon.ts b/generated/schemas/wow/mythic-keystone-dungeon.ts index 073c7163..ba9e0937 100644 --- a/generated/schemas/wow/mythic-keystone-dungeon.ts +++ b/generated/schemas/wow/mythic-keystone-dungeon.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { hrefSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const mythicKeystoneDungeonIndexResponseSchema = responseBaseSchema.extend({ dungeons: z.array(nameIdKeySchema), @@ -16,12 +16,8 @@ const zoneSchema = z.strictObject({ }); export const mythicKeystoneIndexResponseSchema = responseBaseSchema.extend({ - dungeons: z.strictObject({ - href: z.string(), - }), - seasons: z.strictObject({ - href: z.string(), - }), + dungeons: hrefSchema, + seasons: hrefSchema, }); const periodSchema = keyBaseSchema.extend({ diff --git a/generated/schemas/wow/mythic-keystone-leaderboard.ts b/generated/schemas/wow/mythic-keystone-leaderboard.ts index 600802f2..995aeb58 100644 --- a/generated/schemas/wow/mythic-keystone-leaderboard.ts +++ b/generated/schemas/wow/mythic-keystone-leaderboard.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { factionsSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; +import { factionsSchema, hrefSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core'; export const mythicKeystoneLeaderboardIndexResponseSchema = responseBaseSchema.extend({ current_leaderboards: z.array(nameIdKeySchema), @@ -41,9 +41,7 @@ const leadingGroupSchema = z.strictObject({ }); export const mythicKeystoneLeaderboardResponseSchema = responseBaseSchema.extend({ - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, keystone_affixes: z.array(keystoneAffixElementSchema), leading_groups: z.array(leadingGroupSchema), map: nameIdSchema, diff --git a/generated/schemas/wow/pet.ts b/generated/schemas/wow/pet.ts index cd60a62d..b43f3f19 100644 --- a/generated/schemas/wow/pet.ts +++ b/generated/schemas/wow/pet.ts @@ -41,6 +41,7 @@ const sourceSchema = z.strictObject({ export const petAbilityResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ battle_pet_type: battlePetTypeSchema, + cooldown: z.number().optional(), media: mediaSchema, rounds: z.number(), }); diff --git a/generated/schemas/wow/playable-class.ts b/generated/schemas/wow/playable-class.ts index 313029b1..59df8bad 100644 --- a/generated/schemas/wow/playable-class.ts +++ b/generated/schemas/wow/playable-class.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { genderNameSchema, + hrefSchema, keyBaseSchema, mediaAssetSchema, nameIdKeySchema, @@ -32,9 +33,7 @@ export const playableClassResponseSchema = nameIdSchema.extend(responseBaseSchem media: mediaSchema, playable_races: z.array(nameIdKeySchema), power_type: nameIdKeySchema, - pvp_talent_slots: z.strictObject({ - href: z.string(), - }), + pvp_talent_slots: hrefSchema, specializations: z.array(nameIdKeySchema), }); diff --git a/generated/schemas/wow/playable-race.ts b/generated/schemas/wow/playable-race.ts index bae69103..f356444e 100644 --- a/generated/schemas/wow/playable-race.ts +++ b/generated/schemas/wow/playable-race.ts @@ -12,4 +12,5 @@ export const playableRaceResponseSchema = nameIdSchema.extend(responseBaseSchema is_allied_race: z.boolean(), is_selectable: z.boolean(), playable_classes: z.array(nameIdKeySchema), + racial_spells: z.array(nameIdKeySchema), }); diff --git a/generated/schemas/wow/profession.ts b/generated/schemas/wow/profession.ts index 73e68b82..3f084bd0 100644 --- a/generated/schemas/wow/profession.ts +++ b/generated/schemas/wow/profession.ts @@ -31,7 +31,9 @@ export const recipeMediaResponseSchema = responseBaseSchema.extend({ }); const craftedQuantitySchema = z.strictObject({ - value: z.number(), + maximum: z.number().optional(), + minimum: z.number().optional(), + value: z.number().optional(), }); const reagentSchema = z.strictObject({ @@ -53,8 +55,18 @@ export const professionSkillTierResponseSchema = nameIdSchema.extend(responseBas }); export const recipeResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ - crafted_item: nameIdKeySchema, - crafted_quantity: craftedQuantitySchema, + crafted_item: nameIdKeySchema.optional(), + crafted_quantity: craftedQuantitySchema.optional(), + description: z.string().optional(), media: mediaSchema, - reagents: z.array(reagentSchema), + modified_crafting_slots: z + .array( + z.strictObject({ + display_order: z.number(), + slot_type: nameIdKeySchema, + }), + ) + .optional(), + rank: z.number().optional(), + reagents: z.array(reagentSchema).optional(), }); diff --git a/generated/schemas/wow/pvp-season.ts b/generated/schemas/wow/pvp-season.ts index 9cfbd8b4..709a7bd3 100644 --- a/generated/schemas/wow/pvp-season.ts +++ b/generated/schemas/wow/pvp-season.ts @@ -3,6 +3,7 @@ import { z } from 'zod'; import { factionSchema, factionsSchema, + hrefSchema, keyBaseSchema, nameIdKeySchema, nameIdSchema, @@ -15,7 +16,7 @@ const seasonSchema = keyBaseSchema.extend({ const bracketSchema = z.strictObject({ id: z.number(), - type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('SHUFFLE')]), + type: z.union([z.literal('ARENA_3v3'), z.literal('BATTLEGROUNDS'), z.literal('BLITZ'), z.literal('SHUFFLE')]), }); const rewardSchema = z.strictObject({ @@ -33,13 +34,10 @@ export const pvpSeasonIndexResponseSchema = responseBaseSchema.extend({ export const pvpSeasonResponseSchema = responseBaseSchema.extend({ id: z.number(), - leaderboards: z.strictObject({ - href: z.string(), - }), - rewards: z.strictObject({ - href: z.string(), - }), - season_name: z.string().optional(), + leaderboards: hrefSchema, + rewards: hrefSchema, + season_end_timestamp: z.number().optional(), + season_name: z.string().optional().nullable(), season_start_timestamp: z.number(), }); diff --git a/generated/schemas/wow/quest.ts b/generated/schemas/wow/quest.ts index dc78219c..c408d0bf 100644 --- a/generated/schemas/wow/quest.ts +++ b/generated/schemas/wow/quest.ts @@ -1,6 +1,6 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { factionSchema, nameIdKeySchema, responseBaseSchema } from '../core'; +import { factionSchema, hrefSchema, nameIdKeySchema, responseBaseSchema } from '../core'; export const questAreaIndexResponseSchema = responseBaseSchema.extend({ areas: z.array(nameIdKeySchema), @@ -23,15 +23,9 @@ export const questCategoryResponseSchema = responseBaseSchema.extend({ }); export const questIndexResponseSchema = responseBaseSchema.extend({ - areas: z.strictObject({ - href: z.string(), - }), - categories: z.strictObject({ - href: z.string(), - }), - types: z.strictObject({ - href: z.string(), - }), + areas: hrefSchema, + categories: hrefSchema, + types: hrefSchema, }); export const questTypeIndexResponseSchema = responseBaseSchema.extend({ diff --git a/generated/schemas/wow/realm.ts b/generated/schemas/wow/realm.ts index ceccdb2a..1008c883 100644 --- a/generated/schemas/wow/realm.ts +++ b/generated/schemas/wow/realm.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; import { baseSearchParametersSchema, + hrefSchema, keyBaseSchema, localesSchema, nameIdKeySchema, @@ -57,8 +58,6 @@ export const realmTimezoneSchema = z.union([ z.literal('Europe/Paris'), ]); -export const realmTypeSchema = z.union([z.literal('Normal'), z.literal('Roleplaying')]); - export const realmTypeCapitalizedSchema = z.union([z.literal('NORMAL'), z.literal('RP')]); export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ @@ -67,19 +66,19 @@ export const realmSearchParametersSchema = baseSearchParametersSchema.extend({ const realmSearchResponseItemSchema = keyBaseSchema.extend({ data: z.strictObject({ - category: z.record(localesSchema, z.union([z.string(), z.undefined()])), + category: z.record(localesSchema, z.string()), id: z.number(), is_tournament: z.boolean(), locale: realmLocalesSchema, - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), region: z.strictObject({ id: z.number(), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.record(localesSchema, z.string()), type: realmTypeCapitalizedSchema, }), }), @@ -87,16 +86,14 @@ const realmSearchResponseItemSchema = keyBaseSchema.extend({ export const realmResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ category: realmCategorySchema, - connected_realm: z.strictObject({ - href: z.string(), - }), + connected_realm: hrefSchema, is_tournament: z.boolean(), locale: realmLocalesSchema, region: nameIdKeySchema, slug: z.string(), timezone: realmTimezoneSchema, type: z.strictObject({ - name: realmTypeSchema, + name: z.string(), type: realmTypeCapitalizedSchema, }), }); diff --git a/generated/schemas/wow/region.ts b/generated/schemas/wow/region.ts index 38363d3d..aff525ba 100644 --- a/generated/schemas/wow/region.ts +++ b/generated/schemas/wow/region.ts @@ -1,13 +1,9 @@ // Generated by ts-to-zod import { z } from 'zod'; -import { nameIdSchema, responseBaseSchema } from '../core'; +import { hrefSchema, nameIdSchema, responseBaseSchema } from '../core'; export const regionIndexResponseSchema = responseBaseSchema.extend({ - regions: z.array( - z.strictObject({ - href: z.string(), - }), - ), + regions: z.array(hrefSchema), }); export const regionResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({ diff --git a/generated/schemas/wow/spell.ts b/generated/schemas/wow/spell.ts index 544f9cb5..09ef89b3 100644 --- a/generated/schemas/wow/spell.ts +++ b/generated/schemas/wow/spell.ts @@ -30,7 +30,7 @@ const spellSearchResponseItemSchema = keyBaseSchema.extend({ media: z.strictObject({ id: z.number(), }), - name: z.record(localesSchema, z.union([z.string(), z.undefined()])), + name: z.record(localesSchema, z.string()), }), }); diff --git a/packages/classic-wow/src/auction-house/types.ts b/packages/classic-wow/src/auction-house/types.ts index 79cae1b7..338e337e 100644 --- a/packages/classic-wow/src/auction-house/types.ts +++ b/packages/classic-wow/src/auction-house/types.ts @@ -1,4 +1,4 @@ -import type { NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Href, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; export interface AuctionHouseIndexResponse extends ResponseBase { auctions: Array; @@ -6,7 +6,7 @@ export interface AuctionHouseIndexResponse extends ResponseBase { export interface AuctionsResponse extends NameId, ResponseBase { auctions: Array; - connected_realm: { href: string }; + connected_realm: Href; } interface Auction { diff --git a/packages/classic-wow/src/connected-realm/types.ts b/packages/classic-wow/src/connected-realm/types.ts index 385b2ddc..f4d2a11b 100644 --- a/packages/classic-wow/src/connected-realm/types.ts +++ b/packages/classic-wow/src/connected-realm/types.ts @@ -1,30 +1,31 @@ import type { BaseSearchParameters, + Href, KeyBase, Locales, NameIdKey, ResponseBase, SearchResponseWithoutResults, } from '@blizzard-api/core'; -import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; +import type { RealmCategory, RealmLocales, RealmTimezone, RealmTypeCapitalized } from '../realm/types'; /** * Connected Realm Index API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis */ export interface ConnectedRealmIndexResponse extends ResponseBase { - connected_realms: Array<{ href: string }>; + connected_realms: Array; } /** * Connected Realm API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis */ export interface ConnectedRealmResponse extends ResponseBase { - auctions: { href: string }; + auctions: Href; has_queue: boolean; id: number; - mythic_leaderboards: { href: string }; - population: { name: 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; type: RealmPopulationCapitalized }; + population: { name: string; type: RealmPopulationCapitalized }; + pvp_season?: Href; realm_locked_status?: RealmLockedStatus; realms: Array; status: { name: RealmStatus; type: RealmStatusCapitalized }; @@ -60,7 +61,7 @@ interface ConnectedRealmSearchResponseItem extends KeyBase { interface Realm { category: RealmCategory; - connected_realm: { href: string }; + connected_realm: Href; id: number; is_tournament: boolean; locale: RealmLocales; @@ -68,7 +69,7 @@ interface Realm { region: NameIdKey; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: string; type: RealmTypeCapitalized }; } interface RealmLockedStatus { @@ -76,22 +77,22 @@ interface RealmLockedStatus { is_locked_for_pct: boolean; } -type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; +type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOCKED' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; type RealmStatus = 'Down' | 'Up'; type RealmStatusCapitalized = 'DOWN' | 'UP'; interface SearchRealm { - category: Record; + category: Record; id: number; is_tournament: boolean; locale: RealmLocales; name: Record; - region: { id: number; name: Record }; + region: { id: number; name: Record }; slug: string; timezone: RealmTimezone; - type: { name: Record; type: RealmTypeCapitalized }; + type: { name: Record; type: RealmTypeCapitalized }; } interface SearchRealmPopulation { diff --git a/packages/classic-wow/src/creature/types.ts b/packages/classic-wow/src/creature/types.ts index cf8ab050..6b223581 100644 --- a/packages/classic-wow/src/creature/types.ts +++ b/packages/classic-wow/src/creature/types.ts @@ -40,9 +40,9 @@ export interface CreatureFamilyMediaResponse extends ResponseBase { */ export interface CreatureFamilyResponse extends ResponseBase { id: number; - media: Media; + media?: Media; name: string; - specialization: NameIdKey; + specialization?: NameIdKey; } /** @@ -100,11 +100,11 @@ interface CreatureDisplay extends KeyBase { interface CreatureSearchResponseItem extends KeyBase { data: { creature_displays: Array<{ id: number }>; - family?: { id: number; name: Record }; + family?: { id: number; name: Record }; id: number; is_tameable: boolean; name: Record; - type: { id: number; name: Record }; + type: { id: number; name: Record }; }; } diff --git a/packages/classic-wow/src/item/types.ts b/packages/classic-wow/src/item/types.ts index e71790ed..b5e324fc 100644 --- a/packages/classic-wow/src/item/types.ts +++ b/packages/classic-wow/src/item/types.ts @@ -114,7 +114,7 @@ interface Durability { } interface InventoryType { - name: Record; + name: Record; type: //Armor | 'BACK' | 'BAG' @@ -138,7 +138,7 @@ interface InventoryType { } interface ItemQuality { - name: Record; + name: Record; type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; } @@ -148,12 +148,12 @@ interface ItemSearchResponseItem extends KeyBase { inventory_type: InventoryType; is_equippable: boolean; is_stackable: boolean; - item_class: { id: number; name: Record }; - item_subclass: { id: number; name: Record }; + item_class: { id: number; name: Record }; + item_subclass: { id: number; name: Record }; level: number; max_count: number; media: { id: number }; - name: Record; + name: Record; purchase_price: number; purchase_quantity: number; quality: ItemQuality; diff --git a/packages/classic-wow/src/playable-class/types.ts b/packages/classic-wow/src/playable-class/types.ts index d79ca630..f719fba9 100644 --- a/packages/classic-wow/src/playable-class/types.ts +++ b/packages/classic-wow/src/playable-class/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { GenderName, Href, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a playable class index. @@ -27,7 +27,7 @@ export interface PlayableClassResponse extends NameId, ResponseBase { media: Media; playable_races: Array; power_type: NameIdKey; - pvp_talent_slots: { href: string }; + pvp_talent_slots: Href; specializations?: Array; } diff --git a/packages/classic-wow/src/playable-race/types.ts b/packages/classic-wow/src/playable-race/types.ts index d765386e..0d7bd8ca 100644 --- a/packages/classic-wow/src/playable-race/types.ts +++ b/packages/classic-wow/src/playable-race/types.ts @@ -18,4 +18,5 @@ export interface PlayableRaceResponse extends NameId, ResponseBase { is_allied_race: boolean; is_selectable: boolean; playable_classes: Array; + racial_spells: Array; } diff --git a/packages/classic-wow/src/pvp-season/types.ts b/packages/classic-wow/src/pvp-season/types.ts index 526a18f7..32c9ce7f 100644 --- a/packages/classic-wow/src/pvp-season/types.ts +++ b/packages/classic-wow/src/pvp-season/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, ResponseBase } from '@blizzard-api/core'; +import type { Href, KeyBase, ResponseBase } from '@blizzard-api/core'; /** * The response for a PvP season index. @@ -15,8 +15,8 @@ export interface PvpSeasonIndexResponse extends ResponseBase { */ export interface PvpSeasonResponse extends ResponseBase { id: number; - leaderboards: { href: string }; - rewards: { href: string }; + leaderboards: Href; + rewards: Href; season_name?: string; season_start_timestamp: number; } diff --git a/packages/classic-wow/src/realm/types.ts b/packages/classic-wow/src/realm/types.ts index d8c4c9c5..1afbbe19 100644 --- a/packages/classic-wow/src/realm/types.ts +++ b/packages/classic-wow/src/realm/types.ts @@ -1,5 +1,6 @@ import type { BaseSearchParameters, + Href, KeyBase, Locales, NameId, @@ -56,13 +57,13 @@ export type RealmLocales = */ export interface RealmResponse extends NameId, ResponseBase { category: RealmCategory; - connected_realm: { href: string }; + connected_realm: Href; is_tournament: boolean; locale: RealmLocales; region: NameIdKey; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: string; type: RealmTypeCapitalized }; } /** @@ -96,11 +97,6 @@ export type RealmTimezone = | 'Australia/Melbourne' | 'Europe/Paris'; -/** - * The type of a realm, not capitalized or shortened. - */ -export type RealmType = 'Normal' | 'Roleplaying'; - export type RealmTypeCapitalized = 'NORMAL' | 'RP'; /** @@ -109,14 +105,14 @@ export type RealmTypeCapitalized = 'NORMAL' | 'RP'; interface RealmSearchResponseItem extends KeyBase { data: { - category: Record; + category: Record; id: number; is_tournament: boolean; locale: RealmLocales; - name: Record; - region: { id: number; name: Record }; + name: Record; + region: { id: number; name: Record }; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: string; type: RealmTypeCapitalized }; }; } diff --git a/packages/classic-wow/src/region/types.ts b/packages/classic-wow/src/region/types.ts index cd2b9006..51abe9c5 100644 --- a/packages/classic-wow/src/region/types.ts +++ b/packages/classic-wow/src/region/types.ts @@ -1,11 +1,11 @@ -import type { NameId, ResponseBase } from '@blizzard-api/core'; +import type { Href, NameId, ResponseBase } from '@blizzard-api/core'; /** * The response for a region index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface RegionIndexResponse extends ResponseBase { - regions: Array<{ href: string }>; + regions: Array; } /** diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts index b85b7c07..e84e9d68 100644 --- a/packages/core/src/base.ts +++ b/packages/core/src/base.ts @@ -68,20 +68,20 @@ export interface Color { * The faction associated with a character or entity in World of Warcraft. */ export interface Faction { - name: 'Alliance' | 'Horde'; + name: string; type: Factions; } /** * The playable factions in World of Warcraft. */ -export type Factions = 'ALLIANCE' | 'HORDE'; +export type Factions = 'ALLIANCE' | 'HORDE' | 'NEUTRAL'; /** * The gender associated with a character or entity in World of Warcraft. */ export interface Gender { - name: 'Female' | 'Male'; + name: string; type: 'FEMALE' | 'MALE'; } @@ -129,7 +129,9 @@ export interface NameIdKey extends KeyBase, NameId {} /** * The standard structure to represent a World of Warcraft Realm. */ -export interface Realm extends NameIdKey { +export interface Realm extends KeyBase { + id: number; + name?: string; slug: string; } diff --git a/packages/core/src/blizzard-api.ts b/packages/core/src/blizzard-api.ts index cd61668b..fc133034 100644 --- a/packages/core/src/blizzard-api.ts +++ b/packages/core/src/blizzard-api.ts @@ -5,10 +5,10 @@ import type { Locales, Origins } from './locales'; */ const _regionLocaleMap = { cn: ['zh_CN'], - eu: ['en_GB', 'es_ES', 'fr_FR', 'ru_RU', 'de_DE', 'pt_PT', 'it_IT', 'multi'], - kr: ['ko_KR', 'en_GB', 'en_US', 'multi'], - tw: ['zh_TW', 'en_GB', 'en_US', 'multi'], - us: ['en_US', 'es_MX', 'pt_BR', 'multi'], + eu: ['en_GB', 'es_ES', 'fr_FR', 'ru_RU', 'de_DE', 'it_IT'], + kr: ['ko_KR', 'en_GB', 'en_US'], + tw: ['zh_TW', 'en_GB', 'en_US'], + us: ['en_US', 'es_MX', 'pt_BR'], } as const satisfies Record>; /** diff --git a/packages/core/src/locales.ts b/packages/core/src/locales.ts index f8b37429..71c0d5f2 100644 --- a/packages/core/src/locales.ts +++ b/packages/core/src/locales.ts @@ -10,9 +10,7 @@ export type Locales = | 'fr_FR' | 'it_IT' | 'ko_KR' - | 'multi' | 'pt_BR' - | 'pt_PT' | 'ru_RU' | 'zh_CN' | 'zh_TW'; diff --git a/packages/d3/src/game-data/types.ts b/packages/d3/src/game-data/types.ts index 1f039893..0e441e59 100644 --- a/packages/d3/src/game-data/types.ts +++ b/packages/d3/src/game-data/types.ts @@ -1,8 +1,8 @@ -import type { ResponseBase } from '@blizzard-api/core'; +import type { Href, ResponseBase } from '@blizzard-api/core'; export interface EraIndexResponse extends ResponseBase { current_era: number; - era: Array<{ href: string }>; + era: Array; generated_by: string; last_update_time: string; } @@ -31,7 +31,7 @@ export interface SeasonIndexResponse extends ResponseBase { current_season: number; generated_by: string; last_update_time: string; - season: Array<{ href: string }>; + season: Array; service_current_season: number; service_season_state: string; } @@ -72,7 +72,7 @@ interface EraLeaderboard { interface Leaderboard { hardcore?: boolean; hero_class_string?: string; - ladder: { href: string }; + ladder: Href; team_size?: number; } diff --git a/packages/integration-tests/classic-wow/auction-house.integration.test.ts b/packages/integration-tests/classic-wow/auction-house.integration.test.ts index 8f4645c6..9dece9ab 100644 --- a/packages/integration-tests/classic-wow/auction-house.integration.test.ts +++ b/packages/integration-tests/classic-wow/auction-house.integration.test.ts @@ -60,5 +60,5 @@ describe.skip('classic-wow auction house integration', () => { console.error('Auctions validation failed:', treeifyError(parsedAuctions.error)); } expect(parsedAuctions.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-achievements.integration.test.ts b/packages/integration-tests/classic-wow/character-achievements.integration.test.ts index d4ccc4b7..3e810a79 100644 --- a/packages/integration-tests/classic-wow/character-achievements.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-achievements.integration.test.ts @@ -36,5 +36,5 @@ describe('classic-wow character achievements integration', () => { console.error('Character achievement statistics validation failed:', treeifyError(parsedStats.error)); } expect(parsedStats.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-equipment.integration.test.ts b/packages/integration-tests/classic-wow/character-equipment.integration.test.ts index 58b452fb..e57a8db2 100644 --- a/packages/integration-tests/classic-wow/character-equipment.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-equipment.integration.test.ts @@ -22,5 +22,5 @@ describe('classic-wow character equipment integration', () => { console.error('Character equipment summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts index 4c603074..e9e0f36e 100644 --- a/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-hunter-pets.integration.test.ts @@ -22,5 +22,5 @@ describe('classic-wow character hunter pets integration', () => { console.error('Character hunter pets summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-media.integration.test.ts b/packages/integration-tests/classic-wow/character-media.integration.test.ts index c56f9906..b321bca3 100644 --- a/packages/integration-tests/classic-wow/character-media.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-media.integration.test.ts @@ -22,5 +22,5 @@ describe('classic-wow character media integration', () => { console.error('Character media summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-profile.integration.test.ts b/packages/integration-tests/classic-wow/character-profile.integration.test.ts index 4f9b62e7..ac18968f 100644 --- a/packages/integration-tests/classic-wow/character-profile.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-profile.integration.test.ts @@ -22,5 +22,5 @@ describe('classic-wow character profile integration', () => { console.error('Character profile summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-specialization.integration.test.ts b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts index 05660ea1..cf91fd62 100644 --- a/packages/integration-tests/classic-wow/character-specialization.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-specialization.integration.test.ts @@ -24,7 +24,7 @@ describe('classic-wow character specialization integration', () => { console.error('Character specialization summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); it('fetches specialization summary for a character on classic progression', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, @@ -43,5 +43,5 @@ describe('classic-wow character specialization integration', () => { console.error('Character specialization summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/character-statistics.integration.test.ts b/packages/integration-tests/classic-wow/character-statistics.integration.test.ts index 017679cb..b22a3a0e 100644 --- a/packages/integration-tests/classic-wow/character-statistics.integration.test.ts +++ b/packages/integration-tests/classic-wow/character-statistics.integration.test.ts @@ -22,5 +22,5 @@ describe('classic-wow character statistics integration', () => { console.error('Character statistics summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/connected-realm.integration.test.ts b/packages/integration-tests/classic-wow/connected-realm.integration.test.ts index 88ab7165..cc45d8b1 100644 --- a/packages/integration-tests/classic-wow/connected-realm.integration.test.ts +++ b/packages/integration-tests/classic-wow/connected-realm.integration.test.ts @@ -3,7 +3,11 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { connectedRealmIndexResponseSchema } from '../../../generated/schemas/classic-wow'; +import { + connectedRealmIndexResponseSchema, + connectedRealmResponseSchema, + connectedRealmSearchResponseSchema, +} from '../../../generated/schemas/classic-wow'; describe('classic-wow connected realm integration', () => { it('validates connected realm index', async ({ expect }) => { @@ -19,5 +23,21 @@ describe('classic-wow connected realm integration', () => { console.error('Connected realm index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + const realm = await client.sendRequest(classicWow.connectedRealm('dynamic-classic1x', 5085)); + const parsedRealm = connectedRealmResponseSchema.safeParse(realm); + if (!parsedRealm.success) { + console.error('Connected realm detail validation failed:', treeifyError(parsedRealm.error)); + } + expect(parsedRealm.success).toBe(true); + + const search = await client.sendRequest(classicWow.connectedRealmSearch('dynamic-classic1x', { _page: 1 })); + const parsedSearch = connectedRealmSearchResponseSchema.safeParse(search); + if (!parsedSearch.success) { + console.error('Connected realm search validation failed:', treeifyError(parsedSearch.error)); + console.log('search', search); + console.log('parsedSearch.error', parsedSearch.error); + } + expect(parsedSearch.success).toBe(true); + }); }); diff --git a/packages/integration-tests/classic-wow/creature.integration.test.ts b/packages/integration-tests/classic-wow/creature.integration.test.ts index 5d26408a..b9168f13 100644 --- a/packages/integration-tests/classic-wow/creature.integration.test.ts +++ b/packages/integration-tests/classic-wow/creature.integration.test.ts @@ -4,38 +4,183 @@ import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { + creatureDisplayMediaResponseSchema, creatureFamilyIndexResponseSchema, + creatureFamilyMediaResponseSchema, + creatureFamilyResponseSchema, + creatureResponseSchema, + creatureSearchResponseSchema, creatureTypeIndexResponseSchema, + creatureTypeResponseSchema, } from '../../../generated/schemas/classic-wow'; -describe('classic-wow creature integration', () => { - it('validates creature family index', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'us', - secret: environment.blizzardClientSecret, - }); +describe.concurrent('classic-wow creature integration for classic era', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + it('validates creature', async ({ expect }) => { + const resp = await client.sendRequest(classicWow.creature('static-classic1x', 30)); + const parsed = creatureResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature validation failed', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + const respMedia = await client.sendRequest(classicWow.creatureDisplayMedia('static-classic1x', 30)); + const parsedMedia = creatureDisplayMediaResponseSchema.safeParse(respMedia); + if (!parsedMedia.success) { + console.error('Creature validation failed', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + }); + it('validates creature family index', async ({ expect }) => { const resp = await client.sendRequest(classicWow.creatureFamilyIndex('static-classic1x')); const parsed = creatureFamilyIndexResponseSchema.safeParse(resp); if (!parsed.success) { console.error('Creature family index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); - it('validates creature type index', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'us', - secret: environment.blizzardClientSecret, - }); + // eslint-disable-next-line sonarjs/pseudo-random + const creatureFamilyIndex = Math.floor(Math.random() * resp.creature_families.length); + const creatureFamily = resp.creature_families[creatureFamilyIndex]; + expect(creatureFamily).toBeDefined(); + const family = await client.sendRequest(classicWow.creatureFamily('static-classic1x', creatureFamily!.id)); + const parsedFamily = creatureFamilyResponseSchema.safeParse(family); + if (!parsedFamily.success) { + console.error( + 'Creature family detail validation failed for id', + creatureFamily!.id, + treeifyError(parsedFamily.error), + ); + console.log('family', family); + console.log('parsedFamily.error', parsedFamily.error); + } + expect(parsedFamily.success).toBe(true); + + const media = await client.sendRequest(classicWow.creatureFamilyMedia('static-classic1x', creatureFamily!.id)); + const parsedMedia = creatureFamilyMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Creature family media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + }); + + it('validates creature type index and details', async ({ expect }) => { const resp = await client.sendRequest(classicWow.creatureTypeIndex('static-classic1x')); const parsed = creatureTypeIndexResponseSchema.safeParse(resp); if (!parsed.success) { console.error('Creature type index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + // eslint-disable-next-line sonarjs/pseudo-random + const creatureTypeIndex = Math.floor(Math.random() * resp.creature_types.length); + const creatureType = resp.creature_types[creatureTypeIndex]; + expect(creatureType).toBeDefined(); + + const type = await client.sendRequest(classicWow.creatureType('static-classic1x', creatureType!.id)); + const parsedType = creatureTypeResponseSchema.safeParse(type); + if (!parsedType.success) { + console.error('Creature type detail validation failed:', treeifyError(parsedType.error)); + } + expect(parsedType.success).toBe(true); + }); + + it('validates creature search', async ({ expect }) => { + const search = await client.sendRequest( + classicWow.creatureSearch('static-classic1x', { _page: 1, locale: 'en_GB', name: 'wolf' }), + ); + const parsed = creatureSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Creature search validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); +}); + +describe.concurrent('classic-wow creature integration for classic progression', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + it('validates creature', async ({ expect }) => { + const resp = await client.sendRequest(classicWow.creature('static-classic', 30)); + const parsed = creatureResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature validation failed', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); + it('validates creature family index', async ({ expect }) => { + const resp = await client.sendRequest(classicWow.creatureFamilyIndex('static-classic')); + const parsed = creatureFamilyIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature family index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + // eslint-disable-next-line sonarjs/pseudo-random + const creatureFamilyIndex = Math.floor(Math.random() * resp.creature_families.length); + const creatureFamily = resp.creature_families[creatureFamilyIndex]; + expect(creatureFamily).toBeDefined(); + + const family = await client.sendRequest(classicWow.creatureFamily('static-classic', creatureFamily!.id)); + const parsedFamily = creatureFamilyResponseSchema.safeParse(family); + if (!parsedFamily.success) { + console.error( + 'Creature family detail validation failed for id', + creatureFamily!.id, + treeifyError(parsedFamily.error), + ); + console.log('family', family); + console.log('parsedFamily.error', parsedFamily.error); + } + expect(parsedFamily.success).toBe(true); + + const media = await client.sendRequest(classicWow.creatureFamilyMedia('static-classic', 1)); + const parsedMedia = creatureFamilyMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Creature family media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + }); + + it('validates creature type index and details', async ({ expect }) => { + const resp = await client.sendRequest(classicWow.creatureTypeIndex('static-classic')); + const parsed = creatureTypeIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Creature type index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + // eslint-disable-next-line sonarjs/pseudo-random + const creatureTypeIndex = Math.floor(Math.random() * resp.creature_types.length); + const creatureType = resp.creature_types[creatureTypeIndex]; + expect(creatureType).toBeDefined(); + + const type = await client.sendRequest(classicWow.creatureType('static-classic', creatureType!.id)); + const parsedType = creatureTypeResponseSchema.safeParse(type); + if (!parsedType.success) { + console.error('Creature type detail validation failed:', treeifyError(parsedType.error)); + } + expect(parsedType.success).toBe(true); + }); + + it('validates creature search', async ({ expect }) => { + const search = await client.sendRequest( + classicWow.creatureSearch('static-classic', { _page: 1, locale: 'en_GB', name: 'wolf' }), + ); + const parsed = creatureSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Creature search validation failed:', treeifyError(parsed.error)); + console.log('search', search); + console.log('parsed.error', parsed.error); + } + expect(parsed.success).toBe(true); + }); }); diff --git a/packages/integration-tests/classic-wow/guild-crest.integration.test.ts b/packages/integration-tests/classic-wow/guild-crest.integration.test.ts index d704f09e..34837b5a 100644 --- a/packages/integration-tests/classic-wow/guild-crest.integration.test.ts +++ b/packages/integration-tests/classic-wow/guild-crest.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow guild crest integration', () => { console.error('Guild crest components index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/guild.integration.test.ts b/packages/integration-tests/classic-wow/guild.integration.test.ts index 31e390b1..4a3d6848 100644 --- a/packages/integration-tests/classic-wow/guild.integration.test.ts +++ b/packages/integration-tests/classic-wow/guild.integration.test.ts @@ -24,5 +24,5 @@ describe('classic-wow guild integration', () => { const rosterResp = await client.sendRequest(classicWow.guildRoster('profile-classic', realm, guildSlug)); expect(rosterResp).toBeDefined(); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/item.integration.test.ts b/packages/integration-tests/classic-wow/item.integration.test.ts index 6fa2dcc9..154f61f4 100644 --- a/packages/integration-tests/classic-wow/item.integration.test.ts +++ b/packages/integration-tests/classic-wow/item.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow item integration', () => { console.error('Item class index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/media-search.integration.test.ts b/packages/integration-tests/classic-wow/media-search.integration.test.ts index be3b647d..700d29ef 100644 --- a/packages/integration-tests/classic-wow/media-search.integration.test.ts +++ b/packages/integration-tests/classic-wow/media-search.integration.test.ts @@ -26,5 +26,5 @@ describe('classic-wow media search integration', () => { console.error('Media search validation failed:', treeifyError(parsedEraSearch.error)); } expect(parsedEraSearch.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/playable-class.integration.test.ts b/packages/integration-tests/classic-wow/playable-class.integration.test.ts index 1099276e..1b2c3367 100644 --- a/packages/integration-tests/classic-wow/playable-class.integration.test.ts +++ b/packages/integration-tests/classic-wow/playable-class.integration.test.ts @@ -38,7 +38,7 @@ describe.concurrent('classic-wow playable class integration', () => { } expect(mediaParsed.success).toBe(true); } - }, 30_000); + }); it('fetches playable class and media by id for classic', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, @@ -71,5 +71,5 @@ describe.concurrent('classic-wow playable class integration', () => { } expect(mediaParsed.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/playable-race.integration.test.ts b/packages/integration-tests/classic-wow/playable-race.integration.test.ts index a61946f9..7a5f2374 100644 --- a/packages/integration-tests/classic-wow/playable-race.integration.test.ts +++ b/packages/integration-tests/classic-wow/playable-race.integration.test.ts @@ -3,10 +3,10 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { playableRaceIndexResponseSchema } from '../../../generated/schemas/classic-wow'; +import { playableRaceIndexResponseSchema, playableRaceResponseSchema } from '../../../generated/schemas/classic-wow'; -describe('classic-wow playable race integration', () => { - it('validates playable race index', async ({ expect }) => { +describe.concurrent('classic-wow playable race integration', () => { + it('validates playable races for classic era', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'us', @@ -19,5 +19,53 @@ describe('classic-wow playable race integration', () => { console.error('Playable race index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + const requests = []; + + for (const race of resp.races) { + requests.push(client.sendRequest(classicWow.playableRace('static-classic1x', race.id))); + } + + const results = await Promise.all(requests); + + for (const result of results) { + const parsedResult = playableRaceResponseSchema.safeParse(result); + if (!parsedResult.success) { + console.error('Race detail validation failed for id', result.id, treeifyError(parsedResult.error)); + } + expect(parsedResult.success).toBe(true); + } + }); + it('validates playable races for classic progression', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'us', + secret: environment.blizzardClientSecret, + }); + + const resp = await client.sendRequest(classicWow.playableRaceIndex('static-classic')); + const parsed = playableRaceIndexResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Playable race index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const requests = []; + + for (const race of resp.races) { + requests.push(client.sendRequest(classicWow.playableRace('static-classic', race.id))); + } + + const results = await Promise.all(requests); + + for (const result of results) { + const parsedResult = playableRaceResponseSchema.safeParse(result); + if (!parsedResult.success) { + console.error('Race detail validation failed for id', result.id, treeifyError(parsedResult.error)); + console.log('result', result); + console.log('parsedResult.error', parsedResult.error); + } + expect(parsedResult.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/classic-wow/power-type.integration.test.ts b/packages/integration-tests/classic-wow/power-type.integration.test.ts index c2450991..b1aff596 100644 --- a/packages/integration-tests/classic-wow/power-type.integration.test.ts +++ b/packages/integration-tests/classic-wow/power-type.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow power type integration', () => { console.error('Power type index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/pvp-season.integration.test.ts b/packages/integration-tests/classic-wow/pvp-season.integration.test.ts index 21f4a172..68edb630 100644 --- a/packages/integration-tests/classic-wow/pvp-season.integration.test.ts +++ b/packages/integration-tests/classic-wow/pvp-season.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow pvp season integration', () => { console.error('PvP season index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/realm.integration.test.ts b/packages/integration-tests/classic-wow/realm.integration.test.ts index 9d0a7479..eeb6e79a 100644 --- a/packages/integration-tests/classic-wow/realm.integration.test.ts +++ b/packages/integration-tests/classic-wow/realm.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow realm integration', () => { console.error('Realm index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/classic-wow/region.integration.test.ts b/packages/integration-tests/classic-wow/region.integration.test.ts index 21425888..2f26a1fa 100644 --- a/packages/integration-tests/classic-wow/region.integration.test.ts +++ b/packages/integration-tests/classic-wow/region.integration.test.ts @@ -19,5 +19,5 @@ describe('classic-wow region integration', () => { console.error('Region index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/achievements.integration.test.ts b/packages/integration-tests/wow/achievements.integration.test.ts index 27863f42..3894ed85 100644 --- a/packages/integration-tests/wow/achievements.integration.test.ts +++ b/packages/integration-tests/wow/achievements.integration.test.ts @@ -3,7 +3,13 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { achievementIndexResponseSchema, achievementResponseSchema } from '../../../generated/schemas/wow/achievements'; +import { + achievementCategoryIndexResponseSchema, + achievementCategoryResponseSchema, + achievementIndexResponseSchema, + achievementMediaResponseSchema, + achievementResponseSchema, +} from '../../../generated/schemas/wow/achievements'; describe('wow achievements integration', () => { it('fetches achievement indices and media', async ({ expect }) => { @@ -47,4 +53,64 @@ describe('wow achievements integration', () => { expect(parsedAchievement.success).toBe(true); } }); + + it('validates achievement categories and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const catIndex = await client.sendRequest(wow.achievementCategoryIndex()); + const parsedCatIndex = achievementCategoryIndexResponseSchema.safeParse(catIndex); + if (!parsedCatIndex.success) { + console.error('Achievement category index validation failed:', treeifyError(parsedCatIndex.error)); + } + expect(parsedCatIndex.success).toBe(true); + + const categories = parsedCatIndex.success ? parsedCatIndex.data.categories : []; + const sampleSize = Math.min(50, categories.length); + const sampledCats = + categories.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + categories.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : categories.slice(0, sampleSize); + + const catRequests = []; + for (const c of sampledCats) { + catRequests.push(client.sendRequest(wow.achievementCategory(c.id))); + } + + const catResponses = await Promise.all(catRequests); + for (const cr of catResponses) { + const parsedCat = achievementCategoryResponseSchema.safeParse(cr); + if (!parsedCat.success) { + console.error('Achievement category validation failed for id', cr.id, treeifyError(parsedCat.error)); + } + expect(parsedCat.success).toBe(true); + } + + // Validate media for some achievements from the original index + const achievementsList = await client.sendRequest(wow.achievementIndex()); + const parsedIndexAgain = achievementIndexResponseSchema.safeParse(achievementsList); + if (!parsedIndexAgain.success) { + console.error('Achievement index revalidation failed:', treeifyError(parsedIndexAgain.error)); + } + expect(parsedIndexAgain.success).toBe(true); + + const achs = parsedIndexAgain.success ? parsedIndexAgain.data.achievements : []; + const mediaSample = achs.slice(0, Math.min(5, achs.length)); + const mediaRequests = []; + for (const a of mediaSample) { + mediaRequests.push(client.sendRequest(wow.achievementMedia(a.id))); + } + const mediaResponses = await Promise.all(mediaRequests); + for (const m of mediaResponses) { + const parsedMedia = achievementMediaResponseSchema.safeParse(m); + if (!parsedMedia.success) { + console.error('Achievement media validation failed for id', m.id, treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/auction-house.integration.test.ts b/packages/integration-tests/wow/auction-house.integration.test.ts index 080eb25e..c1c0170a 100644 --- a/packages/integration-tests/wow/auction-house.integration.test.ts +++ b/packages/integration-tests/wow/auction-house.integration.test.ts @@ -39,5 +39,5 @@ describe('wow auction-house integration', () => { console.error('Commodities validation failed:', treeifyError(parsedCommodities.error)); } expect(parsedCommodities.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/azerite-essence.integration.test.ts b/packages/integration-tests/wow/azerite-essence.integration.test.ts index 9ed2372f..fb2d4bad 100644 --- a/packages/integration-tests/wow/azerite-essence.integration.test.ts +++ b/packages/integration-tests/wow/azerite-essence.integration.test.ts @@ -5,6 +5,8 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { azeriteEssenceIndexResponseSchema, + azeriteEssenceMediaResponseSchema, + azeriteEssenceResponseSchema, azeriteEssenceSearchResponseSchema, } from '../../../generated/schemas/wow/azerite-essence'; @@ -29,5 +31,39 @@ describe('wow azerite-essence integration', () => { console.error('Azerite essence search validation failed:', treeifyError(parsedSearch.error)); } expect(parsedSearch.success).toBe(true); - }, 30_000); + + // Fetch some detail and media for a few essences from the index + const essences = parsedIndex.success ? parsedIndex.data.azerite_essences : []; + const sampleSize = Math.min(5, essences.length); + const sampled = + essences.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + essences.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : essences.slice(0, sampleSize); + + const detailRequests: Array> = []; + const mediaRequests: Array> = []; + for (const essence of sampled) { + detailRequests.push(client.sendRequest(wow.azeriteEssence(essence.id))); + mediaRequests.push(client.sendRequest(wow.azeriteEssenceMedia(essence.id))); + } + + const details = await Promise.all(detailRequests); + for (const d of details) { + const parsed = azeriteEssenceResponseSchema.safeParse(d); + if (!parsed.success) { + console.error('Azerite essence detail validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + + const medias = await Promise.all(mediaRequests); + for (const m of medias) { + const parsed = azeriteEssenceMediaResponseSchema.safeParse(m); + if (!parsed.success) { + console.error('Azerite essence media validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/character-achievements.integration.test.ts b/packages/integration-tests/wow/character-achievements.integration.test.ts index bdbd2427..830b5236 100644 --- a/packages/integration-tests/wow/character-achievements.integration.test.ts +++ b/packages/integration-tests/wow/character-achievements.integration.test.ts @@ -31,5 +31,5 @@ describe('wow character-achievements integration', () => { console.error('Character achievement statistics validation failed:', treeifyError(parsedStats.error)); } expect(parsedStats.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-appearance.integration.test.ts b/packages/integration-tests/wow/character-appearance.integration.test.ts index 21b6e87d..a67736a5 100644 --- a/packages/integration-tests/wow/character-appearance.integration.test.ts +++ b/packages/integration-tests/wow/character-appearance.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-appearance integration', () => { console.error('Character appearance validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-encounters.integration.test.ts b/packages/integration-tests/wow/character-encounters.integration.test.ts index 4398c788..9c7b5d57 100644 --- a/packages/integration-tests/wow/character-encounters.integration.test.ts +++ b/packages/integration-tests/wow/character-encounters.integration.test.ts @@ -3,7 +3,11 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { characterEncountersSummaryResponseSchema } from '../../../generated/schemas/wow'; +import { + characterDungeonsResponseSchema, + characterEncountersSummaryResponseSchema, + characterRaidsResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-encounters integration', () => { it('validates character encounters', async ({ expect }) => { @@ -20,5 +24,20 @@ describe('wow character-encounters integration', () => { console.error('Character encounters validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + // Validate dungeons and raids endpoints referenced by the summary + const dungeons = await client.sendRequest(wow.characterDungeons(realm, character)); + const parsedDungeons = characterDungeonsResponseSchema.safeParse(dungeons); + if (!parsedDungeons.success) { + console.error('Character dungeons validation failed:', treeifyError(parsedDungeons.error)); + } + expect(parsedDungeons.success).toBe(true); + + const raids = await client.sendRequest(wow.characterRaids(realm, character)); + const parsedRaids = characterRaidsResponseSchema.safeParse(raids); + if (!parsedRaids.success) { + console.error('Character raids validation failed:', treeifyError(parsedRaids.error)); + } + expect(parsedRaids.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/character-equipment.integration.test.ts b/packages/integration-tests/wow/character-equipment.integration.test.ts index c129f733..dae75781 100644 --- a/packages/integration-tests/wow/character-equipment.integration.test.ts +++ b/packages/integration-tests/wow/character-equipment.integration.test.ts @@ -22,5 +22,5 @@ describe('wow character equipment integration', () => { console.error('Character equipment summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts index d573e31b..e29dd7d3 100644 --- a/packages/integration-tests/wow/character-hunter-pets.integration.test.ts +++ b/packages/integration-tests/wow/character-hunter-pets.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-hunter-pets integration', () => { console.error('Character hunter pets validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-media.integration.test.ts b/packages/integration-tests/wow/character-media.integration.test.ts index 8d5256d5..0a667f66 100644 --- a/packages/integration-tests/wow/character-media.integration.test.ts +++ b/packages/integration-tests/wow/character-media.integration.test.ts @@ -22,5 +22,5 @@ describe('wow character media integration', () => { console.error('Character media summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts index 4525bdc6..fff7e1d7 100644 --- a/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-mythic-keystone-profile.integration.test.ts @@ -3,7 +3,10 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { characterMythicKeystoneProfileIndexResponseSchema } from '../../../generated/schemas/wow'; +import { + characterMythicKeystoneProfileIndexResponseSchema, + characterMythicKeystoneSeasonDetailsResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-mythic-keystone-profile integration', () => { it('validates mythic keystone profile index', async ({ expect }) => { @@ -20,5 +23,32 @@ describe('wow character-mythic-keystone-profile integration', () => { console.error('Character mythic keystone profile index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); + + it('validates mythic keystone season details when available', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + + const index = await client.sendRequest(wow.characterMythicKeystoneProfileIndex(realm, character)); + const parsedIndex = characterMythicKeystoneProfileIndexResponseSchema.safeParse(index); + if (!parsedIndex.success) { + console.error('Character mythic keystone profile index validation failed:', treeifyError(parsedIndex.error)); + } + expect(parsedIndex.success).toBe(true); + + const seasonId = index.seasons.at(0)?.id; + const details = await client.sendRequest(wow.characterMythicKeystoneSeasonDetails(realm, character, seasonId!)); + const parsedDetails = characterMythicKeystoneSeasonDetailsResponseSchema.safeParse(details); + if (!parsedDetails.success) { + console.error('Character mythic keystone season details validation failed:', treeifyError(parsedDetails.error)); + console.log('details', details); + console.log('parsedDetails', parsedDetails.error); + } + expect(parsedDetails.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/character-professions.integration.test.ts b/packages/integration-tests/wow/character-professions.integration.test.ts index 2c2be25e..f31f0806 100644 --- a/packages/integration-tests/wow/character-professions.integration.test.ts +++ b/packages/integration-tests/wow/character-professions.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-professions integration', () => { console.error('Character professions validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-profile.integration.test.ts b/packages/integration-tests/wow/character-profile.integration.test.ts index 8f4d84c6..cf534790 100644 --- a/packages/integration-tests/wow/character-profile.integration.test.ts +++ b/packages/integration-tests/wow/character-profile.integration.test.ts @@ -31,5 +31,5 @@ describe('wow character-profile integration', () => { console.error('Character profile status validation failed:', treeifyError(parsedStatus.error)); } expect(parsedStatus.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-pvp.integration.test.ts b/packages/integration-tests/wow/character-pvp.integration.test.ts index ac11bd90..2c39bb6b 100644 --- a/packages/integration-tests/wow/character-pvp.integration.test.ts +++ b/packages/integration-tests/wow/character-pvp.integration.test.ts @@ -3,7 +3,10 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { characterPvpSummaryResponseSchema } from '../../../generated/schemas/wow'; +import { + characterPvpBracketStatisticsResponseSchema, + characterPvpSummaryResponseSchema, +} from '../../../generated/schemas/wow'; describe('wow character-pvp integration', () => { it('validates character pvp summary', async ({ expect }) => { @@ -20,5 +23,22 @@ describe('wow character-pvp integration', () => { console.error('Character pvp summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); + + it('validates character pvp bracket statistics', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'voidshuffle'; + + const bracketResp = await client.sendRequest(wow.characterPvpBracketStatistics(realm, character, '2v2')); + const parsedBracket = characterPvpBracketStatisticsResponseSchema.safeParse(bracketResp); + if (!parsedBracket.success) { + console.error('Character pvp bracket validation failed:', treeifyError(parsedBracket.error)); + } + expect(parsedBracket.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/character-quests.integration.test.ts b/packages/integration-tests/wow/character-quests.integration.test.ts index 2a3171e7..7946b7ad 100644 --- a/packages/integration-tests/wow/character-quests.integration.test.ts +++ b/packages/integration-tests/wow/character-quests.integration.test.ts @@ -3,7 +3,7 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { characterQuestsResponseSchema } from '../../../generated/schemas/wow'; +import { characterCompletedQuestsResponseSchema, characterQuestsResponseSchema } from '../../../generated/schemas/wow'; describe('wow character-quests integration', () => { it('validates character quests', async ({ expect }) => { @@ -20,5 +20,22 @@ describe('wow character-quests integration', () => { console.error('Character quests validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); + + it('validates completed quests', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + const realm = 'laughing-skull'; + const character = 'putro'; + + const completed = await client.sendRequest(wow.characterCompletedQuests(realm, character)); + const parsedCompleted = characterCompletedQuestsResponseSchema.safeParse(completed); + if (!parsedCompleted.success) { + console.error('Character completed quests validation failed:', treeifyError(parsedCompleted.error)); + } + expect(parsedCompleted.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/character-reputations.integration.test.ts b/packages/integration-tests/wow/character-reputations.integration.test.ts index 263043c2..14d69550 100644 --- a/packages/integration-tests/wow/character-reputations.integration.test.ts +++ b/packages/integration-tests/wow/character-reputations.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-reputations integration', () => { console.error('Character reputations validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-soulbinds.integration.test.ts b/packages/integration-tests/wow/character-soulbinds.integration.test.ts index 09f2bd3a..99a1b087 100644 --- a/packages/integration-tests/wow/character-soulbinds.integration.test.ts +++ b/packages/integration-tests/wow/character-soulbinds.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-soulbinds integration', () => { console.error('Character soulbinds validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-specializations.integration.test.ts b/packages/integration-tests/wow/character-specializations.integration.test.ts index b580ef37..d1668051 100644 --- a/packages/integration-tests/wow/character-specializations.integration.test.ts +++ b/packages/integration-tests/wow/character-specializations.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-specializations integration', () => { console.error('Character specializations validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-statistics.integration.test.ts b/packages/integration-tests/wow/character-statistics.integration.test.ts index 50c2e56d..8a6a2a52 100644 --- a/packages/integration-tests/wow/character-statistics.integration.test.ts +++ b/packages/integration-tests/wow/character-statistics.integration.test.ts @@ -22,5 +22,5 @@ describe('wow character statistics integration', () => { console.error('Character statistics summary validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/character-titles.integration.test.ts b/packages/integration-tests/wow/character-titles.integration.test.ts index ab7dccc6..c64e6e0c 100644 --- a/packages/integration-tests/wow/character-titles.integration.test.ts +++ b/packages/integration-tests/wow/character-titles.integration.test.ts @@ -20,5 +20,5 @@ describe('wow character-titles integration', () => { console.error('Character titles validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/connected-realm.integration.test.ts b/packages/integration-tests/wow/connected-realm.integration.test.ts index f3e8ad32..e7b38a21 100644 --- a/packages/integration-tests/wow/connected-realm.integration.test.ts +++ b/packages/integration-tests/wow/connected-realm.integration.test.ts @@ -3,7 +3,7 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { connectedRealmIndexResponseSchema } from '../../../generated/schemas/wow'; +import { connectedRealmIndexResponseSchema, connectedRealmSearchResponseSchema } from '../../../generated/schemas/wow'; describe('wow connected realm integration', () => { it('validates connected realm index', async ({ expect }) => { @@ -19,5 +19,20 @@ describe('wow connected realm integration', () => { console.error('Connected realm index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); + + it('validates connected realm search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const search = await client.sendRequest(wow.connectedRealmSearch({ _page: 1 })); + const parsed = connectedRealmSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Connected realm search validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/covenant.integration.test.ts b/packages/integration-tests/wow/covenant.integration.test.ts index b53ae939..daaa4975 100644 --- a/packages/integration-tests/wow/covenant.integration.test.ts +++ b/packages/integration-tests/wow/covenant.integration.test.ts @@ -7,6 +7,7 @@ import { conduitIndexResponseSchema, conduitResponseSchema, covenantIndexResponseSchema, + covenantMediaResponseSchema, covenantResponseSchema, soulbindIndexResponseSchema, soulbindResponseSchema, @@ -28,7 +29,7 @@ describe.concurrent('wow covenant integration', async () => { const requests = []; - for (const cov of parsedCov.success ? parsedCov.data.covenants : []) { + for (const cov of covIndex.covenants) { requests.push(client.sendRequest(wow.covenant(cov.id))); } const responses = await Promise.all(requests); @@ -38,8 +39,15 @@ describe.concurrent('wow covenant integration', async () => { console.error('Covenant detail validation failed:', treeifyError(parsedDetail.error)); } expect(parsedDetail.success).toBe(true); + + const media = await client.sendRequest(wow.covenantMedia(covenant.id)); + const parsedMedia = covenantMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Covenant media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); } - }, 30_000); + }); it('validates soulbind index and fetches details', async ({ expect }) => { const soulIndex = await client.sendRequest(wow.soulbindIndex()); const parsedSoul = soulbindIndexResponseSchema.safeParse(soulIndex); @@ -61,7 +69,7 @@ describe.concurrent('wow covenant integration', async () => { } expect(parsedDetail.success).toBe(true); } - }, 30_000); + }); it('validates conduit index and fetches details', async ({ expect }) => { const conduitIndex = await client.sendRequest(wow.conduitIndex()); @@ -93,5 +101,5 @@ describe.concurrent('wow covenant integration', async () => { } expect(parsedDetail.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/creature.integration.test.ts b/packages/integration-tests/wow/creature.integration.test.ts index 5a4b597a..c4bf3e11 100644 --- a/packages/integration-tests/wow/creature.integration.test.ts +++ b/packages/integration-tests/wow/creature.integration.test.ts @@ -5,7 +5,9 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { creatureFamilyIndexResponseSchema, + creatureFamilyMediaResponseSchema, creatureFamilyResponseSchema, + creatureSearchResponseSchema, creatureTypeIndexResponseSchema, creatureTypeResponseSchema, } from '../../../generated/schemas/wow/creature'; @@ -33,8 +35,30 @@ describe('wow creature integration', () => { console.error('Creature family detail validation failed:', treeifyError(parsedDetail.error)); } expect(parsedDetail.success).toBe(true); + + const media = await client.sendRequest(wow.creatureFamilyMedia(first.id)); + const parsedMedia = creatureFamilyMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Creature family media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + } + }); + + it('validates creature search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const search = await client.sendRequest(wow.creatureSearch({ _page: 1, locale: 'en_GB', name: 'dragon' })); + const parsed = creatureSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Creature search validation failed:', treeifyError(parsed.error)); } - }, 30_000); + expect(parsed.success).toBe(true); + }); it('validates creature type index', async ({ expect }) => { const client = await createBlizzardApiClient({ @@ -59,5 +83,5 @@ describe('wow creature integration', () => { } expect(parsedDetail.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/guild-crest.integration.test.ts b/packages/integration-tests/wow/guild-crest.integration.test.ts index 429b4d1e..18cb578a 100644 --- a/packages/integration-tests/wow/guild-crest.integration.test.ts +++ b/packages/integration-tests/wow/guild-crest.integration.test.ts @@ -19,5 +19,5 @@ describe('wow guild crest integration', () => { console.error('Guild crest components index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/guild.integration.test.ts b/packages/integration-tests/wow/guild.integration.test.ts index f08f97a0..e3727965 100644 --- a/packages/integration-tests/wow/guild.integration.test.ts +++ b/packages/integration-tests/wow/guild.integration.test.ts @@ -1,7 +1,14 @@ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; +import { treeifyError } from 'zod'; import { environment } from '../../../environment'; +import { + guildAchievementsResponseSchema, + guildActivityResponseSchema, + guildResponseSchema, + guildRosterResponseSchema, +} from '../../../generated/schemas/wow/guild'; describe('wow guild integration', () => { it('fetches guild endpoints for echoes on laughing-skull', async ({ expect }) => { @@ -15,12 +22,31 @@ describe('wow guild integration', () => { const guildSlug = 'echoes'; const guildResp = await client.sendRequest(wow.guild(realm, guildSlug)); - expect(guildResp).toBeDefined(); + const parsedGuild = guildResponseSchema.safeParse(guildResp); + if (!parsedGuild.success) { + console.error('Guild validation failed:', treeifyError(parsedGuild.error)); + } + expect(parsedGuild.success).toBe(true); const achievementsResp = await client.sendRequest(wow.guildAchievements(realm, guildSlug)); - expect(achievementsResp).toBeDefined(); + const parsedAchievements = guildAchievementsResponseSchema.safeParse(achievementsResp); + if (!parsedAchievements.success) { + console.error('Guild achievements validation failed:', treeifyError(parsedAchievements.error)); + } + expect(parsedAchievements.success).toBe(true); const rosterResp = await client.sendRequest(wow.guildRoster(realm, guildSlug)); - expect(rosterResp).toBeDefined(); - }, 30_000); + const parsedRoster = guildRosterResponseSchema.safeParse(rosterResp); + if (!parsedRoster.success) { + console.error('Guild roster validation failed:', treeifyError(parsedRoster.error)); + } + expect(parsedRoster.success).toBe(true); + + const activityResp = await client.sendRequest(wow.guildActivity(realm, guildSlug)); + const parsedActivity = guildActivityResponseSchema.safeParse(activityResp); + if (!parsedActivity.success) { + console.error('Guild activity validation failed:', treeifyError(parsedActivity.error)); + } + expect(parsedActivity.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/heirloom.integration.test.ts b/packages/integration-tests/wow/heirloom.integration.test.ts index 39a73d37..f4850ab4 100644 --- a/packages/integration-tests/wow/heirloom.integration.test.ts +++ b/packages/integration-tests/wow/heirloom.integration.test.ts @@ -28,5 +28,5 @@ describe('wow heirloom integration', () => { } expect(parsedItem.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/item.integration.test.ts b/packages/integration-tests/wow/item.integration.test.ts index 35f16ed7..7c1d5492 100644 --- a/packages/integration-tests/wow/item.integration.test.ts +++ b/packages/integration-tests/wow/item.integration.test.ts @@ -1,18 +1,42 @@ +/* eslint-disable sonarjs/pseudo-random */ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { itemClassIndexResponseSchema, itemClassResponseSchema } from '../../../generated/schemas/wow/item'; +import { + itemClassIndexResponseSchema, + itemClassResponseSchema, + itemMediaResponseSchema, + itemResponseSchema, + itemSearchResponseSchema, + itemSetIndexResponseSchema, + itemSetResponseSchema, + itemSubClassResponseSchema, +} from '../../../generated/schemas/wow/item'; -describe('wow item integration', () => { - it('validates item class index', async ({ expect }) => { - const client = await createBlizzardApiClient({ - key: environment.blizzardClientId, - origin: 'eu', - secret: environment.blizzardClientSecret, - }); +describe.concurrent('wow item integration', async () => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + it('validates item and item media', async ({ expect }) => { + const resp = await client.sendRequest(wow.item(19_019)); + const parsed = itemResponseSchema.safeParse(resp); + if (!parsed.success) { + console.error('Item validation failed', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + const respMedia = await client.sendRequest(wow.itemMedia(19_019)); + const parsedMedia = itemMediaResponseSchema.safeParse(respMedia); + if (!parsedMedia.success) { + console.error('Item media validation failed', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + }); + it('validates item class index', async ({ expect }) => { const resp = await client.sendRequest(wow.itemClassIndex()); const parsed = itemClassIndexResponseSchema.safeParse(resp); if (!parsed.success) { @@ -20,14 +44,54 @@ describe('wow item integration', () => { } expect(parsed.success).toBe(true); - const first = parsed.success ? parsed.data.item_classes[0] : undefined; + const itemClassIndex = Math.floor(Math.random() * resp.item_classes.length); + const itemClass = resp.item_classes[itemClassIndex]; + + expect(itemClass).toBeDefined(); + + const detail = await client.sendRequest(wow.itemClass(itemClass!.id)); + const parsedDetail = itemClassResponseSchema.safeParse(detail); + if (!parsedDetail.success) { + console.error('Item class detail validation failed:', treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + + const subClassIndex = Math.floor(Math.random() * detail.item_subclasses.length); + const subClass = detail.item_subclasses[subClassIndex]; + + const subDetail = await client.sendRequest(wow.itemSubClass(itemClass!.id, subClass!.id)); + const parsedSubDetail = itemSubClassResponseSchema.safeParse(subDetail); + if (!parsedSubDetail.success) { + console.error('Item subclass detail validation failed:', treeifyError(parsedSubDetail.error)); + } + expect(parsedSubDetail.success).toBe(true); + }); + + it('validates item sets', async ({ expect }) => { + const setIndex = await client.sendRequest(wow.itemSetIndex()); + const parsedSetIndex = itemSetIndexResponseSchema.safeParse(setIndex); + if (!parsedSetIndex.success) { + console.error('Item set index validation failed:', treeifyError(parsedSetIndex.error)); + } + expect(parsedSetIndex.success).toBe(true); + + const first = parsedSetIndex.success ? parsedSetIndex.data.item_sets[0] : undefined; if (first) { - const detail = await client.sendRequest(wow.itemClass(first.id)); - const parsedDetail = itemClassResponseSchema.safeParse(detail); - if (!parsedDetail.success) { - console.error('Item class detail validation failed:', treeifyError(parsedDetail.error)); + const set = await client.sendRequest(wow.itemSet(first.id)); + const parsedSet = itemSetResponseSchema.safeParse(set); + if (!parsedSet.success) { + console.error('Item set detail validation failed:', treeifyError(parsedSet.error)); } - expect(parsedDetail.success).toBe(true); + expect(parsedSet.success).toBe(true); } - }, 30_000); + }); + + it('validates item search', async ({ expect }) => { + const search = await client.sendRequest(wow.itemSearch({ _page: 1, locale: 'en_GB', name: 'Glaive' })); + const parsed = itemSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Item search validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/journal.integration.test.ts b/packages/integration-tests/wow/journal.integration.test.ts index 37437b4a..88827fb7 100644 --- a/packages/integration-tests/wow/journal.integration.test.ts +++ b/packages/integration-tests/wow/journal.integration.test.ts @@ -6,9 +6,11 @@ import { environment } from '../../../environment'; import { journalEncounterIndexResponseSchema, journalEncounterResponseSchema, + journalEncounterSearchResponseSchema, journalExpansionIndexResponseSchema, journalExpansionResponseSchema, journalInstanceIndexResponseSchema, + journalInstanceMediaResponseSchema, journalInstanceResponseSchema, } from '../../../generated/schemas/wow/journal'; @@ -52,7 +54,7 @@ describe.concurrent('wow journal integration', () => { } expect(parsedEncounter.success).toBe(true); } - }, 30_000); + }); it('validates journal expansion index and details', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, @@ -93,7 +95,7 @@ describe.concurrent('wow journal integration', () => { } expect(parsedExpansion.success).toBe(true); } - }, 30_000); + }); it('validates journal instance index and details', async ({ expect }) => { const client = await createBlizzardApiClient({ @@ -135,5 +137,47 @@ describe.concurrent('wow journal integration', () => { } expect(parsedInstance.success).toBe(true); } - }, 30_000); + }); + + it('validates journal encounter search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const search = await client.sendRequest( + wow.journalEncounterSearch({ _page: 1, instanceName: 'raid', locale: 'en_GB' }), + ); + const parsed = journalEncounterSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Journal encounter search validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); + + it('validates journal instance media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const instanceResp = await client.sendRequest(wow.journalInstanceIndex()); + const parsedExp = journalInstanceIndexResponseSchema.safeParse(instanceResp); + if (!parsedExp.success) { + console.error('Journal instance index validation failed:', treeifyError(parsedExp.error)); + } + expect(parsedExp.success).toBe(true); + + const instances = parsedExp.success ? parsedExp.data.instances : []; + if (instances.length > 0) { + const media = await client.sendRequest(wow.journalInstanceMedia(instances[0]!.id)); + const parsedMedia = journalInstanceMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Journal instance media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/media-search.integration.test.ts b/packages/integration-tests/wow/media-search.integration.test.ts index df89eba4..6073f3bc 100644 --- a/packages/integration-tests/wow/media-search.integration.test.ts +++ b/packages/integration-tests/wow/media-search.integration.test.ts @@ -19,5 +19,5 @@ describe('wow media search integration', () => { console.error('Media search validation failed:', treeifyError(parsedSearch.error)); } expect(parsedSearch.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/modified-crafting.integration.test.ts b/packages/integration-tests/wow/modified-crafting.integration.test.ts index fea184ac..25ba46b1 100644 --- a/packages/integration-tests/wow/modified-crafting.integration.test.ts +++ b/packages/integration-tests/wow/modified-crafting.integration.test.ts @@ -6,6 +6,9 @@ import { environment } from '../../../environment'; import { modifiedCraftingCategoryIndexResponseSchema, modifiedCraftingCategoryResponseSchema, + modifiedCraftingIndexResponseSchema, + modifiedCraftingReagentSlotTypeIndexResponseSchema, + modifiedCraftingReagentSlotTypeResponseSchema, } from '../../../generated/schemas/wow/modified-crafting'; describe('wow modified-crafting integration', () => { @@ -44,5 +47,43 @@ describe('wow modified-crafting integration', () => { } expect(parsedCategory.success).toBe(true); } - }, 30_000); + }); + + it('validates modified crafting index and reagent slot types', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const index = await client.sendRequest(wow.modifiedCraftingIndex()); + const parsed = modifiedCraftingIndexResponseSchema.safeParse(index); + if (!parsed.success) { + console.error('Modified crafting index validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + + const slotTypeIndex = await client.sendRequest(wow.modifiedCraftingReagentSlotTypeIndex()); + const parsedSlotIndex = modifiedCraftingReagentSlotTypeIndexResponseSchema.safeParse(slotTypeIndex); + if (!parsedSlotIndex.success) { + console.error( + 'Modified crafting reagent slot type index validation failed:', + treeifyError(parsedSlotIndex.error), + ); + } + expect(parsedSlotIndex.success).toBe(true); + + const slotTypes = parsedSlotIndex.success ? parsedSlotIndex.data.slot_types : []; + if (slotTypes.length > 0) { + const slotType = await client.sendRequest(wow.modifiedCraftingReagentSlotType(slotTypes[0]!.id)); + const parsedSlotType = modifiedCraftingReagentSlotTypeResponseSchema.safeParse(slotType); + if (!parsedSlotType.success) { + console.error( + 'Modified crafting reagent slot type detail validation failed:', + treeifyError(parsedSlotType.error), + ); + } + expect(parsedSlotType.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/mount.integration.test.ts b/packages/integration-tests/wow/mount.integration.test.ts index 47d69944..c25d7ef1 100644 --- a/packages/integration-tests/wow/mount.integration.test.ts +++ b/packages/integration-tests/wow/mount.integration.test.ts @@ -3,7 +3,11 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { mountIndexResponseSchema, mountResponseSchema } from '../../../generated/schemas/wow/mount'; +import { + mountIndexResponseSchema, + mountResponseSchema, + mountSearchResponseSchema, +} from '../../../generated/schemas/wow/mount'; describe('wow mount integration', () => { it('validates mount index and fetches mount detail', async ({ expect }) => { @@ -41,5 +45,22 @@ describe('wow mount integration', () => { } expect(parsedmount.success).toBe(true); } - }, 30_000); + }); + + it('validates mount search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const search = await client.sendRequest(wow.mountSearch({ _page: 1, locale: 'en_GB', name: 'Horse' })); + const parsed = mountSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Mount search validation failed:', treeifyError(parsed.error)); + console.log('search', search); + console.log('parsed.error', parsed.error); + } + expect(parsed.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts b/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts index e628a3a8..e5e37633 100644 --- a/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts +++ b/packages/integration-tests/wow/mythic-keystone-affix.integration.test.ts @@ -57,5 +57,5 @@ describe('wow mythic-keystone-affix integration', () => { } expect(parsed.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts b/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts index 1f182634..ac6e9684 100644 --- a/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts +++ b/packages/integration-tests/wow/mythic-keystone-dungeon.integration.test.ts @@ -44,5 +44,5 @@ describe('wow mythic-keystone-dungeon integration', () => { } expect(parsedResp.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/pet.integration.test.ts b/packages/integration-tests/wow/pet.integration.test.ts index d967bada..9be0d303 100644 --- a/packages/integration-tests/wow/pet.integration.test.ts +++ b/packages/integration-tests/wow/pet.integration.test.ts @@ -3,7 +3,14 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { petIndexResponseSchema, petResponseSchema } from '../../../generated/schemas/wow/pet'; +import { + petAbilityIndexResponseSchema, + petAbilityMediaResponseSchema, + petAbilityResponseSchema, + petIndexResponseSchema, + petMediaResponseSchema, + petResponseSchema, +} from '../../../generated/schemas/wow/pet'; describe('wow pet integration', () => { it('validates pet index and fetches pet detail', async ({ expect }) => { @@ -41,5 +48,75 @@ describe('wow pet integration', () => { } expect(parsedPet.success).toBe(true); } - }, 30_000); + }); + + it('validates pet abilities and media', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const abilityIndex = await client.sendRequest(wow.petAbilityIndex()); + const parsedAbilityIndex = petAbilityIndexResponseSchema.safeParse(abilityIndex); + if (!parsedAbilityIndex.success) { + console.error('Pet ability index validation failed:', treeifyError(parsedAbilityIndex.error)); + } + expect(parsedAbilityIndex.success).toBe(true); + + const abilities = parsedAbilityIndex.success ? parsedAbilityIndex.data.abilities : []; + const sampleSize = Math.min(5, abilities.length); + const sampled = + abilities.length > sampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + abilities.toSorted(() => 0.5 - Math.random()).slice(0, sampleSize) + : abilities.slice(0, sampleSize); + + for (const ability of sampled) { + const detail = await client.sendRequest(wow.petAbility(ability.id)); + const parsedDetail = petAbilityResponseSchema.safeParse(detail); + if (!parsedDetail.success) { + console.error('Pet ability detail validation failed for id', ability.id, treeifyError(parsedDetail.error)); + } + expect(parsedDetail.success).toBe(true); + + const media = await client.sendRequest(wow.petAbilityMedia(ability.id)); + const parsedMedia = petAbilityMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Pet ability media validation failed for id', ability.id, treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + } + + const petIndex = await client.sendRequest(wow.petIndex()); + const parsedPetIndex = petIndexResponseSchema.safeParse(petIndex); + if (!parsedPetIndex.success) { + console.error('Pet index validation failed:', treeifyError(parsedPetIndex.error)); + } + expect(parsedPetIndex.success).toBe(true); + + // Pick up to 5 pets at random from the index to fetch details + const pets = petIndex.pets; + const petSampleSize = Math.min(5, pets.length); + const petSampled = + pets.length > petSampleSize + ? // eslint-disable-next-line sonarjs/pseudo-random + pets.toSorted(() => 0.5 - Math.random()).slice(0, petSampleSize) + : pets.slice(0, petSampleSize); + + const requests = []; + + for (const pet of petSampled) { + requests.push(client.sendRequest(wow.petMedia(pet.id))); + } + const responses = await Promise.all(requests); + + for (const pet of responses) { + const parsedPetMedia = petMediaResponseSchema.safeParse(pet); + if (!parsedPetMedia.success) { + console.error('Pet media validation failed for id', pet.id, treeifyError(parsedPetMedia.error)); + } + expect(parsedPetMedia.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/playable-class.integration.test.ts b/packages/integration-tests/wow/playable-class.integration.test.ts index 5a3d0019..94f87ac5 100644 --- a/packages/integration-tests/wow/playable-class.integration.test.ts +++ b/packages/integration-tests/wow/playable-class.integration.test.ts @@ -5,7 +5,9 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { playableClassIndexResponseSchema, + playableClassMediaResponseSchema, playableClassResponseSchema, + pvpTalentSlotsResponseSchema, } from '../../../generated/schemas/wow/playable-class'; describe.concurrent('wow playable class integration', () => { @@ -31,6 +33,20 @@ describe.concurrent('wow playable class integration', () => { console.error('Playable class validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); + + const media = await client.sendRequest(wow.playableClassMedia(first.id)); + const parsedMedia = playableClassMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Playable class media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + + const pvpSlots = await client.sendRequest(wow.pvpTalentSlots(first.id)); + const parsedPvpSlots = pvpTalentSlotsResponseSchema.safeParse(pvpSlots); + if (!parsedPvpSlots.success) { + console.error('Playable class PvP talent slots validation failed:', treeifyError(parsedPvpSlots.error)); + } + expect(parsedPvpSlots.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/playable-race.integration.test.ts b/packages/integration-tests/wow/playable-race.integration.test.ts index d3ac137d..31d71515 100644 --- a/packages/integration-tests/wow/playable-race.integration.test.ts +++ b/packages/integration-tests/wow/playable-race.integration.test.ts @@ -3,10 +3,10 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { playableRaceIndexResponseSchema } from '../../../generated/schemas/wow'; +import { playableRaceIndexResponseSchema, playableRaceResponseSchema } from '../../../generated/schemas/wow'; describe('wow playable race integration', () => { - it('validates playable race index', async ({ expect }) => { + it('validates playable races', async ({ expect }) => { const client = await createBlizzardApiClient({ key: environment.blizzardClientId, origin: 'us', @@ -19,5 +19,21 @@ describe('wow playable race integration', () => { console.error('Playable race index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + const requests = []; + + for (const race of resp.races) { + requests.push(client.sendRequest(wow.playableRace(race.id))); + } + + const results = await Promise.all(requests); + + for (const result of results) { + const parsedResult = playableRaceResponseSchema.safeParse(result); + if (!parsedResult.success) { + console.error('Race detail validation failed for id', result.id, treeifyError(parsedResult.error)); + } + expect(parsedResult.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts index 4c5c6918..03a93e25 100644 --- a/packages/integration-tests/wow/playable-specialization.integration.test.ts +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -5,6 +5,7 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { playableSpecializationIndexResponseSchema, + playableSpecializationMediaResponseSchema, playableSpecializationResponseSchema, } from '../../../generated/schemas/wow/playable-specialization'; @@ -34,6 +35,13 @@ describe('wow playable-specialization integration', () => { } expect(parsedSpec.success).toBe(true); + + const media = await client.sendRequest(wow.playableSpecializationMedia(spec.id)); + const parsedMedia = playableSpecializationMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Playable specialization media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/power-type.integration.test.ts b/packages/integration-tests/wow/power-type.integration.test.ts index 6f1f7537..6e801718 100644 --- a/packages/integration-tests/wow/power-type.integration.test.ts +++ b/packages/integration-tests/wow/power-type.integration.test.ts @@ -3,7 +3,7 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { powerTypeIndexResponseSchema } from '../../../generated/schemas/wow'; +import { powerTypeIndexResponseSchema, powerTypeResponseSchema } from '../../../generated/schemas/wow'; describe('wow power type integration', () => { it('validates power type index', async ({ expect }) => { @@ -19,5 +19,15 @@ describe('wow power type integration', () => { console.error('Power type index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + + const first = parsed.success ? parsed.data.power_types[0] : undefined; + if (first) { + const type = await client.sendRequest(wow.powerType(first.id)); + const parsedType = powerTypeResponseSchema.safeParse(type); + if (!parsedType.success) { + console.error('Power type detail validation failed:', treeifyError(parsedType.error)); + } + expect(parsedType.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/profession.integration.test.ts b/packages/integration-tests/wow/profession.integration.test.ts index 381feb92..87cafbcd 100644 --- a/packages/integration-tests/wow/profession.integration.test.ts +++ b/packages/integration-tests/wow/profession.integration.test.ts @@ -1,9 +1,17 @@ +/* eslint-disable sonarjs/pseudo-random */ import { createBlizzardApiClient } from '@blizzard-api/client'; import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { professionIndexResponseSchema, professionResponseSchema } from '../../../generated/schemas/wow/profession'; +import { + professionIndexResponseSchema, + professionMediaResponseSchema, + professionResponseSchema, + professionSkillTierResponseSchema, + recipeMediaResponseSchema, + recipeResponseSchema, +} from '../../../generated/schemas/wow/profession'; describe('wow profession integration', () => { it('validates profession index and fetches profession detail', async ({ expect }) => { @@ -19,14 +27,56 @@ describe('wow profession integration', () => { } expect(parsedIndex.success).toBe(true); - const first = parsedIndex.success ? parsedIndex.data.professions[0] : undefined; - if (first) { - const prof = await client.sendRequest(wow.profession(first.id)); - const parsedProf = professionResponseSchema.safeParse(prof); - if (!parsedProf.success) { - console.error('Profession detail validation failed:', treeifyError(parsedProf.error)); - } - expect(parsedProf.success).toBe(true); + const first = parsedIndex.data?.professions[0]; + + expect(first).toBeDefined(); + + const prof = await client.sendRequest(wow.profession(first!.id)); + const parsedProf = professionResponseSchema.safeParse(prof); + if (!parsedProf.success) { + console.error('Profession detail validation failed:', treeifyError(parsedProf.error)); + } + expect(parsedProf.success).toBe(true); + + const media = await client.sendRequest(wow.professionMedia(first!.id)); + const parsedMedia = professionMediaResponseSchema.safeParse(media); + if (!parsedMedia.success) { + console.error('Profession media validation failed:', treeifyError(parsedMedia.error)); + } + expect(parsedMedia.success).toBe(true); + + const skillTierId = + parsedProf.data?.skill_tiers[Math.floor(Math.random() * parsedProf.data?.skill_tiers.length)]?.id; + + expect(skillTierId).toBeDefined(); + const tier = await client.sendRequest(wow.professionSkillTier(first!.id, skillTierId!)); + const parsedTier = professionSkillTierResponseSchema.safeParse(tier); + if (!parsedTier.success) { + console.error('Profession skill tier detail validation failed:', treeifyError(parsedTier.error)); + } + expect(parsedTier.success).toBe(true); + + const categoryIndex = Math.floor(Math.random() * (parsedTier.data?.categories.length ?? 0)); + const recipeLength = parsedTier.data?.categories[categoryIndex]?.recipes.length; + const recipeIndex = Math.floor(Math.random() * (recipeLength ?? 0)); + const recipeId = parsedTier.data?.categories[categoryIndex]?.recipes[recipeIndex]?.id; + + expect(recipeId).toBeDefined(); + + const recipe = await client.sendRequest(wow.recipe(recipeId!)); + const parsedRecipe = recipeResponseSchema.safeParse(recipe); + if (!parsedRecipe.success) { + console.error('Recipe detail validation failed:', recipeId, treeifyError(parsedRecipe.error)); + console.log('recipe', recipe); + console.log('parsedrecipe.error', parsedRecipe.error); + } + expect(parsedRecipe.success).toBe(true); + + const recipeMedia = await client.sendRequest(wow.recipeMedia(recipeId!)); + const parsedRecipeMedia = recipeMediaResponseSchema.safeParse(recipeMedia); + if (!parsedRecipeMedia.success) { + console.error('Recipe media validation failed:', treeifyError(parsedRecipeMedia.error)); } - }, 30_000); + expect(parsedRecipeMedia.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/pvp-season.integration.test.ts b/packages/integration-tests/wow/pvp-season.integration.test.ts index 12a94109..0b39cf25 100644 --- a/packages/integration-tests/wow/pvp-season.integration.test.ts +++ b/packages/integration-tests/wow/pvp-season.integration.test.ts @@ -5,7 +5,10 @@ import { treeifyError } from 'zod'; import { environment } from '../../../environment'; import { pvpLeaderboardIndexResponseSchema, + pvpLeaderboardResponseSchema, + pvpRewardsIndexResponseSchema, pvpSeasonIndexResponseSchema, + pvpSeasonResponseSchema, } from '../../../generated/schemas/wow/pvp-season'; describe('wow pvp integration', () => { @@ -23,11 +26,37 @@ describe('wow pvp integration', () => { } expect(parsedSeason.success).toBe(true); - const leaderboard = await client.sendRequest(wow.pvpLeaderboardIndex(season.current_season.id)); - const parsedLeaderboard = pvpLeaderboardIndexResponseSchema.safeParse(leaderboard); + const seasonId = parsedSeason.success ? parsedSeason.data.current_season.id : undefined; + if (seasonId) { + const seasonDetail = await client.sendRequest(wow.pvpSeason(seasonId)); + const parsedSeasonDetail = pvpSeasonResponseSchema.safeParse(seasonDetail); + if (!parsedSeasonDetail.success) { + console.error('PVP season detail validation failed:', treeifyError(parsedSeasonDetail.error)); + } + expect(parsedSeasonDetail.success).toBe(true); + + const rewards = await client.sendRequest(wow.pvpRewardsIndex(seasonId)); + const parsedRewards = pvpRewardsIndexResponseSchema.safeParse(rewards); + if (!parsedRewards.success) { + console.error('PVP rewards index validation failed:', treeifyError(parsedRewards.error)); + } + expect(parsedRewards.success).toBe(true); + } + + const leaderboardIndex = await client.sendRequest(wow.pvpLeaderboardIndex(season.current_season.id)); + const parsedLeaderboardIndex = pvpLeaderboardIndexResponseSchema.safeParse(leaderboardIndex); + if (!parsedLeaderboardIndex.success) { + console.error('PVP leaderboard index validation failed:', treeifyError(parsedLeaderboardIndex.error)); + } + expect(parsedLeaderboardIndex.success).toBe(true); + + const leaderboard = await client.sendRequest(wow.pvpLeaderboard(season.current_season.id, '3v3')); + const parsedLeaderboard = pvpLeaderboardResponseSchema.safeParse(leaderboard); if (!parsedLeaderboard.success) { - console.error('PVP leaderboard index validation failed:', treeifyError(parsedLeaderboard.error)); + console.error('PVP leaderboard detail validation failed:', treeifyError(parsedLeaderboard.error)); + console.log('leaderboard', leaderboard); + console.log('parsedLeaderboard.error', parsedLeaderboard.error); } expect(parsedLeaderboard.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/pvp-tier.integration.test.ts b/packages/integration-tests/wow/pvp-tier.integration.test.ts index f0880416..70f96bf3 100644 --- a/packages/integration-tests/wow/pvp-tier.integration.test.ts +++ b/packages/integration-tests/wow/pvp-tier.integration.test.ts @@ -56,5 +56,5 @@ describe('wow pvp-tier integration', () => { } expect(parsed.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/quest.integration.test.ts b/packages/integration-tests/wow/quest.integration.test.ts index 9867e65c..2298e360 100644 --- a/packages/integration-tests/wow/quest.integration.test.ts +++ b/packages/integration-tests/wow/quest.integration.test.ts @@ -3,7 +3,16 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { questIndexResponseSchema, questResponseSchema } from '../../../generated/schemas/wow/quest'; +import { + questAreaIndexResponseSchema, + questAreaResponseSchema, + questCategoryIndexResponseSchema, + questCategoryResponseSchema, + questIndexResponseSchema, + questResponseSchema, + questTypeIndexResponseSchema, + questTypeResponseSchema, +} from '../../../generated/schemas/wow/quest'; describe('wow quest integration', () => { it('validates quest index and fetches quest detail', async ({ expect }) => { @@ -25,6 +34,64 @@ describe('wow quest integration', () => { console.error('Quest detail validation failed:', treeifyError(parsedQuest.error)); } expect(parsedQuest.success).toBe(true); - }, 30_000); - //TODO Do more quest tests + }); + + it('validates quest areas, categories, and types', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const areaIndex = await client.sendRequest(wow.questAreaIndex()); + const parsedAreaIndex = questAreaIndexResponseSchema.safeParse(areaIndex); + if (!parsedAreaIndex.success) { + console.error('Quest area index validation failed:', treeifyError(parsedAreaIndex.error)); + } + expect(parsedAreaIndex.success).toBe(true); + + const areas = parsedAreaIndex.success ? parsedAreaIndex.data.areas : []; + if (areas.length > 0) { + const area = await client.sendRequest(wow.questArea(areas[0]!.id)); + const parsedArea = questAreaResponseSchema.safeParse(area); + if (!parsedArea.success) { + console.error('Quest area detail validation failed:', treeifyError(parsedArea.error)); + } + expect(parsedArea.success).toBe(true); + } + + const categoryIndex = await client.sendRequest(wow.questCategoryIndex()); + const parsedCategoryIndex = questCategoryIndexResponseSchema.safeParse(categoryIndex); + if (!parsedCategoryIndex.success) { + console.error('Quest category index validation failed:', treeifyError(parsedCategoryIndex.error)); + } + expect(parsedCategoryIndex.success).toBe(true); + + const categories = parsedCategoryIndex.success ? parsedCategoryIndex.data.categories : []; + if (categories.length > 0) { + const category = await client.sendRequest(wow.questCategory(categories[0]!.id)); + const parsedCategory = questCategoryResponseSchema.safeParse(category); + if (!parsedCategory.success) { + console.error('Quest category detail validation failed:', treeifyError(parsedCategory.error)); + } + expect(parsedCategory.success).toBe(true); + } + + const typeIndex = await client.sendRequest(wow.questTypeIndex()); + const parsedTypeIndex = questTypeIndexResponseSchema.safeParse(typeIndex); + if (!parsedTypeIndex.success) { + console.error('Quest type index validation failed:', treeifyError(parsedTypeIndex.error)); + } + expect(parsedTypeIndex.success).toBe(true); + + const types = parsedTypeIndex.success ? parsedTypeIndex.data.types : []; + if (types.length > 0) { + const type = await client.sendRequest(wow.questType(types[0]!.id)); + const parsedType = questTypeResponseSchema.safeParse(type); + if (!parsedType.success) { + console.error('Quest type detail validation failed:', treeifyError(parsedType.error)); + } + expect(parsedType.success).toBe(true); + } + }); }); diff --git a/packages/integration-tests/wow/realm.integration.test.ts b/packages/integration-tests/wow/realm.integration.test.ts index c5823fcd..49ccab85 100644 --- a/packages/integration-tests/wow/realm.integration.test.ts +++ b/packages/integration-tests/wow/realm.integration.test.ts @@ -3,7 +3,11 @@ import * as wow from '@blizzard-api/wow'; import { describe, it } from 'vitest'; import { treeifyError } from 'zod'; import { environment } from '../../../environment'; -import { realmIndexResponseSchema, realmResponseSchema } from '../../../generated/schemas/wow/realm'; +import { + realmIndexResponseSchema, + realmResponseSchema, + realmSearchResponseSchema, +} from '../../../generated/schemas/wow/realm'; describe('wow realm integration', () => { it('validates realm index and fetches realm detail', async ({ expect }) => { @@ -26,8 +30,25 @@ describe('wow realm integration', () => { const parsedRealm = realmResponseSchema.safeParse(realm); if (!parsedRealm.success) { console.error('Realm detail validation failed:', treeifyError(parsedRealm.error)); + console.log(parsedRealm.error); + console.log('realm', realm); } expect(parsedRealm.success).toBe(true); } - }, 30_000); + }); + + it('validates realm search', async ({ expect }) => { + const client = await createBlizzardApiClient({ + key: environment.blizzardClientId, + origin: 'eu', + secret: environment.blizzardClientSecret, + }); + + const search = await client.sendRequest(wow.realmSearch({ _page: 1 })); + const parsed = realmSearchResponseSchema.safeParse(search); + if (!parsed.success) { + console.error('Realm search validation failed:', treeifyError(parsed.error)); + } + expect(parsed.success).toBe(true); + }); }); diff --git a/packages/integration-tests/wow/region.integration.test.ts b/packages/integration-tests/wow/region.integration.test.ts index cef41431..8c305515 100644 --- a/packages/integration-tests/wow/region.integration.test.ts +++ b/packages/integration-tests/wow/region.integration.test.ts @@ -19,5 +19,5 @@ describe('wow region integration', () => { console.error('Region index validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/spell.integration.test.ts b/packages/integration-tests/wow/spell.integration.test.ts index f1d6c358..176fbdb9 100644 --- a/packages/integration-tests/wow/spell.integration.test.ts +++ b/packages/integration-tests/wow/spell.integration.test.ts @@ -37,5 +37,5 @@ describe('wow spell integration', () => { console.error('Spell media validation failed:', treeifyError(parsedMedia.error)); } expect(parsedMedia.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/title.integration.test.ts b/packages/integration-tests/wow/title.integration.test.ts index a8398b79..b2ad1044 100644 --- a/packages/integration-tests/wow/title.integration.test.ts +++ b/packages/integration-tests/wow/title.integration.test.ts @@ -41,5 +41,5 @@ describe('wow title integration', () => { } expect(parsedTitle.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/toy.integration.test.ts b/packages/integration-tests/wow/toy.integration.test.ts index 08d102a7..685a0cda 100644 --- a/packages/integration-tests/wow/toy.integration.test.ts +++ b/packages/integration-tests/wow/toy.integration.test.ts @@ -41,5 +41,5 @@ describe('wow toy integration', () => { } expect(parsedToy.success).toBe(true); } - }, 30_000); + }); }); diff --git a/packages/integration-tests/wow/wow-token.integration.test.ts b/packages/integration-tests/wow/wow-token.integration.test.ts index a8b8a5b0..a16c2f18 100644 --- a/packages/integration-tests/wow/wow-token.integration.test.ts +++ b/packages/integration-tests/wow/wow-token.integration.test.ts @@ -18,5 +18,5 @@ describe('wow wow-token integration', () => { console.error('Wow token validation failed:', treeifyError(parsed.error)); } expect(parsed.success).toBe(true); - }, 30_000); + }); }); diff --git a/packages/wow/src/account-profile/types.ts b/packages/wow/src/account-profile/types.ts index 6cbe0753..4a17578c 100644 --- a/packages/wow/src/account-profile/types.ts +++ b/packages/wow/src/account-profile/types.ts @@ -118,7 +118,7 @@ interface ProtectedStats { } interface Quality { - name: 'Common' | 'Poor' | 'Rare' | 'Uncommon'; + name: string; type: 'COMMON' | 'POOR' | 'RARE' | 'UNCOMMON'; } diff --git a/packages/wow/src/achievements/types.ts b/packages/wow/src/achievements/types.ts index 5af559c1..83ac0386 100644 --- a/packages/wow/src/achievements/types.ts +++ b/packages/wow/src/achievements/types.ts @@ -27,8 +27,9 @@ export interface AchievementCategoryResponse extends NameId, ResponseBase { }; }; display_order: number; - isGuildCategory: boolean; - parent_category: NameIdKey; + is_guild_category: boolean; + parent_category?: NameIdKey; + subcategories?: Array; } /** diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index 7938d53a..dffd91cb 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -55,8 +55,8 @@ export interface AzeriteEssenceSearchResponse extends SearchResponseWithoutResul } interface AzeriteEssenceSearchResponseItem extends KeyBase { data: { - allowed_specializations: Array<{ id: number; name: Record }>; - name: Record; + allowed_specializations: Array<{ id: number; name: Record }>; + name: Record; }; } diff --git a/packages/wow/src/character-collections/types.ts b/packages/wow/src/character-collections/types.ts index e849fbea..a61290a9 100644 --- a/packages/wow/src/character-collections/types.ts +++ b/packages/wow/src/character-collections/types.ts @@ -58,7 +58,7 @@ interface Pet { } interface Quality { - name: 'Common' | 'Poor' | 'Rare' | 'Uncommon'; + name: string; type: 'COMMON' | 'POOR' | 'RARE' | 'UNCOMMON'; } diff --git a/packages/wow/src/character-encounters/types.ts b/packages/wow/src/character-encounters/types.ts index 4d528d35..d06781f2 100644 --- a/packages/wow/src/character-encounters/types.ts +++ b/packages/wow/src/character-encounters/types.ts @@ -16,8 +16,8 @@ export interface CharacterRaidsResponse extends ResponseBase { } interface DungeonDifficulties { - name: 'Heroic' | 'Mythic' | 'Mythic+ Dungeons' | 'Normal'; - type: 'HEROIC' | 'MYTHIC' | 'MYTHIC_KEYSTONE' | 'NORMAL'; + name?: string; + type?: 'HEROIC' | 'MYTHIC' | 'MYTHIC_KEYSTONE' | 'NORMAL'; } interface DungeonInstance { @@ -54,15 +54,7 @@ interface Progress { } interface RaidDifficulties { - name: - | '10 Player' - | '10 Player (Heroic)' - | '25 Player' - | '25 Player (Heroic)' - | 'Heroic' - | 'Mythic' - | 'Normal' - | 'Raid Finder'; + name: string; type: | 'HEROIC' | 'LEGACY_10_MAN' @@ -86,6 +78,6 @@ interface RaidMode { } interface Status { - name: 'Complete' | 'In Progress'; + name: string; type: 'COMPLETE' | 'IN_PROGRESS'; } diff --git a/packages/wow/src/character-mythic-keystone-profile/types.ts b/packages/wow/src/character-mythic-keystone-profile/types.ts index cd737681..47a26874 100644 --- a/packages/wow/src/character-mythic-keystone-profile/types.ts +++ b/packages/wow/src/character-mythic-keystone-profile/types.ts @@ -8,7 +8,7 @@ export interface CharacterMythicKeystoneProfileIndexResponse extends ResponseBas export interface CharacterMythicKeystoneSeasonDetailsResponse extends ResponseBase { best_runs: Array; - character: NameIdKey; + character: Character; mythic_rating: MythicRating; season: KeyBase & { id: number }; } diff --git a/packages/wow/src/connected-realm/types.ts b/packages/wow/src/connected-realm/types.ts index e2aabe78..aca5a51f 100644 --- a/packages/wow/src/connected-realm/types.ts +++ b/packages/wow/src/connected-realm/types.ts @@ -1,30 +1,31 @@ import type { BaseSearchParameters, + Href, KeyBase, Locales, NameIdKey, ResponseBase, SearchResponseWithoutResults, } from '@blizzard-api/core'; -import type { RealmCategory, RealmLocales, RealmTimezone, RealmType, RealmTypeCapitalized } from '../realm/types'; +import type { RealmCategory, RealmLocales, RealmTimezone, RealmTypeCapitalized } from '../realm/types'; /** * Connected Realm Index API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis */ export interface ConnectedRealmIndexResponse extends ResponseBase { - connected_realms: Array<{ href: string }>; + connected_realms: Array; } /** * Connected Realm API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis */ export interface ConnectedRealmResponse extends ResponseBase { - auctions: { href: string }; + auctions: Href; has_queue: boolean; id: number; - mythic_leaderboards: { href: string }; - population: { name: 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; type: RealmPopulationCapitalized }; + mythic_leaderboards: Href; + population: { name: string; type: RealmPopulationCapitalized }; realm_locked_status?: RealmLockedStatus; realms: Array; status: { name: RealmStatus; type: RealmStatusCapitalized }; @@ -60,7 +61,7 @@ interface ConnectedRealmSearchResponseItem extends KeyBase { interface Realm { category: RealmCategory; - connected_realm: { href: string }; + connected_realm: Href; id: number; is_tournament: boolean; locale: RealmLocales; @@ -68,7 +69,7 @@ interface Realm { region: NameIdKey; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: string; type: RealmTypeCapitalized }; } interface RealmLockedStatus { @@ -83,15 +84,15 @@ type RealmStatus = 'Down' | 'Up'; type RealmStatusCapitalized = 'DOWN' | 'UP'; interface SearchRealm { - category: Record; + category: Record; id: number; is_tournament: boolean; locale: RealmLocales; - name: Record; - region: { id: number; name: Record }; + name: Record; + region: { id: number; name: Record }; slug: string; timezone: RealmTimezone; - type: { name: Record; type: RealmTypeCapitalized }; + type: { name: Record; type: RealmTypeCapitalized }; } interface SearchRealmPopulation { diff --git a/packages/wow/src/covenant/types.ts b/packages/wow/src/covenant/types.ts index 93667c32..1b1dc178 100644 --- a/packages/wow/src/covenant/types.ts +++ b/packages/wow/src/covenant/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * Interface for a response from the conduit index endpoint. @@ -33,14 +33,7 @@ export interface CovenantIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface CovenantMediaResponse extends ResponseBase { - class_abilities: Array; - description: string; - id: number; - media: Media; - name: string; - renown_rewards: Array; - signature_ability: SignatureAbility; - soulbinds: Array; + assets?: Array; } /** diff --git a/packages/wow/src/creature/types.ts b/packages/wow/src/creature/types.ts index d1a3d349..83d105d3 100644 --- a/packages/wow/src/creature/types.ts +++ b/packages/wow/src/creature/types.ts @@ -101,11 +101,11 @@ interface CreatureDisplay extends KeyBase { interface CreatureSearchResponseItem extends KeyBase { data: { creature_displays: Array<{ id: number }>; - family?: { id: number; name: Record }; + family?: { id: number; name: Record }; id: number; is_tameable: boolean; name: Record; - type: { id: number; name: Record }; + type: { id: number; name: Record }; }; } diff --git a/packages/wow/src/guild/types.ts b/packages/wow/src/guild/types.ts index 5edf2f6a..e0d7f606 100644 --- a/packages/wow/src/guild/types.ts +++ b/packages/wow/src/guild/types.ts @@ -1,4 +1,14 @@ -import type { Character, Color, Faction, Href, KeyBase, NameIdKey, Realm, ResponseBase } from '@blizzard-api/core'; +import type { + Character, + Color, + Faction, + Factions, + Href, + KeyBase, + NameIdKey, + Realm, + ResponseBase, +} from '@blizzard-api/core'; export interface GuildAchievementsResponse extends ResponseBase { achievements: Array; @@ -43,7 +53,8 @@ interface Achievement { interface ActivityElement { activity: { type: string }; - character_achievement: CharacterAchievement; + character_achievement?: CharacterAchievement; + encounter_completed?: EncounterActivity; timestamp: number; } @@ -83,6 +94,11 @@ interface Criteria { is_completed: boolean; } +interface EncounterActivity { + encounter: NameIdKey; + mode: { name: string; type: 'MYTHIC' }; +} + interface Guild extends NameIdKey { faction: Faction; realm: Realm; @@ -108,6 +124,7 @@ interface RgbWithId { } interface RosterMemberCharacter extends Character { + faction: { type: Factions }; level: number; playable_class: Playable; playable_race: Playable; diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index fa8457f9..473491bf 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -42,8 +42,9 @@ export interface ItemMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface ItemResponse extends NameId, ResponseBase { + appearances?: Array; description?: string; - inventory_type: InventoryType; + inventory_type: InventoryTypeName; is_equippable: boolean; is_stackable: boolean; item_class: NameIdKey; @@ -104,9 +105,9 @@ export interface ItemSetResponse extends ResponseBase { export interface ItemSubClassResponse extends ResponseBase { class_id: number; display_name: string; - hide_subclass_in_tooltips: boolean; + hide_subclass_in_tooltips?: boolean; subclass_id: number; - verbose_name: string; + verbose_name?: string; } interface Armor { @@ -139,50 +140,71 @@ interface Effect { required_count: number; } -interface InventoryType { - name: Record; - type: //Armor - | 'BACK' - | 'BAG' - | 'CHEST' - | 'FEET' - | 'FINGER' - | 'HANDS' - | 'HEAD' - | 'LEGS' - | 'NECK' - | 'NON_EQUIP' - | 'SHIRT' - | 'SHOULDER' - | 'TABARD' - | 'TRINKET' - //Weapons - | 'TWOHWEAPON' - //Misc - | 'WAIST' - | 'WRIST'; +type InventoryType = + //Armor + | 'BACK' + | 'CHEST' + | 'FEET' + | 'FINGER' + | 'HAND' + | 'HANDS' + | 'HEAD' + | 'LEGS' + | 'NECK' + | 'SHOULDER' + | 'THROWN' + | 'TRINKET' + | 'WAIST' + | 'WRIST' + //Weapons + | 'RANGED' + | 'TWOHWEAPON' + | 'WEAPON' + | 'WEAPONMAINHAND' + | 'WEAPONOFFHAND' + //Misc + | 'BAG' + | 'NON_EQUIP' + | 'SHIRT' + | 'TABARD'; + +interface InventoryTypeName { + name: string; + type: InventoryType; +} +interface InventoryTypeNameFromSearch { + name: Record; + type: InventoryType; } interface ItemQuality { - name: Record; - type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; + name: string; + type: ItemQualityType; } +interface ItemQualityFromSearch { + name: Record; + type: ItemQualityType; +} + +type ItemQualityType = 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; + interface ItemSearchResponseItem extends KeyBase { data: { + appearances?: Array<{ id: number }>; id: number; - inventory_type: InventoryType; + inventory_type: InventoryTypeNameFromSearch; is_equippable: boolean; is_stackable: boolean; - item_class: { id: number; name: Record }; - item_subclass: { id: number; name: Record }; + item_class: { id: number; name: Record }; + item_subclass: { id: number; name: Record }; level: number; max_count: number; media: { id: number }; name: Record; purchase_price: number; purchase_quantity: number; - quality: ItemQuality; + quality: ItemQualityFromSearch; required_level: number; sell_price: number; }; @@ -204,7 +226,7 @@ interface PreviewItem { crafting_reagent?: string; description?: string; durability?: Durability; - inventory_type: InventoryType; + inventory_type: InventoryTypeName; is_subclass_hidden?: boolean; item: Media; item_class: NameIdKey; @@ -236,7 +258,7 @@ interface RecipeItem { type: string; }; durability: Durability; - inventory_type: InventoryType; + inventory_type: InventoryTypeName; item: Media; item_class: NameIdKey; item_subclass: NameIdKey; @@ -270,28 +292,23 @@ interface Stat { display: Display; is_negated?: boolean; type: { - name: StatType; + name: string; type: StatTypeCapitalized; }; value: number; } -type StatType = - | 'Agility' - | 'Critical Strike' - | 'Haste' - | 'Intellect' - | 'Mastery' - | 'Stamina' - | 'Strength' - | 'Versatility'; - type StatTypeCapitalized = | 'AGILITY' + | 'ARCANE_RESISTANCE' | 'CRIT_RATING' + | 'FIRE_RESISTANCE' + | 'FROST_RESISTANCE' | 'HASTE_RATING' | 'INTELLECT' | 'MASTERY' + | 'NATURE_RESISTANCE' + | 'SHADOW_RESISTANCE' | 'STAMINA' | 'STRENGTH' | 'VERSATILITY'; diff --git a/packages/wow/src/modified-crafting/types.ts b/packages/wow/src/modified-crafting/types.ts index f682b83e..1ede2755 100644 --- a/packages/wow/src/modified-crafting/types.ts +++ b/packages/wow/src/modified-crafting/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Href, KeyBase, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a modified crafting category index. @@ -22,8 +22,8 @@ export interface ModifiedCraftingCategoryResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface ModifiedCraftingIndexResponse extends ResponseBase { - categories: { href: string }; - slot_types: { href: string }; + categories: Href; + slot_types: Href; } /** diff --git a/packages/wow/src/mythic-keystone-dungeon/types.ts b/packages/wow/src/mythic-keystone-dungeon/types.ts index abfa78ae..30a99687 100644 --- a/packages/wow/src/mythic-keystone-dungeon/types.ts +++ b/packages/wow/src/mythic-keystone-dungeon/types.ts @@ -1,4 +1,4 @@ -import type { KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Href, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone dungeon index. @@ -25,8 +25,8 @@ export interface MythicKeystoneDungeonResponse extends NameId, ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface MythicKeystoneIndexResponse extends ResponseBase { - dungeons: { href: string }; - seasons: { href: string }; + dungeons: Href; + seasons: Href; } /** diff --git a/packages/wow/src/mythic-keystone-leaderboard/types.ts b/packages/wow/src/mythic-keystone-leaderboard/types.ts index 09960075..48e7fe32 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/types.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/types.ts @@ -1,4 +1,4 @@ -import type { Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Factions, Href, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a Mythic Keystone leaderboard index. @@ -13,7 +13,7 @@ export interface MythicKeystoneLeaderboardIndexResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface MythicKeystoneLeaderboardResponse extends ResponseBase { - connected_realm: { href: string }; + connected_realm: Href; keystone_affixes: Array; leading_groups: Array; map: NameId; diff --git a/packages/wow/src/pet/types.ts b/packages/wow/src/pet/types.ts index e6bbdc77..e568614a 100644 --- a/packages/wow/src/pet/types.ts +++ b/packages/wow/src/pet/types.ts @@ -23,6 +23,7 @@ export interface PetAbilityMediaResponse extends ResponseBase { */ export interface PetAbilityResponse extends NameId, ResponseBase { battle_pet_type: BattlePetType; + cooldown?: number; media: Media; rounds: number; } diff --git a/packages/wow/src/playable-class/types.ts b/packages/wow/src/playable-class/types.ts index fbc2cb04..dafd8bf2 100644 --- a/packages/wow/src/playable-class/types.ts +++ b/packages/wow/src/playable-class/types.ts @@ -1,4 +1,4 @@ -import type { GenderName, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { GenderName, Href, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a playable class index. @@ -26,7 +26,7 @@ export interface PlayableClassResponse extends NameId, ResponseBase { media: Media; playable_races: Array; power_type: NameIdKey; - pvp_talent_slots: { href: string }; + pvp_talent_slots: Href; specializations: Array; } diff --git a/packages/wow/src/playable-race/types.ts b/packages/wow/src/playable-race/types.ts index d765386e..0d7bd8ca 100644 --- a/packages/wow/src/playable-race/types.ts +++ b/packages/wow/src/playable-race/types.ts @@ -18,4 +18,5 @@ export interface PlayableRaceResponse extends NameId, ResponseBase { is_allied_race: boolean; is_selectable: boolean; playable_classes: Array; + racial_spells: Array; } diff --git a/packages/wow/src/profession/types.ts b/packages/wow/src/profession/types.ts index f26580ec..48a11f4a 100644 --- a/packages/wow/src/profession/types.ts +++ b/packages/wow/src/profession/types.ts @@ -52,10 +52,13 @@ export interface RecipeMediaResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface RecipeResponse extends NameId, ResponseBase { - crafted_item: NameIdKey; - crafted_quantity: CraftedQuantity; + crafted_item?: NameIdKey; + crafted_quantity?: CraftedQuantity; + description?: string; media: Media; - reagents: Array; + modified_crafting_slots?: Array<{ display_order: number; slot_type: NameIdKey }>; + rank?: number; + reagents?: Array; } interface Category { @@ -64,7 +67,9 @@ interface Category { } interface CraftedQuantity { - value: number; + maximum?: number; + minimum?: number; + value?: number; } interface Media extends KeyBase { diff --git a/packages/wow/src/pvp-season/types.ts b/packages/wow/src/pvp-season/types.ts index 9d1bf6f4..a28d23d9 100644 --- a/packages/wow/src/pvp-season/types.ts +++ b/packages/wow/src/pvp-season/types.ts @@ -1,4 +1,4 @@ -import type { Faction, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Faction, Factions, Href, KeyBase, NameId, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a PvP leaderboard index. @@ -44,15 +44,16 @@ export interface PvpSeasonIndexResponse extends ResponseBase { */ export interface PvpSeasonResponse extends ResponseBase { id: number; - leaderboards: { href: string }; - rewards: { href: string }; - season_name?: string; + leaderboards: Href; + rewards: Href; + season_end_timestamp?: number; + season_name?: null | string; season_start_timestamp: number; } interface Bracket { id: number; - type: 'ARENA_3v3' | 'BATTLEGROUNDS' | 'SHUFFLE'; + type: 'ARENA_3v3' | 'BATTLEGROUNDS' | 'BLITZ' | 'SHUFFLE'; } interface Character extends NameId { diff --git a/packages/wow/src/quest/types.ts b/packages/wow/src/quest/types.ts index 22c2c558..9c8dcb13 100644 --- a/packages/wow/src/quest/types.ts +++ b/packages/wow/src/quest/types.ts @@ -1,4 +1,4 @@ -import type { Faction, NameIdKey, ResponseBase } from '@blizzard-api/core'; +import type { Faction, Href, NameIdKey, ResponseBase } from '@blizzard-api/core'; /** * The response for a quest area index. @@ -41,9 +41,9 @@ export interface QuestCategoryResponse extends ResponseBase { * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface QuestIndexResponse extends ResponseBase { - areas: { href: string }; - categories: { href: string }; - types: { href: string }; + areas: Href; + categories: Href; + types: Href; } /** diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index 02309c2e..b6d57e1a 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -1,5 +1,6 @@ import type { BaseSearchParameters, + Href, KeyBase, Locales, NameId, @@ -56,13 +57,13 @@ export type RealmLocales = */ export interface RealmResponse extends NameId, ResponseBase { category: RealmCategory; - connected_realm: { href: string }; + connected_realm: Href; is_tournament: boolean; locale: RealmLocales; region: NameIdKey; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: string; type: RealmTypeCapitalized }; } /** @@ -97,25 +98,20 @@ export type RealmTimezone = | 'Europe/Paris'; /** - * The type of a realm, not capitalized or shortened. - */ -export type RealmType = 'Normal' | 'Roleplaying'; - -/** - * The type of a realm, capitalized and shortended). + * The type of a realm, capitalized and shortened). */ export type RealmTypeCapitalized = 'NORMAL' | 'RP'; interface RealmSearchResponseItem extends KeyBase { data: { - category: Record; + category: Record; id: number; is_tournament: boolean; locale: RealmLocales; - name: Record; - region: { id: number; name: Record }; + name: Record; + region: { id: number; name: Record }; slug: string; timezone: RealmTimezone; - type: { name: RealmType; type: RealmTypeCapitalized }; + type: { name: Record; type: RealmTypeCapitalized }; }; } diff --git a/packages/wow/src/region/types.ts b/packages/wow/src/region/types.ts index cd2b9006..51abe9c5 100644 --- a/packages/wow/src/region/types.ts +++ b/packages/wow/src/region/types.ts @@ -1,11 +1,11 @@ -import type { NameId, ResponseBase } from '@blizzard-api/core'; +import type { Href, NameId, ResponseBase } from '@blizzard-api/core'; /** * The response for a region index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ export interface RegionIndexResponse extends ResponseBase { - regions: Array<{ href: string }>; + regions: Array; } /** diff --git a/packages/wow/src/spell/types.ts b/packages/wow/src/spell/types.ts index 047dcd5f..9cff2ca9 100644 --- a/packages/wow/src/spell/types.ts +++ b/packages/wow/src/spell/types.ts @@ -53,6 +53,6 @@ interface SpellSearchResponseItem extends KeyBase { data: { id: number; media: { id: number }; - name: Record; + name: Record; }; } From b1d45707f18408aaeedfdfcb285d8263c05fb138 Mon Sep 17 00:00:00 2001 From: Pewtro <29204244+Pewtro@users.noreply.github.com> Date: Thu, 5 Feb 2026 01:36:21 +0100 Subject: [PATCH 52/52] increease playable-specialization test timeout --- .../wow/playable-specialization.integration.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration-tests/wow/playable-specialization.integration.test.ts b/packages/integration-tests/wow/playable-specialization.integration.test.ts index 03a93e25..328fa379 100644 --- a/packages/integration-tests/wow/playable-specialization.integration.test.ts +++ b/packages/integration-tests/wow/playable-specialization.integration.test.ts @@ -43,5 +43,5 @@ describe('wow playable-specialization integration', () => { } expect(parsedMedia.success).toBe(true); } - }); + }, 10_000); });