diff --git a/.changeset/two-panthers-complain.md b/.changeset/two-panthers-complain.md new file mode 100644 index 0000000..cc33763 --- /dev/null +++ b/.changeset/two-panthers-complain.md @@ -0,0 +1,5 @@ +--- +"@gw2api/types": patch +--- + +Add types for `/v2/homestead/glyphs` diff --git a/packages/types/data/homestead.ts b/packages/types/data/homestead.ts index 918cffc..07799f1 100644 --- a/packages/types/data/homestead.ts +++ b/packages/types/data/homestead.ts @@ -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' +} diff --git a/packages/types/endpoints.ts b/packages/types/endpoints.ts index 969904f..5a26893 100644 --- a/packages/types/endpoints.ts +++ b/packages/types/endpoints.ts @@ -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'; @@ -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' @@ -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' @@ -446,6 +448,7 @@ export type EndpointType ? 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> : Url extends BulkExpandedEndpointUrl<'/v2/legendaryarmory', number> ? BulkExpandedResponseType<'/v2/legendaryarmory', Url, number, Legendaryarmory> : Url extends BulkExpandedEndpointUrl<'/v2/materials', number> ? BulkExpandedResponseType<'/v2/materials', Url, number, MaterialCategory> :