Skip to content

Commit

Permalink
Add types for /v2/homestead/glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
darthmaim committed Aug 24, 2024
1 parent 2ef7d60 commit e770961
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/two-panthers-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gw2api/types": patch
---

Add types for `/v2/homestead/glyphs`
15 changes: 15 additions & 0 deletions packages/types/data/homestead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ export interface HomesteadDecorationCategory {
/** The name of the category */
name: string,
}

export interface HomesteadGlyph {
/** The glyph id */
id: string,

/** The corresponding glyph item id */
item_id: number,

/** The slot of this glyph */
slot: HomesteadGlyph.Slot,
}

export namespace HomesteadGlyph {
export type Slot = 'harvesting' | 'logging' | 'mining'
}
5 changes: 4 additions & 1 deletion packages/types/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { Createsubtoken } from './data/createsubtoken';
import type { Currency } from './data/currency';
import type { GuildUpgrade } from './data/guild';
import type { HomeCat, HomeNode } from './data/home';
import type { HomesteadDecoration, HomesteadDecorationCategory } from './data/homestead';
import type { HomesteadDecoration, HomesteadDecorationCategory, HomesteadGlyph } from './data/homestead';
import type { Item } from './data/item';
import type { Legendaryarmory } from './data/legendaryarmory';
import type { MaterialCategory } from './data/material';
Expand Down Expand Up @@ -149,6 +149,7 @@ export type KnownUnauthorizedEndpoint =
| '/v2/home/nodes'
| '/v2/homestead/decorations/categories'
| '/v2/homestead/decorations'
| '/v2/homestead/glyphs'
| '/v2/items'
| '/v2/itemstats'
| '/v2/jadebots'
Expand Down Expand Up @@ -230,6 +231,7 @@ export type KnownBulkExpandedEndpoint =
| '/v2/home/nodes'
| '/v2/homestead/decorations/categories'
| '/v2/homestead/decorations'
| '/v2/homestead/glyphs'
| '/v2/items'
| '/v2/itemstats'
| '/v2/legendaryarmory'
Expand Down Expand Up @@ -446,6 +448,7 @@ export type EndpointType<Url extends KnownEndpoint | (string & {}), Schema exten
Url extends BulkExpandedEndpointUrl<'/v2/home/nodes', string> ? BulkExpandedResponseType<'/v2/home/nodes', Url, string, HomeNode> :
Url extends BulkExpandedEndpointUrl<'/v2/homestead/decorations/categories', number> ? BulkExpandedResponseType<'/v2/homestead/decorations/categories', Url, number, HomesteadDecorationCategory> :
Url extends BulkExpandedEndpointUrl<'/v2/homestead/decorations', number> ? BulkExpandedResponseType<'/v2/homestead/decorations', Url, number, HomesteadDecoration> :
Url extends BulkExpandedEndpointUrl<'/v2/homestead/glyphs', string> ? BulkExpandedResponseType<'/v2/homestead/glyphs', Url, string, HomesteadGlyph> :
Url extends BulkExpandedEndpointUrl<'/v2/items', number> ? BulkExpandedResponseType<'/v2/items', Url, number, Item<Schema>> :
Url extends BulkExpandedEndpointUrl<'/v2/legendaryarmory', number> ? BulkExpandedResponseType<'/v2/legendaryarmory', Url, number, Legendaryarmory> :
Url extends BulkExpandedEndpointUrl<'/v2/materials', number> ? BulkExpandedResponseType<'/v2/materials', Url, number, MaterialCategory> :
Expand Down

0 comments on commit e770961

Please sign in to comment.