Skip to content

Commit

Permalink
[WoW] Cleanup some of the new response types to use ResponseBase
Browse files Browse the repository at this point in the history
  • Loading branch information
Pewtro committed Aug 11, 2024
1 parent a77dc5d commit 9e40e24
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 45 deletions.
8 changes: 3 additions & 5 deletions packages/wow/src/character-achievements/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, NameIdKey } from '../base';
import type { Href, NameIdKey, ResponseBase } from '../base';

export interface CharacterAchievementsSummaryResponse {
_links: { self: Href };
export interface CharacterAchievementsSummaryResponse extends ResponseBase {
achievements: Array<Achievement>;
category_progress: Array<CategoryProgress>;
character: Character;
Expand Down Expand Up @@ -44,8 +43,7 @@ interface RecentEvent {
timestamp: number;
}

export interface CharacterAchievementStatisticsResponse {
_links: { self: Href };
export interface CharacterAchievementStatisticsResponse extends ResponseBase {
categories: Array<Category>;
character: Character;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/wow/src/character-appearance/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Color, Faction, Gender, Href, KeyBase, NameId, NameIdKey } from '../base';
import type { Color, Faction, Gender, KeyBase, NameId, NameIdKey, ResponseBase } from '../base';

export interface CharacterAppearanceResponse {
_links: { self: Href };
export interface CharacterAppearanceResponse extends ResponseBase {
active_spec: NameIdKey;
character: Character;
customizations: Array<Customization>;
Expand Down
20 changes: 7 additions & 13 deletions packages/wow/src/character-collections/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, KeyBase, NameIdKey } from '../base';
import type { Href, KeyBase, NameIdKey, ResponseBase } from '../base';

export interface CharacterCollectionsIndexResponse {
_links: { self: Href };
export interface CharacterCollectionsIndexResponse extends ResponseBase {
character: Character;
heirlooms: Href;
mounts: Href;
Expand All @@ -18,8 +17,7 @@ interface Character extends NameIdKey {
realm: Realm;
}

export interface CharacterHeirloomsCollectionSummaryResponse {
_links: { self: Href };
export interface CharacterHeirloomsCollectionSummaryResponse extends ResponseBase {
heirlooms: Array<Heirloom>;
}

Expand All @@ -28,8 +26,7 @@ interface Heirloom {
upgrade: { level: number };
}

export interface CharacterMountsCollectionSummaryResponse {
_links: { self: Href };
export interface CharacterMountsCollectionSummaryResponse extends ResponseBase {
mounts: Array<Mount>;
}

Expand All @@ -40,8 +37,7 @@ interface Mount {
mount: NameIdKey;
}

export interface CharacterPetsCollectionSummaryResponse {
_links: { self: Href };
export interface CharacterPetsCollectionSummaryResponse extends ResponseBase {
pets: Array<Pet>;
unlocked_battle_pet_slots: number;
}
Expand Down Expand Up @@ -71,8 +67,7 @@ interface Stats {
speed: number;
}

export interface CharacterToysCollectionSummaryResponse {
_links: { self: Href };
export interface CharacterToysCollectionSummaryResponse extends ResponseBase {
toys: Array<Toy>;
}

Expand All @@ -81,8 +76,7 @@ interface Toy {
toy: NameIdKey;
}

export interface CharacterTransmogCollectionSummaryResponse {
_links: { self: Href };
export interface CharacterTransmogCollectionSummaryResponse extends ResponseBase {
appearance_sets: Array<NameIdKey>;
slots: Array<Slot>;
}
Expand Down
11 changes: 4 additions & 7 deletions packages/wow/src/character-encounters/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, NameIdKey } from '../base';
import type { Href, NameIdKey, ResponseBase } from '../base';

export interface CharacterEncountersSummaryResponse {
_links: { self: Href };
export interface CharacterEncountersSummaryResponse extends ResponseBase {
character: Character;
dungeons: Href;
raids: Href;
Expand All @@ -15,8 +14,7 @@ interface Character extends NameIdKey {
realm: Realm;
}

export interface CharacterDungeonsResponse {
_links: { self: Href };
export interface CharacterDungeonsResponse extends ResponseBase {
expansions: Array<Expansion<DungeonMode>>;
}

Expand Down Expand Up @@ -58,8 +56,7 @@ interface Encounter {
last_kill_timestamp: number;
}

export interface CharacterRaidsResponse {
_links: { self: Href };
export interface CharacterRaidsResponse extends ResponseBase {
character: Character;
expansions: Array<Expansion<RaidMode>>;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/wow/src/character-equipment/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Color, Href, KeyBase, NameIdKey } from '../base';
import type { Color, KeyBase, NameIdKey, ResponseBase } from '../base';

export interface CharacterEquipmentSummaryResponse {
_links: { self: Href };
export interface CharacterEquipmentSummaryResponse extends ResponseBase {
character: Character;
equipped_item_sets: Array<Set>;
equipped_items: Array<EquippedItem>;
Expand Down
5 changes: 2 additions & 3 deletions packages/wow/src/character-hunter-pets/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, KeyBase, NameIdKey } from '../base';
import type { KeyBase, NameIdKey, ResponseBase } from '../base';

export interface CharacterHunterPetsSummaryResponse {
_links: { self: Href };
export interface CharacterHunterPetsSummaryResponse extends ResponseBase {
character: Character;
hunter_pets: Array<HunterPet>;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/wow/src/character-media/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, NameIdKey } from '../base';
import type { NameIdKey, ResponseBase } from '../base';

export interface CharacterMediaSummaryResponse {
_links: { self: Href };
export interface CharacterMediaSummaryResponse extends ResponseBase {
assets: Array<Asset>;
character: Character;
}
Expand Down
8 changes: 3 additions & 5 deletions packages/wow/src/character-mythic-keystone-profile/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Color, Href, KeyBase, NameId, NameIdKey } from '../base';
import type { Color, KeyBase, NameId, NameIdKey, ResponseBase } from '../base';

export interface CharacterMythicKeystoneProfileIndexResponse {
_links: { self: Href };
export interface CharacterMythicKeystoneProfileIndexResponse extends ResponseBase {
character: Character;
current_period: CurrentPeriod;
seasons: Array<{ id: number } & KeyBase>;
Expand All @@ -19,8 +18,7 @@ interface CurrentPeriod {
period: { id: number } & KeyBase;
}

export interface CharacterMythicKeystoneSeasonDetailsResponse {
_links: { self: Href };
export interface CharacterMythicKeystoneSeasonDetailsResponse extends ResponseBase {
best_runs: Array<BestRun>;
character: NameIdKey;
mythic_rating: MythicRating;
Expand Down
5 changes: 2 additions & 3 deletions packages/wow/src/character-professions/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Href, NameId, NameIdKey } from '../base';
import type { NameId, NameIdKey, ResponseBase } from '../base';

export interface CharacterProfessionsSummaryResponse {
_links: { self: Href };
export interface CharacterProfessionsSummaryResponse extends ResponseBase {
character: Character;
primaries: Array<Primary>;
secondaries: Array<Secondary>;
Expand Down

0 comments on commit 9e40e24

Please sign in to comment.