From 36584d8fe4469c025bcee88fe710249de02c7928 Mon Sep 17 00:00:00 2001 From: Putro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:16:33 +0100 Subject: [PATCH] [Project] Update @putstack/eslint-config-typescript to 3.11.0 This includes requring sorting of types, functions and more - has no impact on consumers of the library --- .changeset/soft-frogs-invite.md | 11 + package.json | 20 +- .../src/auction-house/auction-house.ts | 4 +- .../classic-wow/src/auction-house/types.ts | 2 +- .../src/connected-realm/connected-realm.ts | 30 +- packages/classic-wow/src/creature/creature.ts | 54 +- .../src/guild-crest/guild-crest.ts | 30 +- packages/classic-wow/src/index.ts | 2 +- packages/classic-wow/src/item/item.ts | 68 +- .../src/media-search/media-search.ts | 2 +- .../src/playable-class/playable-class.ts | 6 +- .../classic-wow/src/playable-class/types.ts | 2 +- .../src/playable-race/playable-race.ts | 4 +- .../classic-wow/src/power-type/power-type.ts | 4 +- .../classic-wow/src/pvp-season/pvp-season.ts | 96 +-- packages/classic-wow/src/realm/realm.ts | 6 +- packages/classic-wow/src/region/region.ts | 4 +- packages/client/src/client/client.ts | 26 +- packages/client/src/client/types.ts | 80 +-- packages/client/src/index.ts | 2 +- packages/core/src/blizzard-api.ts | 24 +- packages/core/src/namespace.ts | 6 +- packages/core/src/resource.ts | 50 +- packages/d3/src/act/types.ts | 8 +- packages/d3/src/artisan-and-recipe/types.ts | 24 +- .../d3/src/character-class-and-skill/types.ts | 22 +- packages/d3/src/game-data/game-data.ts | 24 +- packages/d3/src/game-data/types.ts | 106 +-- packages/d3/src/index.ts | 4 +- packages/d3/src/item-type/item-type.ts | 8 +- packages/d3/src/item/types.ts | 12 +- packages/d3/src/profile/profile.ts | 12 +- packages/d3/src/profile/types.ts | 446 ++++++------ packages/hs/src/base.ts | 8 +- packages/hs/src/card-backs/types.ts | 32 +- packages/hs/src/cards/types.ts | 106 +-- packages/hs/src/decks/types.ts | 2 +- packages/hs/src/metadata/types.ts | 46 +- packages/sc2/src/ladder/types.ts | 16 +- packages/sc2/src/league/types.ts | 36 +- packages/sc2/src/legacy/legacy.ts | 28 +- packages/sc2/src/legacy/types.ts | 120 ++-- packages/sc2/src/profile/profile.ts | 38 +- packages/sc2/src/profile/types.ts | 42 +- .../src/account-profile/account-profile.ts | 64 +- packages/wow/src/account-profile/types.ts | 162 ++--- packages/wow/src/achievements/achievements.ts | 22 +- packages/wow/src/achievements/types.ts | 48 +- packages/wow/src/auction-house/types.ts | 40 +- packages/wow/src/azerite-essence/types.ts | 38 +- packages/wow/src/base.ts | 74 +- .../wow/src/character-achievements/types.ts | 40 +- .../wow/src/character-appearance/types.ts | 28 +- .../wow/src/character-collections/types.ts | 58 +- .../character-encounters.ts | 18 +- .../wow/src/character-encounters/types.ts | 66 +- packages/wow/src/character-equipment/types.ts | 98 +-- .../wow/src/character-hunter-pets/types.ts | 2 +- .../types.ts | 14 +- .../character-profile/character-profile.ts | 30 +- packages/wow/src/character-profile/types.ts | 12 +- packages/wow/src/character-pvp/types.ts | 10 +- .../src/character-quests/character-quests.ts | 18 +- packages/wow/src/character-quests/types.ts | 10 +- .../wow/src/character-reputations/types.ts | 12 +- packages/wow/src/character-soulbinds/types.ts | 20 +- .../src/character-specializations/types.ts | 30 +- packages/wow/src/character-titles/types.ts | 2 +- .../src/connected-realm/connected-realm.ts | 18 +- packages/wow/src/connected-realm/types.ts | 84 +-- packages/wow/src/covenant/types.ts | 96 +-- packages/wow/src/creature/creature.ts | 36 +- packages/wow/src/creature/types.ts | 84 +-- packages/wow/src/guild-crest/guild-crest.ts | 18 +- packages/wow/src/guild-crest/types.ts | 38 +- packages/wow/src/guild/guild.ts | 12 +- packages/wow/src/guild/types.ts | 102 +-- packages/wow/src/heirloom/types.ts | 64 +- packages/wow/src/index.ts | 2 +- packages/wow/src/item/item.ts | 48 +- packages/wow/src/item/types.ts | 364 +++++----- packages/wow/src/journal/types.ts | 194 ++--- packages/wow/src/modified-crafting/types.ts | 22 +- packages/wow/src/mount/types.ts | 18 +- .../wow/src/mythic-keystone-affix/types.ts | 20 +- .../wow/src/mythic-keystone-dungeon/types.ts | 28 +- .../src/mythic-keystone-leaderboard/types.ts | 10 +- .../wow/src/mythic-raid-leaderboard/types.ts | 6 +- packages/wow/src/pet/pet.ts | 42 +- packages/wow/src/pet/types.ts | 74 +- packages/wow/src/playable-class/types.ts | 28 +- packages/wow/src/playable-race/types.ts | 2 +- .../wow/src/playable-specialization/types.ts | 28 +- packages/wow/src/power-type/types.ts | 2 +- packages/wow/src/profession/types.ts | 52 +- packages/wow/src/pvp-season/types.ts | 98 +-- packages/wow/src/pvp-tier/types.ts | 20 +- packages/wow/src/quest/quest.ts | 20 +- packages/wow/src/quest/types.ts | 102 +-- packages/wow/src/realm/types.ts | 58 +- packages/wow/src/region/types.ts | 2 +- packages/wow/src/reputations/types.ts | 18 +- packages/wow/src/spell/types.ts | 22 +- packages/wow/src/talent/types.ts | 98 +-- packages/wow/src/tech-talent/types.ts | 36 +- packages/wow/src/title/types.ts | 2 +- pnpm-lock.yaml | 672 ++++++++---------- 107 files changed, 2582 insertions(+), 2647 deletions(-) create mode 100644 .changeset/soft-frogs-invite.md diff --git a/.changeset/soft-frogs-invite.md b/.changeset/soft-frogs-invite.md new file mode 100644 index 0000000..ecd2b4c --- /dev/null +++ b/.changeset/soft-frogs-invite.md @@ -0,0 +1,11 @@ +--- +'@blizzard-api/classic-wow': patch +'@blizzard-api/client': patch +'@blizzard-api/core': patch +'@blizzard-api/sc2': patch +'@blizzard-api/wow': patch +'@blizzard-api/d3': patch +'@blizzard-api/hs': patch +--- + +Sort types, functions and more - has no impact on consumers of the library diff --git a/package.json b/package.json index bf493be..ce24f36 100644 --- a/package.json +++ b/package.json @@ -29,22 +29,22 @@ "hearthstone" ], "devDependencies": { - "@changesets/cli": "2.27.9", - "@putstack/eslint-config-typescript": "3.10.0", + "@changesets/cli": "2.27.10", + "@putstack/eslint-config-typescript": "3.11.0", "@putstack/prettier-config": "1.4.3", - "@types/node": "22.9.0", - "@vitest/coverage-v8": "2.1.4", - "@vitest/ui": "2.1.4", - "eslint": "9.14.0", - "husky": "9.1.6", + "@types/node": "22.9.1", + "@vitest/coverage-v8": "2.1.5", + "@vitest/ui": "2.1.5", + "eslint": "9.15.0", + "husky": "9.1.7", "lint-staged": "15.2.10", "npm-run-all2": "7.0.1", "prettier": "3.3.3", "tsup": "8.3.5", - "turbo": "2.2.3", + "turbo": "2.3.0", "typescript": "5.6.3", - "typescript-eslint": "8.13.0", - "vitest": "2.1.4", + "typescript-eslint": "8.15.0", + "vitest": "2.1.5", "zod": "3.23.8" }, "scripts": { diff --git a/packages/classic-wow/src/auction-house/auction-house.ts b/packages/classic-wow/src/auction-house/auction-house.ts index 86ef9c0..9a71254 100644 --- a/packages/classic-wow/src/auction-house/auction-house.ts +++ b/packages/classic-wow/src/auction-house/auction-house.ts @@ -9,7 +9,7 @@ import type { AuctionHouseIndexResponse, AuctionsResponse } from './types'; * @returns The auction house index. See {@link AuctionHouseIndexResponse}. */ export function auctionHouseIndex( - namespace: Extract, + namespace: Extract, connectedRealmId: number, ): Resource { return { @@ -29,7 +29,7 @@ export function auctionHouseIndex( * @returns The auction house data. See {@link AuctionsResponse}. */ export function auctions( - namespace: Extract, + namespace: Extract, connectedRealmId: number, auctionHouseId: number, ): Resource { diff --git a/packages/classic-wow/src/auction-house/types.ts b/packages/classic-wow/src/auction-house/types.ts index c13b580..0db8c7d 100644 --- a/packages/classic-wow/src/auction-house/types.ts +++ b/packages/classic-wow/src/auction-house/types.ts @@ -4,7 +4,7 @@ export interface AuctionHouseIndexResponse extends ResponseBase { auctions: Array; } -export interface AuctionsResponse extends ResponseBase, NameId { +export interface AuctionsResponse extends NameId, ResponseBase { auctions: Array; connected_realm: { href: string }; } diff --git a/packages/classic-wow/src/connected-realm/connected-realm.ts b/packages/classic-wow/src/connected-realm/connected-realm.ts index 72059e2..c10b114 100644 --- a/packages/classic-wow/src/connected-realm/connected-realm.ts +++ b/packages/classic-wow/src/connected-realm/connected-realm.ts @@ -7,19 +7,6 @@ import type { ConnectedRealmSearchResponseItem, } from './types'; -/** - * Returns an index of connected realms. - * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}. - */ -export function connectedRealmIndex( - namespace: Extract, -): Resource { - return { - namespace, - path: `${base}/connected-realm/index`, - }; -} /** * Returns a connected realm by ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. @@ -27,7 +14,7 @@ export function connectedRealmIndex( * @returns The connected realm. See {@link ConnectedRealmResponse}. */ export function connectedRealm( - namespace: Extract, + namespace: Extract, connectedRealmId: number, ): Resource { return { @@ -35,6 +22,19 @@ export function connectedRealm( path: `${base}/connected-realm/${connectedRealmId}`, }; } +/** + * Returns an index of connected realms. + * @param namespace The namespace to use. See {@link BlizzardNamespaces}. + * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}. + */ +export function connectedRealmIndex( + namespace: Extract, +): Resource { + return { + namespace, + path: `${base}/connected-realm/index`, + }; +} /** * Performs a search of connected realms. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. @@ -42,7 +42,7 @@ export function connectedRealm( * @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}. */ export function connectedRealmSearch( - namespace: Extract, + namespace: Extract, options: ConnectedRealmSearchParameters, ): Resource, ConnectedRealmSearchParameters> { return { diff --git a/packages/classic-wow/src/creature/creature.ts b/packages/classic-wow/src/creature/creature.ts index 7fa6848..ac5b14a 100644 --- a/packages/classic-wow/src/creature/creature.ts +++ b/packages/classic-wow/src/creature/creature.ts @@ -19,7 +19,7 @@ import type { * @returns The creature. See {@link CreatureResponse}. */ export function creature( - namespace: Extract, + namespace: Extract, creatureId: number, ): Resource { return { @@ -34,7 +34,7 @@ export function creature( * @returns The creature display media. See {@link CreatureDisplayMediaResponse}. */ export function creatureDisplayMedia( - namespace: Extract, + namespace: Extract, creatureDisplayId: number, ): Resource { return { @@ -49,7 +49,7 @@ export function creatureDisplayMedia( * @returns The creature family. See {@link CreatureFamilyResponse}. */ export function creatureFamily( - namespace: Extract, + namespace: Extract, creatureFamilyId: number, ): Resource { return { @@ -63,7 +63,7 @@ export function creatureFamily( * @returns The creature family index. See {@link CreatureFamilyIndexResponse}. */ export function creatureFamilyIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, @@ -77,7 +77,7 @@ export function creatureFamilyIndex( * @returns The creature family media. See {@link CreatureFamilyMediaResponse}. */ export function creatureFamilyMedia( - namespace: Extract, + namespace: Extract, creatureFamilyId: number, ): Resource { return { @@ -85,6 +85,26 @@ export function creatureFamilyMedia( path: `${mediaBase}/creature-family/${creatureFamilyId}`, }; } +/** + * 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}. + */ +export function creatureSearch( + namespace: Extract, + options: CreatureSearchParameters, +): Resource, Omit> { + return { + namespace, + parameters: { + _page: options._page, + [`name.${options.locale}`]: options.name, + orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, + }, + path: `${searchBase}/creature`, + }; +} /** * Returns a creature type by ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. @@ -92,7 +112,7 @@ export function creatureFamilyMedia( * @returns The creature type. See {@link CreatureTypeResponse}. */ export function creatureType( - namespace: Extract, + namespace: Extract, creatureTypeId: number, ): Resource { return { @@ -106,30 +126,10 @@ export function creatureType( * @returns The creature type index. See {@link CreatureTypeIndexResponse}. */ export function creatureTypeIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, path: `${base}/creature-type/index`, }; } -/** - * 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}. - */ -export function creatureSearch( - namespace: Extract, - options: CreatureSearchParameters, -): Resource, Omit> { - return { - namespace, - parameters: { - _page: options._page, - [`name.${options.locale}`]: options.name, - orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, - }, - path: `${searchBase}/creature`, - }; -} diff --git a/packages/classic-wow/src/guild-crest/guild-crest.ts b/packages/classic-wow/src/guild-crest/guild-crest.ts index cf73bbf..7c259a7 100644 --- a/packages/classic-wow/src/guild-crest/guild-crest.ts +++ b/packages/classic-wow/src/guild-crest/guild-crest.ts @@ -2,19 +2,6 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core'; import { base, mediaBase } from '../../../wow/src/base'; import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types'; -/** - * Returns an index of guild crest media. - * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}. - */ -export function guildCrestComponentsIndex( - namespace: Extract, -): Resource { - return { - namespace, - path: `${base}/guild-crest/index`, - }; -} /** * Returns media for a guild crest border by ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. @@ -22,7 +9,7 @@ export function guildCrestComponentsIndex( * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}. */ export function guildCrestBorder( - namespace: Extract, + namespace: Extract, borderId: number, ): Resource { return { @@ -30,6 +17,19 @@ export function guildCrestBorder( path: `${mediaBase}/guild-crest/border/${borderId}`, }; } +/** + * Returns an index of guild crest media. + * @param namespace The namespace to use. See {@link BlizzardNamespaces}. + * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}. + */ +export function guildCrestComponentsIndex( + namespace: Extract, +): Resource { + return { + namespace, + path: `${base}/guild-crest/index`, + }; +} /** * Returns media for a guild crest emblem by ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. @@ -37,7 +37,7 @@ export function guildCrestBorder( * @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}. */ export function guildCrestEmblem( - namespace: Extract, + namespace: Extract, emblemId: number, ): Resource { return { diff --git a/packages/classic-wow/src/index.ts b/packages/classic-wow/src/index.ts index 972d3a2..c12cbe7 100644 --- a/packages/classic-wow/src/index.ts +++ b/packages/classic-wow/src/index.ts @@ -86,7 +86,7 @@ const classicWow = { region, regionIndex, }; -export { classicWow as default, classicWow }; +export { classicWow, classicWow as default }; //Auction House export * from './auction-house/auction-house'; diff --git a/packages/classic-wow/src/item/item.ts b/packages/classic-wow/src/item/item.ts index f618a22..1305115 100644 --- a/packages/classic-wow/src/item/item.ts +++ b/packages/classic-wow/src/item/item.ts @@ -11,16 +11,18 @@ import type { } from './types'; /** - * Get an item class index. + * Get an item by ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @returns The item class index. See {@link ItemClassIndexResponse}. + * @param itemId The item ID. + * @returns The item. See {@link ItemResponse}. */ -export function itemClassIndex( - namespace: Extract, -): Resource { +export function item( + namespace: Extract, + itemId: number, +): Resource { return { namespace, - path: `${base}/item-class/index`, + path: `${base}/item/${itemId}`, }; } /** @@ -30,7 +32,7 @@ export function itemClassIndex( * @returns The item class. See {@link ItemClassResponse}. */ export function itemClass( - namespace: Extract, + namespace: Extract, itemClassId: number, ): Resource { return { @@ -39,35 +41,16 @@ export function itemClass( }; } /** - * Get an item subclass by ID. - * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @param itemClassId The item class ID. - * @param itemSubclassId The item subclass ID. - * @returns The item subclass. See {@link ItemSubClassResponse}. - */ -export function itemSubClass( - namespace: Extract, - itemClassId: number, - itemSubclassId: number, -): Resource { - return { - namespace, - path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, - }; -} -/** - * Get an item by ID. + * Get an item class index. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @param itemId The item ID. - * @returns The item. See {@link ItemResponse}. + * @returns The item class index. See {@link ItemClassIndexResponse}. */ -export function item( - namespace: Extract, - itemId: number, -): Resource { +export function itemClassIndex( + namespace: Extract, +): Resource { return { namespace, - path: `${base}/item/${itemId}`, + path: `${base}/item-class/index`, }; } /** @@ -77,7 +60,7 @@ export function item( * @returns The item media. See {@link ItemMediaResponse}. */ export function itemMedia( - namespace: Extract, + namespace: Extract, itemId: number, ): Resource { return { @@ -92,7 +75,7 @@ export function itemMedia( * @returns The search results. See {@link SearchResponse}. */ export function itemSearch( - namespace: Extract, + namespace: Extract, options: ItemSearchParameters, ): Resource, Omit> { return { @@ -105,3 +88,20 @@ export function itemSearch( path: `${searchBase}/item`, }; } +/** + * Get an item subclass by ID. + * @param namespace The namespace to use. See {@link BlizzardNamespaces}. + * @param itemClassId The item class ID. + * @param itemSubclassId The item subclass ID. + * @returns The item subclass. See {@link ItemSubClassResponse}. + */ +export function itemSubClass( + namespace: Extract, + itemClassId: number, + itemSubclassId: number, +): Resource { + return { + namespace, + path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, + }; +} diff --git a/packages/classic-wow/src/media-search/media-search.ts b/packages/classic-wow/src/media-search/media-search.ts index d114e1e..8096987 100644 --- a/packages/classic-wow/src/media-search/media-search.ts +++ b/packages/classic-wow/src/media-search/media-search.ts @@ -8,7 +8,7 @@ import type { MediaSearchParameters, MediaSearchResponseItem } from './types'; * @returns The search results. See {@link SearchResponse}. */ export function mediaSearch( - namespace: Extract, + namespace: Extract, options: MediaSearchParameters, ): Resource, MediaSearchParameters> { return { diff --git a/packages/classic-wow/src/playable-class/playable-class.ts b/packages/classic-wow/src/playable-class/playable-class.ts index 03c89cd..73b7993 100644 --- a/packages/classic-wow/src/playable-class/playable-class.ts +++ b/packages/classic-wow/src/playable-class/playable-class.ts @@ -9,7 +9,7 @@ import type { PlayableClassIndexResponse, PlayableClassMediaResponse, PlayableCl * @returns The playable class. See {@link PlayableClassResponse}. */ export function playableClass( - namespace: Extract, + namespace: Extract, playableClassId: number, ): Resource { return { @@ -23,7 +23,7 @@ export function playableClass( * @returns The playable class index. See {@link PlayableClassIndexResponse}. */ export function playableClassIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, @@ -37,7 +37,7 @@ export function playableClassIndex( * @returns The playable class media. See {@link PlayableClassMediaResponse}. */ export function playableClassMedia( - namespace: Extract, + namespace: Extract, playableClassId: number, ): Resource { return { diff --git a/packages/classic-wow/src/playable-class/types.ts b/packages/classic-wow/src/playable-class/types.ts index 43bc1f1..5dc38bb 100644 --- a/packages/classic-wow/src/playable-class/types.ts +++ b/packages/classic-wow/src/playable-class/types.ts @@ -6,7 +6,7 @@ export type { PlayableClassIndexResponse, PlayableClassMediaResponse } from '../ * The response for a playable class. * @see {@link https://develop.battle.net/documentation/world-of-warcraft-classic/game-data-apis} */ -export interface PlayableClassResponse extends ResponseBase, NameId { +export interface PlayableClassResponse extends NameId, ResponseBase { gender_name: GenderName; media: Media; playable_races: Array; diff --git a/packages/classic-wow/src/playable-race/playable-race.ts b/packages/classic-wow/src/playable-race/playable-race.ts index 19affa8..251dea0 100644 --- a/packages/classic-wow/src/playable-race/playable-race.ts +++ b/packages/classic-wow/src/playable-race/playable-race.ts @@ -9,7 +9,7 @@ import type { PlayableRaceIndexResponse, PlayableRaceResponse } from './types'; * @returns The playable race. See {@link PlayableRaceResponse}. */ export function playableRace( - namespace: Extract, + namespace: Extract, playableRaceId: number, ): Resource { return { @@ -23,7 +23,7 @@ export function playableRace( * @returns The playable race index. See {@link PlayableRaceIndexResponse}. */ export function playableRaceIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, diff --git a/packages/classic-wow/src/power-type/power-type.ts b/packages/classic-wow/src/power-type/power-type.ts index f5af794..5a162db 100644 --- a/packages/classic-wow/src/power-type/power-type.ts +++ b/packages/classic-wow/src/power-type/power-type.ts @@ -9,7 +9,7 @@ import type { PowerTypeIndexResponse, PowerTypeResponse } from './types'; * @returns The power type. See {@link PowerTypeResponse}. */ export function powerType( - namespace: Extract, + namespace: Extract, powerTypeId: number, ): Resource { return { @@ -23,7 +23,7 @@ export function powerType( * @returns The power type index. See {@link PowerTypeIndexResponse}. */ export function powerTypeIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, diff --git a/packages/classic-wow/src/pvp-season/pvp-season.ts b/packages/classic-wow/src/pvp-season/pvp-season.ts index 5bf6c44..8eb81d1 100644 --- a/packages/classic-wow/src/pvp-season/pvp-season.ts +++ b/packages/classic-wow/src/pvp-season/pvp-season.ts @@ -3,42 +3,53 @@ import { base } from '../../../wow/src/base'; import type { PvpSeasonIndexResponse, PvpSeasonResponse } from './types'; /** - * Get a PvP season index. + * Get a PvP leaderboard by PvP season ID and bracket. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @returns The PvP season index. See {@link PvpSeasonIndexResponse}. + * @param pvpRegionId The PvP region ID. + * @param pvpSeasonId The PvP season ID. + * @param pvpBracket The PvP bracket. */ -export function pvpSeasonIndex( - namespace: Extract, -): Resource { +export function pvpLeaderboard( + namespace: Extract, + pvpRegionId: number, + pvpSeasonId: number, + pvpBracket: string, +): Resource { return { namespace, - path: `${base}/pvp-season/index`, + path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, }; } /** - * Get a PvP season by ID. + * Returns an index of PvP leaderboards for a PvP season in a given PvP region. + * @param namespace The namespace to use. See {@link BlizzardNamespaces}. + * @param pvpRegionId The PvP region ID. * @param pvpSeasonId The PvP season ID. - * @returns The PvP season. See {@link PvpSeasonResponse}. */ -export function pvpSeason( - namespace: Extract, +export function pvpLeaderboardIndex( + namespace: Extract, + pvpRegionId: number, pvpSeasonId: number, -): Resource { +): Resource { return { namespace, - path: `${base}/pvp-season/${pvpSeasonId}`, + path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, }; } /** - * Returns an index of PvP Regions. + * Returns a PvP season by region ID and season ID. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. + * @param pvpRegionId The PvP region ID. + * @param pvpSeasonId The PvP season ID. */ -export function pvpRegionIndex( - namespace: Extract, +export function pvpRegionalSeason( + namespace: Extract, + pvpRegionId: number, + pvpSeasonId: number, ): Resource { return { namespace, - path: `${base}/pvp-region/index`, + path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`, }; } /** @@ -48,7 +59,7 @@ export function pvpRegionIndex( * @returns The PvP season index. See {@link PvpSeasonIndexResponse}. */ export function pvpRegionalSeasonIndex( - namespace: Extract, + namespace: Extract, pvpRegionId: number, ): Resource { return { @@ -57,68 +68,57 @@ export function pvpRegionalSeasonIndex( }; } /** - * Returns a PvP season by region ID and season ID. + * Returns an index of PvP Regions. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @param pvpRegionId The PvP region ID. - * @param pvpSeasonId The PvP season ID. */ -export function pvpRegionalSeason( - namespace: Extract, - pvpRegionId: number, - pvpSeasonId: number, +export function pvpRegionIndex( + namespace: Extract, ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`, + path: `${base}/pvp-region/index`, }; } /** - * Returns an index of PvP leaderboards for a PvP season in a given PvP region. + * Returns an index of PvP rewards for a PvP season in a given PvP region. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. * @param pvpRegionId The PvP region ID. * @param pvpSeasonId The PvP season ID. */ -export function pvpLeaderboardIndex( - namespace: Extract, +export function pvpRewardsIndex( + namespace: Extract, pvpRegionId: number, pvpSeasonId: number, ): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`, + path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`, }; } /** - * Get a PvP leaderboard by PvP season ID and bracket. - * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @param pvpRegionId The PvP region ID. + * Get a PvP season by ID. * @param pvpSeasonId The PvP season ID. - * @param pvpBracket The PvP bracket. + * @returns The PvP season. See {@link PvpSeasonResponse}. */ -export function pvpLeaderboard( - namespace: Extract, - pvpRegionId: number, +export function pvpSeason( + namespace: Extract, pvpSeasonId: number, - pvpBracket: string, -): Resource { +): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`, + path: `${base}/pvp-season/${pvpSeasonId}`, }; } /** - * Returns an index of PvP rewards for a PvP season in a given PvP region. + * Get a PvP season index. * @param namespace The namespace to use. See {@link BlizzardNamespaces}. - * @param pvpRegionId The PvP region ID. - * @param pvpSeasonId The PvP season ID. + * @returns The PvP season index. See {@link PvpSeasonIndexResponse}. */ -export function pvpRewardsIndex( - namespace: Extract, - pvpRegionId: number, - pvpSeasonId: number, -): Resource { +export function pvpSeasonIndex( + namespace: Extract, +): Resource { return { namespace, - path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`, + path: `${base}/pvp-season/index`, }; } diff --git a/packages/classic-wow/src/realm/realm.ts b/packages/classic-wow/src/realm/realm.ts index ef17c40..868cb21 100644 --- a/packages/classic-wow/src/realm/realm.ts +++ b/packages/classic-wow/src/realm/realm.ts @@ -9,7 +9,7 @@ import type { RealmIndexResponse, RealmResponse, RealmSearchParameters, RealmSea * @returns The realm. See {@link RealmResponse}. */ export function realm( - namespace: Extract, + namespace: Extract, realmSlug: string, ): Resource { return { @@ -23,7 +23,7 @@ export function realm( * @returns The realm index. See {@link RealmIndexResponse}. */ export function realmIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, @@ -37,7 +37,7 @@ export function realmIndex( * @returns The search results. See {@link SearchResponse}. */ export function realmSearch( - namespace: Extract, + namespace: Extract, options: RealmSearchParameters, ): Resource, RealmSearchParameters> { return { diff --git a/packages/classic-wow/src/region/region.ts b/packages/classic-wow/src/region/region.ts index 6448b12..f397bd7 100644 --- a/packages/classic-wow/src/region/region.ts +++ b/packages/classic-wow/src/region/region.ts @@ -9,7 +9,7 @@ import type { RegionIndexResponse, RegionResponse } from './types'; * @returns The region. See {@link RegionResponse}. */ export function region( - namespace: Extract, + namespace: Extract, regionId: number, ): Resource { return { @@ -23,7 +23,7 @@ export function region( * @returns The region index. See {@link RegionIndexResponse}. */ export function regionIndex( - namespace: Extract, + namespace: Extract, ): Resource { return { namespace, diff --git a/packages/client/src/client/client.ts b/packages/client/src/client/client.ts index a6fe271..f2a2fa5 100644 --- a/packages/client/src/client/client.ts +++ b/packages/client/src/client/client.ts @@ -27,8 +27,6 @@ import type { * }); */ export class BlizzardApiClient implements IBlizzardApiClient { - private axios = axios.create(); - public defaults: { key: string; locale: Locales; @@ -37,6 +35,8 @@ export class BlizzardApiClient implements IBlizzardApiClient { token?: string; }; + private axios = axios.create(); + /** * Get an access token. * @param options The access token request arguments. See {@link AccessTokenRequestArguments}. @@ -102,6 +102,17 @@ export class BlizzardApiClient implements IBlizzardApiClient { * console.log(response.data.client_id); * // => 'client-id' */ + constructor(options: ClientOptions) { + const { locale, origin } = getBlizzardApi(options.origin, options.locale); + this.defaults = { + key: options.key, + locale: locale, + origin: origin, + secret: options.secret, + token: options.token, + }; + } + public validateAccessToken = async ( options?: ValidateAccessTokenArguments, ): Promise> => { @@ -122,17 +133,6 @@ export class BlizzardApiClient implements IBlizzardApiClient { ); }; - constructor(options: ClientOptions) { - const { locale, origin } = getBlizzardApi(options.origin, options.locale); - this.defaults = { - key: options.key, - locale: locale, - origin: origin, - secret: options.secret, - token: options.token, - }; - } - /** * Get the request configuration. * @param resource The resource to fetch. See {@link Resource}. diff --git a/packages/client/src/client/types.ts b/packages/client/src/client/types.ts index 4d692ed..4683a25 100644 --- a/packages/client/src/client/types.ts +++ b/packages/client/src/client/types.ts @@ -45,6 +45,46 @@ export interface AccessTokenRequestArguments { secret?: string; } +/** + * A client configuration object. + * @interface ClientOptions + * @property key The client ID. + * @property secret The client secret. + * @property origin The region of the Blizzard API. + * @property locale The locale of the Blizzard API. + * @property token The access token. + * @example + * const options: ClientOptions = { + * key: 'client', + * secret: 'secret', + * origin: 'eu', + * locale: 'en_GB', + * token: 'access' + * }; + */ +export interface ClientOptions { + key: string; + locale?: Locales; + origin: Origins; + secret: string; + token?: string; +} + +/** + * A Blizzard API client. + * @interface IBlizzardApiClient + * @property getAccessToken Get an access token. + * @property setAccessToken Set an access token. + * @property refreshAccessToken Refresh an access token. + * @property validateAccessToken Validate an access token. + */ +export interface IBlizzardApiClient { + getAccessToken: (options: AccessTokenRequestArguments) => Promise>; + refreshAccessToken: (options: AccessTokenRequestArguments) => Promise>; + setAccessToken: (token: string) => void; + validateAccessToken: (options: ValidateAccessTokenArguments) => Promise>; +} + /** * Validate an access token. * @see https://develop.battle.net/documentation/guides/using-oauth/client-credentials-flow @@ -90,43 +130,3 @@ export interface ValidateAccessTokenResponse { exp: number; scope: Array; } - -/** - * A client configuration object. - * @interface ClientOptions - * @property key The client ID. - * @property secret The client secret. - * @property origin The region of the Blizzard API. - * @property locale The locale of the Blizzard API. - * @property token The access token. - * @example - * const options: ClientOptions = { - * key: 'client', - * secret: 'secret', - * origin: 'eu', - * locale: 'en_GB', - * token: 'access' - * }; - */ -export interface ClientOptions { - key: string; - locale?: Locales; - origin: Origins; - secret: string; - token?: string; -} - -/** - * A Blizzard API client. - * @interface IBlizzardApiClient - * @property getAccessToken Get an access token. - * @property setAccessToken Set an access token. - * @property refreshAccessToken Refresh an access token. - * @property validateAccessToken Validate an access token. - */ -export interface IBlizzardApiClient { - getAccessToken: (options: AccessTokenRequestArguments) => Promise>; - refreshAccessToken: (options: AccessTokenRequestArguments) => Promise>; - setAccessToken: (token: string) => void; - validateAccessToken: (options: ValidateAccessTokenArguments) => Promise>; -} diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index b1936fc..94c96c8 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -1,2 +1,2 @@ -export { createBlizzardApiClient as default, createBlizzardApiClient } from './client/create-client'; +export { createBlizzardApiClient, createBlizzardApiClient as default } from './client/create-client'; export type * from './client/types'; diff --git a/packages/core/src/blizzard-api.ts b/packages/core/src/blizzard-api.ts index 9c35b5f..b0314b6 100644 --- a/packages/core/src/blizzard-api.ts +++ b/packages/core/src/blizzard-api.ts @@ -1,7 +1,3 @@ -/** - * Possible regions for use within the Blizzard API. - */ -export type Origins = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; /** * Possible locales for use within the Blizzard API. */ @@ -20,6 +16,10 @@ export type Locales = | 'ru_RU' | 'zh_CN' | 'zh_TW'; +/** + * Possible regions for use within the Blizzard API. + */ +export type Origins = 'cn' | 'eu' | 'kr' | 'tw' | 'us'; /** * A record of regions and their supported locales. @@ -32,14 +32,6 @@ const _regionLocaleMap = { us: ['en_US', 'es_MX', 'pt_BR', 'multi'], } as const satisfies Record>; -/** - * The default Blizzard API configuration for each region. - */ -interface BlizzardApiDefault { - defaultLocale: (typeof _regionLocaleMap)[T][number]; - hostname: T extends 'cn' ? 'https://gateway.battlenet.com.cn' : `https://${T}.api.blizzard.com`; -} - /** * A record of Blizzard API configurations by region. */ @@ -51,6 +43,14 @@ interface BlizzardApiByRegion { us: BlizzardApiDefault<'us'>; } +/** + * The default Blizzard API configuration for each region. + */ +interface BlizzardApiDefault { + defaultLocale: (typeof _regionLocaleMap)[T][number]; + hostname: T extends 'cn' ? 'https://gateway.battlenet.com.cn' : `https://${T}.api.blizzard.com`; +} + const endpoints: BlizzardApiByRegion = { cn: { defaultLocale: 'zh_CN', diff --git a/packages/core/src/namespace.ts b/packages/core/src/namespace.ts index 3fc6e21..059d672 100644 --- a/packages/core/src/namespace.ts +++ b/packages/core/src/namespace.ts @@ -4,9 +4,9 @@ */ export type BlizzardNamespaces = | 'dynamic' - | 'dynamic-classic' | 'dynamic-classic1x' + | 'dynamic-classic' | 'profile' | 'static' - | 'static-classic' - | 'static-classic1x'; + | 'static-classic1x' + | 'static-classic'; diff --git a/packages/core/src/resource.ts b/packages/core/src/resource.ts index fc51907..3a1c290 100644 --- a/packages/core/src/resource.ts +++ b/packages/core/src/resource.ts @@ -1,5 +1,27 @@ import type { BlizzardNamespaces } from './namespace'; +/** + * Extracts the response type from a resource + * @param Type The resource type + * @returns The response type + * @example + * type extracted = ExtractResourceType>; + */ +export type ExtractResourceType = + Type extends Resource ? R : never; + +/** + * Represents a resource that requires a token to be requested + * @param Response The response type of the resource + * @param SearchOptions The search options that can be passed to the resource + * + */ +export type ProtectedResource> = Resource< + Response, + SearchOptions, + true +>; + /** * Represents a resource that can be requested from the Blizzard API * @param _Response The response type of the resource @@ -9,8 +31,8 @@ import type { BlizzardNamespaces } from './namespace'; export type Resource< Response, SearchOptions extends object = Record, - ProtectedResource extends boolean = false, -> = { + IsProtectedResource extends boolean = false, +> = (IsProtectedResource extends true ? { token: string } : unknown) & { /** * The response type of the resource * @private @internal This is an internal property and should not be used as it will not be populated @@ -19,19 +41,7 @@ export type Resource< namespace?: BlizzardNamespaces; parameters?: SearchOptions; path: string; -} & (ProtectedResource extends true ? { token: string } : unknown); - -/** - * Represents a resource that requires a token to be requested - * @param Response The response type of the resource - * @param SearchOptions The search options that can be passed to the resource - * - */ -export type ProtectedResource> = Resource< - Response, - SearchOptions, - true ->; +}; /** * Represents the response of a resource @@ -42,13 +52,3 @@ export type ProtectedResource console.log(data.id)); */ export type ResourceResponse = Promise; - -/** - * Extracts the response type from a resource - * @param Type The resource type - * @returns The response type - * @example - * type extracted = ExtractResourceType>; - */ -export type ExtractResourceType = - Type extends Resource ? R : never; diff --git a/packages/d3/src/act/types.ts b/packages/d3/src/act/types.ts index ce11f86..b367b79 100644 --- a/packages/d3/src/act/types.ts +++ b/packages/d3/src/act/types.ts @@ -1,3 +1,7 @@ +export interface ActIndexResponse { + acts: Array; +} + export interface ActResponse { name: string; number: number; @@ -5,10 +9,6 @@ export interface ActResponse { slug: string; } -export interface ActIndexResponse { - acts: Array; -} - interface Act { name: string; number: number; diff --git a/packages/d3/src/artisan-and-recipe/types.ts b/packages/d3/src/artisan-and-recipe/types.ts index c09f35d..c230abd 100644 --- a/packages/d3/src/artisan-and-recipe/types.ts +++ b/packages/d3/src/artisan-and-recipe/types.ts @@ -5,17 +5,7 @@ export interface ArtisanResponse { training: Training; } -interface Training { - tiers: Array; -} - -interface Tier { - taughtRecipes: Array; - tier: number; - trainedRecipes: Array; -} - -interface Recipe { +export interface RecipeResponse { cost: number; id: string; itemProduced: Item; @@ -37,7 +27,7 @@ interface Reagent { quantity: number; } -export interface RecipeResponse { +interface Recipe { cost: number; id: string; itemProduced: Item; @@ -45,3 +35,13 @@ export interface RecipeResponse { reagents: Array; slug: string; } + +interface Tier { + taughtRecipes: Array; + tier: number; + trainedRecipes: Array; +} + +interface Training { + tiers: Array; +} diff --git a/packages/d3/src/character-class-and-skill/types.ts b/packages/d3/src/character-class-and-skill/types.ts index 5f1d869..33db66b 100644 --- a/packages/d3/src/character-class-and-skill/types.ts +++ b/packages/d3/src/character-class-and-skill/types.ts @@ -8,9 +8,18 @@ export interface CharacterClassResponse { slug: string; } -interface SkillCategory { +export interface SkillResponse { + runes: Array; + skill: Skill; +} + +interface Rune { + description: string; + descriptionHtml: string; + level: number; name: string; slug: string; + type: string; } interface Skill { @@ -24,16 +33,7 @@ interface Skill { tooltipUrl: string; } -export interface SkillResponse { - runes: Array; - skill: Skill; -} - -interface Rune { - description: string; - descriptionHtml: string; - level: number; +interface SkillCategory { name: string; slug: string; - type: string; } diff --git a/packages/d3/src/game-data/game-data.ts b/packages/d3/src/game-data/game-data.ts index b985590..82ffa61 100644 --- a/packages/d3/src/game-data/game-data.ts +++ b/packages/d3/src/game-data/game-data.ts @@ -9,38 +9,38 @@ import type { SeasonResponse, } from './types'; -export function seasonIndex(): Resource { +export function era(id: number): Resource { return { - path: `${gameDataBase}/season`, + path: `${gameDataBase}/era/${id}`, }; } -export function season(id: number): Resource { +export function eraIndex(): Resource { return { - path: `${gameDataBase}/season/${id}`, + path: `${gameDataBase}/era`, }; } -export function seasonLeaderboard(id: number, leaderboard: string): Resource { +export function eraLeaderboard(id: number, leaderboard: string): Resource { return { - path: `${gameDataBase}/season/${id}/leaderboard/${leaderboard}`, + path: `${gameDataBase}/era/${id}/leaderboard/${leaderboard}`, }; } -export function eraIndex(): Resource { +export function season(id: number): Resource { return { - path: `${gameDataBase}/era`, + path: `${gameDataBase}/season/${id}`, }; } -export function era(id: number): Resource { +export function seasonIndex(): Resource { return { - path: `${gameDataBase}/era/${id}`, + path: `${gameDataBase}/season`, }; } -export function eraLeaderboard(id: number, leaderboard: string): Resource { +export function seasonLeaderboard(id: number, leaderboard: string): Resource { return { - path: `${gameDataBase}/era/${id}/leaderboard/${leaderboard}`, + path: `${gameDataBase}/season/${id}/leaderboard/${leaderboard}`, }; } diff --git a/packages/d3/src/game-data/types.ts b/packages/d3/src/game-data/types.ts index a7c1fe2..e0fcf06 100644 --- a/packages/d3/src/game-data/types.ts +++ b/packages/d3/src/game-data/types.ts @@ -1,26 +1,39 @@ import type { ResponseBase } from '../base'; -export interface SeasonIndexResponse extends ResponseBase { - current_season: number; +export interface EraIndexResponse extends ResponseBase { + current_era: number; + era: Array<{ href: string }>; generated_by: string; last_update_time: string; - season: Array<{ href: string }>; - service_current_season: number; - service_season_state: string; } -export interface SeasonResponse extends ResponseBase { +export interface EraLeaderboardResponse extends ResponseBase { + column: Array; + era: number; generated_by: string; + greater_rift: boolean; + greater_rift_solo_class: string; + key: string; last_update_time: string; - leaderboard: Array; - season_id: number; + row: Array; + title: string; } -interface Leaderboard { - hardcore?: boolean; - hero_class_string?: string; - ladder: { href: string }; - team_size?: number; +export interface EraResponse extends ResponseBase { + era_id: number; + era_start_date: number; + generated_by: string; + last_update_time: string; + leaderboard: Array; +} + +export interface SeasonIndexResponse extends ResponseBase { + current_season: number; + generated_by: string; + last_update_time: string; + season: Array<{ href: string }>; + service_current_season: number; + service_season_state: string; } export interface SeasonLeaderboardResponse extends ResponseBase { @@ -34,6 +47,13 @@ export interface SeasonLeaderboardResponse extends ResponseBase { title: string; } +export interface SeasonResponse extends ResponseBase { + generated_by: string; + last_update_time: string; + leaderboard: Array; + season_id: number; +} + interface Column { hidden: boolean; id: LeaderboardId; @@ -42,6 +62,20 @@ interface Column { type: 'DATETIME' | 'NUMBER' | 'STRING'; } +interface EraLeaderboard { + hardcore?: boolean; + hero_class_string?: string; + ladder: Self; + team_size: number; +} + +interface Leaderboard { + hardcore?: boolean; + hero_class_string?: string; + ladder: { href: string }; + team_size?: number; +} + type LeaderboardId = | 'AchievementPoints' | 'BattleTag' @@ -60,6 +94,12 @@ type LeaderboardId = | 'RiftLevel' | 'RiftTime'; +interface Player { + accountId: number; + data: Array; + key: string; +} + interface Row { data: Array; order: number; @@ -73,46 +113,6 @@ interface RowData { timestamp?: number; } -interface Player { - accountId: number; - data: Array; - key: string; -} - -export interface EraIndexResponse extends ResponseBase { - current_era: number; - era: Array<{ href: string }>; - generated_by: string; - last_update_time: string; -} - -export interface EraResponse extends ResponseBase { - era_id: number; - era_start_date: number; - generated_by: string; - last_update_time: string; - leaderboard: Array; -} - interface Self { href: string; } - -interface EraLeaderboard { - hardcore?: boolean; - hero_class_string?: string; - ladder: Self; - team_size: number; -} - -export interface EraLeaderboardResponse extends ResponseBase { - column: Array; - era: number; - generated_by: string; - greater_rift: boolean; - greater_rift_solo_class: string; - key: string; - last_update_time: string; - row: Array; - title: string; -} diff --git a/packages/d3/src/index.ts b/packages/d3/src/index.ts index 5e475c8..d75e1b6 100644 --- a/packages/d3/src/index.ts +++ b/packages/d3/src/index.ts @@ -3,8 +3,8 @@ import { artisan, recipe } from './artisan-and-recipe/artisan-and-recipe'; import { characterClass, skill } from './character-class-and-skill/character-class-and-skill'; import { follower } from './follower/follower'; import { era, eraIndex, eraLeaderboard, season, seasonIndex, seasonLeaderboard } from './game-data/game-data'; -import { item } from './item/item'; import { itemType, itemTypeIndex } from './item-type/item-type'; +import { item } from './item/item'; import { account, accountHero, accountHeroFollowerItems, accountHeroItems } from './profile/profile'; const d3 = { @@ -37,7 +37,7 @@ const d3 = { seasonIndex, seasonLeaderboard, }; -export { d3 as default, d3 }; +export { d3, d3 as default }; //Act export * from './act/act'; diff --git a/packages/d3/src/item-type/item-type.ts b/packages/d3/src/item-type/item-type.ts index 3a34a8c..6590787 100644 --- a/packages/d3/src/item-type/item-type.ts +++ b/packages/d3/src/item-type/item-type.ts @@ -2,14 +2,14 @@ import type { Resource } from '@blizzard-api/core'; import { base } from '../base'; import type { ItemTypeIndexResponse, ItemTypeResponse } from './types'; -export function itemTypeIndex(): Resource> { +export function itemType(itemTypeSlug: string): Resource> { return { - path: `${base}/item-type`, + path: `${base}/item-type/${itemTypeSlug}`, }; } -export function itemType(itemTypeSlug: string): Resource> { +export function itemTypeIndex(): Resource> { return { - path: `${base}/item-type/${itemTypeSlug}`, + path: `${base}/item-type`, }; } diff --git a/packages/d3/src/item/types.ts b/packages/d3/src/item/types.ts index 3536c27..006ea7b 100644 --- a/packages/d3/src/item/types.ts +++ b/packages/d3/src/item/types.ts @@ -1,3 +1,9 @@ +export interface Attributes { + other: Array; + primary: Array; + secondary: Array; +} + export interface ItemResponse { accountBound: boolean; attributes: Attributes; @@ -23,12 +29,6 @@ export interface ItemResponse { typeName: string; } -export interface Attributes { - other: Array; - primary: Array; - secondary: Array; -} - export interface Primary { text: string; textHtml: string; diff --git a/packages/d3/src/profile/profile.ts b/packages/d3/src/profile/profile.ts index 8cc5fc7..a76c898 100644 --- a/packages/d3/src/profile/profile.ts +++ b/packages/d3/src/profile/profile.ts @@ -14,12 +14,6 @@ export function accountHero(battleTag: string, heroId: number): Resource { - return { - path: `${profileBase}/${battleTag}/hero/${heroId}/items`, - }; -} - export function accountHeroFollowerItems( battleTag: string, heroId: number, @@ -28,3 +22,9 @@ export function accountHeroFollowerItems( path: `${profileBase}/${battleTag}/hero/${heroId}/follower-items`, }; } + +export function accountHeroItems(battleTag: string, heroId: number): Resource { + return { + path: `${profileBase}/${battleTag}/hero/${heroId}/items`, + }; +} diff --git a/packages/d3/src/profile/types.ts b/packages/d3/src/profile/types.ts index ef661d9..0acddb3 100644 --- a/packages/d3/src/profile/types.ts +++ b/packages/d3/src/profile/types.ts @@ -1,3 +1,62 @@ +export interface AccountHeroFollowerItemsResponse { + enchantress: Record; + scoundrel: Record; + templar: Record; +} + +export interface AccountHeroItemsResponse { + accountBound: boolean; + armor: number; + attacksPerSecond: number; + attributes: Attributes; + attributesHtml: Attributes; + craftedBy?: CraftedBy; + damage?: string; + displayColor: DisplayColor; + dps?: string; + elementalType?: string; + flavorText: string; + gems?: Array; + icon: string; + id: string; + isSeasonRequiredToDrop: boolean; + itemLevel: number; + maxDamage: number; + minDamage: number; + name: string; + openSockets: number; + requiredLevel: number; + seasonRequiredToDrop: number; + set?: Set; + slots: string; + stackSizeMax: number; + tooltipParams: string; + type: Record; + typeName: string; +} + +export interface AccountHeroResponse { + alive: boolean; + class: string; + followers: Followers; + gender: number; + hardcore: boolean; + highestSoloRiftCompleted: number; + id: number; + items: Record; + kills: Kills; + lastUpdated: number; + legendaryPowers: Array; + level: number; + name: string; + paragonLevel: number; + progression: HeroProgression; + seasonal: boolean; + seasonCreated: number; + skills: Skills; + stats: Record; +} + export interface AccountResponse { battleTag: string; blacksmith: Artisan; @@ -27,28 +86,12 @@ export interface AccountResponse { timePlayed: TimePlayed; } -interface Artisan { - level: number; - slug: 'blacksmith' | 'jeweler' | 'mystic'; -} - -interface Hero { - class: string; - classSlug: string; - dead: boolean; - gender: number; - hardcore: boolean; - id: number; - kills: HeroKills; - 'last-updated': number; - level: number; +interface AccountHeroItem { + icon: string; + id: string; name: string; - paragonLevel: number; - seasonal: boolean; -} - -interface HeroKills { - elites: number; + path: string; + slug: string; } interface AccountResponseKills { @@ -57,187 +100,74 @@ interface AccountResponseKills { monsters: number; } -interface Progression { - act1: boolean; - act2: boolean; - act3: boolean; - act4: boolean; - act5: boolean; -} - -interface Season { - highestHardcoreLevel: number; - kills: AccountResponseKills; - paragonLevel: number; - paragonLevelHardcore: number; - seasonId: number; - timePlayed: TimePlayed; +interface Act { + completed: boolean; + completedQuests: Array; } -interface TimePlayed { - barbarian: number; - crusader: number; - 'demon-hunter': number; - monk: number; - necromancer: number; - 'witch-doctor': number; - wizard: number; +interface Active { + rune: Rune; + skill: Skill; } -export interface AccountHeroResponse { - alive: boolean; - class: string; - followers: Followers; - gender: number; - hardcore: boolean; - highestSoloRiftCompleted: number; - id: number; - items: Record; - kills: Kills; - lastUpdated: number; - legendaryPowers: Array; +interface Artisan { level: number; - name: string; - paragonLevel: number; - progression: HeroProgression; - seasonal: boolean; - seasonCreated: number; - skills: Skills; - stats: Record; + slug: 'blacksmith' | 'jeweler' | 'mystic'; } -interface Followers { - enchantress: Enchantress; - scoundrel: Scoundrel; - templar: Templar; +interface Attributes { + primary: Array; + secondary?: Array; } -interface Enchantress { - items: EnchantressItems; - level: number; - skills: Array; +interface CompletedQuest { + name: string; slug: string; - stats: Stats; } -interface EnchantressItems { - mainHand: Item; -} - -interface Item { - displayColor?: DisplayColor; - dyeColor?: Item; - icon: string; +interface CraftedBy { + cost: number; id: string; + itemProduced: ItemProduced; name: string; - tooltipParams: string; -} - -interface Stats { - experienceBonus: number; - goldFind: number; - magicFind: number; -} - -interface Scoundrel { - items: Record; - level: number; - skills: Array; + reagents: Array; slug: string; - stats: Stats; } -interface Skill { - description: string; - descriptionHtml: string; - flavorText?: string; +type DisplayColor = 'blue' | 'green' | 'orange' | 'white' | 'yellow'; + +interface Dye { icon: string; - level: number; + id: string; name: string; - slug: string; - tooltipUrl: string; + tooltipParams: string; } -interface Templar { - items: TemplarItems; +interface Enchantress { + items: EnchantressItems; level: number; - skills: Array; + skills: Array; slug: string; stats: Stats; } -interface TemplarItems { - bracers: Item; - feet: Item; - hands: Item; - head: Item; +interface EnchantressItems { mainHand: Item; - offHand: Item; - shoulders: Item; - torso: Item; - waist: Item; -} - -interface Kills { - elites: number; -} - -interface HeroProgression { - act1: Act; - act2: Act; - act3: Act; - act4: Act; - act5: Act; -} - -interface Act { - completed: boolean; - completedQuests: Array; -} - -interface CompletedQuest { - name: string; - slug: string; -} - -interface Skills { - active: Array; - passive: Array; -} - -interface Active { - rune: Rune; - skill: Skill; -} - -interface Rune { - description: string; - descriptionHtml: string; - level: number; - name: string; - slug: string; - type: string; } -interface Passive { - skill: Skill; -} - -type DisplayColor = 'blue' | 'green' | 'orange' | 'white' | 'yellow'; - -export interface AccountHeroItemsResponse { +interface FollowerItem { accountBound: boolean; armor: number; attacksPerSecond: number; - attributes: Attributes; - attributesHtml: Attributes; + attributes?: Attributes; + attributesHtml?: Attributes; + blockChance?: string; craftedBy?: CraftedBy; damage?: string; - displayColor: DisplayColor; + displayColor: string; dps?: string; - elementalType?: string; - flavorText: string; - gems?: Array; + dye?: Dye; + flavorText?: string; icon: string; id: string; isSeasonRequiredToDrop: boolean; @@ -256,18 +186,55 @@ export interface AccountHeroItemsResponse { typeName: string; } -interface Attributes { - primary: Array; - secondary?: Array; +interface Followers { + enchantress: Enchantress; + scoundrel: Scoundrel; + templar: Templar; } -interface CraftedBy { - cost: number; +interface Gem { + attributes: Array; + isGem: boolean; + isJewel: boolean; + item: AccountHeroItem; + jewelRank?: number; + jewelSecondaryUnlockRank?: number; +} + +interface Hero { + class: string; + classSlug: string; + dead: boolean; + gender: number; + hardcore: boolean; + id: number; + kills: HeroKills; + 'last-updated': number; + level: number; + name: string; + paragonLevel: number; + seasonal: boolean; +} + +interface HeroKills { + elites: number; +} + +interface HeroProgression { + act1: Act; + act2: Act; + act3: Act; + act4: Act; + act5: Act; +} + +interface Item { + displayColor?: DisplayColor; + dyeColor?: Item; + icon: string; id: string; - itemProduced: ItemProduced; name: string; - reagents: Array; - slug: string; + tooltipParams: string; } interface ItemProduced { @@ -275,26 +242,51 @@ interface ItemProduced { path: string; } +interface Kills { + elites: number; +} + +interface Passive { + skill: Skill; +} + +interface Progression { + act1: boolean; + act2: boolean; + act3: boolean; + act4: boolean; + act5: boolean; +} + interface Reagent { item: AccountHeroItem; quantity: number; } -interface AccountHeroItem { - icon: string; - id: string; +interface Rune { + description: string; + descriptionHtml: string; + level: number; name: string; - path: string; slug: string; + type: string; } -interface Gem { - attributes: Array; - isGem: boolean; - isJewel: boolean; - item: AccountHeroItem; - jewelRank?: number; - jewelSecondaryUnlockRank?: number; +interface Scoundrel { + items: Record; + level: number; + skills: Array; + slug: string; + stats: Stats; +} + +interface Season { + highestHardcoreLevel: number; + kills: AccountResponseKills; + paragonLevel: number; + paragonLevelHardcore: number; + seasonId: number; + timePlayed: TimePlayed; } interface Set { @@ -304,46 +296,54 @@ interface Set { slug: string; } -export interface AccountHeroFollowerItemsResponse { - enchantress: Record; - scoundrel: Record; - templar: Record; -} - -interface FollowerItem { - accountBound: boolean; - armor: number; - attacksPerSecond: number; - attributes?: Attributes; - attributesHtml?: Attributes; - blockChance?: string; - craftedBy?: CraftedBy; - damage?: string; - displayColor: string; - dps?: string; - dye?: Dye; +interface Skill { + description: string; + descriptionHtml: string; flavorText?: string; icon: string; - id: string; - isSeasonRequiredToDrop: boolean; - itemLevel: number; - maxDamage: number; - minDamage: number; + level: number; name: string; - openSockets: number; - requiredLevel: number; - seasonRequiredToDrop: number; - set?: Set; - slots: string; - stackSizeMax: number; - tooltipParams: string; - type: Record; - typeName: string; + slug: string; + tooltipUrl: string; } -interface Dye { - icon: string; - id: string; - name: string; - tooltipParams: string; +interface Skills { + active: Array; + passive: Array; +} + +interface Stats { + experienceBonus: number; + goldFind: number; + magicFind: number; +} + +interface Templar { + items: TemplarItems; + level: number; + skills: Array; + slug: string; + stats: Stats; +} + +interface TemplarItems { + bracers: Item; + feet: Item; + hands: Item; + head: Item; + mainHand: Item; + offHand: Item; + shoulders: Item; + torso: Item; + waist: Item; +} + +interface TimePlayed { + barbarian: number; + crusader: number; + 'demon-hunter': number; + monk: number; + necromancer: number; + 'witch-doctor': number; + wizard: number; } diff --git a/packages/hs/src/base.ts b/packages/hs/src/base.ts index c6134fe..accd862 100644 --- a/packages/hs/src/base.ts +++ b/packages/hs/src/base.ts @@ -1,7 +1,7 @@ -type SortDirection = 'asc' | 'desc'; - -type SortOptions = 'attack' | 'class' | 'dataAdded' | 'groupByClass' | 'health' | 'manaCost' | 'name'; +export type GameMode = 'arena' | 'battlegrounds' | 'classic' | 'constructed' | 'duels' | 'mercenaries' | 'standard'; export type SearchSortOption = `${SortOptions}:${SortDirection}`; -export type GameMode = 'arena' | 'battlegrounds' | 'classic' | 'constructed' | 'duels' | 'mercenaries' | 'standard'; +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 8068af4..efe943a 100644 --- a/packages/hs/src/card-backs/types.ts +++ b/packages/hs/src/card-backs/types.ts @@ -1,22 +1,6 @@ import type { Locales } from '@blizzard-api/core'; import type { SearchSortOption } from '../base'; -export interface CardBackSearchResponse { - cardBacks: Array; - cardCount: number; - page: number; - pageCount: number; -} - -export interface SingleCardBackSearchResponse { - id: number; - image: string; - name: Record | string; - slug: string; - sortCategory: number; - text: Record | string; -} - export interface CardBackSearchParameters { cardBackCategory?: | 'achieve' @@ -38,3 +22,19 @@ export interface CardBackSearchParameters { sort?: SearchSortOption; textFilter?: string; } + +export interface CardBackSearchResponse { + cardBacks: Array; + cardCount: number; + page: number; + pageCount: number; +} + +export interface SingleCardBackSearchResponse { + id: number; + image: string; + name: Record | string; + slug: string; + sortCategory: number; + text: Record | string; +} diff --git a/packages/hs/src/cards/types.ts b/packages/hs/src/cards/types.ts index 3e25836..90b1f73 100644 --- a/packages/hs/src/cards/types.ts +++ b/packages/hs/src/cards/types.ts @@ -1,6 +1,20 @@ import type { Locales } from '@blizzard-api/core'; import type { GameMode } from '../base'; +export interface BlizzardCardSearchParameters extends BaseSearchParameters { + attack?: string; + defaultMercenary?: string; + health?: string; + mercenaryId?: string; +} + +export interface CardSearchParameters extends BaseSearchParameters { + attack?: Array | number; + defaultMercenary?: Array | number; + health?: Array | number; + mercenaryId?: Array | number; +} + export interface CardSearchResponse { cardCount: number; cards: Array; @@ -8,60 +22,28 @@ export interface CardSearchResponse { pageCount: number; } -interface Card { - artistName: null | string; +export interface FetchOneCardResponse { + artistName: string; attack: number; cardSetId: number; cardTypeId: number; - classId: null | number; + classId: number; collectible: number; - cropImage: null | string; - flavorText: string; + cropImage: string; + flavorText: Record | string; health: number; id: number; - image: string; - imageGold: string; + image: Record | string; + imageGold: Record | string; isZilliaxCosmeticModule: boolean; isZilliaxFunctionalModule: boolean; + keywordIds: Array; manaCost: number; - mercenaryHero: MercenaryHero; - minionTypeId: number; multiClassIds: Array; - multiTypeIds?: Array; - name: string; + name: Record | string; rarityId: number; slug: string; - text: string; -} - -interface MercenaryHero { - collectible: number; - craftingCost: number; - default: number; - faction: null | number; - mercId: number; - rarity: number; - roleId: number; - statsByLevel: Record; -} - -interface StatsByLevel { - attack: number; - health: number; -} - -export interface CardSearchParameters extends BaseSearchParameters { - attack?: Array | number; - defaultMercenary?: Array | number; - health?: Array | number; - mercenaryId?: Array | number; -} - -export interface BlizzardCardSearchParameters extends BaseSearchParameters { - attack?: string; - defaultMercenary?: string; - health?: string; - mercenaryId?: string; + text: Record | string; } interface BaseSearchParameters { @@ -81,29 +63,47 @@ interface BaseSearchParameters { | 'tier:asc' | 'tier:desc'; textFilter?: string; - tier?: 'hero' | 1 | 2 | 3 | 4 | 5 | 6; + tier?: 1 | 2 | 3 | 4 | 5 | 6 | 'hero'; } -export interface FetchOneCardResponse { - artistName: string; +interface Card { + artistName: null | string; attack: number; cardSetId: number; cardTypeId: number; - classId: number; + classId: null | number; collectible: number; - cropImage: string; - flavorText: Record | string; + cropImage: null | string; + flavorText: string; health: number; id: number; - image: Record | string; - imageGold: Record | string; + image: string; + imageGold: string; isZilliaxCosmeticModule: boolean; isZilliaxFunctionalModule: boolean; - keywordIds: Array; manaCost: number; + mercenaryHero: MercenaryHero; + minionTypeId: number; multiClassIds: Array; - name: Record | string; + multiTypeIds?: Array; + name: string; rarityId: number; slug: string; - text: Record | string; + text: string; +} + +interface MercenaryHero { + collectible: number; + craftingCost: number; + default: number; + faction: null | number; + mercId: number; + rarity: number; + roleId: number; + statsByLevel: Record; +} + +interface StatsByLevel { + attack: number; + health: number; } diff --git a/packages/hs/src/decks/types.ts b/packages/hs/src/decks/types.ts index 841c4c6..ee31160 100644 --- a/packages/hs/src/decks/types.ts +++ b/packages/hs/src/decks/types.ts @@ -1,4 +1,3 @@ -export type DeckSearchParameters = { code: string } | { hero?: string; ids: string }; export interface DeckResponse { cardCount: number; cards: Array; @@ -9,6 +8,7 @@ export interface DeckResponse { heroPower: Hero; version: number; } +export type DeckSearchParameters = { code: string } | { hero?: string; ids: string }; interface Card { armor?: number; diff --git a/packages/hs/src/metadata/types.ts b/packages/hs/src/metadata/types.ts index 8e1fc5b..f72dbc2 100644 --- a/packages/hs/src/metadata/types.ts +++ b/packages/hs/src/metadata/types.ts @@ -19,9 +19,15 @@ export interface AllMetadataResponse { types: Array; } -interface GameMode extends NameId { - gameModes?: Array; +export interface SpecificMetadataResponse extends NameId { + aliasSetIds?: Array; + collectibleCount: number; + collectibleRevealedCount: number; + hyped: boolean; + nonCollectibleCount: number; + nonCollectibleRevealedCount: number; slug: string; + type: SetType; } interface Class { @@ -33,6 +39,11 @@ interface Class { slug: string; } +interface GameMode extends NameId { + gameModes?: Array; + slug: string; +} + interface Keyword extends NameId { gameModes: Array; refText: string; @@ -46,19 +57,6 @@ interface Rarity extends NameId { slug: string; } -interface SetGroup { - cardSets: Array; - icon?: string; - name: string; - slug: string; - standard?: boolean; - svg?: null | string; - year?: number; - yearRange?: string; -} - -type SetType = '' | 'adventure' | 'base' | 'expansion'; - interface Set extends NameId { aliasSetIds?: Array; collectibleCount: number; @@ -70,13 +68,15 @@ interface Set extends NameId { type: SetType; } -export interface SpecificMetadataResponse extends NameId { - aliasSetIds?: Array; - collectibleCount: number; - collectibleRevealedCount: number; - hyped: boolean; - nonCollectibleCount: number; - nonCollectibleRevealedCount: number; +interface SetGroup { + cardSets: Array; + icon?: string; + name: string; slug: string; - type: SetType; + standard?: boolean; + svg?: null | string; + year?: number; + yearRange?: string; } + +type SetType = '' | 'adventure' | 'base' | 'expansion'; diff --git a/packages/sc2/src/ladder/types.ts b/packages/sc2/src/ladder/types.ts index 343607e..b901580 100644 --- a/packages/sc2/src/ladder/types.ts +++ b/packages/sc2/src/ladder/types.ts @@ -2,6 +2,14 @@ export interface GrandmasterLeaderboardResponse { ladderTeams: Array; } +export interface SeasonResponse { + endDate: string; + number: number; + seasonId: number; + startDate: string; + year: number; +} + interface LadderTeam { joinTimestamp: number; losses: number; @@ -20,11 +28,3 @@ interface TeamMember { realm: number; region: number; } - -export interface SeasonResponse { - endDate: string; - number: number; - seasonId: number; - startDate: string; - year: number; -} diff --git a/packages/sc2/src/league/types.ts b/packages/sc2/src/league/types.ts index a95a40f..f9277aa 100644 --- a/packages/sc2/src/league/types.ts +++ b/packages/sc2/src/league/types.ts @@ -5,23 +5,7 @@ export interface LeagueDataResponse extends ResponseBase { tier: Array; } -interface Key { - league_id: number; - queue_id: number; - season_id: number; - team_type: number; -} - -interface Tier { - division: Array; - id: number; -} - -interface Division { - id: number; - ladder_id: number; - member_count: number; -} +export type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver'; export type StarcraftLeagueQueue = | 'hots-1v1' @@ -40,4 +24,20 @@ export type StarcraftLeagueQueue = export type StarcraftLeagueTeamType = 'arranged' | 'random'; -export type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver'; +interface Division { + id: number; + ladder_id: number; + member_count: number; +} + +interface Key { + league_id: number; + queue_id: number; + season_id: number; + team_type: number; +} + +interface Tier { + division: Array; + id: number; +} diff --git a/packages/sc2/src/legacy/legacy.ts b/packages/sc2/src/legacy/legacy.ts index 097371e..03b91a3 100644 --- a/packages/sc2/src/legacy/legacy.ts +++ b/packages/sc2/src/legacy/legacy.ts @@ -8,13 +8,15 @@ import type { LegacyRewardsResponse, } from './types'; -export function legacyProfile( - regionId: StarcraftRegion, - realmId: 1 | 2, - profileId: number, -): Resource { +export function legacyAchievements(regionId: StarcraftRegion): Resource { return { - path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, + path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`, + }; +} + +export function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource { + return { + path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`, }; } @@ -38,15 +40,13 @@ export function legacyMatchHistory( }; } -export function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource { - return { - path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`, - }; -} - -export function legacyAchievements(regionId: StarcraftRegion): Resource { +export function legacyProfile( + regionId: StarcraftRegion, + realmId: 1 | 2, + profileId: number, +): Resource { return { - path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`, + path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, }; } diff --git a/packages/sc2/src/legacy/types.ts b/packages/sc2/src/legacy/types.ts index 7275b43..b414659 100644 --- a/packages/sc2/src/legacy/types.ts +++ b/packages/sc2/src/legacy/types.ts @@ -1,3 +1,18 @@ +export interface LegacyAchievementsResponse { + achievements: Array; + categories: Array; +} + +export interface LegacyLaddersResponse { + currentSeason: Array; + previousSeason: Array; + showcasePlacement: Array; +} + +export interface LegacyMatchHistoryResponse { + matches: Array; +} + export interface LegacyProfileResponse { achievements: Achievements; campaign: Campaign; @@ -14,6 +29,24 @@ export interface LegacyProfileResponse { swarmLevels: SwarmLevels; } +export interface LegacyRewardsResponse { + animations: Array; + portraits: Array; + protossDecals: Array; + skins: Array; + terranDecals: Array; + zergDecals: Array; +} + +interface Achievement { + achievementId: string; + categoryId: string; + description: string; + icon: Icon; + points: number; + title: string; +} + interface Achievements { achievements: Array<{ achievementId: string; @@ -22,9 +55,13 @@ interface Achievements { points: Points; } -interface Points { - categoryPoints: Record; - totalPoints: number; +interface Animation { + achievementId: string; + command?: '/dance'; + icon: Icon; + id: string; + name?: string; + title: string; } interface Campaign { @@ -43,6 +80,13 @@ interface Career { zergWins: number; } +interface Category { + categoryId: string; + children?: Array; + featuredAchievementId: string; + title: string; +} + interface Icon { h: number; offset: number; @@ -52,6 +96,19 @@ interface Icon { y: number; } +interface Match { + date: number; + decision: 'Left' | 'Loss' | 'Win'; + map: string; + speed: 'Fast' | 'Faster'; + type: '2v2' | '3v3' | 'Co-Op' | 'Custom'; +} + +interface Points { + categoryPoints: Record; + totalPoints: number; +} + interface Rewards { earned: Array; selected: Array; @@ -83,60 +140,3 @@ interface SwarmLevelsByRace { level: number; totalLevelXP: number; } - -export interface LegacyLaddersResponse { - currentSeason: Array; - previousSeason: Array; - showcasePlacement: Array; -} - -export interface LegacyMatchHistoryResponse { - matches: Array; -} - -interface Match { - date: number; - decision: 'Left' | 'Loss' | 'Win'; - map: string; - speed: 'Fast' | 'Faster'; - type: '2v2' | '3v3' | 'Co-Op' | 'Custom'; -} - -export interface LegacyAchievementsResponse { - achievements: Array; - categories: Array; -} - -interface Achievement { - achievementId: string; - categoryId: string; - description: string; - icon: Icon; - points: number; - title: string; -} - -interface Category { - categoryId: string; - children?: Array; - featuredAchievementId: string; - title: string; -} - -export interface LegacyRewardsResponse { - animations: Array; - portraits: Array; - protossDecals: Array; - skins: Array; - terranDecals: Array; - zergDecals: Array; -} - -interface Animation { - achievementId: string; - command?: '/dance'; - icon: Icon; - id: string; - name?: string; - title: string; -} diff --git a/packages/sc2/src/profile/profile.ts b/packages/sc2/src/profile/profile.ts index 65ca2dc..91b2b68 100644 --- a/packages/sc2/src/profile/profile.ts +++ b/packages/sc2/src/profile/profile.ts @@ -2,41 +2,41 @@ import type { Resource } from '@blizzard-api/core'; import { starcraftRegion, type StarcraftRegion } from '../base'; import type { LadderResponse, LadderSummaryResponse, MetadataResponse, StaticProfileResponse } from './types'; -export function staticProfile(regionId: StarcraftRegion): Resource { +export function ladder( + regionId: StarcraftRegion, + realmId: 1 | 2, + profileId: number, + ladderId: number, +): Resource { return { - path: `/sc2/static/profile/${starcraftRegion[regionId]}`, + path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`, }; } -export function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource { +export function ladderSummary( + regionId: StarcraftRegion, + realmId: 1 | 2, + profileId: number, +): Resource { return { - path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, + path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`, }; } -export function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource { +export function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource { return { - path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, + path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, }; } -export function ladderSummary( - regionId: StarcraftRegion, - realmId: 1 | 2, - profileId: number, -): Resource { +export function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource { return { - path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`, + path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`, }; } -export function ladder( - regionId: StarcraftRegion, - realmId: 1 | 2, - profileId: number, - ladderId: number, -): Resource { +export function staticProfile(regionId: StarcraftRegion): Resource { return { - path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`, + path: `/sc2/static/profile/${starcraftRegion[regionId]}`, }; } diff --git a/packages/sc2/src/profile/types.ts b/packages/sc2/src/profile/types.ts index 838ee4c..8f3bda5 100644 --- a/packages/sc2/src/profile/types.ts +++ b/packages/sc2/src/profile/types.ts @@ -1,3 +1,24 @@ +export interface LadderResponse { + allLadderMemberships: Array; + ladderTeams: Array; + ranksAndPools: Array; +} + +export interface LadderSummaryResponse { + allLadderMemberships: Array; + placementMatches: Array; + showCaseEntries: Array; +} + +export interface MetadataResponse { + avatarUrl: string; + name: string; + profileId: string; + profileUrl: string; + realmId: number; + regionId: number; +} + export interface StaticProfileResponse { achievements: Array; categories: Array; @@ -52,24 +73,3 @@ interface Reward { uiOrderHint: number; unlockableType: string; } - -export interface MetadataResponse { - avatarUrl: string; - name: string; - profileId: string; - profileUrl: string; - realmId: number; - regionId: number; -} - -export interface LadderSummaryResponse { - allLadderMemberships: Array; - placementMatches: Array; - showCaseEntries: Array; -} - -export interface LadderResponse { - allLadderMemberships: Array; - ladderTeams: Array; - ranksAndPools: Array; -} diff --git a/packages/wow/src/account-profile/account-profile.ts b/packages/wow/src/account-profile/account-profile.ts index f8c7421..2068357 100644 --- a/packages/wow/src/account-profile/account-profile.ts +++ b/packages/wow/src/account-profile/account-profile.ts @@ -12,38 +12,6 @@ import type { const accountProfileBase = '/profile/user/wow'; -/** - * Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow} - * @param token The OAuth 2.0 access token to use for authentication. - * @returns a profile summary for an account. - */ -export function accountProfileSummary(token: string): ProtectedResource { - return { - namespace: 'profile', - path: `${accountProfileBase}`, - token, - }; -} - -/** - * Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow} - * @param realmId The realm ID. - * @param characterId The character ID. - * @param token The OAuth 2.0 access token to use for authentication. - * @returns a protected profile summary for a character. - */ -export function protectedCharacterProfileSummary( - realmId: number, - characterId: number, - token: string, -): ProtectedResource { - return { - namespace: 'profile', - path: `${accountProfileBase}/protected-character/${realmId}-${characterId}`, - token, - }; -} - /** * Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow} * @param token The OAuth 2.0 access token to use for authentication. @@ -100,6 +68,19 @@ export function accountPetsCollectionSummary(token: string): ProtectedResource { + return { + namespace: 'profile', + path: `${accountProfileBase}`, + token, + }; +} + /** * Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow} * @param token The OAuth 2.0 access token to use for authentication. @@ -127,3 +108,22 @@ export function accountTransmogsCollectionSummary( token, }; } + +/** + * Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow} + * @param realmId The realm ID. + * @param characterId The character ID. + * @param token The OAuth 2.0 access token to use for authentication. + * @returns a protected profile summary for a character. + */ +export function protectedCharacterProfileSummary( + realmId: number, + characterId: number, + token: string, +): ProtectedResource { + return { + namespace: 'profile', + path: `${accountProfileBase}/protected-character/${realmId}-${characterId}`, + token, + }; +} diff --git a/packages/wow/src/account-profile/types.ts b/packages/wow/src/account-profile/types.ts index 0f480bf..b8dab2a 100644 --- a/packages/wow/src/account-profile/types.ts +++ b/packages/wow/src/account-profile/types.ts @@ -1,5 +1,30 @@ import type { Faction, Gender, Href, KeyBase, NameId, NameIdKey, Realm } from '../base'; +export interface AccountCollectionsIndexResponse { + _links: Links; + heirlooms: Href; + mounts: Href; + pets: Href; + toys: Href; + transmogs: Href; +} + +export interface AccountHeirloomsCollectionSummaryResponse { + _links: Links; + heirlooms: Array; +} + +export interface AccountMountsCollectionSummaryResponse { + _links: Links; + mounts: Array; +} + +export interface AccountPetsCollectionSummaryResponse { + _links: Links; + pets: Array; + unlocked_battle_pet_slots: number; +} + export interface AccountProfileSummaryResponse { _links: Links; collections: Href; @@ -7,28 +32,15 @@ export interface AccountProfileSummaryResponse { wow_accounts?: Array; } -interface Links { - profile: Href; - self: Href; - user: Href; -} - -interface WowAccount { - characters: Array; - id: number; +export interface AccountToysCollectionSummaryResponse { + _links: Links; + toys: Array; } -interface Character { - character: Href; - faction: Faction; - gender: Gender; - id: number; - level: number; - name: string; - playable_class: NameIdKey; - playable_race: NameIdKey; - protected_character: Href; - realm: Realm; +export interface AccountTransmogsCollectionSummaryResponse { + _links: Links; + appearance_sets: Array; + slots: Array; } export interface ProtectedCharacterProfileSummaryResponse { @@ -43,38 +55,17 @@ export interface ProtectedCharacterProfileSummaryResponse { wow_account: number; } -interface Position { - facing: number; - map: NameId; - x: number; - y: number; - z: number; - zone: NameId; -} - -interface ProtectedStats { - level_gold_gained: number; - level_gold_lost: number; - level_item_value_gained: number; - level_number_deaths: number; - total_gold_gained: number; - total_gold_lost: number; - total_item_value_gained: number; - total_number_deaths: number; -} - -export interface AccountCollectionsIndexResponse { - _links: Links; - heirlooms: Href; - mounts: Href; - pets: Href; - toys: Href; - transmogs: Href; -} - -export interface AccountHeirloomsCollectionSummaryResponse { - _links: Links; - heirlooms: Array; +interface Character { + character: Href; + faction: Faction; + gender: Gender; + id: number; + level: number; + name: string; + playable_class: NameIdKey; + playable_race: NameIdKey; + protected_character: Href; + realm: Realm; } interface Heirloom { @@ -82,9 +73,10 @@ interface Heirloom { upgrade: { level: number }; } -export interface AccountMountsCollectionSummaryResponse { - _links: Links; - mounts: Array; +interface Links { + profile: Href; + self: Href; + user: Href; } interface Mount { @@ -92,15 +84,9 @@ interface Mount { mount: NameIdKey; } -export interface AccountPetsCollectionSummaryResponse { - _links: Links; - pets: Array; - unlocked_battle_pet_slots: number; -} - interface Pet { active_slot?: number; - creature_display?: { id: number } & KeyBase; + creature_display?: KeyBase & { id: number }; id: number; is_active?: boolean; is_favorite?: boolean; @@ -111,11 +97,41 @@ interface Pet { stats: Stats; } +interface Position { + facing: number; + map: NameId; + x: number; + y: number; + z: number; + zone: NameId; +} + +interface ProtectedStats { + level_gold_gained: number; + level_gold_lost: number; + level_item_value_gained: number; + level_number_deaths: number; + total_gold_gained: number; + total_gold_lost: number; + total_item_value_gained: number; + total_number_deaths: number; +} + interface Quality { name: 'Common' | 'Poor' | 'Rare' | 'Uncommon'; type: 'COMMON' | 'POOR' | 'RARE' | 'UNCOMMON'; } +interface Slot { + appearances: Array; + slot: Slot; +} + +interface Slot { + name: string; + type: string; +} + interface Stats { breed_id: number; health: number; @@ -123,28 +139,12 @@ interface Stats { speed: number; } -export interface AccountToysCollectionSummaryResponse { - _links: Links; - toys: Array; -} - interface Toy { is_favorite?: boolean; toy: NameIdKey; } -export interface AccountTransmogsCollectionSummaryResponse { - _links: Links; - appearance_sets: Array; - slots: Array; -} - -interface Slot { - appearances: Array<{ id: number } & KeyBase>; - slot: Slot; -} - -interface Slot { - name: string; - type: string; +interface WowAccount { + characters: Array; + id: number; } diff --git a/packages/wow/src/achievements/achievements.ts b/packages/wow/src/achievements/achievements.ts index 8c317d5..e8c9751 100644 --- a/packages/wow/src/achievements/achievements.ts +++ b/packages/wow/src/achievements/achievements.ts @@ -11,6 +11,17 @@ import type { const achievementBase = `${base}/achievement`; const achievementCategoryBase = `${base}/achievement-category`; +/** + * Get an achievement by ID. + * @param achievementId The achievement ID. + * @returns The achievement. See {@link AchievementResponse}. + */ +export function achievement(achievementId: number): Resource { + return { + namespace: 'static', + path: `${achievementBase}/${achievementId}`, + }; +} /** * Get an achievement category by ID. * @param achievementCategoryId The achievement category ID. @@ -32,17 +43,6 @@ export function achievementCategoryIndex(): Resource { - return { - namespace: 'static', - path: `${achievementBase}/${achievementId}`, - }; -} /** * Get an achievement index. * @returns The achievement index. See {@link AchievementIndexResponse}. diff --git a/packages/wow/src/achievements/types.ts b/packages/wow/src/achievements/types.ts index 06ac685..8b15f3f 100644 --- a/packages/wow/src/achievements/types.ts +++ b/packages/wow/src/achievements/types.ts @@ -1,10 +1,20 @@ import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; +/** + * Interface for a response from the achievement category index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface AchievementCategoryIndexResponse extends ResponseBase { + categories: Array; + guild_categories: Array; + root_categories: Array; +} + /** * Interface for a response from the achievement category endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface AchievementCategoryResponse extends ResponseBase, NameId { +export interface AchievementCategoryResponse extends NameId, ResponseBase { achievements: Array; aggregates_by_faction: { alliance: { @@ -22,20 +32,27 @@ export interface AchievementCategoryResponse extends ResponseBase, NameId { } /** - * Interface for a response from the achievement category index endpoint. + * Interface for a response from the achievement index endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface AchievementCategoryIndexResponse extends ResponseBase { - categories: Array; - guild_categories: Array; - root_categories: Array; +export interface AchievementIndexResponse extends ResponseBase { + achievements: Array; +} + +/** + * Interface for a response from the achievement media endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface AchievementMediaResponse extends ResponseBase { + assets: Array; + id: number; } /** * Interface for a response from the achievement endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface AchievementResponse extends ResponseBase, NameId { +export interface AchievementResponse extends NameId, ResponseBase { category: NameIdKey; criteria: { amount: number; @@ -49,25 +66,8 @@ export interface AchievementResponse extends ResponseBase, NameId { points: number; } -/** - * Interface for a response from the achievement index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface AchievementIndexResponse extends ResponseBase { - achievements: Array; -} - interface AchievementMediaItem { file_data_id: number; key: string; value: string; } - -/** - * Interface for a response from the achievement media endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface AchievementMediaResponse extends ResponseBase { - assets: Array; - id: number; -} diff --git a/packages/wow/src/auction-house/types.ts b/packages/wow/src/auction-house/types.ts index 4997ca5..bba9f8d 100644 --- a/packages/wow/src/auction-house/types.ts +++ b/packages/wow/src/auction-house/types.ts @@ -1,19 +1,11 @@ import type { ResponseBase } from '../base'; -type AuctionHouseTimeLeft = 'LONG' | 'MEDIUM' | 'SHORT' | 'VERY_LONG'; - -interface AuctionHousePosting { - bid: number; - buyout: number; - id: number; - item: { - bonus_lists: Array; - context: number; - id: number; - modifiers: Array<{ type: number; value: number }>; - }; - quantity: number; - time_left: AuctionHouseTimeLeft; +/** + * Interface for a response from the auction house commodities endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface AuctionHouseCommoditiesResponse extends ResponseBase { + auctions: Array; } /** @@ -38,10 +30,18 @@ interface AuctionHouseCommodity { unit_price: number; } -/** - * Interface for a response from the auction house commodities endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface AuctionHouseCommoditiesResponse extends ResponseBase { - auctions: Array; +interface AuctionHousePosting { + bid: number; + buyout: number; + id: number; + item: { + bonus_lists: Array; + context: number; + id: number; + modifiers: Array<{ type: number; value: number }>; + }; + quantity: number; + time_left: AuctionHouseTimeLeft; } + +type AuctionHouseTimeLeft = 'LONG' | 'MEDIUM' | 'SHORT' | 'VERY_LONG'; diff --git a/packages/wow/src/azerite-essence/types.ts b/packages/wow/src/azerite-essence/types.ts index 34146a8..e1d3e01 100644 --- a/packages/wow/src/azerite-essence/types.ts +++ b/packages/wow/src/azerite-essence/types.ts @@ -10,33 +10,22 @@ export interface AzeriteEssenceIndexResponse extends ResponseBase { } /** - * Interface for a response from the azerite essence endpoint. + * Interface for a response from the azerite essence media endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface AzeriteEssenceResponse extends ResponseBase, NameId { - allowed_specializations: Array; - media: Media; - powers: Array; -} - -interface Media extends KeyBase { - id: number; -} - -interface Power { +export interface AzeriteEssenceMediaResponse extends ResponseBase { + assets: Array; id: number; - main_power_spell: NameIdKey; - passive_power_spell: NameIdKey; - rank: number; } /** - * Interface for a response from the azerite essence media endpoint. + * Interface for a response from the azerite essence endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface AzeriteEssenceMediaResponse extends ResponseBase { - assets: Array; - id: number; +export interface AzeriteEssenceResponse extends NameId, ResponseBase { + allowed_specializations: Array; + media: Media; + powers: Array; } /** @@ -59,3 +48,14 @@ export interface AzeriteEssenceSearchResponseItem extends KeyBase { name: Record; }; } + +interface Media extends KeyBase { + id: number; +} + +interface Power { + id: number; + main_power_spell: NameIdKey; + passive_power_spell: NameIdKey; + rank: number; +} diff --git a/packages/wow/src/base.ts b/packages/wow/src/base.ts index 05327ed..f622940 100644 --- a/packages/wow/src/base.ts +++ b/packages/wow/src/base.ts @@ -23,16 +23,25 @@ export const searchBase = `${base}/search` as const; * */ -export interface Href { - href: string; +/** + * A record containing the RGBA values of a color. + */ +export interface Color { + a: number; + b: number; + g: number; + r: number; } /** - * Base interface for Blizzard API responses. + * The playable gender names/descriptions in World of Warcraft. */ -export interface ResponseBase { - _links: { - self: Href; - }; +export interface GenderName { + female: string; + male: string; +} + +export interface Href { + href: string; } /** @@ -42,6 +51,15 @@ 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. */ @@ -56,30 +74,12 @@ export interface NameId { export interface NameIdKey extends KeyBase, NameId {} /** - * A record containing the RGBA values of a color. - */ -export interface Color { - a: number; - b: number; - g: number; - r: number; -} - -/** - * The media asset associated with a character or entity in World of Warcraft. - */ -export interface MediaAsset { - file_data_id: number; - key: string; - value: string; -} - -/** - * The playable gender names/descriptions in World of Warcraft. + * Base interface for Blizzard API responses. */ -export interface GenderName { - female: string; - male: string; +export interface ResponseBase { + _links: { + self: Href; + }; } /** @@ -106,6 +106,13 @@ export const Factions = { HORDE: 'HORDE', } 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. */ @@ -120,10 +127,3 @@ export interface Faction { export interface Realm extends NameIdKey { slug: string; } - -/** - * The standard structure to represent a World of Warcraft Character. - */ -export interface Character extends NameIdKey { - realm: Realm; -} diff --git a/packages/wow/src/character-achievements/types.ts b/packages/wow/src/character-achievements/types.ts index f661d68..9079a72 100644 --- a/packages/wow/src/character-achievements/types.ts +++ b/packages/wow/src/character-achievements/types.ts @@ -10,6 +10,11 @@ export interface CharacterAchievementsSummaryResponse extends ResponseBase { total_quantity: number; } +export interface CharacterAchievementStatisticsResponse extends ResponseBase { + categories: Array; + character: Character; +} + interface Achievement { achievement: NameIdKey; completed_timestamp?: number; @@ -17,11 +22,11 @@ interface Achievement { id: number; } -interface Criteria { - amount?: number; - child_criteria?: Array; +interface Category { id: number; - is_completed: boolean; + name: string; + statistics: Array; + sub_categories: Array; } interface CategoryProgress { @@ -30,21 +35,24 @@ interface CategoryProgress { quantity: number; } +interface Criteria { + amount?: number; + child_criteria?: Array; + id: number; + is_completed: boolean; +} + interface RecentEvent { achievement: NameIdKey; timestamp: number; } -export interface CharacterAchievementStatisticsResponse extends ResponseBase { - categories: Array; - character: Character; -} - -interface Category { +interface Statistic { + description?: string; id: number; + last_updated_timestamp: number; name: string; - statistics: Array; - sub_categories: Array; + quantity: number; } interface SubCategory { @@ -52,11 +60,3 @@ interface SubCategory { name: string; statistics: Array; } - -interface Statistic { - description?: string; - id: number; - last_updated_timestamp: number; - name: string; - quantity: number; -} diff --git a/packages/wow/src/character-appearance/types.ts b/packages/wow/src/character-appearance/types.ts index eb2df7a..f73ee5c 100644 --- a/packages/wow/src/character-appearance/types.ts +++ b/packages/wow/src/character-appearance/types.ts @@ -12,9 +12,10 @@ export interface CharacterAppearanceResponse extends ResponseBase { playable_race: NameIdKey; } -interface Customization { - choice: Choice; - option: NameId; +interface BorderEmblem { + color: RGBWithId; + id: number; + media: KeyBase & { id: number }; } interface Choice { @@ -23,23 +24,17 @@ interface Choice { name?: string; } +interface Customization { + choice: Choice; + option: NameId; +} + interface GuildCrest { background: { color: RGBWithId }; border: BorderEmblem; emblem: BorderEmblem; } -interface RGBWithId { - id: number; - rgba: Color; -} - -interface BorderEmblem { - color: RGBWithId; - id: number; - media: { id: number } & KeyBase; -} - interface Item { enchant: number; id: number; @@ -48,3 +43,8 @@ interface Item { slot: { name: string; type: string }; subclass: number; } + +interface RGBWithId { + id: number; + rgba: Color; +} diff --git a/packages/wow/src/character-collections/types.ts b/packages/wow/src/character-collections/types.ts index 534ca67..d0bbd03 100644 --- a/packages/wow/src/character-collections/types.ts +++ b/packages/wow/src/character-collections/types.ts @@ -13,15 +13,29 @@ export interface CharacterHeirloomsCollectionSummaryResponse extends ResponseBas heirlooms: Array; } +export interface CharacterMountsCollectionSummaryResponse extends ResponseBase { + mounts: Array; +} + +export interface CharacterPetsCollectionSummaryResponse extends ResponseBase { + pets: Array; + unlocked_battle_pet_slots: number; +} + +export interface CharacterToysCollectionSummaryResponse extends ResponseBase { + toys: Array; +} + +export interface CharacterTransmogCollectionSummaryResponse extends ResponseBase { + appearance_sets: Array; + slots: Array; +} + interface Heirloom { heirloom: NameIdKey; upgrade: { level: number }; } -export interface CharacterMountsCollectionSummaryResponse extends ResponseBase { - mounts: Array; -} - interface Mount { is_character_specific?: boolean; is_favorite?: boolean; @@ -29,14 +43,9 @@ interface Mount { mount: NameIdKey; } -export interface CharacterPetsCollectionSummaryResponse extends ResponseBase { - pets: Array; - unlocked_battle_pet_slots: number; -} - interface Pet { active_slot?: number; - creature_display?: { id: number } & KeyBase; + creature_display?: KeyBase & { id: number }; id: number; is_active?: boolean; is_favorite?: boolean; @@ -52,6 +61,16 @@ interface Quality { type: 'COMMON' | 'POOR' | 'RARE' | 'UNCOMMON'; } +interface Slot { + appearances: Array; + slot: Slot; +} + +interface Slot { + name: string; + type: string; +} + interface Stats { breed_id: number; health: number; @@ -59,26 +78,7 @@ interface Stats { speed: number; } -export interface CharacterToysCollectionSummaryResponse extends ResponseBase { - toys: Array; -} - interface Toy { is_favorite?: boolean; toy: NameIdKey; } - -export interface CharacterTransmogCollectionSummaryResponse extends ResponseBase { - appearance_sets: Array; - slots: Array; -} - -interface Slot { - appearances: Array<{ id: number } & KeyBase>; - slot: Slot; -} - -interface Slot { - name: string; - type: string; -} diff --git a/packages/wow/src/character-encounters/character-encounters.ts b/packages/wow/src/character-encounters/character-encounters.ts index 7c229f8..64772ba 100644 --- a/packages/wow/src/character-encounters/character-encounters.ts +++ b/packages/wow/src/character-encounters/character-encounters.ts @@ -6,27 +6,27 @@ const bathPase = 'profile/wow/character'; /** * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. - * @returns a summary of a character's encounters. + * @returns a summary of a character's completed dungeons. */ -export function characterEncountersSummary( - realmSlug: string, - characterName: string, -): Resource { +export function characterDungeons(realmSlug: string, characterName: string): Resource { return { namespace: 'profile', - path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters`, + path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters/dungeons`, }; } /** * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. - * @returns a summary of a character's completed dungeons. + * @returns a summary of a character's encounters. */ -export function characterDungeons(realmSlug: string, characterName: string): Resource { +export function characterEncountersSummary( + realmSlug: string, + characterName: string, +): Resource { return { namespace: 'profile', - path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters/dungeons`, + path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters`, }; } diff --git a/packages/wow/src/character-encounters/types.ts b/packages/wow/src/character-encounters/types.ts index 0da9394..2864f20 100644 --- a/packages/wow/src/character-encounters/types.ts +++ b/packages/wow/src/character-encounters/types.ts @@ -1,23 +1,23 @@ import type { Character, Href, NameIdKey, ResponseBase } from '../base'; +export interface CharacterDungeonsResponse extends ResponseBase { + expansions: Array>; +} + export interface CharacterEncountersSummaryResponse extends ResponseBase { character: Character; dungeons: Href; raids: Href; } -export interface CharacterDungeonsResponse extends ResponseBase { - expansions: Array>; -} - -interface Expansion { - expansion: NameIdKey; - instances: Array>; +export interface CharacterRaidsResponse extends ResponseBase { + character: Character; + expansions: Array>; } -interface Instance { - instance: NameIdKey; - modes: Array; +interface DungeonDifficulties { + name: 'Heroic' | 'Mythic' | 'Mythic+ Dungeons' | 'Normal'; + type: 'HEROIC' | 'MYTHIC' | 'MYTHIC_KEYSTONE' | 'NORMAL'; } interface DungeonMode { @@ -26,37 +26,26 @@ interface DungeonMode { status: Status; } -interface Status { - name: 'Complete' | 'In Progress'; - type: 'COMPLETE' | 'IN_PROGRESS'; -} - -interface DungeonDifficulties { - name: 'Heroic' | 'Mythic' | 'Mythic+ Dungeons' | 'Normal'; - type: 'HEROIC' | 'MYTHIC' | 'MYTHIC_KEYSTONE' | 'NORMAL'; -} - -interface Progress { - completed_count: number; - encounters: Array; - total_count: number; -} - interface Encounter { completed_count: number; encounter: NameIdKey; last_kill_timestamp: number; } -export interface CharacterRaidsResponse extends ResponseBase { - character: Character; - expansions: Array>; +interface Expansion { + expansion: NameIdKey; + instances: Array>; } -interface RaidMode { - difficulty: RaidDifficulties; - progress: Progress; - status: Status; +interface Instance { + instance: NameIdKey; + modes: Array; +} + +interface Progress { + completed_count: number; + encounters: Array; + total_count: number; } interface RaidDifficulties { @@ -79,3 +68,14 @@ interface RaidDifficulties { | 'MYTHIC' | 'NORMAL'; } + +interface RaidMode { + difficulty: RaidDifficulties; + progress: Progress; + status: Status; +} + +interface Status { + name: 'Complete' | 'In Progress'; + type: 'COMPLETE' | 'IN_PROGRESS'; +} diff --git a/packages/wow/src/character-equipment/types.ts b/packages/wow/src/character-equipment/types.ts index 5012c76..1676904 100644 --- a/packages/wow/src/character-equipment/types.ts +++ b/packages/wow/src/character-equipment/types.ts @@ -6,11 +6,28 @@ export interface CharacterEquipmentSummaryResponse extends ResponseBase { equipped_items: Array; } -interface Set { +interface Armor { + display: NameDescription; + value: number; +} + +interface Damage { + damage_class: NameType; display_string: string; - effects: Array; - item_set: NameIdKey; - items: Array; + 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 { @@ -19,8 +36,16 @@ interface Effect { required_count: number; } -interface ItemElement extends NameIdKey { - is_equipped?: boolean; +interface Enchantment { + display_string: string; + enchantment_id: number; + enchantment_slot: EnchantmentSlot; + source_item?: NameIdKey; +} + +interface EnchantmentSlot { + id: number; + type: string; } interface EquippedItem { @@ -33,12 +58,12 @@ interface EquippedItem { enchantments?: Array; inventory_type: NameType; is_subclass_hidden?: boolean; - item: { id: number } & KeyBase; + item: KeyBase & { id: number }; item_class: NameIdKey; item_subclass: NameIdKey; level: DisplayStringValue; limit_category?: string; - media: { id: number } & KeyBase; + media: KeyBase & { id: number }; modified_appearance_id?: number; modified_crafting_stat?: Array; name: string; @@ -57,9 +82,14 @@ interface EquippedItem { weapon?: Weapon; } -interface Armor { - display: NameDescription; - value: number; +interface ItemElement extends NameIdKey { + is_equipped?: boolean; +} + +interface ModifiedCraftingStat { + id: number; + name: string; + type: string; } interface NameDescription { @@ -72,27 +102,9 @@ interface NameType { type: string; } -interface DisplayStringValue { - display_string: string; - value: number; -} - -interface Enchantment { +interface PlayableClasses { display_string: string; - enchantment_id: number; - enchantment_slot: EnchantmentSlot; - source_item?: NameIdKey; -} - -interface EnchantmentSlot { - id: number; - type: string; -} - -interface ModifiedCraftingStat { - id: number; - name: string; - type: string; + links: Array; } interface Requirements { @@ -100,27 +112,22 @@ interface Requirements { playable_classes?: PlayableClasses; } -interface PlayableClasses { - display_string: string; - links: Array; -} - interface SellPrice { display_strings: DisplayStrings; value: number; } -interface DisplayStrings { - copper: string; - gold: string; - header: string; - silver: string; +interface Set { + display_string: string; + effects: Array; + item_set: NameIdKey; + items: Array; } interface Socket { display_string: string; item: NameIdKey; - media: { id: number } & KeyBase; + media: KeyBase & { id: number }; socket_type: NameType; } @@ -148,10 +155,3 @@ interface Weapon { damage: Damage; dps: DisplayStringValue; } - -interface Damage { - damage_class: NameType; - display_string: string; - max_value: number; - min_value: number; -} diff --git a/packages/wow/src/character-hunter-pets/types.ts b/packages/wow/src/character-hunter-pets/types.ts index 469a712..30d673d 100644 --- a/packages/wow/src/character-hunter-pets/types.ts +++ b/packages/wow/src/character-hunter-pets/types.ts @@ -7,7 +7,7 @@ export interface CharacterHunterPetsSummaryResponse extends ResponseBase { interface HunterPet { creature: NameIdKey; - creature_display: { id: number } & KeyBase; + creature_display: KeyBase & { id: number }; is_active?: boolean; is_summoned?: boolean; level: number; diff --git a/packages/wow/src/character-mythic-keystone-profile/types.ts b/packages/wow/src/character-mythic-keystone-profile/types.ts index 59e8aa5..59824ac 100644 --- a/packages/wow/src/character-mythic-keystone-profile/types.ts +++ b/packages/wow/src/character-mythic-keystone-profile/types.ts @@ -3,18 +3,14 @@ import type { Character, Color, KeyBase, NameId, NameIdKey, Realm, ResponseBase export interface CharacterMythicKeystoneProfileIndexResponse extends ResponseBase { character: Character; current_period: CurrentPeriod; - seasons: Array<{ id: number } & KeyBase>; -} - -interface CurrentPeriod { - period: { id: number } & KeyBase; + seasons: Array; } export interface CharacterMythicKeystoneSeasonDetailsResponse extends ResponseBase { best_runs: Array; character: NameIdKey; mythic_rating: MythicRating; - season: { id: number } & KeyBase; + season: KeyBase & { id: number }; } interface BestRun { @@ -28,8 +24,12 @@ interface BestRun { mythic_rating: MythicRating; } +interface CurrentPeriod { + period: KeyBase & { id: number }; +} + interface Member { - character: { realm: Realm } & NameId; + character: NameId & { realm: Realm }; equipped_item_level: number; race: NameIdKey; specialization: NameIdKey; diff --git a/packages/wow/src/character-profile/character-profile.ts b/packages/wow/src/character-profile/character-profile.ts index 33055dd..c1aee15 100644 --- a/packages/wow/src/character-profile/character-profile.ts +++ b/packages/wow/src/character-profile/character-profile.ts @@ -1,21 +1,6 @@ import type { Resource } from '@blizzard-api/core'; import type { CharacterProfileStatusResponse, CharacterProfileSummaryResponse } from './types'; -/** - * @param realmSlug The slug of the realm. - * @param characterName The lowercase name of the character. - * @returns a summary of the character profile for a character. - */ -export function characterProfileSummary( - realmSlug: string, - characterName: string, -): Resource { - return { - namespace: 'profile', - path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}`, - }; -} - /** * Returns the status and a unique ID for a character. A client should delete information about a character from their application if any of the following conditions occur: * - an HTTP 404 Not Found error is returned @@ -42,3 +27,18 @@ export function characterProfileStatus( path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}/status`, }; } + +/** + * @param realmSlug The slug of the realm. + * @param characterName The lowercase name of the character. + * @returns a summary of the character profile for a character. + */ +export function characterProfileSummary( + realmSlug: string, + characterName: string, +): Resource { + return { + namespace: 'profile', + path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}`, + }; +} diff --git a/packages/wow/src/character-profile/types.ts b/packages/wow/src/character-profile/types.ts index 07cb6e3..9296865 100644 --- a/packages/wow/src/character-profile/types.ts +++ b/packages/wow/src/character-profile/types.ts @@ -1,11 +1,16 @@ import type { Faction, Href, NameIdKey, Realm, ResponseBase } from '../base'; +export interface CharacterProfileStatusResponse extends ResponseBase { + id: number; + is_valid: boolean; +} + export interface CharacterProfileSummaryResponse extends ResponseBase { achievement_points: number; achievements: Href; achievements_statistics: Href; active_spec: NameIdKey; - active_title: { display_string: string } & NameIdKey; + active_title: NameIdKey & { display_string: string }; appearance: Href; average_item_level: number; character_class: NameIdKey; @@ -47,8 +52,3 @@ interface Guild extends NameIdKey { faction: Faction; realm: Realm; } - -export interface CharacterProfileStatusResponse extends ResponseBase { - id: number; - is_valid: boolean; -} diff --git a/packages/wow/src/character-pvp/types.ts b/packages/wow/src/character-pvp/types.ts index d90332e..37494f9 100644 --- a/packages/wow/src/character-pvp/types.ts +++ b/packages/wow/src/character-pvp/types.ts @@ -7,13 +7,13 @@ export interface CharacterPvpSummaryResponse extends ResponseBase { pvp_map_statistics: Array; } -interface PvpMapStatistic { - match_statistics: MatchStatistics; - world_map: NameId; -} - interface MatchStatistics { lost: number; played: number; won: number; } + +interface PvpMapStatistic { + match_statistics: MatchStatistics; + world_map: NameId; +} diff --git a/packages/wow/src/character-quests/character-quests.ts b/packages/wow/src/character-quests/character-quests.ts index b2feffd..8ce752b 100644 --- a/packages/wow/src/character-quests/character-quests.ts +++ b/packages/wow/src/character-quests/character-quests.ts @@ -4,26 +4,26 @@ import type { CharacterCompletedQuestsResponse, CharacterQuestsResponse } from ' /** * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. - * @returns a character's active quests as well as a link to the character's completed quests. + * @returns a list of quests that a character has completed. */ -export function characterQuests(realmSlug: string, characterName: string): Resource { +export function characterCompletedQuests( + realmSlug: string, + characterName: string, +): Resource { return { namespace: 'profile', - path: `/profile/wow/character/${realmSlug}/${characterName}/quests`, + path: `/profile/wow/character/${realmSlug}/${characterName}/quests/completed`, }; } /** * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. - * @returns a list of quests that a character has completed. + * @returns a character's active quests as well as a link to the character's completed quests. */ -export function characterCompletedQuests( - realmSlug: string, - characterName: string, -): Resource { +export function characterQuests(realmSlug: string, characterName: string): Resource { return { namespace: 'profile', - path: `/profile/wow/character/${realmSlug}/${characterName}/quests/completed`, + path: `/profile/wow/character/${realmSlug}/${characterName}/quests`, }; } diff --git a/packages/wow/src/character-quests/types.ts b/packages/wow/src/character-quests/types.ts index 693058b..8d53315 100644 --- a/packages/wow/src/character-quests/types.ts +++ b/packages/wow/src/character-quests/types.ts @@ -1,12 +1,12 @@ import type { Character, Href, NameIdKey, ResponseBase } from '../base'; -export interface CharacterQuestsResponse extends ResponseBase { +export interface CharacterCompletedQuestsResponse extends ResponseBase { character: Character; - completed: Href; - in_progress: Array; + quests: Array; } -export interface CharacterCompletedQuestsResponse extends ResponseBase { +export interface CharacterQuestsResponse extends ResponseBase { character: Character; - quests: Array; + completed: Href; + in_progress: Array; } diff --git a/packages/wow/src/character-reputations/types.ts b/packages/wow/src/character-reputations/types.ts index 3c2446d..1eb3b89 100644 --- a/packages/wow/src/character-reputations/types.ts +++ b/packages/wow/src/character-reputations/types.ts @@ -5,18 +5,18 @@ export interface CharacterReputationsSummaryResponse extends ResponseBase { reputations: Array; } -interface Reputation { - faction: NameIdKey; - paragon?: Paragon; - standing: Standing; -} - interface Paragon { max: number; raw: number; value: number; } +interface Reputation { + faction: NameIdKey; + paragon?: Paragon; + standing: Standing; +} + interface Standing { max: number; name: string; diff --git a/packages/wow/src/character-soulbinds/types.ts b/packages/wow/src/character-soulbinds/types.ts index 79c5b6d..d5232bf 100644 --- a/packages/wow/src/character-soulbinds/types.ts +++ b/packages/wow/src/character-soulbinds/types.ts @@ -7,6 +7,16 @@ export interface CharacterSoulbindsResponse extends ResponseBase { soulbinds: Array; } +interface ConduitSocket { + socket: Socket; + type: TypeClass; +} + +interface Socket { + conduit: NameIdKey; + rank: number; +} + interface Soulbind { is_active?: boolean; soulbind: NameIdKey; @@ -20,16 +30,6 @@ interface Trait { trait?: NameIdKey; } -interface ConduitSocket { - socket: Socket; - type: TypeClass; -} - -interface Socket { - conduit: NameIdKey; - rank: number; -} - interface TypeClass { name: 'Endurance Conduit Slot' | 'Finesse Conduit Slot' | 'Potency Conduit Slot'; type: 'ENDURANCE' | 'FINESSE' | 'POTENCY'; diff --git a/packages/wow/src/character-specializations/types.ts b/packages/wow/src/character-specializations/types.ts index 3f3ced4..d24369b 100644 --- a/packages/wow/src/character-specializations/types.ts +++ b/packages/wow/src/character-specializations/types.ts @@ -7,13 +7,6 @@ export interface CharacterSpecializationsSummaryResponse extends ResponseBase { specializations: Array; } -interface Specialization { - glyphs?: Array; - loadouts: Array; - pvp_talent_slots?: Array; - specialization: NameIdKey; -} - interface Loadout { is_active: boolean; selected_class_talent_tree: NameIdKey; @@ -23,6 +16,16 @@ interface Loadout { talent_loadout_code: string; } +interface PvpTalentSlot { + selected: Selected; + slot_number: number; +} + +interface Selected { + spell_tooltip: SpellTooltip; + talent: NameIdKey; +} + interface SelectedTalent { default_points?: number; id: number; @@ -30,9 +33,11 @@ interface SelectedTalent { tooltip: Selected; } -interface Selected { - spell_tooltip: SpellTooltip; - talent: NameIdKey; +interface Specialization { + glyphs?: Array; + loadouts: Array; + pvp_talent_slots?: Array; + specialization: NameIdKey; } interface SpellTooltip { @@ -51,8 +56,3 @@ interface SpellTooltip { | 'Melee Range'; spell: NameIdKey; } - -interface PvpTalentSlot { - selected: Selected; - slot_number: number; -} diff --git a/packages/wow/src/character-titles/types.ts b/packages/wow/src/character-titles/types.ts index 9c81708..432cea7 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 '../base'; export interface CharacterTitlesSummaryResponse extends ResponseBase { - active_title: { display_string: string } & NameIdKey; + active_title: NameIdKey & { display_string: string }; character: Character; titles: Array; } diff --git a/packages/wow/src/connected-realm/connected-realm.ts b/packages/wow/src/connected-realm/connected-realm.ts index c4cf64d..5318d00 100644 --- a/packages/wow/src/connected-realm/connected-realm.ts +++ b/packages/wow/src/connected-realm/connected-realm.ts @@ -8,24 +8,24 @@ import type { } from './types'; /** - * Get a connected realm index. - * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}. + * Get a connected realm by ID. + * @param connectedRealmId The connected realm ID. + * @returns The connected realm. See {@link ConnectedRealmResponse}. */ -export function connectedRealmIndex(): Resource { +export function connectedRealm(connectedRealmId: number): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/index`, + path: `${base}/connected-realm/${connectedRealmId}`, }; } /** - * Get a connected realm by ID. - * @param connectedRealmId The connected realm ID. - * @returns The connected realm. See {@link ConnectedRealmResponse}. + * Get a connected realm index. + * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}. */ -export function connectedRealm(connectedRealmId: number): Resource { +export function connectedRealmIndex(): Resource { return { namespace: 'dynamic', - path: `${base}/connected-realm/${connectedRealmId}`, + path: `${base}/connected-realm/index`, }; } /** diff --git a/packages/wow/src/connected-realm/types.ts b/packages/wow/src/connected-realm/types.ts index 318e8c3..588990d 100644 --- a/packages/wow/src/connected-realm/types.ts +++ b/packages/wow/src/connected-realm/types.ts @@ -2,10 +2,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'; -type RealmPopulation = 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; -type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; -type RealmStatus = 'Down' | 'Up'; - /** * Connected Realm Index API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis @@ -13,25 +9,6 @@ type RealmStatus = 'Down' | 'Up'; export interface ConnectedRealmIndexResponse extends ResponseBase { connected_realms: Array<{ href: string }>; } - -interface Realm { - category: RealmCategory; - connected_realm: { href: string }; - id: number; - is_tournament: boolean; - locale: WithoutUnderscore; - 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; -} - /** * Connected Realm API response. * @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis @@ -46,7 +23,6 @@ export interface ConnectedRealmResponse extends ResponseBase { realms: Array; status: { name: RealmStatus; type: Uppercase }; } - /** * Connected Realm Search API parameters. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -57,6 +33,45 @@ export interface ConnectedRealmSearchParameters extends BaseSearchParameters { 'status.type'?: Uppercase; } +/** + * 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: WithoutUnderscore; + 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 RealmPopulation = 'Full' | 'High' | 'Low' | 'Medium' | 'New Players'; + +type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED'; + +type RealmStatus = 'Down' | 'Up'; + interface SearchRealm { category: Record; id: number; @@ -69,27 +84,12 @@ interface SearchRealm { type: { name: Record; type: RealmTypeCapitalized }; } -interface SearchRealmStatus { - name: Record; - type: Uppercase; -} - interface SearchRealmPopulation { name: Record; type: RealmPopulationCapitalized; } -/** - * 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 SearchRealmStatus { + name: Record; + type: Uppercase; } diff --git a/packages/wow/src/covenant/types.ts b/packages/wow/src/covenant/types.ts index 2c093fd..683a127 100644 --- a/packages/wow/src/covenant/types.ts +++ b/packages/wow/src/covenant/types.ts @@ -20,27 +20,6 @@ export interface ConduitResponse extends ResponseBase { socket_type: SocketType; } -interface Item extends KeyBase { - id: number; -} - -interface Rank { - id: number; - spell_tooltip: SpellTooltip; - tier: number; -} - -interface SpellTooltip { - cast_time: string; - description: string; - spell: Item; -} - -interface SocketType { - name: string; - type: string; -} - /** * Interface for a response from the covenant index endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -49,6 +28,21 @@ export interface CovenantIndexResponse extends ResponseBase { covenants: Array; } +/** + * Interface for a response from the covenant media endpoint. + * @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; +} + /** * Interface for a response from the covenant endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -60,24 +54,25 @@ export interface CovenantResponse extends ResponseBase { renown_rewards: Array; } -interface RenownReward { - level: number; - reward: NameIdKey; +/** + * Interface for a response from the soulbind index endpoint. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface SoulbindIndexResponse extends ResponseBase { + soulbinds: Array; } /** - * Interface for a response from the covenant media endpoint. + * Interface for a response from the soulbind endpoint. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface CovenantMediaResponse extends ResponseBase { - class_abilities: Array; - description: string; +export interface SoulbindResponse extends ResponseBase { + covenant: NameIdKey; + creature: NameIdKey; + follower: NameIdKey; id: number; - media: Media; name: string; - renown_rewards: Array; - signature_ability: SignatureAbility; - soulbinds: Array; + talent_tree: NameIdKey; } interface ClassAbility { @@ -95,10 +90,25 @@ interface ClassAbilitySpellTooltip { spell: NameIdKey; } +interface Item extends KeyBase { + id: number; +} + interface Media extends KeyBase { id: number; } +interface Rank { + id: number; + spell_tooltip: SpellTooltip; + tier: number; +} + +interface RenownReward { + level: number; + reward: NameIdKey; +} + interface SignatureAbility { id: number; spell_tooltip: SignatureAbilitySpellTooltip; @@ -111,23 +121,13 @@ interface SignatureAbilitySpellTooltip { spell: NameIdKey; } -/** - * Interface for a response from the soulbind endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface SoulbindResponse extends ResponseBase { - covenant: NameIdKey; - creature: NameIdKey; - follower: NameIdKey; - id: number; +interface SocketType { name: string; - talent_tree: NameIdKey; + type: string; } -/** - * Interface for a response from the soulbind index endpoint. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface SoulbindIndexResponse extends ResponseBase { - soulbinds: Array; +interface SpellTooltip { + cast_time: string; + description: string; + spell: Item; } diff --git a/packages/wow/src/creature/creature.ts b/packages/wow/src/creature/creature.ts index a4cc534..f80161d 100644 --- a/packages/wow/src/creature/creature.ts +++ b/packages/wow/src/creature/creature.ts @@ -66,6 +66,24 @@ export function creatureFamilyMedia(creatureFamilyId: number): Resource, Omit> { + return { + namespace: 'static', + parameters: { + _page: options._page, + [`name.${options.locale}`]: options.name, + orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, + }, + path: `${searchBase}/creature`, + }; +} /** * Get a creature type by ID. * @param creatureTypeId The creature type ID. @@ -87,21 +105,3 @@ export function creatureTypeIndex(): Resource { path: `${base}/creature-type/index`, }; } -/** - * Search for creatures. - * @param options The creature search parameters. See {@link CreatureSearchParameters}. - * @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}. - */ -export function creatureSearch( - options: CreatureSearchParameters, -): Resource, Omit> { - return { - namespace: 'static', - parameters: { - _page: options._page, - [`name.${options.locale}`]: options.name, - orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, - }, - path: `${searchBase}/creature`, - }; -} diff --git a/packages/wow/src/creature/types.ts b/packages/wow/src/creature/types.ts index d3c617e..3049ce9 100644 --- a/packages/wow/src/creature/types.ts +++ b/packages/wow/src/creature/types.ts @@ -1,23 +1,6 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { KeyBase, MediaAsset, NameIdKey, ResponseBase } from '../base'; -/** - * 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; -} - -interface CreatureDisplay extends KeyBase { - id: number; -} - /** * The response for creature display media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -27,11 +10,6 @@ export interface CreatureDisplayMediaResponse extends ResponseBase { id: number; } -interface DisplayMediaAsset { - key: string; - value: string; -} - /** * The response for a creature family index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -40,21 +18,6 @@ export interface CreatureFamilyIndexResponse extends ResponseBase { creature_families: Array; } -/** - * 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; -} - -interface Media extends KeyBase { - id: number; -} - /** * The response for creature family media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -65,20 +28,27 @@ export interface CreatureFamilyMediaResponse extends ResponseBase { } /** - * The response for a creature type index. + * The response for a creature family. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface CreatureTypeIndexResponse extends ResponseBase { - creature_types: Array; +export interface CreatureFamilyResponse extends ResponseBase { + id: number; + media: Media; + name: string; + specialization: NameIdKey; } /** - * The response for a creature type. + * The response for a creature. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface CreatureTypeResponse extends ResponseBase { +export interface CreatureResponse extends ResponseBase { + creature_displays: Array; + family: NameIdKey; id: number; + is_tameable: boolean; name: string; + type: NameIdKey; } /** @@ -106,3 +76,33 @@ export interface CreatureSearchResponseItem extends KeyBase { 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/wow/src/guild-crest/guild-crest.ts b/packages/wow/src/guild-crest/guild-crest.ts index ca7ab9e..ec9f3c1 100644 --- a/packages/wow/src/guild-crest/guild-crest.ts +++ b/packages/wow/src/guild-crest/guild-crest.ts @@ -3,24 +3,24 @@ import { base, mediaBase } from '../base'; import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types'; /** - * Get the guild crest components index. - * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}. + * Get a guild crest border by ID. + * @param borderId The guild crest border ID. + * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}. */ -export function guildCrestComponentsIndex(): Resource { +export function guildCrestBorder(borderId: number): Resource { return { namespace: 'static', - path: `${base}/guild-crest/index`, + path: `${mediaBase}/guild-crest/border/${borderId}`, }; } /** - * Get a guild crest border by ID. - * @param borderId The guild crest border ID. - * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}. + * Get the guild crest components index. + * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}. */ -export function guildCrestBorder(borderId: number): Resource { +export function guildCrestComponentsIndex(): Resource { return { namespace: 'static', - path: `${mediaBase}/guild-crest/border/${borderId}`, + path: `${base}/guild-crest/index`, }; } /** diff --git a/packages/wow/src/guild-crest/types.ts b/packages/wow/src/guild-crest/types.ts index 75019d6..6e0c2b2 100644 --- a/packages/wow/src/guild-crest/types.ts +++ b/packages/wow/src/guild-crest/types.ts @@ -1,5 +1,14 @@ import type { KeyBase, ResponseBase } from '../base'; +/** + * 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} @@ -10,13 +19,14 @@ export interface GuildCrestComponentsIndexResponse extends ResponseBase { emblems: Array; } -interface Border { +interface Background { id: number; - media: Media; + rgba: RGBA; } -interface Media extends KeyBase { +interface Border { id: number; + media: Media; } interface Colors { @@ -25,9 +35,13 @@ interface Colors { emblems: Array; } -interface Background { +interface GuildCrestAsset { + key: string; + value: string; +} + +interface Media extends KeyBase { id: number; - rgba: RGBA; } interface RGBA { @@ -36,17 +50,3 @@ interface RGBA { g: number; r: number; } - -/** - * 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; -} - -interface GuildCrestAsset { - key: string; - value: string; -} diff --git a/packages/wow/src/guild/guild.ts b/packages/wow/src/guild/guild.ts index 3e83547..ebeeac1 100644 --- a/packages/wow/src/guild/guild.ts +++ b/packages/wow/src/guild/guild.ts @@ -18,24 +18,24 @@ export function guild(realmSlug: string, nameSlug: string): Resource { +export function guildAchievements(realmSlug: string, nameSlug: string): Resource { return { namespace: 'profile', - path: `${basePath}/${realmSlug}/${nameSlug}/activity`, + path: `${basePath}/${realmSlug}/${nameSlug}/achievements`, }; } /** * @param realmSlug The slug of the realm. * @param nameSlug The lowercase name of the guild. - * @returns a single guild's achievements by name and realm. + * @returns a single guild's activity by name and realm. */ -export function guildAchievements(realmSlug: string, nameSlug: string): Resource { +export function guildActivity(realmSlug: string, nameSlug: string): Resource { return { namespace: 'profile', - path: `${basePath}/${realmSlug}/${nameSlug}/achievements`, + path: `${basePath}/${realmSlug}/${nameSlug}/activity`, }; } diff --git a/packages/wow/src/guild/types.ts b/packages/wow/src/guild/types.ts index 69ea980..07bb751 100644 --- a/packages/wow/src/guild/types.ts +++ b/packages/wow/src/guild/types.ts @@ -1,5 +1,19 @@ import type { Character, Color, Faction, Href, KeyBase, NameIdKey, Realm, ResponseBase } from '../base'; +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 interface GuildResponse extends ResponseBase { achievement_points: number; achievements: Href; @@ -15,26 +29,16 @@ export interface GuildResponse extends ResponseBase { roster: Href; } -interface Crest { - background: { color: RgbWithId }; - border: Border; - emblem: Border; -} - -interface RgbWithId { - id: number; - rgba: Color; +export interface GuildRosterResponse extends ResponseBase { + guild: Guild; + members: Array; } -interface Border { - color: RgbWithId; +interface Achievement { + achievement: NameIdKey; + completed_timestamp?: number; + criteria?: Criteria; id: number; - media: { id: number } & KeyBase; -} - -export interface GuildActivityResponse extends ResponseBase { - activities: Array; - guild: Guild; } interface ActivityElement { @@ -43,30 +47,27 @@ interface ActivityElement { timestamp: number; } -interface CharacterAchievement { - achievement: NameIdKey; - character: Character; +interface Border { + color: RgbWithId; + id: number; + media: KeyBase & { id: number }; } -interface Guild extends NameIdKey { - faction: Faction; - realm: Realm; +interface CategoryProgress { + category: NameIdKey; + points: number; + quantity: number; } -export interface GuildAchievementsResponse extends ResponseBase { - achievements: Array; - category_progress: Array; - guild: Guild; - recent_events: Array; - total_points: number; - total_quantity: number; +interface CharacterAchievement { + achievement: NameIdKey; + character: Character; } -interface Achievement { - achievement: NameIdKey; - completed_timestamp?: number; - criteria?: Criteria; - id: number; +interface Crest { + background: { color: RgbWithId }; + border: Border; + emblem: Border; } interface Criteria { @@ -76,10 +77,18 @@ interface Criteria { is_completed: boolean; } -interface CategoryProgress { - category: NameIdKey; - points: number; - quantity: number; +interface Guild extends NameIdKey { + faction: Faction; + realm: Realm; +} + +interface Member { + character: RosterMemberCharacter; + rank: number; +} + +interface Playable extends KeyBase { + id: number; } interface RecentEvent { @@ -87,14 +96,9 @@ interface RecentEvent { timestamp: number; } -export interface GuildRosterResponse extends ResponseBase { - guild: Guild; - members: Array; -} - -interface Member { - character: RosterMemberCharacter; - rank: number; +interface RgbWithId { + id: number; + rgba: Color; } interface RosterMemberCharacter extends Character { @@ -102,7 +106,3 @@ interface RosterMemberCharacter extends Character { playable_class: Playable; playable_race: Playable; } - -interface Playable extends KeyBase { - id: number; -} diff --git a/packages/wow/src/heirloom/types.ts b/packages/wow/src/heirloom/types.ts index 9117710..1ca4d93 100644 --- a/packages/wow/src/heirloom/types.ts +++ b/packages/wow/src/heirloom/types.ts @@ -21,15 +21,47 @@ export interface HeirloomResponse extends ResponseBase { upgrades: Array; } +interface AttackSpeedClass { + display_string: string; + value: number; +} + +interface Damage { + damage_class: Source; + display_string: string; + max_value: number; + min_value: number; +} + +interface Display { + color: Color; + display_string: string; +} + interface Media extends KeyBase { id: number; } +interface Requirements { + level: RequirementsLevel; +} + +interface RequirementsLevel { + display_string: string; +} + interface Source { name: string; type: string; } +interface Stat { + display: Display; + is_equip_bonus?: boolean; + type: Source; + value: number; +} + interface Upgrade { item: UpgradeItem; level: number; @@ -53,31 +85,6 @@ interface UpgradeItem { weapon: Weapon; } -interface AttackSpeedClass { - display_string: string; - value: number; -} - -interface Requirements { - level: RequirementsLevel; -} - -interface RequirementsLevel { - display_string: string; -} - -interface Stat { - display: Display; - is_equip_bonus?: boolean; - type: Source; - value: number; -} - -interface Display { - color: Color; - display_string: string; -} - interface Upgrades { display_string: string; max_value: number; @@ -89,10 +96,3 @@ interface Weapon { damage: Damage; dps: AttackSpeedClass; } - -interface Damage { - damage_class: Source; - display_string: string; - max_value: number; - min_value: number; -} diff --git a/packages/wow/src/index.ts b/packages/wow/src/index.ts index 2e853dd..b7182b9 100644 --- a/packages/wow/src/index.ts +++ b/packages/wow/src/index.ts @@ -76,8 +76,8 @@ import { creatureType, creatureTypeIndex, } from './creature/creature'; -import { guild, guildAchievements, guildActivity, guildRoster } from './guild/guild'; import { guildCrestBorder, guildCrestComponentsIndex, guildCrestEmblem } from './guild-crest/guild-crest'; +import { guild, guildAchievements, guildActivity, guildRoster } from './guild/guild'; import { heirloom, heirloomIndex } from './heirloom/heirloom'; import { item, diff --git a/packages/wow/src/item/item.ts b/packages/wow/src/item/item.ts index b46f128..20ec077 100644 --- a/packages/wow/src/item/item.ts +++ b/packages/wow/src/item/item.ts @@ -34,18 +34,6 @@ export function itemClass(itemClassId: number): Resource { path: `${base}/item-class/${itemClassId}`, }; } -/** - * Get an item subclass by ID. - * @param itemClassId The item class ID. - * @param itemSubclassId The item subclass ID. - * @returns The item subclass. See {@link ItemSubClassResponse}. - */ -export function itemSubClass(itemClassId: number, itemSubclassId: number): Resource { - return { - namespace: 'static', - path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, - }; -} /** * Get an item class index. * @returns The item class index. See {@link ItemClassIndexResponse}. @@ -67,6 +55,24 @@ export function itemMedia(itemId: number): Resource { path: `${mediaBase}/item/${itemId}`, }; } +/** + * Search for items. + * @param options The search parameters. See {@link ItemSearchParameters}. + * @returns The search results. See {@link SearchResponse}. + */ +export function itemSearch( + options: ItemSearchParameters, +): Resource, Omit> { + return { + namespace: 'static', + parameters: { + _page: options._page, + [`name.${options.locale}`]: options.name, + orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, + }, + path: `${searchBase}/item`, + }; +} /** * Get an item set by ID. * @param itemSetId The item set ID. @@ -89,20 +95,14 @@ export function itemSetIndex(): Resource { }; } /** - * Search for items. - * @param options The search parameters. See {@link ItemSearchParameters}. - * @returns The search results. See {@link SearchResponse}. + * Get an item subclass by ID. + * @param itemClassId The item class ID. + * @param itemSubclassId The item subclass ID. + * @returns The item subclass. See {@link ItemSubClassResponse}. */ -export function itemSearch( - options: ItemSearchParameters, -): Resource, Omit> { +export function itemSubClass(itemClassId: number, itemSubclassId: number): Resource { return { namespace: 'static', - parameters: { - _page: options._page, - [`name.${options.locale}`]: options.name, - orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby, - }, - path: `${searchBase}/item`, + path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`, }; } diff --git a/packages/wow/src/item/types.ts b/packages/wow/src/item/types.ts index 37d1e6a..00dc29a 100644 --- a/packages/wow/src/item/types.ts +++ b/packages/wow/src/item/types.ts @@ -1,9 +1,149 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { Color, KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; -interface ItemQuality { - name: Record; - type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; +/** + * 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 set index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemSetIndexResponse extends ResponseBase { + item_sets: Array; +} + +/** + * The response for an item set. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ItemSetResponse extends ResponseBase { + effects: Array; + id: number; + items: Array; + name: string; +} + +/** + * 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 Effect { + display_string: string; + required_count: number; } interface InventoryType { @@ -30,46 +170,9 @@ interface InventoryType { | 'WRIST'; } -type StatTypeCapitalized = - | 'AGILITY' - | 'CRIT_RATING' - | 'HASTE_RATING' - | 'INTELLECT' - | 'MASTERY' - | 'STAMINA' - | 'STRENGTH' - | 'VERSATILITY'; - -type StatType = - | 'Agility' - | 'Critical Strike' - | 'Haste' - | 'Intellect' - | 'Mastery' - | 'Stamina' - | 'Strength' - | 'Versatility'; - -/** - * The response for an item. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface ItemResponse extends ResponseBase, NameId { - 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; +interface ItemQuality { + name: Record; + type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON'; } interface Media extends KeyBase { @@ -107,59 +210,9 @@ interface PreviewItem { weapon?: Weapon; } -interface Armor { - display: Display; - value: number; -} - -interface Durability { - display_string: string; - value: number; -} - -interface Requirements { - level: Durability; -} - -interface Spell { - description: string; - spell: NameIdKey; -} - -interface Stat { - display: Display; - is_negated?: boolean; - type: { - name: StatType; - type: StatTypeCapitalized; - }; - value: number; -} - -interface Display { - color: Color; - display_string: string; -} - -interface Weapon { - attack_speed: Durability; - damage: Damage; - dps: Durability; -} - -interface Damage { - damage_class: { - name: string; - type: string; - }; - display_string: string; - max_value: number; - min_value: number; -} - interface Recipe { item: RecipeItem; - reagents: Array<{ quantity: number } & NameIdKey>; + reagents: Array; reagents_display_string: string; } @@ -191,100 +244,47 @@ interface RecipeItemDisplayStrings { silver: string; } -/** - * 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 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 Requirements { + level: Durability; } -/** - * The response for an item set index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface ItemSetIndexResponse extends ResponseBase { - item_sets: Array; +interface Spell { + description: string; + spell: NameIdKey; } -/** - * The response for an item set. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface ItemSetResponse extends ResponseBase { - effects: Array; - id: number; - items: Array; - name: string; +interface Stat { + display: Display; + is_negated?: boolean; + type: { + name: StatType; + type: StatTypeCapitalized; + }; + value: number; } -interface Effect { - display_string: string; - required_count: number; -} +type StatType = + | 'Agility' + | 'Critical Strike' + | 'Haste' + | 'Intellect' + | 'Mastery' + | 'Stamina' + | 'Strength' + | 'Versatility'; -/** - * 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; -} +type StatTypeCapitalized = + | 'AGILITY' + | 'CRIT_RATING' + | 'HASTE_RATING' + | 'INTELLECT' + | 'MASTERY' + | 'STAMINA' + | 'STRENGTH' + | 'VERSATILITY'; -/** - * 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; - }; +interface Weapon { + attack_speed: Durability; + damage: Damage; + dps: Durability; } diff --git a/packages/wow/src/journal/types.ts b/packages/wow/src/journal/types.ts index 60f7150..49c004b 100644 --- a/packages/wow/src/journal/types.ts +++ b/packages/wow/src/journal/types.ts @@ -1,31 +1,6 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { Faction, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; -type EncounterCategory = 'DUNGEON' | 'RAID' | 'WORLD_BOSS'; - -type EncounterMode = 'HEROIC' | 'LFR' | 'MYTHIC' | 'NORMAL'; - -type ModeName = - | '10 Player' - | '10 Player (Heroic)' - | '25 Player' - | '25 Player (Heroic)' - | 'Heroic' - | 'Mythic' - | 'Mythic+ Dungeons' - | 'Normal' - | 'Raid Finder'; -type ModeType = - | 'HEROIC' - | 'LEGACY_10_MAN' - | 'LEGACY_10_MAN_HEROIC' - | 'LEGACY_25_MAN' - | 'LEGACY_25_MAN_HEROIC' - | 'LFR' - | 'MYTHIC' - | 'MYTHIC_KEYSTONE' - | 'NORMAL'; - /** * The response for a journal encounter index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -38,7 +13,7 @@ export interface JournalEncounterIndexResponse extends ResponseBase { * The response for a journal encounter. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface JournalEncounterResponse extends ResponseBase, NameId { +export interface JournalEncounterResponse extends NameId, ResponseBase { category: Category; creatures: Array; description: string; @@ -49,36 +24,31 @@ export interface JournalEncounterResponse extends ResponseBase, NameId { sections: Array; } -interface Category { - type: EncounterCategory; -} - -interface Creature extends NameId { - creature_display: CreatureDisplay; - description?: string; -} - -interface CreatureDisplay extends KeyBase { - id: number; -} - -interface Item { - id: number; - item: NameIdKey; -} - -interface Mode { - name: ModeName; - type: ModeType; +/** + * 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 interface JournalEncounterSearchParameters extends BaseSearchParameters { + instanceName: string; + locale: Locales; } - -interface JournalSection { - body_text?: string; - creature_display?: CreatureDisplay; - id: number; - sections?: Array; - spell?: NameIdKey; - title: 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 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; + }; } /** @@ -93,7 +63,7 @@ export interface JournalExpansionIndexResponse extends ResponseBase { * The response for a journal expansion. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface JournalExpansionResponse extends ResponseBase, NameId { +export interface JournalExpansionResponse extends NameId, ResponseBase { dungeons: Array; raids: Array; } @@ -106,11 +76,19 @@ export interface JournalInstanceIndexResponse extends ResponseBase { instances: Array; } +/** + * The response for journal instance media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface JournalInstanceMediaResponse extends ResponseBase { + assets: Array; +} + /** * The response for a journal instance. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface JournalInstanceResponse extends ResponseBase, NameId { +export interface JournalInstanceResponse extends NameId, ResponseBase { area: NameId; category: Category; description: string; @@ -124,55 +102,31 @@ export interface JournalInstanceResponse extends ResponseBase, NameId { order_index: number; } -interface Media extends KeyBase { - id: number; +interface Asset { + key: string; + value: string; } -interface ModeElement { - is_tracked: boolean; - mode: Mode; - players: number; +interface Category { + type: EncounterCategory; } -/** - * The response for journal instance media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface JournalInstanceMediaResponse extends ResponseBase { - assets: Array; +interface Creature extends NameId { + creature_display: CreatureDisplay; + description?: string; } -interface Asset { - key: string; - value: string; +interface CreatureDisplay extends KeyBase { + id: number; } -/** - * 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 interface JournalEncounterSearchParameters extends BaseSearchParameters { - instanceName: string; - locale: Locales; -} +type EncounterCategory = 'DUNGEON' | 'RAID' | 'WORLD_BOSS'; -/** - * 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 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; - }; +type EncounterMode = 'HEROIC' | 'LFR' | 'MYTHIC' | 'NORMAL'; + +interface Item { + id: number; + item: NameIdKey; } interface JournalEncounterSearchCreature { @@ -185,3 +139,49 @@ interface JournalEncounterSearchItem { id: number; item: { id: number; name: Record }; } + +interface JournalSection { + body_text?: string; + creature_display?: CreatureDisplay; + id: number; + sections?: Array; + spell?: NameIdKey; + title: string; +} + +interface Media extends KeyBase { + id: number; +} + +interface Mode { + name: ModeName; + type: ModeType; +} + +interface ModeElement { + is_tracked: boolean; + mode: Mode; + players: number; +} + +type ModeName = + | '10 Player' + | '10 Player (Heroic)' + | '25 Player' + | '25 Player (Heroic)' + | 'Heroic' + | 'Mythic' + | 'Mythic+ Dungeons' + | 'Normal' + | 'Raid Finder'; + +type ModeType = + | 'HEROIC' + | 'LEGACY_10_MAN' + | 'LEGACY_10_MAN_HEROIC' + | 'LEGACY_25_MAN' + | 'LEGACY_25_MAN_HEROIC' + | 'LFR' + | 'MYTHIC' + | 'MYTHIC_KEYSTONE' + | 'NORMAL'; diff --git a/packages/wow/src/modified-crafting/types.ts b/packages/wow/src/modified-crafting/types.ts index 74979da..4729978 100644 --- a/packages/wow/src/modified-crafting/types.ts +++ b/packages/wow/src/modified-crafting/types.ts @@ -1,11 +1,5 @@ import type { KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; -/** - * The response for a modified crafting category. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface ModifiedCraftingCategoryResponse extends ResponseBase, NameId {} - /** * The response for a modified crafting category index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -14,6 +8,12 @@ export interface ModifiedCraftingCategoryIndexResponse extends ResponseBase { 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 {} + /** * The response for a modified crafting index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -31,11 +31,6 @@ export interface ModifiedCraftingReagentSlotTypeIndexResponse extends ResponseBa slot_types: Array; } -interface SlotType extends KeyBase { - id: number; - name?: string; -} - /** * The response for a modified crafting reagent slot type. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -45,3 +40,8 @@ export interface ModifiedCraftingReagentSlotTypeResponse extends ResponseBase { description: string; id: number; } + +interface SlotType extends KeyBase { + id: number; + name?: string; +} diff --git a/packages/wow/src/mount/types.ts b/packages/wow/src/mount/types.ts index 2529110..b6eab87 100644 --- a/packages/wow/src/mount/types.ts +++ b/packages/wow/src/mount/types.ts @@ -22,15 +22,6 @@ export interface MountResponse extends ResponseBase { source: Source; } -interface CreatureDisplay extends KeyBase { - id: number; -} - -interface Source { - name: string; - type: string; -} - /** * The search parameters for mounts. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -55,3 +46,12 @@ export interface MountSearchResponseItem extends KeyBase { source: { name: Record; type: string }; }; } + +interface CreatureDisplay extends KeyBase { + id: number; +} + +interface Source { + name: string; + type: string; +} diff --git a/packages/wow/src/mythic-keystone-affix/types.ts b/packages/wow/src/mythic-keystone-affix/types.ts index 931e3bc..2aaefb6 100644 --- a/packages/wow/src/mythic-keystone-affix/types.ts +++ b/packages/wow/src/mythic-keystone-affix/types.ts @@ -9,23 +9,23 @@ export interface MythicKeystoneAffixIndexResponse extends ResponseBase { } /** - * The response for a Mythic Keystone affix. + * The response for a Mythic Keystone affix media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface MythicKeystoneAffixResponse extends ResponseBase, NameId { - description: string; - media: Media; -} - -interface Media extends KeyBase { +export interface MythicKeystoneAffixMediaResponse extends ResponseBase { + assets: Array; id: number; } /** - * The response for a Mythic Keystone affix media. + * The response for a Mythic Keystone affix. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface MythicKeystoneAffixMediaResponse extends ResponseBase { - assets: Array; +export interface MythicKeystoneAffixResponse extends NameId, ResponseBase { + description: string; + media: Media; +} + +interface Media extends KeyBase { id: number; } diff --git a/packages/wow/src/mythic-keystone-dungeon/types.ts b/packages/wow/src/mythic-keystone-dungeon/types.ts index 6147812..60584d7 100644 --- a/packages/wow/src/mythic-keystone-dungeon/types.ts +++ b/packages/wow/src/mythic-keystone-dungeon/types.ts @@ -12,7 +12,7 @@ export interface MythicKeystoneDungeonIndexResponse extends ResponseBase { * The response for a Mythic Keystone dungeon. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface MythicKeystoneDungeonResponse extends ResponseBase, NameId { +export interface MythicKeystoneDungeonResponse extends NameId, ResponseBase { dungeon: NameIdKey; is_tracked: boolean; keystone_upgrades: Array; @@ -20,15 +20,6 @@ export interface MythicKeystoneDungeonResponse extends ResponseBase, NameId { zone: Zone; } -interface KeystoneUpgrade { - qualifying_duration: number; - upgrade_level: number; -} - -interface Zone { - slug: string; -} - /** * The response for a Mythic Keystone index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -47,10 +38,6 @@ export interface MythicKeystonePeriodIndexResponse extends ResponseBase { periods: Array; } -interface Period extends KeyBase { - id: number; -} - /** * The response for a Mythic Keystone period. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -81,3 +68,16 @@ export interface MythicKeystoneSeasonResponse extends ResponseBase { season_name: null | string; start_timestamp: number; } + +interface KeystoneUpgrade { + qualifying_duration: number; + upgrade_level: number; +} + +interface Period extends KeyBase { + id: number; +} + +interface Zone { + slug: string; +} diff --git a/packages/wow/src/mythic-keystone-leaderboard/types.ts b/packages/wow/src/mythic-keystone-leaderboard/types.ts index b55d4c4..1f56636 100644 --- a/packages/wow/src/mythic-keystone-leaderboard/types.ts +++ b/packages/wow/src/mythic-keystone-leaderboard/types.ts @@ -44,6 +44,11 @@ interface Member { specialization: Specialization; } +interface MythicRating { + color: Color; + rating: number; +} + interface Profile extends NameId { realm: Realm; } @@ -56,8 +61,3 @@ interface Realm extends KeyBase { interface Specialization extends KeyBase { id: number; } - -interface MythicRating { - color: Color; - rating: number; -} diff --git a/packages/wow/src/mythic-raid-leaderboard/types.ts b/packages/wow/src/mythic-raid-leaderboard/types.ts index 3c41ffd..f665da4 100644 --- a/packages/wow/src/mythic-raid-leaderboard/types.ts +++ b/packages/wow/src/mythic-raid-leaderboard/types.ts @@ -24,13 +24,13 @@ interface Guild extends NameId { realm: Realm; } -interface Realm { +interface JournalInstance extends KeyBase { id: number; name: null; - slug: string; } -interface JournalInstance extends KeyBase { +interface Realm { id: number; name: null; + slug: string; } diff --git a/packages/wow/src/pet/pet.ts b/packages/wow/src/pet/pet.ts index 002045c..f8430f4 100644 --- a/packages/wow/src/pet/pet.ts +++ b/packages/wow/src/pet/pet.ts @@ -20,27 +20,6 @@ export function pet(petId: number): Resource { path: `${base}/pet/${petId}`, }; } -/** - * Get a pet index. - * @returns The pet index. See {@link PetIndexResponse}. - */ -export function petIndex(): Resource { - return { - namespace: 'static', - path: `${base}/pet/index`, - }; -} -/** - * Get a pet media by ID. - * @param petId The pet ID. - * @returns The pet media. See {@link PetMediaResponse}. - */ -export function petMedia(petId: number): Resource { - return { - namespace: 'static', - path: `${mediaBase}/pet/${petId}`, - }; -} /** * Get a pet ability by ID. * @param petAbilityId The pet ability ID. @@ -73,3 +52,24 @@ export function petAbilityMedia(petAbilityId: number): Resource { + return { + namespace: 'static', + path: `${base}/pet/index`, + }; +} +/** + * Get a pet media by ID. + * @param petId The pet ID. + * @returns The pet media. See {@link PetMediaResponse}. + */ +export function petMedia(petId: number): Resource { + return { + namespace: 'static', + path: `${mediaBase}/pet/${petId}`, + }; +} diff --git a/packages/wow/src/pet/types.ts b/packages/wow/src/pet/types.ts index 19afa9e..d290abb 100644 --- a/packages/wow/src/pet/types.ts +++ b/packages/wow/src/pet/types.ts @@ -1,5 +1,32 @@ import type { KeyBase, MediaAsset, NameId, NameIdKey, ResponseBase } from '../base'; +/** + * The response for a pet ability index. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PetAbilityIndexResponse extends ResponseBase { + abilities: Array; +} + +/** + * The response for a pet ability media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PetAbilityMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + +/** + * The response for a pet ability. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PetAbilityResponse extends NameId, ResponseBase { + battle_pet_type: BattlePetType; + media: Media; + rounds: number; +} + /** * The response for a pet index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -8,11 +35,20 @@ export interface PetIndexResponse extends ResponseBase { pets: Array; } +/** + * The response for a pet search. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PetMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + /** * The response for a pet. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PetResponse extends ResponseBase, NameId { +export interface PetResponse extends NameId, ResponseBase { abilities: Array; battle_pet_type: BattlePetType; creature: NameIdKey; @@ -47,39 +83,3 @@ interface Source { name: string; type: string; } - -/** - * The response for a pet search. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PetMediaResponse extends ResponseBase { - assets: Array; - id: number; -} - -/** - * The response for a pet ability index. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PetAbilityIndexResponse extends ResponseBase { - abilities: Array; -} - -/** - * The response for a pet ability. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PetAbilityResponse extends ResponseBase, NameId { - battle_pet_type: BattlePetType; - media: Media; - rounds: number; -} - -/** - * The response for a pet ability media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PetAbilityMediaResponse extends ResponseBase { - assets: Array; - id: number; -} diff --git a/packages/wow/src/playable-class/types.ts b/packages/wow/src/playable-class/types.ts index 013c294..6b9092d 100644 --- a/packages/wow/src/playable-class/types.ts +++ b/packages/wow/src/playable-class/types.ts @@ -8,11 +8,20 @@ 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/game-data-apis} */ -export interface PlayableClassResponse extends ResponseBase, NameId { +export interface PlayableClassResponse extends NameId, ResponseBase { gender_name: GenderName; media: Media; playable_races: Array; @@ -21,19 +30,6 @@ export interface PlayableClassResponse extends ResponseBase, NameId { specializations: Array; } -interface Media extends KeyBase { - id: number; -} - -/** - * 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's PvP talent slots. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -42,6 +38,10 @@ export interface PvpTalentSlotsResponse extends ResponseBase { talent_slots: Array; } +interface Media extends KeyBase { + id: number; +} + interface TalentSlot { slot_number: number; unlock_player_level: number; diff --git a/packages/wow/src/playable-race/types.ts b/packages/wow/src/playable-race/types.ts index 8d2eee0..50c7634 100644 --- a/packages/wow/src/playable-race/types.ts +++ b/packages/wow/src/playable-race/types.ts @@ -12,7 +12,7 @@ export interface PlayableRaceIndexResponse extends ResponseBase { * The playable race response. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PlayableRaceResponse extends ResponseBase, NameId { +export interface PlayableRaceResponse extends NameId, ResponseBase { faction: Faction; gender_name: GenderName; is_allied_race: boolean; diff --git a/packages/wow/src/playable-specialization/types.ts b/packages/wow/src/playable-specialization/types.ts index aa4a2a8..68aa3dc 100644 --- a/packages/wow/src/playable-specialization/types.ts +++ b/packages/wow/src/playable-specialization/types.ts @@ -9,11 +9,20 @@ export interface PlayableSpecializationIndexResponse extends ResponseBase { pet_specializations: Array; } +/** + * The response for a playable specialization media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PlayableSpecializationMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + /** * The response for a playable specialization. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PlayableSpecializationResponse extends ResponseBase, NameId { +export interface PlayableSpecializationResponse extends NameId, ResponseBase { gender_description: GenderName; media: Media; playable_class: NameIdKey; @@ -38,6 +47,10 @@ interface PvpTalent { talent: NameIdKey; } +interface SpecTalentTree extends KeyBase { + name: string; +} + interface SpellTooltip { cast_time: string; cooldown?: string; @@ -45,16 +58,3 @@ interface SpellTooltip { power_cost?: string; range?: string; } - -interface SpecTalentTree extends KeyBase { - name: string; -} - -/** - * The response for a playable specialization media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PlayableSpecializationMediaResponse extends ResponseBase { - assets: Array; - id: number; -} diff --git a/packages/wow/src/power-type/types.ts b/packages/wow/src/power-type/types.ts index 3f743ea..baae4a9 100644 --- a/packages/wow/src/power-type/types.ts +++ b/packages/wow/src/power-type/types.ts @@ -12,4 +12,4 @@ export interface PowerTypeIndexResponse extends ResponseBase { * The response for a power type. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PowerTypeResponse extends ResponseBase, NameId {} +export interface PowerTypeResponse extends NameId, ResponseBase {} diff --git a/packages/wow/src/profession/types.ts b/packages/wow/src/profession/types.ts index f1a7044..e0634ec 100644 --- a/packages/wow/src/profession/types.ts +++ b/packages/wow/src/profession/types.ts @@ -8,46 +8,41 @@ export interface ProfessionIndexResponse extends ResponseBase { professions: Array; } +/** + * The response for a profession media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface ProfessionMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + /** * The response for a profession. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface ProfessionResponse extends ResponseBase, NameId { +export interface ProfessionResponse extends NameId, ResponseBase { description: string; media: Media; skill_tiers: Array; type: Type; } -interface Media extends KeyBase { - id: number; -} - -interface Type { - name: string; - type: string; -} - /** * The response for a profession skill tier. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface ProfessionSkillTierResponse extends ResponseBase, NameId { +export interface ProfessionSkillTierResponse extends NameId, ResponseBase { categories: Array; maximum_skill_level: number; minimum_skill_level: number; } -interface Category { - name: string; - recipes: Array; -} - /** - * The response for a profession media. + * The response for a recipe media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface ProfessionMediaResponse extends ResponseBase { +export interface RecipeMediaResponse extends ResponseBase { assets: Array; id: number; } @@ -56,27 +51,32 @@ export interface ProfessionMediaResponse extends ResponseBase { * The response for a recipe. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface RecipeResponse extends ResponseBase, NameId { +export interface RecipeResponse extends NameId, ResponseBase { crafted_item: NameIdKey; crafted_quantity: CraftedQuantity; media: Media; reagents: Array; } +interface Category { + name: string; + recipes: Array; +} + interface CraftedQuantity { value: number; } +interface Media extends KeyBase { + id: number; +} + interface Reagent { quantity: number; reagent: NameIdKey; } -/** - * The response for a recipe media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface RecipeMediaResponse extends ResponseBase { - assets: Array; - id: number; +interface Type { + name: string; + type: string; } diff --git a/packages/wow/src/pvp-season/types.ts b/packages/wow/src/pvp-season/types.ts index 55c20a7..952268e 100644 --- a/packages/wow/src/pvp-season/types.ts +++ b/packages/wow/src/pvp-season/types.ts @@ -1,46 +1,22 @@ import type { Faction, Factions, KeyBase, NameId, NameIdKey, ResponseBase } from '../base'; /** - * The response for a PvP leaderboard. + * The response for a PvP leaderboard index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PvpLeaderboardResponse extends ResponseBase { - bracket: Bracket; - entries: Array; - name: string; +export interface PvpLeaderboardIndexResponse extends ResponseBase { + leaderboards: Array; season: Season; } -interface Entry { - character: Character; - faction: { type: keyof typeof Factions }; - rank: number; - rating: number; - season_match_statistics: SeasonMatchStatistics; - tier: Season; -} - -interface Character extends NameId { - realm: Realm; -} - -interface Realm extends KeyBase { - id: number; - slug: string; -} - -interface SeasonMatchStatistics { - lost: number; - played: number; - won: number; -} - /** - * The response for a PvP leaderboard index. + * The response for a PvP leaderboard. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PvpLeaderboardIndexResponse extends ResponseBase { - leaderboards: Array; +export interface PvpLeaderboardResponse extends ResponseBase { + bracket: Bracket; + entries: Array; + name: string; season: Season; } @@ -53,19 +29,6 @@ export interface PvpRewardsIndexResponse extends ResponseBase { season: Season; } -interface Reward { - achievement: NameIdKey; - bracket: Bracket; - faction?: Faction; - rating_cutoff: number; - specialization?: NameIdKey; -} - -interface Bracket { - id: number; - type: 'ARENA_3v3' | 'BATTLEGROUNDS' | 'SHUFFLE'; -} - /** * The response for a PvP season index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -75,10 +38,6 @@ export interface PvpSeasonIndexResponse extends ResponseBase { seasons: Array; } -interface Season extends KeyBase { - id: number; -} - /** * The response for a PvP season. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -90,3 +49,44 @@ export interface PvpSeasonResponse extends ResponseBase { season_name?: string; season_start_timestamp: number; } + +interface Bracket { + id: number; + type: 'ARENA_3v3' | 'BATTLEGROUNDS' | 'SHUFFLE'; +} + +interface Character extends NameId { + realm: Realm; +} + +interface Entry { + character: Character; + faction: { type: keyof typeof Factions }; + rank: number; + rating: number; + season_match_statistics: SeasonMatchStatistics; + tier: Season; +} + +interface Realm extends KeyBase { + id: number; + slug: string; +} + +interface Reward { + achievement: NameIdKey; + bracket: Bracket; + faction?: Faction; + rating_cutoff: number; + specialization?: NameIdKey; +} + +interface Season extends KeyBase { + id: number; +} + +interface SeasonMatchStatistics { + lost: number; + played: number; + won: number; +} diff --git a/packages/wow/src/pvp-tier/types.ts b/packages/wow/src/pvp-tier/types.ts index 9f189b0..b09ce7d 100644 --- a/packages/wow/src/pvp-tier/types.ts +++ b/packages/wow/src/pvp-tier/types.ts @@ -8,11 +8,20 @@ export interface PvpTierIndexResponse extends ResponseBase { tiers: Array; } +/** + * The response for a PvP tier media. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface PvpTierMediaResponse extends ResponseBase { + assets: Array; + id: number; +} + /** * The response for a PvP tier. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface PvpTierResponse extends ResponseBase, NameId { +export interface PvpTierResponse extends NameId, ResponseBase { bracket: Bracket; max_rating: number; media: Media; @@ -28,12 +37,3 @@ interface Bracket { interface Media extends KeyBase { id: number; } - -/** - * The response for a PvP tier media. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface PvpTierMediaResponse extends ResponseBase { - assets: Array; - id: number; -} diff --git a/packages/wow/src/quest/quest.ts b/packages/wow/src/quest/quest.ts index 2b7cd3e..ddf46f1 100644 --- a/packages/wow/src/quest/quest.ts +++ b/packages/wow/src/quest/quest.ts @@ -22,16 +22,6 @@ export function quest(questId: number): Resource { path: `${base}/quest/${questId}`, }; } -/** - * Get a quest index. - * @returns The quest index. See {@link QuestIndexResponse}. - */ -export function questIndex(): Resource { - return { - namespace: 'static', - path: `${base}/quest/index`, - }; -} /** * Get a quest area by ID. * @param questAreaId The quest area ID. @@ -74,6 +64,16 @@ export function questCategoryIndex(): Resource { path: `${base}/quest/category/index`, }; } +/** + * Get a quest index. + * @returns The quest index. See {@link QuestIndexResponse}. + */ +export function questIndex(): Resource { + return { + namespace: 'static', + path: `${base}/quest/index`, + }; +} /** * Get a quest type by ID. * @param questTypeId The quest type ID. diff --git a/packages/wow/src/quest/types.ts b/packages/wow/src/quest/types.ts index 47ba3cd..cb74b83 100644 --- a/packages/wow/src/quest/types.ts +++ b/packages/wow/src/quest/types.ts @@ -1,56 +1,5 @@ import type { Faction, NameIdKey, ResponseBase } from '../base'; -/** - * The response for a quest index. - * @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 }; -} - -/** - * The response for a quest. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface QuestResponse extends ResponseBase { - area: NameIdKey; - description: string; - id: number; - requirements: Requirements; - rewards: Rewards; - title: string; -} - -interface Requirements { - faction: Faction; - max_character_level: number; - min_character_level: number; -} - -interface Rewards { - experience: number; - money: Money; - reputations: Array; -} - -interface Money { - units: Units; - value: number; -} - -interface Units { - copper: number; - gold: number; - silver: number; -} - -interface Reputation { - reward: NameIdKey; - value: number; -} - /** * The response for a quest area index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -87,6 +36,29 @@ export interface QuestCategoryResponse extends ResponseBase { quests: Array; } +/** + * The response for a quest index. + * @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 }; +} + +/** + * The response for a quest. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface QuestResponse extends ResponseBase { + area: NameIdKey; + description: string; + id: number; + requirements: Requirements; + rewards: Rewards; + title: string; +} + /** * The response for a quest type index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -104,3 +76,31 @@ export interface QuestTypeResponse extends ResponseBase { quests: Array; type: string; } + +interface Money { + units: Units; + value: number; +} + +interface Reputation { + reward: NameIdKey; + value: number; +} + +interface Requirements { + faction: Faction; + max_character_level: number; + min_character_level: number; +} + +interface Rewards { + experience: number; + money: Money; + reputations: Array; +} + +interface Units { + copper: number; + gold: number; + silver: number; +} diff --git a/packages/wow/src/realm/types.ts b/packages/wow/src/realm/types.ts index 57fddef..91657a5 100644 --- a/packages/wow/src/realm/types.ts +++ b/packages/wow/src/realm/types.ts @@ -1,11 +1,6 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { KeyBase, NameId, NameIdKey, Realm, ResponseBase } from '../base'; -// 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; - /** * The category of a realm. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -24,29 +19,6 @@ export type RealmCategory = | 'United States' | '한국'; -/** - * 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, capitalized and shortended). - */ -export type RealmTypeCapitalized = 'NORMAL' | 'RP'; - -/** - * The type of a realm, not capitalized or shortened. - */ -export type RealmType = 'Normal' | 'Roleplaying'; - /** * The response for a realm index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -59,7 +31,7 @@ export interface RealmIndexResponse extends ResponseBase { * The response for a realm. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface RealmResponse extends ResponseBase, NameId { +export interface RealmResponse extends NameId, ResponseBase { category: RealmCategory; connected_realm: { href: string }; is_tournament: boolean; @@ -97,3 +69,31 @@ export interface RealmSearchResponseItem extends KeyBase { type: { name: Record; 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'; + +// 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/packages/wow/src/region/types.ts b/packages/wow/src/region/types.ts index e82e30e..98f7895 100644 --- a/packages/wow/src/region/types.ts +++ b/packages/wow/src/region/types.ts @@ -12,7 +12,7 @@ export interface RegionIndexResponse extends ResponseBase { * The response for a region. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface RegionResponse extends ResponseBase, NameId { +export interface RegionResponse extends NameId, ResponseBase { patch_string: string; tag: string; } diff --git a/packages/wow/src/reputations/types.ts b/packages/wow/src/reputations/types.ts index ad20c0f..29730b1 100644 --- a/packages/wow/src/reputations/types.ts +++ b/packages/wow/src/reputations/types.ts @@ -20,10 +20,6 @@ export interface ReputationFactionResponse extends ResponseBase { reputation_tiers: ReputationTiers; } -interface ReputationTiers extends KeyBase { - id: number; -} - /** * The response for a reputation tier index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -32,11 +28,6 @@ export interface ReputationTiersIndexResponse extends ResponseBase { reputation_tiers: Array; } -interface ReputationTier extends KeyBase { - id: number; - name?: string; -} - /** * The response for a reputation tier. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -47,6 +38,15 @@ export interface ReputationTiersResponse extends ResponseBase { tiers: Array; } +interface ReputationTier extends KeyBase { + id: number; + name?: string; +} + +interface ReputationTiers extends KeyBase { + id: number; +} + interface Tier { id: number; max_value: number; diff --git a/packages/wow/src/spell/types.ts b/packages/wow/src/spell/types.ts index 06375c8..79c66d5 100644 --- a/packages/wow/src/spell/types.ts +++ b/packages/wow/src/spell/types.ts @@ -2,25 +2,21 @@ import type { BaseSearchParameters, Locales } from '@blizzard-api/core'; import type { KeyBase, MediaAsset, NameId, ResponseBase } from '../base'; /** - * The response for a spell. + * The response for a spell media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface SpellResponse extends ResponseBase, NameId { - description: null | string; - media: Media; -} - -interface Media extends KeyBase { +export interface SpellMediaResponse extends ResponseBase { + assets: Array; id: number; } /** - * The response for a spell media. + * The response for a spell. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface SpellMediaResponse extends ResponseBase { - assets: Array; - id: number; +export interface SpellResponse extends NameId, ResponseBase { + description: null | string; + media: Media; } /** @@ -45,3 +41,7 @@ export interface SpellSearchResponseItem extends KeyBase { name: Record; }; } + +interface Media extends KeyBase { + id: number; +} diff --git a/packages/wow/src/talent/types.ts b/packages/wow/src/talent/types.ts index daf4197..2eb6267 100644 --- a/packages/wow/src/talent/types.ts +++ b/packages/wow/src/talent/types.ts @@ -40,15 +40,6 @@ export interface TalentResponse extends ResponseBase { spell: NameIdKey; } -interface PlayableClass extends KeyBase { - id: number; -} - -interface RankDescription { - description: null; - rank: number; -} - /** * The response for a talent tree index. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -58,15 +49,21 @@ export interface TalentTreeIndexResponse extends ResponseBase { spec_talent_trees: Array; } -interface TalentTree extends KeyBase { - name: string; +/** + * The response for a talent tree nodes. + * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} + */ +export interface TalentTreeNodesResponse extends ResponseBase { + id: number; + spec_talent_trees: Array; + talent_nodes: Array; } /** * The response for a talent tree. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface TalentTreeResponse extends ResponseBase, NameId { +export interface TalentTreeResponse extends NameId, ResponseBase { class_talent_nodes: Array; media: { href: string }; playable_class: NameIdKey; @@ -75,6 +72,11 @@ export interface TalentTreeResponse extends ResponseBase, NameId { spec_talent_nodes: Array; } +interface ChoiceOfTooltip { + spell_tooltip: PurpleSpellTooltip; + talent: NameIdKey; +} + interface ClassTalentNode { display_col: number; display_row: number; @@ -87,11 +89,6 @@ interface ClassTalentNode { unlocks?: Array; } -interface NodeType { - id: number; - type: 'ACTIVE' | 'CHOICE' | 'PASSIVE'; -} - interface ClassTalentNodeRank { choice_of_tooltips?: Array; default_points?: number; @@ -99,20 +96,32 @@ interface ClassTalentNodeRank { tooltip?: Tooltip; } -interface Tooltip { - spell_tooltip: TooltipSpellTooltip; - talent: NameIdKey; +interface NodeType { + id: number; + type: 'ACTIVE' | 'CHOICE' | 'PASSIVE'; } -interface TooltipSpellTooltip { +interface PlayableClass extends KeyBase { + id: number; +} + +interface PurpleSpellTooltip { cast_time: string; - cooldown?: string; description: string; - power_cost?: string; - range?: string; spell: NameIdKey; } +interface Rank { + choice_of_tooltips?: Array; + rank: number; + tooltip?: Tooltip; +} + +interface RankDescription { + description: null; + rank: number; +} + interface RestrictionLine { is_for_class: boolean; required_points: number; @@ -137,27 +146,6 @@ interface SpecTalentNodeRank { tooltip?: Tooltip; } -interface ChoiceOfTooltip { - spell_tooltip: PurpleSpellTooltip; - talent: NameIdKey; -} - -interface PurpleSpellTooltip { - cast_time: string; - description: string; - spell: NameIdKey; -} - -/** - * The response for a talent tree nodes. - * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} - */ -export interface TalentTreeNodesResponse extends ResponseBase { - id: number; - spec_talent_trees: Array; - talent_nodes: Array; -} - interface SpecTalentTree extends KeyBase { name: string; } @@ -172,8 +160,20 @@ interface TalentNode { raw_position_y: number; } -interface Rank { - choice_of_tooltips?: Array; - rank: number; - tooltip?: Tooltip; +interface TalentTree extends KeyBase { + name: string; +} + +interface Tooltip { + spell_tooltip: TooltipSpellTooltip; + talent: NameIdKey; +} + +interface TooltipSpellTooltip { + cast_time: string; + cooldown?: string; + description: string; + power_cost?: string; + range?: string; + spell: NameIdKey; } diff --git a/packages/wow/src/tech-talent/types.ts b/packages/wow/src/tech-talent/types.ts index e75e030..e7a7f8d 100644 --- a/packages/wow/src/tech-talent/types.ts +++ b/packages/wow/src/tech-talent/types.ts @@ -9,26 +9,22 @@ export interface TechTalentIndexResponse extends ResponseBase { } /** - * The response for a tech talent. + * The response for a tech talent media. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface TechTalentResponse extends ResponseBase, NameId { - display_order: number; - media: Media; - talent_tree: Media; - tier: number; -} - -interface Media extends KeyBase { - id: number; +export interface TechTalentMediaResponse extends ResponseBase { + assets: Array; } /** - * The response for a tech talent media. + * The response for a tech talent. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface TechTalentMediaResponse extends ResponseBase { - assets: Array; +export interface TechTalentResponse extends NameId, ResponseBase { + display_order: number; + media: Media; + talent_tree: Media; + tier: number; } /** @@ -39,11 +35,6 @@ export interface TechTalentTreeIndexResponse extends ResponseBase { talent_trees: Array; } -interface TalentTree extends KeyBase { - id: number; - name?: string; -} - /** * The response for a tech talent tree. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} @@ -54,3 +45,12 @@ export interface TechTalentTreeResponse extends ResponseBase { playable_class: NameIdKey; talents: Array; } + +interface Media extends KeyBase { + id: number; +} + +interface TalentTree extends KeyBase { + id: number; + name?: string; +} diff --git a/packages/wow/src/title/types.ts b/packages/wow/src/title/types.ts index bceddba..ab7fb12 100644 --- a/packages/wow/src/title/types.ts +++ b/packages/wow/src/title/types.ts @@ -12,6 +12,6 @@ export interface TitleIndexResponse extends ResponseBase { * The response for a title. * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis} */ -export interface TitleResponse extends ResponseBase, NameId { +export interface TitleResponse extends NameId, ResponseBase { gender_name: GenderName; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16e22ac..730d5d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,29 +9,29 @@ importers: .: devDependencies: '@changesets/cli': - specifier: 2.27.9 - version: 2.27.9 + specifier: 2.27.10 + version: 2.27.10 '@putstack/eslint-config-typescript': - specifier: 3.10.0 - version: 3.10.0(eslint@9.14.0)(typescript@5.6.3) + specifier: 3.11.0 + version: 3.11.0(eslint@9.15.0)(typescript@5.6.3) '@putstack/prettier-config': specifier: 1.4.3 version: 1.4.3(prettier@3.3.3) '@types/node': - specifier: 22.9.0 - version: 22.9.0 + specifier: 22.9.1 + version: 22.9.1 '@vitest/coverage-v8': - specifier: 2.1.4 - version: 2.1.4(vitest@2.1.4) + specifier: 2.1.5 + version: 2.1.5(vitest@2.1.5) '@vitest/ui': - specifier: 2.1.4 - version: 2.1.4(vitest@2.1.4) + specifier: 2.1.5 + version: 2.1.5(vitest@2.1.5) eslint: - specifier: 9.14.0 - version: 9.14.0 + specifier: 9.15.0 + version: 9.15.0 husky: - specifier: 9.1.6 - version: 9.1.6 + specifier: 9.1.7 + version: 9.1.7 lint-staged: specifier: 15.2.10 version: 15.2.10 @@ -45,17 +45,17 @@ importers: specifier: 8.3.5 version: 8.3.5(postcss@8.4.38)(typescript@5.6.3)(yaml@2.5.0) turbo: - specifier: 2.2.3 - version: 2.2.3 + specifier: 2.3.0 + version: 2.3.0 typescript: specifier: 5.6.3 version: 5.6.3 typescript-eslint: - specifier: 8.13.0 - version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.15.0 + version: 8.15.0(eslint@9.15.0)(typescript@5.6.3) vitest: - specifier: 2.1.4 - version: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4) + specifier: 2.1.5 + version: 2.1.5(@types/node@22.9.1)(@vitest/ui@2.1.5) zod: specifier: 3.23.8 version: 3.23.8 @@ -155,21 +155,21 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@changesets/apply-release-plan@7.0.5': - resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} + '@changesets/apply-release-plan@7.0.6': + resolution: {integrity: sha512-TKhVLtiwtQOgMAC0fCJfmv93faiViKSDqr8oMEqrnNs99gtSC1sZh/aEMS9a+dseU1ESZRCK+ofLgGY7o0fw/Q==} - '@changesets/assemble-release-plan@6.0.4': - resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} + '@changesets/assemble-release-plan@6.0.5': + resolution: {integrity: sha512-IgvBWLNKZd6k4t72MBTBK3nkygi0j3t3zdC1zrfusYo0KpdsvnDjrMM9vPnTCLCMlfNs55jRL4gIMybxa64FCQ==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - '@changesets/cli@2.27.9': - resolution: {integrity: sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==} + '@changesets/cli@2.27.10': + resolution: {integrity: sha512-PfeXjvs9OfQJV8QSFFHjwHX3QnUL9elPEQ47SgkiwzLgtKGyuikWjrdM+lO9MXzOE22FO9jEGkcs4b+B6D6X0Q==} hasBin: true - '@changesets/config@3.0.3': - resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} + '@changesets/config@3.0.4': + resolution: {integrity: sha512-+DiIwtEBpvvv1z30f8bbOsUQGuccnZl9KRKMM/LxUHuDu5oEjmN+bJQ1RIBKNJjfYMQn8RZzoPiX0UgPaLQyXw==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} @@ -177,14 +177,14 @@ packages: '@changesets/get-dependents-graph@2.1.2': resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} - '@changesets/get-release-plan@4.0.4': - resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} + '@changesets/get-release-plan@4.0.5': + resolution: {integrity: sha512-E6wW7JoSMcctdVakut0UB76FrrN3KIeJSXvB+DHMFo99CnC3ZVnNYDCVNClMlqAhYGmLmAj77QfApaI3ca4Fkw==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@3.0.1': - resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} + '@changesets/git@3.0.2': + resolution: {integrity: sha512-r1/Kju9Y8OxRRdvna+nxpQIsMsRQn9dhhAZt94FLDeu0Hij2hnOozW8iqnHBgvu+KdnJppCveQwK4odwfw/aWQ==} '@changesets/logger@0.1.1': resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} @@ -195,8 +195,8 @@ packages: '@changesets/pre@2.0.1': resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} - '@changesets/read@0.6.1': - resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} + '@changesets/read@0.6.2': + resolution: {integrity: sha512-wjfQpJvryY3zD61p8jR87mJdyx2FIhEcdXhKUqkja87toMrP/3jtg/Yg29upN+N4Ckf525/uvV7a4tzBlpk6gg==} '@changesets/should-skip-package@0.1.1': resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} @@ -498,36 +498,32 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.0': - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.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/config-array@0.18.0': - resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.7.0': - resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.14.0': - resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} + '@eslint/js@9.15.0': + resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.0': - resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanfs/core@0.19.1': @@ -546,8 +542,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.0': - resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} engines: {node: '>=18.18'} '@isaacs/cliui@8.0.2': @@ -601,8 +597,8 @@ packages: '@polka/url@1.0.0-next.25': resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} - '@putstack/eslint-config-typescript@3.10.0': - resolution: {integrity: sha512-0RkZ2TlY2BJu+j1OwF82HakUZBJNV1bVw/8PvIRfjxMhb/dQbE5sr+z7HML9thOmM9m1sTZkSJzLR4KlzOzqqw==} + '@putstack/eslint-config-typescript@3.11.0': + resolution: {integrity: sha512-+7U+gz4S8832IzmrEtCHr0r9vfMZb2BYX4HvTj5wFcm8OjKbVDLK/T76dchlc9CQ/ycGoK9oXc/9+jxvmhvj4Q==} engines: {node: ^20.9 || ^22} peerDependencies: eslint: ^9.9.0 @@ -702,14 +698,14 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.9.0': - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + '@types/node@22.9.1': + resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@typescript-eslint/eslint-plugin@8.13.0': - resolution: {integrity: sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==} + '@typescript-eslint/eslint-plugin@8.15.0': + resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -719,8 +715,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.13.0': - resolution: {integrity: sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==} + '@typescript-eslint/parser@8.15.0': + resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -729,29 +725,26 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.13.0': - resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} + '@typescript-eslint/scope-manager@8.15.0': + resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.13.0': - resolution: {integrity: sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==} + '@typescript-eslint/type-utils@8.15.0': + resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/types@8.12.2': - resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/types@8.13.0': - resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} + '@typescript-eslint/types@8.15.0': + resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.13.0': - resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} + '@typescript-eslint/typescript-estree@8.15.0': + resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -759,30 +752,34 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.13.0': - resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} + '@typescript-eslint/utils@8.15.0': + resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - '@typescript-eslint/visitor-keys@8.13.0': - resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} + '@typescript-eslint/visitor-keys@8.15.0': + resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@vitest/coverage-v8@2.1.4': - resolution: {integrity: sha512-FPKQuJfR6VTfcNMcGpqInmtJuVXFSCd9HQltYncfR01AzXhLucMEtQ5SinPdZxsT5x/5BK7I5qFJ5/ApGCmyTQ==} + '@vitest/coverage-v8@2.1.5': + resolution: {integrity: sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==} peerDependencies: - '@vitest/browser': 2.1.4 - vitest: 2.1.4 + '@vitest/browser': 2.1.5 + vitest: 2.1.5 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@2.1.4': - resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} + '@vitest/expect@2.1.5': + resolution: {integrity: sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==} - '@vitest/mocker@2.1.4': - resolution: {integrity: sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==} + '@vitest/mocker@2.1.5': + resolution: {integrity: sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 @@ -792,25 +789,25 @@ packages: vite: optional: true - '@vitest/pretty-format@2.1.4': - resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} + '@vitest/pretty-format@2.1.5': + resolution: {integrity: sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==} - '@vitest/runner@2.1.4': - resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} + '@vitest/runner@2.1.5': + resolution: {integrity: sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==} - '@vitest/snapshot@2.1.4': - resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} + '@vitest/snapshot@2.1.5': + resolution: {integrity: sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==} - '@vitest/spy@2.1.4': - resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} + '@vitest/spy@2.1.5': + resolution: {integrity: sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==} - '@vitest/ui@2.1.4': - resolution: {integrity: sha512-Zd9e5oU063c+j9N9XzGJagCLNvG71x/2tOme3Js4JEZKX55zsgxhJwUgLI8hkN6NjMLpdJO8d7nVUUuPGAA58Q==} + '@vitest/ui@2.1.5': + resolution: {integrity: sha512-ERgKkDMTfngrZip6VG5h8L9B5D0AH/4+bga4yR1UzGH7c2cxv3LWogw2Dvuwr9cP3/iKDHYys7kIFLDKpxORTg==} peerDependencies: - vitest: 2.1.4 + vitest: 2.1.5 - '@vitest/utils@2.1.4': - resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} + '@vitest/utils@2.1.5': + resolution: {integrity: sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -1004,11 +1001,8 @@ packages: core-js-compat@3.38.1: resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} - cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} debug@4.3.7: @@ -1065,6 +1059,9 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esbuild@0.20.2: resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} engines: {node: '>=12'} @@ -1090,24 +1087,11 @@ packages: eslint-plugin-depend@0.12.0: resolution: {integrity: sha512-bS5ESnC3eXDJPNv0RKkzRbLO45hRRLR/dleAUdbysXChWz1bAxa4MRh14EtDREn7fZieueqz4L7TfQQbzvdYHA==} - eslint-plugin-perfectionist@3.9.1: - resolution: {integrity: sha512-9WRzf6XaAxF4Oi5t/3TqKP5zUjERhasHmLFHin2Yw6ZAp/EP/EVA2dr3BhQrrHWCm5SzTMZf0FcjDnBkO2xFkA==} + eslint-plugin-perfectionist@4.0.3: + resolution: {integrity: sha512-CyafnreF6boy4lf1XaF72U8NbkwrfjU/mOf1y6doaDMS9zGXhUU1DSk+ZPf/rVwCf1PL1m+rhHqFs+IcB8kDmA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - astro-eslint-parser: ^1.0.2 eslint: '>=8.0.0' - svelte: '>=3.0.0' - svelte-eslint-parser: ^0.41.1 - vue-eslint-parser: '>=9.0.0' - peerDependenciesMeta: - astro-eslint-parser: - optional: true - svelte: - optional: true - svelte-eslint-parser: - optional: true - vue-eslint-parser: - optional: true eslint-plugin-sonarjs@1.0.4: resolution: {integrity: sha512-jF0eGCUsq/HzMub4ExAyD8x1oEgjOyB9XVytYGyWgSFvdiJQJp6IuP7RmtauCf06o6N/kZErh+zW4b10y1WZ+Q==} @@ -1115,8 +1099,8 @@ packages: peerDependencies: eslint: ^8.0.0 || ^9.0.0 - eslint-plugin-unicorn@56.0.0: - resolution: {integrity: sha512-aXpddVz/PQMmd69uxO98PA4iidiVNvA0xOtbpUoz1WhBd4RxOQQYqN618v68drY0hmy5uU2jy1bheKEVWBjlPw==} + eslint-plugin-unicorn@56.0.1: + resolution: {integrity: sha512-FwVV0Uwf8XPfVnKSGpMg7NtlZh0G0gBarCaFcMUOoqPxXryxdYxTRRv4kH6B9TFCVIrjRXG+emcxIk2ayZilog==} engines: {node: '>=18.18'} peerDependencies: eslint: '>=8.56.0' @@ -1133,8 +1117,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.14.0: - resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1338,8 +1322,8 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - husky@9.1.6: - resolution: {integrity: sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} engines: {node: '>=18'} hasBin: true @@ -1533,9 +1517,6 @@ packages: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} engines: {node: 14 || >=16.14} - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} @@ -1614,12 +1595,13 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + natural-orderby@5.0.0: + resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} + engines: {node: '>=18'} + node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} @@ -1801,9 +1783,6 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1885,18 +1864,10 @@ packages: engines: {node: '>=10'} hasBin: true - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -1907,9 +1878,6 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -1938,8 +1906,8 @@ packages: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} - spawndamnit@2.0.0: - resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -1959,8 +1927,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@3.7.0: - resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} @@ -2027,9 +1995,6 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -2106,38 +2071,38 @@ packages: typescript: optional: true - turbo-darwin-64@2.2.3: - resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==} + turbo-darwin-64@2.3.0: + resolution: {integrity: sha512-pji+D49PhFItyQjf2QVoLZw2d3oRGo8gJgKyOiRzvip78Rzie74quA8XNwSg/DuzM7xx6gJ3p2/LylTTlgZXxQ==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.2.3: - resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==} + turbo-darwin-arm64@2.3.0: + resolution: {integrity: sha512-AJrGIL9BO41mwDF/IBHsNGwvtdyB911vp8f5mbNo1wG66gWTvOBg7WCtYQBvCo11XTenTfXPRSsAb7w3WAZb6w==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.2.3: - resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==} + turbo-linux-64@2.3.0: + resolution: {integrity: sha512-jZqW6vc2sPJT3M/3ZmV1Cg4ecQVPqsbHncG/RnogHpBu783KCSXIndgxvUQNm9qfgBYbZDBnP1md63O4UTElhw==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.2.3: - resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==} + turbo-linux-arm64@2.3.0: + resolution: {integrity: sha512-HUbDLJlvd/hxuyCNO0BmEWYQj0TugRMvSQeG8vHJH+Lq8qOgDAe7J0K73bFNbZejZQxW3C3XEiZFB3pnpO78+A==} cpu: [arm64] os: [linux] - turbo-windows-64@2.2.3: - resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==} + turbo-windows-64@2.3.0: + resolution: {integrity: sha512-c5rxrGNTYDWX9QeMzWLFE9frOXnKjHGEvQMp1SfldDlbZYsloX9UKs31TzUThzfTgTiz8NYuShaXJ2UvTMnV/g==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.2.3: - resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==} + turbo-windows-arm64@2.3.0: + resolution: {integrity: sha512-7qfUuYhfIVb1AZgs89DxhXK+zZez6O2ocmixEQ4hXZK7ytnBt5vaz2zGNJJKFNYIL5HX1C3tuHolnpNgDNCUIg==} cpu: [arm64] os: [win32] - turbo@2.2.3: - resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==} + turbo@2.3.0: + resolution: {integrity: sha512-/uOq5o2jwRPyaUDnwBpOR5k9mQq4c3wziBgWNWttiYQPmbhDtrKYPRBxTvA2WpgQwRIbt8UM612RMN8n/TvmHA==} hasBin: true type-check@0.4.0: @@ -2152,10 +2117,11 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} - typescript-eslint@8.13.0: - resolution: {integrity: sha512-vIMpDRJrQd70au2G8w34mPps0ezFSPMEX4pXkTzUkrNbRX+36ais2ksGWN0esZL+ZMaFJEneOBHzCgSqle7DHw==} + typescript-eslint@8.15.0: + resolution: {integrity: sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -2185,8 +2151,8 @@ packages: validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - vite-node@2.1.4: - resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} + vite-node@2.1.5: + resolution: {integrity: sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -2218,15 +2184,15 @@ packages: terser: optional: true - vitest@2.1.4: - resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} + vitest@2.1.5: + resolution: {integrity: sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.4 - '@vitest/ui': 2.1.4 + '@vitest/browser': 2.1.5 + '@vitest/ui': 2.1.5 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -2252,10 +2218,6 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2287,9 +2249,6 @@ packages: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - yaml@2.5.0: resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} engines: {node: '>= 14'} @@ -2340,11 +2299,11 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@changesets/apply-release-plan@7.0.5': + '@changesets/apply-release-plan@7.0.6': dependencies: - '@changesets/config': 3.0.3 + '@changesets/config': 3.0.4 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.1 + '@changesets/git': 3.0.2 '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -2356,7 +2315,7 @@ snapshots: resolve-from: 5.0.0 semver: 7.6.3 - '@changesets/assemble-release-plan@6.0.4': + '@changesets/assemble-release-plan@6.0.5': dependencies: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.1.2 @@ -2369,19 +2328,19 @@ snapshots: dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.27.9': + '@changesets/cli@2.27.10': dependencies: - '@changesets/apply-release-plan': 7.0.5 - '@changesets/assemble-release-plan': 6.0.4 + '@changesets/apply-release-plan': 7.0.6 + '@changesets/assemble-release-plan': 6.0.5 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.3 + '@changesets/config': 3.0.4 '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.1.2 - '@changesets/get-release-plan': 4.0.4 - '@changesets/git': 3.0.1 + '@changesets/get-release-plan': 4.0.5 + '@changesets/git': 3.0.2 '@changesets/logger': 0.1.1 '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 + '@changesets/read': 0.6.2 '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@changesets/write': 0.3.2 @@ -2397,10 +2356,10 @@ snapshots: picocolors: 1.1.1 resolve-from: 5.0.0 semver: 7.6.3 - spawndamnit: 2.0.0 + spawndamnit: 3.0.1 term-size: 2.2.1 - '@changesets/config@3.0.3': + '@changesets/config@3.0.4': dependencies: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.1.2 @@ -2421,24 +2380,24 @@ snapshots: picocolors: 1.1.1 semver: 7.6.3 - '@changesets/get-release-plan@4.0.4': + '@changesets/get-release-plan@4.0.5': dependencies: - '@changesets/assemble-release-plan': 6.0.4 - '@changesets/config': 3.0.3 + '@changesets/assemble-release-plan': 6.0.5 + '@changesets/config': 3.0.4 '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 + '@changesets/read': 0.6.2 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.1': + '@changesets/git@3.0.2': dependencies: '@changesets/errors': 0.2.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 micromatch: 4.0.8 - spawndamnit: 2.0.0 + spawndamnit: 3.0.1 '@changesets/logger@0.1.1': dependencies: @@ -2456,9 +2415,9 @@ snapshots: '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.1': + '@changesets/read@0.6.2': dependencies: - '@changesets/git': 3.0.1 + '@changesets/git': 3.0.2 '@changesets/logger': 0.1.1 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 @@ -2623,16 +2582,14 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.14.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.15.0)': dependencies: - eslint: 9.14.0 + eslint: 9.15.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.0': {} - '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.18.0': + '@eslint/config-array@0.19.0': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.7 @@ -2640,9 +2597,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/core@0.7.0': {} + '@eslint/core@0.9.0': {} - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 debug: 4.3.7 @@ -2656,11 +2613,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.14.0': {} + '@eslint/js@9.15.0': {} '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.2.0': + '@eslint/plugin-kit@0.2.3': dependencies: levn: 0.4.1 @@ -2675,7 +2632,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.0': {} + '@humanwhocodes/retry@0.4.1': {} '@isaacs/cliui@8.0.2': dependencies: @@ -2738,23 +2695,19 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@putstack/eslint-config-typescript@3.10.0(eslint@9.14.0)(typescript@5.6.3)': + '@putstack/eslint-config-typescript@3.11.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint/js': 9.14.0 - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - eslint: 9.14.0 + '@eslint/js': 9.15.0 + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + eslint: 9.15.0 eslint-plugin-depend: 0.12.0 - eslint-plugin-perfectionist: 3.9.1(eslint@9.14.0)(typescript@5.6.3) - eslint-plugin-sonarjs: 1.0.4(eslint@9.14.0) - eslint-plugin-unicorn: 56.0.0(eslint@9.14.0) + eslint-plugin-perfectionist: 4.0.3(eslint@9.15.0)(typescript@5.6.3) + eslint-plugin-sonarjs: 1.0.4(eslint@9.15.0) + eslint-plugin-unicorn: 56.0.1(eslint@9.15.0) typescript: 5.6.3 - typescript-eslint: 8.13.0(eslint@9.14.0)(typescript@5.6.3) + typescript-eslint: 8.15.0(eslint@9.15.0)(typescript@5.6.3) transitivePeerDependencies: - - astro-eslint-parser - supports-color - - svelte - - svelte-eslint-parser - - vue-eslint-parser '@putstack/prettier-config@1.4.3(prettier@3.3.3)': dependencies: @@ -2814,21 +2767,21 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@22.9.0': + '@types/node@22.9.1': dependencies: undici-types: 6.19.8 '@types/normalize-package-data@2.4.4': {} - '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/type-utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 - eslint: 9.14.0 + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.15.0 + eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -2838,44 +2791,42 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7 - eslint: 9.14.0 + eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.13.0': + '@typescript-eslint/scope-manager@8.15.0': dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/type-utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) debug: 4.3.7 + eslint: 9.15.0 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - - eslint - supports-color - '@typescript-eslint/types@8.12.2': {} + '@typescript-eslint/types@8.15.0': {} - '@typescript-eslint/types@8.13.0': {} - - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.6.3)': dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -2887,23 +2838,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.14.0) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - eslint: 9.14.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.15.0) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + eslint: 9.15.0 + optionalDependencies: + typescript: 5.6.3 transitivePeerDependencies: - supports-color - - typescript - '@typescript-eslint/visitor-keys@8.13.0': + '@typescript-eslint/visitor-keys@8.15.0': dependencies: - '@typescript-eslint/types': 8.13.0 - eslint-visitor-keys: 3.4.3 + '@typescript-eslint/types': 8.15.0 + eslint-visitor-keys: 4.2.0 - '@vitest/coverage-v8@2.1.4(vitest@2.1.4)': + '@vitest/coverage-v8@2.1.5(vitest@2.1.5)': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -2914,61 +2866,61 @@ snapshots: istanbul-reports: 3.1.7 magic-string: 0.30.12 magicast: 0.3.5 - std-env: 3.7.0 + std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4) + vitest: 2.1.5(@types/node@22.9.1)(@vitest/ui@2.1.5) transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.4': + '@vitest/expect@2.1.5': dependencies: - '@vitest/spy': 2.1.4 - '@vitest/utils': 2.1.4 + '@vitest/spy': 2.1.5 + '@vitest/utils': 2.1.5 chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.4(vite@5.2.11(@types/node@22.9.0))': + '@vitest/mocker@2.1.5(vite@5.2.11(@types/node@22.9.1))': dependencies: - '@vitest/spy': 2.1.4 + '@vitest/spy': 2.1.5 estree-walker: 3.0.3 magic-string: 0.30.12 optionalDependencies: - vite: 5.2.11(@types/node@22.9.0) + vite: 5.2.11(@types/node@22.9.1) - '@vitest/pretty-format@2.1.4': + '@vitest/pretty-format@2.1.5': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.1.4': + '@vitest/runner@2.1.5': dependencies: - '@vitest/utils': 2.1.4 + '@vitest/utils': 2.1.5 pathe: 1.1.2 - '@vitest/snapshot@2.1.4': + '@vitest/snapshot@2.1.5': dependencies: - '@vitest/pretty-format': 2.1.4 + '@vitest/pretty-format': 2.1.5 magic-string: 0.30.12 pathe: 1.1.2 - '@vitest/spy@2.1.4': + '@vitest/spy@2.1.5': dependencies: tinyspy: 3.0.2 - '@vitest/ui@2.1.4(vitest@2.1.4)': + '@vitest/ui@2.1.5(vitest@2.1.5)': dependencies: - '@vitest/utils': 2.1.4 + '@vitest/utils': 2.1.5 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 sirv: 3.0.0 tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4) + vitest: 2.1.5(@types/node@22.9.1)(@vitest/ui@2.1.5) - '@vitest/utils@2.1.4': + '@vitest/utils@2.1.5': dependencies: - '@vitest/pretty-format': 2.1.4 + '@vitest/pretty-format': 2.1.5 loupe: 3.1.2 tinyrainbow: 1.2.0 @@ -3142,13 +3094,7 @@ snapshots: dependencies: browserslist: 4.24.0 - cross-spawn@5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - - cross-spawn@7.0.3: + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -3191,6 +3137,8 @@ snapshots: dependencies: is-arrayish: 0.2.1 + es-module-lexer@1.5.4: {} + esbuild@0.20.2: optionalDependencies: '@esbuild/aix-ppc64': 0.20.2 @@ -3256,29 +3204,28 @@ snapshots: module-replacements: 2.1.0 semver: 7.6.3 - eslint-plugin-perfectionist@3.9.1(eslint@9.14.0)(typescript@5.6.3): + eslint-plugin-perfectionist@4.0.3(eslint@9.15.0)(typescript@5.6.3): dependencies: - '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - eslint: 9.14.0 - minimatch: 9.0.5 - natural-compare-lite: 1.4.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + eslint: 9.15.0 + natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-sonarjs@1.0.4(eslint@9.14.0): + eslint-plugin-sonarjs@1.0.4(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 - eslint-plugin-unicorn@56.0.0(eslint@9.14.0): + eslint-plugin-unicorn@56.0.1(eslint@9.15.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.15.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.38.1 - eslint: 9.14.0 + eslint: 9.15.0 esquery: 1.6.0 globals: 15.10.0 indent-string: 4.0.0 @@ -3300,23 +3247,23 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.14.0: + eslint@9.15.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.15.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.18.0 - '@eslint/core': 0.7.0 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.14.0 - '@eslint/plugin-kit': 0.2.0 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.15.0 + '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.0 + '@humanwhocodes/retry': 0.4.1 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 debug: 4.3.7 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 @@ -3336,7 +3283,6 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - text-table: 0.2.0 transitivePeerDependencies: - supports-color @@ -3368,7 +3314,7 @@ snapshots: execa@8.0.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 8.0.1 human-signals: 5.0.0 is-stream: 3.0.0 @@ -3445,7 +3391,7 @@ snapshots: foreground-child@3.1.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 form-data@4.0.0: @@ -3525,7 +3471,7 @@ snapshots: human-signals@5.0.0: {} - husky@9.1.6: {} + husky@9.1.7: {} iconv-lite@0.4.24: dependencies: @@ -3703,11 +3649,6 @@ snapshots: lru-cache@10.2.2: {} - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -3771,10 +3712,10 @@ snapshots: nanoid@3.3.7: {} - natural-compare-lite@1.4.0: {} - natural-compare@1.4.0: {} + natural-orderby@5.0.0: {} + node-releases@2.0.18: {} normalize-package-data@2.5.0: @@ -3789,7 +3730,7 @@ snapshots: npm-run-all2@7.0.1: dependencies: ansi-styles: 6.2.1 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 memorystream: 0.3.1 minimatch: 9.0.5 pidtree: 0.6.0 @@ -3917,8 +3858,6 @@ snapshots: proxy-from-env@1.1.0: {} - pseudomap@1.0.2: {} - punycode@2.3.1: {} queue-microtask@1.2.3: {} @@ -4009,24 +3948,16 @@ snapshots: semver@7.6.3: {} - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} shell-quote@1.8.1: {} siginfo@2.0.0: {} - signal-exit@3.0.7: {} - signal-exit@4.1.0: {} sirv@3.0.0: @@ -4053,10 +3984,10 @@ snapshots: dependencies: whatwg-url: 7.1.0 - spawndamnit@2.0.0: + spawndamnit@3.0.1: dependencies: - cross-spawn: 5.1.0 - signal-exit: 3.0.7 + cross-spawn: 7.0.6 + signal-exit: 4.1.0 spdx-correct@3.2.0: dependencies: @@ -4076,7 +4007,7 @@ snapshots: stackback@0.0.2: {} - std-env@3.7.0: {} + std-env@3.8.0: {} string-argv@0.3.2: {} @@ -4144,8 +4075,6 @@ snapshots: glob: 10.4.5 minimatch: 9.0.5 - text-table@0.2.0: {} - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -4218,32 +4147,32 @@ snapshots: - tsx - yaml - turbo-darwin-64@2.2.3: + turbo-darwin-64@2.3.0: optional: true - turbo-darwin-arm64@2.2.3: + turbo-darwin-arm64@2.3.0: optional: true - turbo-linux-64@2.2.3: + turbo-linux-64@2.3.0: optional: true - turbo-linux-arm64@2.2.3: + turbo-linux-arm64@2.3.0: optional: true - turbo-windows-64@2.2.3: + turbo-windows-64@2.3.0: optional: true - turbo-windows-arm64@2.2.3: + turbo-windows-arm64@2.3.0: optional: true - turbo@2.2.3: + turbo@2.3.0: optionalDependencies: - turbo-darwin-64: 2.2.3 - turbo-darwin-arm64: 2.2.3 - turbo-linux-64: 2.2.3 - turbo-linux-arm64: 2.2.3 - turbo-windows-64: 2.2.3 - turbo-windows-arm64: 2.2.3 + turbo-darwin-64: 2.3.0 + turbo-darwin-arm64: 2.3.0 + turbo-linux-64: 2.3.0 + turbo-linux-arm64: 2.3.0 + turbo-windows-64: 2.3.0 + turbo-windows-arm64: 2.3.0 type-check@0.4.0: dependencies: @@ -4253,15 +4182,15 @@ snapshots: type-fest@0.8.1: {} - typescript-eslint@8.13.0(eslint@9.14.0)(typescript@5.6.3): + typescript-eslint@8.15.0(eslint@9.15.0)(typescript@5.6.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - - eslint - supports-color typescript@5.6.3: {} @@ -4285,12 +4214,13 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@2.1.4(@types/node@22.9.0): + vite-node@2.1.5(@types/node@22.9.1): dependencies: cac: 6.7.14 debug: 4.3.7 + es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 5.2.11(@types/node@22.9.0) + vite: 5.2.11(@types/node@22.9.1) transitivePeerDependencies: - '@types/node' - less @@ -4301,40 +4231,40 @@ snapshots: - supports-color - terser - vite@5.2.11(@types/node@22.9.0): + vite@5.2.11(@types/node@22.9.1): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 fsevents: 2.3.3 - vitest@2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4): + vitest@2.1.5(@types/node@22.9.1)(@vitest/ui@2.1.5): dependencies: - '@vitest/expect': 2.1.4 - '@vitest/mocker': 2.1.4(vite@5.2.11(@types/node@22.9.0)) - '@vitest/pretty-format': 2.1.4 - '@vitest/runner': 2.1.4 - '@vitest/snapshot': 2.1.4 - '@vitest/spy': 2.1.4 - '@vitest/utils': 2.1.4 + '@vitest/expect': 2.1.5 + '@vitest/mocker': 2.1.5(vite@5.2.11(@types/node@22.9.1)) + '@vitest/pretty-format': 2.1.5 + '@vitest/runner': 2.1.5 + '@vitest/snapshot': 2.1.5 + '@vitest/spy': 2.1.5 + '@vitest/utils': 2.1.5 chai: 5.1.2 debug: 4.3.7 expect-type: 1.1.0 magic-string: 0.30.12 pathe: 1.1.2 - std-env: 3.7.0 + std-env: 3.8.0 tinybench: 2.9.0 tinyexec: 0.3.1 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.2.11(@types/node@22.9.0) - vite-node: 2.1.4(@types/node@22.9.0) + vite: 5.2.11(@types/node@22.9.1) + vite-node: 2.1.5(@types/node@22.9.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.9.0 - '@vitest/ui': 2.1.4(vitest@2.1.4) + '@types/node': 22.9.1 + '@vitest/ui': 2.1.5(vitest@2.1.5) transitivePeerDependencies: - less - lightningcss @@ -4355,10 +4285,6 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - which@1.3.1: - dependencies: - isexe: 2.0.0 - which@2.0.2: dependencies: isexe: 2.0.0 @@ -4392,8 +4318,6 @@ snapshots: string-width: 7.1.0 strip-ansi: 7.1.0 - yallist@2.1.2: {} - yaml@2.5.0: {} yocto-queue@0.1.0: {}