UNPKG

guildwars2-ts

Version:

GuildWars 2 API Wrapper in Typescript

50 lines (49 loc) 2.49 kB
import { z } from 'zod'; /** * /v2/tokeninfo definition */ export declare const TokenInfoDTO: z.ZodObject<{ /** The first half of the API key that was requested. */ id: z.ZodString; /** The name given to the API key by the account owner. * NOTE: The value of this field is not escaped and may contain valid HTML, JavaScript, other code. */ name: z.ZodString; /** * Array of strings describing which permissions the API key has. The array can contain any of: * account - Grants access to the /v2/account endpoint (This permission is required for all API keys). * builds - Grants access to view each character's equipped specializations and gear. * characters - Grants access to the /v2/characters endpoint. * guilds - Grants access to guild info under the /v2/guild/:id/ sub-endpoints. * inventories - Grants access to inventories in the /v2/characters, /v2/account/bank, and /v2/account/materials endpoints. * progression - Grants access to achievements, dungeon unlock status, mastery point assignments, and general PvE progress. * pvp - Grants access to the /v2/pvp sub-endpoints. (i.e. /v2/pvp/games, /v2/pvp/stats) * tradingpost - Grants access to the /v2/commerce/transactions endpoint. * unlocks - Grants access to the /v2/account/skins and /v2/account/dyes endpoints. * wallet - Grants access to the /v2/account/wallet endpoint. * wvw - Grants access to the /v2/account/wvw endpoint. */ permissions: z.ZodArray<z.ZodEnum<{ account: "account"; progression: "progression"; wallet: "wallet"; wvw: "wvw"; characters: "characters"; pvp: "pvp"; guilds: "guilds"; unlocks: "unlocks"; builds: "builds"; inventories: "inventories"; tradingpost: "tradingpost"; }>>; /** The type of the access token given. */ type: z.ZodEnum<{ APIKey: "APIKey"; Subtoken: "Subtoken"; }>; /** If a subtoken is given, ISO8601 timestamp indicating when the given subtoken expires. */ expires_at: z.ZodOptional<z.ZodString>; /** If a subtoken is given, ISO8601 timestamp indicating when the given subtoken was created. */ issued_at: z.ZodOptional<z.ZodString>; /** If the given subtoken is restricted to a list of URLs, contains an array of strings describing what endpoints are available to this token. */ urls: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>;