Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update API types #55

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gw2-ui/src/gw2api/types/common/fact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ interface GW2ApiFactBase {
export interface GW2ApiFactAttributeAdjust extends GW2ApiFactBase {
type: 'AttributeAdjust';
value?: number;
target: GW2ApiAttribute | 'None'; // TODO: why does the API return None sometimes?
hit_count?: number;
target?: GW2ApiAttribute | 'None'; // TODO: why does the API return None sometimes?
}

export interface GW2ApiFactBuff extends GW2ApiFactBase {
Expand Down
3 changes: 2 additions & 1 deletion gw2-ui/src/gw2api/types/items/details/consumable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ type GW2ApiUnlockType =
| 'SharedSlot'
| 'GearLoadoutTab'
| 'BuildLibrarySlot'
| 'BuildLoadoutTab';
| 'BuildLoadoutTab'
| 'JadeBotSkin';

interface GW2ApiConsumableDetails {
type: GW2ApiConsumableType;
Expand Down
2 changes: 1 addition & 1 deletion gw2-ui/src/gw2api/types/items/details/gatheringTool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
interface GW2ApiGatheringToolDetails {
type: 'Foraging' | 'Logging' | 'Mining' | 'Foo';
type: 'Foraging' | 'Logging' | 'Mining' | 'Foo' | 'Bait' | 'Lure';
}

export default GW2ApiGatheringToolDetails;
7 changes: 6 additions & 1 deletion gw2-ui/src/gw2api/types/items/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ export interface GW2ApiItemUpgradeComponent extends GW2ApiItemBase {
type: 'UpgradeComponent';
details: WrapInUndefined<GW2ApiUpgradeComponentDetails>;
}
export interface GW2ApiItemRelic extends GW2ApiItemBase {
type: 'Relic';
details?: undefined;
}
export interface GW2ApiItemWeapon extends GW2ApiItemBase {
type: 'Weapon';
details: WrapInUndefined<GW2ApiWeaponDetails>;
}

export interface GW2ApiItemJadeBot extends GW2ApiItemBase {
type: 'Quux' | 'Qux'; // Don't ask
type: 'JadeTechModule' | 'PowerCore';
details?: undefined;
}

Expand All @@ -187,6 +191,7 @@ type GW2ApiItem =
| GW2ApiItemTrinket
| GW2ApiItemTrophy
| GW2ApiItemUpgradeComponent
| GW2ApiItemRelic
| GW2ApiItemWeapon
| GW2ApiItemJadeBot;
export default GW2ApiItem;