guildwars2-ts
Version:
GuildWars 2 API Wrapper in Typescript
585 lines (584 loc) • 23.3 kB
TypeScript
import { z } from 'zod';
/**
* /v2/items definition
*/
export declare const ItemsDTO: z.ZodArray<z.ZodObject<{
/** The item id. */
id: z.ZodNumber;
/** The chat link. */
chat_link: z.ZodString;
/** The item name. */
name: z.ZodString;
/** The full icon url. */
icon: z.ZodOptional<z.ZodString>;
/** The item description. */
description: z.ZodOptional<z.ZodString>;
/** The item type. */
type: z.ZodEnum<{
PowerCore: "PowerCore";
Consumable: "Consumable";
Armor: "Armor";
Back: "Back";
Bag: "Bag";
Container: "Container";
CraftingMaterial: "CraftingMaterial";
Gathering: "Gathering";
Gizmo: "Gizmo";
JadeTechModule: "JadeTechModule";
Key: "Key";
MiniPet: "MiniPet";
Tool: "Tool";
Trait: "Trait";
Trinket: "Trinket";
Trophy: "Trophy";
UpgradeComponent: "UpgradeComponent";
Weapon: "Weapon";
}>;
/** The item rarity. */
rarity: z.ZodEnum<{
Rare: "Rare";
Junk: "Junk";
Basic: "Basic";
Fine: "Fine";
Masterwork: "Masterwork";
Exotic: "Exotic";
Ascended: "Ascended";
Legendary: "Legendary";
}>;
/** The required level. */
level: z.ZodNumber;
/** The value in coins when selling to a vendor.
* Note: Can be non-zero even when the item has the NoSell flag. */
vendor_value: z.ZodNumber;
/** The default skin id. */
default_skin: z.ZodOptional<z.ZodNumber>;
/** Flags applying to the item. */
flags: z.ZodArray<z.ZodEnum<{
AccountBindOnUse: "AccountBindOnUse";
AccountBound: "AccountBound";
Attuned: "Attuned";
BulkConsume: "BulkConsume";
DeleteWarning: "DeleteWarning";
HideSuffix: "HideSuffix";
Infused: "Infused";
MonsterOnly: "MonsterOnly";
NoMysticForge: "NoMysticForge";
NoSalvage: "NoSalvage";
NoSell: "NoSell";
NotUpgradeable: "NotUpgradeable";
NoUnderwater: "NoUnderwater";
SoulbindOnAcquire: "SoulbindOnAcquire";
SoulBindOnUse: "SoulBindOnUse";
Tonic: "Tonic";
Unique: "Unique";
}>>;
/** The game types in which the item is usable.
* At least one game type is specified. */
game_types: z.ZodArray<z.ZodEnum<{
Pvp: "Pvp";
Activity: "Activity";
Dungeon: "Dungeon";
Pve: "Pve";
Wvw: "Wvw";
PvpLobby: "PvpLobby";
}>>;
/** Restrictions applied to the item. */
restrictions: z.ZodArray<z.ZodEnum<{
Asura: "Asura";
Charr: "Charr";
Human: "Human";
Norn: "Norn";
Sylvari: "Sylvari";
Female: "Female";
Elementalist: "Elementalist";
Engineer: "Engineer";
Guardian: "Guardian";
Mesmer: "Mesmer";
Necromancer: "Necromancer";
Ranger: "Ranger";
Thief: "Thief";
Warrior: "Warrior";
}>>;
/** Lists what items this item can be upgraded into, and the method of upgrading. */
upgrades_into: z.ZodOptional<z.ZodArray<z.ZodObject<{
/** Describes the method of upgrading. */
upgrade: z.ZodEnum<{
Attunement: "Attunement";
Infusion: "Infusion";
}>;
/** The item ID that results from performing the upgrade. */
item_id: z.ZodNumber;
}, z.core.$strict>>>;
/** Lists what items this item can be upgraded from, and the method of upgrading. */
upgrades_from: z.ZodOptional<z.ZodArray<z.ZodObject<{
/** Describes the method of upgrading. */
upgrade: z.ZodEnum<{
Attunement: "Attunement";
Infusion: "Infusion";
}>;
/** The item ID that results from performing the upgrade. */
item_id: z.ZodNumber;
}, z.core.$strict>>>;
/** Additional item details, if applicable. */
details: z.ZodUnion<readonly [z.ZodObject<{
/** The armor slot type. */
type: z.ZodEnum<{
HelmAquatic: "HelmAquatic";
Coat: "Coat";
Boots: "Boots";
Gloves: "Gloves";
Helm: "Helm";
Leggings: "Leggings";
Shoulders: "Shoulders";
}>;
/** The weight class of the armor piece. */
weight_class: z.ZodEnum<{
Heavy: "Heavy";
Medium: "Medium";
Light: "Light";
Clothing: "Clothing";
}>;
/** The defense value of the armor piece. */
defense: z.ZodNumber;
/** Infusion slots of the armor piece. */
infusion_slots: z.ZodArray<z.ZodObject<{
/**
* Infusion slot type of infusion upgrades.
* The array contains a maximum of one value
*/
flags: z.ZodArray<z.ZodEnum<{
Infusion: "Infusion";
Enrichment: "Enrichment";
}>>;
/**
* The infusion upgrade already in the armor piece.
*/
item_id: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>>;
/** The value used to calculate attributes. See /v2/itemstats. */
attribute_adjustments: z.ZodNumber;
/** The infix upgrade. */
infix_upgrade: z.ZodOptional<z.ZodObject<{
/** The itemstat id. Can be resolved against /v2/itemstats.
* The usual whitelist restrictions apply, and not all itemstats may be visible. */
id: z.ZodNumber;
/** List of attribute bonuses. */
attributes: z.ZodArray<z.ZodObject<{
/** Attribute this bonus applies to. */
attribute: z.ZodEnum<{
AgonyResistance: "AgonyResistance";
BoonDuration: "BoonDuration";
ConditionDamage: "ConditionDamage";
ConditionDuration: "ConditionDuration";
CritDamage: "CritDamage";
Healing: "Healing";
Power: "Power";
Precision: "Precision";
Toughness: "Toughness";
Vitality: "Vitality";
}>;
/** The modifier value. */
modifier: z.ZodNumber;
}, z.core.$strict>>;
/** Object containing an additional effect.
* This is used for Boon Duration, Condition Duration,
* or additional attribute bonuses for ascended trinkets or back items. */
buff: z.ZodOptional<z.ZodObject<{
/** The skill id of the effect. */
skill_id: z.ZodNumber;
/** The effect's description. */
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
/** Infusion slots of the back item. */
infusion_slots: z.ZodArray<z.ZodObject<{
/**
* Infusion slot type of infusion upgrades.
* The array contains a maximum of one value
*/
flags: z.ZodArray<z.ZodEnum<{
Infusion: "Infusion";
Enrichment: "Enrichment";
}>>;
/**
* The infusion upgrade already in the armor piece.
*/
item_id: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>>;
/** The value used to calculate attributes. See /v2/itemstats. */
attribute_adjustments: z.ZodOptional<z.ZodNumber>;
/** The infix upgrade. */
infix_upgrade: z.ZodOptional<z.ZodObject<{
/** The itemstat id. Can be resolved against /v2/itemstats.
* The usual whitelist restrictions apply, and not all itemstats may be visible. */
id: z.ZodNumber;
/** List of attribute bonuses. */
attributes: z.ZodArray<z.ZodObject<{
/** Attribute this bonus applies to. */
attribute: z.ZodEnum<{
AgonyResistance: "AgonyResistance";
BoonDuration: "BoonDuration";
ConditionDamage: "ConditionDamage";
ConditionDuration: "ConditionDuration";
CritDamage: "CritDamage";
Healing: "Healing";
Power: "Power";
Precision: "Precision";
Toughness: "Toughness";
Vitality: "Vitality";
}>;
/** The modifier value. */
modifier: z.ZodNumber;
}, z.core.$strict>>;
/** Object containing an additional effect.
* This is used for Boon Duration, Condition Duration,
* or additional attribute bonuses for ascended trinkets or back items. */
buff: z.ZodOptional<z.ZodObject<{
/** The skill id of the effect. */
skill_id: z.ZodNumber;
/** The effect's description. */
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>>;
/** The id of the item suffix. */
suffix_item_id: z.ZodOptional<z.ZodNumber>;
/** The secondary id of the item suffix. */
secondary_suffix_item_id: z.ZodString;
/** Selectable stat ids. Can be resolved by /v2/itemstats */
stat_choices: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
}, z.core.$strict>, z.ZodObject<{
/** The number of bag slots. */
size: z.ZodNumber;
/** Whether the bag is invisible or safe. */
no_sell_or_sort: z.ZodBoolean;
}, z.core.$strict>, z.ZodObject<{
/** Consumable type. */
type: z.ZodEnum<{
Currency: "Currency";
Unlock: "Unlock";
AppearanceChange: "AppearanceChange";
Booze: "Booze";
ContractNpc: "ContractNpc";
Food: "Food";
Generic: "Generic";
Halloween: "Halloween";
Immediate: "Immediate";
MountRandomUnlock: "MountRandomUnlock";
RandomUnlock: "RandomUnlock";
Transmutation: "Transmutation";
UpgradeRemoval: "UpgradeRemoval";
Utility: "Utility";
TeleportToFriend: "TeleportToFriend";
}>;
/** Effect description for consumables applying an effect. */
description: z.ZodOptional<z.ZodString>;
/** Effect duration, in milliseconds. */
duration_ms: z.ZodOptional<z.ZodNumber>;
/** Unlock type for unlock consumables */
unlock_type: z.ZodOptional<z.ZodEnum<{
Minipet: "Minipet";
RandomUnlock: "RandomUnlock";
BagSlot: "BagSlot";
BankTab: "BankTab";
Champion: "Champion";
CollectibleCapacity: "CollectibleCapacity";
Content: "Content";
CraftingRecipe: "CraftingRecipe";
Dye: "Dye";
GliderSkin: "GliderSkin";
Ms: "Ms";
Outfit: "Outfit";
SharedSlot: "SharedSlot";
}>>;
/** The dye id for dye unlocks. */
color_id: z.ZodOptional<z.ZodNumber>;
/** The recipe id for recipe unlocks. */
recipe_id: z.ZodOptional<z.ZodNumber>;
/** Additional recipe ids for recipe unlocks */
extra_recipe_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
/** The guild upgrade id for the item. Can be resolved by /v2/guild/upgrades. */
guild_upgrade_id: z.ZodOptional<z.ZodNumber>;
/** The number of stacks of the effect applied by this item. */
apply_count: z.ZodOptional<z.ZodNumber>;
/** The effect type name of the consumable. */
name: z.ZodOptional<z.ZodString>;
/** The icon of the effect. */
icon: z.ZodOptional<z.ZodString>;
/** A list of skin ids which this item unlocks. Can be resolved by /v2/skins. */
skins: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
}, z.core.$strict>, z.ZodObject<{
/** Container type. */
type: z.ZodEnum<{
Default: "Default";
Immediate: "Immediate";
GiftBox: "GiftBox";
OpenUI: "OpenUI";
}>;
}, z.core.$strict>, z.ZodObject<{
/** Gathering utility type. */
type: z.ZodEnum<{
Foraging: "Foraging";
Logging: "Logging";
Mining: "Mining";
Bait: "Bait";
Lure: "Lure";
}>;
}, z.core.$strict>, z.ZodObject<{
/** Gizmo type. */
type: z.ZodEnum<{
Default: "Default";
ContainerKey: "ContainerKey";
RentableContractNpc: "RentableContractNpc";
UnlimitedConsumable: "UnlimitedConsumable";
}>;
/** The id of the guild decoration, which can be deposited. Can be resolved by /v2/guild/upgrades. */
guild_upgrade_id: z.ZodOptional<z.ZodNumber>;
/** Vendor ids of the gizmo. */
vendor_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
}, z.core.$strict>, z.ZodObject<{
/** The miniature this item unlocks. Can be resolved by /v2/minis. */
minipet_id: z.ZodNumber;
}, z.core.$strict>, z.ZodObject<{
/** The tool type. Always the same value. */
type: z.ZodLiteral<"Salvage">;
/** Number of charges. */
charges: z.ZodNumber;
}, z.core.$strict>, z.ZodObject<{
/** The trinket type. */
type: z.ZodEnum<{
Amulet: "Amulet";
Accessory: "Accessory";
Ring: "Ring";
}>;
/** Infusion slots of the trinket. */
infusion_slots: z.ZodArray<z.ZodObject<{
/**
* Infusion slot type of infusion upgrades.
* The array contains a maximum of one value
*/
flags: z.ZodArray<z.ZodEnum<{
Infusion: "Infusion";
Enrichment: "Enrichment";
}>>;
/**
* The infusion upgrade already in the armor piece.
*/
item_id: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>>;
/** The value used to calculate attributes. See /v2/itemstats */
attribute_adjustments: z.ZodNumber;
/** The infix upgrade. */
infix_upgrade: z.ZodOptional<z.ZodObject<{
/** The itemstat id. Can be resolved against /v2/itemstats.
* The usual whitelist restrictions apply, and not all itemstats may be visible. */
id: z.ZodNumber;
/** List of attribute bonuses. */
attributes: z.ZodArray<z.ZodObject<{
/** Attribute this bonus applies to. */
attribute: z.ZodEnum<{
AgonyResistance: "AgonyResistance";
BoonDuration: "BoonDuration";
ConditionDamage: "ConditionDamage";
ConditionDuration: "ConditionDuration";
CritDamage: "CritDamage";
Healing: "Healing";
Power: "Power";
Precision: "Precision";
Toughness: "Toughness";
Vitality: "Vitality";
}>;
/** The modifier value. */
modifier: z.ZodNumber;
}, z.core.$strict>>;
/** Object containing an additional effect.
* This is used for Boon Duration, Condition Duration,
* or additional attribute bonuses for ascended trinkets or back items. */
buff: z.ZodOptional<z.ZodObject<{
/** The skill id of the effect. */
skill_id: z.ZodNumber;
/** The effect's description. */
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>>;
/** The id of the item suffix. */
suffix_item_id: z.ZodOptional<z.ZodNumber>;
/** The secondary id of the item suffix. */
secondary_suffix_item_id: z.ZodString;
/** Selectable stat ids. Can be resolved by /v2/itemstats */
stat_choices: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
}, z.core.$strict>, z.ZodUndefined, z.ZodObject<{
/** The upgrade component type. */
type: z.ZodEnum<{
Default: "Default";
Gem: "Gem";
Rune: "Rune";
Sigil: "Sigil";
}>;
/** The items that can be upgraded with the upgrade component. */
flags: z.ZodArray<z.ZodEnum<{
Axe: "Axe";
Trinket: "Trinket";
Dagger: "Dagger";
Focus: "Focus";
Greatsword: "Greatsword";
Hammer: "Hammer";
Harpoon: "Harpoon";
LongBow: "LongBow";
Mace: "Mace";
Pistol: "Pistol";
Rifle: "Rifle";
Scepter: "Scepter";
Shield: "Shield";
ShortBow: "ShortBow";
Speargun: "Speargun";
Staff: "Staff";
Sword: "Sword";
Torch: "Torch";
Trident: "Trident";
Warhorn: "Warhorn";
HeavyArmor: "HeavyArmor";
MediumArmor: "MediumArmor";
LightArmor: "LightArmor";
}>>;
/** Applicable infusion slot for infusion upgrades. */
infusion_upgrade_flags: z.ZodArray<z.ZodEnum<{
Infusion: "Infusion";
Enrichment: "Enrichment";
}>>;
/** The suffix appended to the item name when the component is applied. */
suffix: z.ZodOptional<z.ZodString>;
/** The infix upgrade object. */
infix_upgrade: z.ZodObject<{
/** The itemstat id. Can be resolved against /v2/itemstats.
* The usual whitelist restrictions apply, and not all itemstats may be visible. */
id: z.ZodNumber;
/** List of attribute bonuses. */
attributes: z.ZodArray<z.ZodObject<{
/** Attribute this bonus applies to. */
attribute: z.ZodEnum<{
AgonyResistance: "AgonyResistance";
BoonDuration: "BoonDuration";
ConditionDamage: "ConditionDamage";
ConditionDuration: "ConditionDuration";
CritDamage: "CritDamage";
Healing: "Healing";
Power: "Power";
Precision: "Precision";
Toughness: "Toughness";
Vitality: "Vitality";
}>;
/** The modifier value. */
modifier: z.ZodNumber;
}, z.core.$strict>>;
/** Object containing an additional effect.
* This is used for Boon Duration, Condition Duration,
* or additional attribute bonuses for ascended trinkets or back items. */
buff: z.ZodOptional<z.ZodObject<{
/** The skill id of the effect. */
skill_id: z.ZodNumber;
/** The effect's description. */
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>;
/** The bonuses from runes. */
bonuses: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strict>, z.ZodObject<{
/** The weapon type. */
type: z.ZodEnum<{
Axe: "Axe";
Dagger: "Dagger";
Focus: "Focus";
Greatsword: "Greatsword";
Hammer: "Hammer";
Harpoon: "Harpoon";
LongBow: "LongBow";
Mace: "Mace";
Pistol: "Pistol";
Rifle: "Rifle";
Scepter: "Scepter";
Shield: "Shield";
ShortBow: "ShortBow";
Speargun: "Speargun";
Staff: "Staff";
Sword: "Sword";
Torch: "Torch";
Trident: "Trident";
Warhorn: "Warhorn";
LargeBundle: "LargeBundle";
SmallBundle: "SmallBundle";
Toy: "Toy";
ToyTwoHanded: "ToyTwoHanded";
}>;
/** The damage type. */
damage_type: z.ZodEnum<{
Fire: "Fire";
Ice: "Ice";
Lightning: "Lightning";
Physical: "Physical";
Choking: "Choking";
}>;
/** Minimum weapon power. */
min_power: z.ZodNumber;
/** Maximum weapon power; */
max_power: z.ZodNumber;
/** The defense value of the weapon. */
defense: z.ZodNumber;
/** Infusion slots of the trinket. */
infusion_slots: z.ZodArray<z.ZodObject<{
/**
* Infusion slot type of infusion upgrades.
* The array contains a maximum of one value
*/
flags: z.ZodArray<z.ZodEnum<{
Infusion: "Infusion";
Enrichment: "Enrichment";
}>>;
/**
* The infusion upgrade already in the armor piece.
*/
item_id: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>>;
/** The value used to calculate attributes. See /v2/itemstats. */
attribute_adjustment: z.ZodNumber;
/** The infix upgrade. */
infix_upgrade: z.ZodOptional<z.ZodObject<{
/** The itemstat id. Can be resolved against /v2/itemstats.
* The usual whitelist restrictions apply, and not all itemstats may be visible. */
id: z.ZodNumber;
/** List of attribute bonuses. */
attributes: z.ZodArray<z.ZodObject<{
/** Attribute this bonus applies to. */
attribute: z.ZodEnum<{
AgonyResistance: "AgonyResistance";
BoonDuration: "BoonDuration";
ConditionDamage: "ConditionDamage";
ConditionDuration: "ConditionDuration";
CritDamage: "CritDamage";
Healing: "Healing";
Power: "Power";
Precision: "Precision";
Toughness: "Toughness";
Vitality: "Vitality";
}>;
/** The modifier value. */
modifier: z.ZodNumber;
}, z.core.$strict>>;
/** Object containing an additional effect.
* This is used for Boon Duration, Condition Duration,
* or additional attribute bonuses for ascended trinkets or back items. */
buff: z.ZodOptional<z.ZodObject<{
/** The skill id of the effect. */
skill_id: z.ZodNumber;
/** The effect's description. */
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>>;
/** The id of the item suffix. */
suffix_item_id: z.ZodOptional<z.ZodNumber>;
/** The secondary id of the item suffix. */
secondary_suffix_item_id: z.ZodString;
/** Selectable stat ids. Can be resolved by /v2/itemstats */
stat_choices: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
}, z.core.$strict>]>;
}, z.core.$strict>>;