-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@gw2api/types": patch | ||
--- | ||
|
||
Add types for `/v2/skins` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import type { Gender, Race } from './character'; | ||
|
||
/** | ||
* Skin as returned from `/v2/skins` | ||
* @see https://wiki.guildwars2.com/wiki/API:2/skins | ||
*/ | ||
export interface Skin { | ||
/** The id of the skin */ | ||
id: number; | ||
|
||
/** The name of the skin */ | ||
name: string; | ||
|
||
/** Description of the skin */ | ||
description?: string; | ||
|
||
/** The icon of the skin */ | ||
icon?: string; | ||
|
||
/** The rarity of the skin */ | ||
rarity: 'Basic' | 'Masterwork' | 'Legendary' | 'Rare' | 'Exotic' | 'Ascended'; | ||
|
||
/** Flags of this skin */ | ||
flags: SkinFlag[]; | ||
|
||
/** Restrictions of the skin */ | ||
restrictions: string[]; | ||
|
||
/** Skin type */ | ||
type: 'Armor' | 'Back' | 'Gathering' | 'Weapon'; | ||
|
||
/** Skin details */ | ||
details?: { | ||
/** Damage type */ | ||
damage_type?: 'Physical' | 'Choking' | 'Fire' | 'Lightning' | 'Ice'; | ||
|
||
/** Dye slots */ | ||
dye_slots?: { | ||
default: DyeSlot[]; | ||
overrides: Record<`${Race}${Gender}`, DyeSlot[]>; | ||
}; | ||
|
||
/** The subtype of this skin */ | ||
type: 'Leggings' | 'Coat' | 'Boots' | 'Gloves' | 'Shoulders' | 'Helm' | 'HelmAquatic' | 'Foraging' | 'Logging' | 'Mining' | 'LargeBundle' | 'Rifle' | 'SmallBundle' | 'Toy' | 'ToyTwoHanded' | 'Axe' | 'Staff' | 'Hammer' | 'Pistol' | 'Longbow' | 'Dagger' | 'Sword' | 'Shortbow' | 'Focus' | 'Torch' | 'Spear' | 'Mace' | 'Speargun' | 'Greatsword' | 'Scepter' | 'Warhorn' | 'Shield' | 'Trident' | 'Lure' | 'Bait' | 'Fishing'; | ||
|
||
/** The weight class of this armor skin */ | ||
weight_class?: 'Heavy' | 'Light' | 'Medium' | 'Clothing'; | ||
}; | ||
}; | ||
|
||
interface DyeSlot { | ||
color_id: number; | ||
material: 'leather' | 'cloth' | 'metal'; | ||
} | ||
|
||
export type SkinFlag = 'ShowInWardrobe' | 'NoCost' | 'HideIfLocked' | 'OverrideRarity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters