@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
192 lines (191 loc) • 8.03 kB
TypeScript
import { Faction, Gender, Href, KeyBase, NameId, NameIdKey, ProtectedResource, Realm } from "@blizzard-api/core";
//#region src/account-profile/types.d.ts
interface AccountCollectionsIndexResponse {
_links: Links;
heirlooms: Href;
mounts: Href;
pets: Href;
toys: Href;
transmogs: Href;
}
interface AccountHeirloomsCollectionSummaryResponse {
_links: Links;
heirlooms: Array<Heirloom>;
}
interface AccountMountsCollectionSummaryResponse {
_links: Links;
mounts: Array<Mount>;
}
interface AccountPetsCollectionSummaryResponse {
_links: Links;
pets: Array<Pet>;
unlocked_battle_pet_slots: number;
}
interface AccountProfileSummaryResponse {
_links: Links;
collections: Href;
id: number;
wow_accounts?: Array<WowAccount>;
}
interface AccountToysCollectionSummaryResponse {
_links: Links;
toys: Array<Toy>;
}
interface AccountTransmogsCollectionSummaryResponse {
_links: Links;
appearance_sets: Array<NameIdKey>;
slots: Array<Slot>;
}
interface ProtectedCharacterProfileSummaryResponse {
_links: Links;
bind_position: Position;
character: Realm;
id: number;
money: number;
name: string;
position: Position;
protected_stats: ProtectedStats;
wow_account: number;
}
interface Character$1 {
character: Href;
faction: Faction;
gender: Gender;
id: number;
level: number;
name: string;
playable_class: NameIdKey;
playable_race: NameIdKey;
protected_character: Href;
realm: Realm;
}
interface Heirloom {
heirloom: NameIdKey;
upgrade: {
level: number;
};
}
interface Links {
profile: Href;
self: Href;
user: Href;
}
interface Mount {
is_favorite?: boolean;
mount: NameIdKey;
}
interface Pet {
active_slot?: number;
creature_display?: KeyBase & {
id: number;
};
id: number;
is_active?: boolean;
is_favorite?: boolean;
level: number;
name?: string;
quality: Quality;
species: NameIdKey;
stats: Stats;
}
interface Position {
facing: number;
map: NameId;
x: number;
y: number;
z: number;
zone: NameId;
}
interface ProtectedStats {
level_gold_gained: number;
level_gold_lost: number;
level_item_value_gained: number;
level_number_deaths: number;
total_gold_gained: number;
total_gold_lost: number;
total_item_value_gained: number;
total_number_deaths: number;
}
interface Quality {
name: string;
type: 'COMMON' | 'POOR' | 'RARE' | 'UNCOMMON';
}
interface Slot {
appearances: Array<KeyBase & {
id: number;
}>;
slot: Slot;
}
interface Slot {
name: string;
type: string;
}
interface Stats {
breed_id: number;
health: number;
power: number;
speed: number;
}
interface Toy {
is_favorite?: boolean;
toy: NameIdKey;
}
interface WowAccount {
characters: Array<Character$1>;
id: number;
}
//#endregion
//#region src/account-profile/index.d.ts
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns an index of collection types for an account.
*/
declare function accountCollectionsIndex(token: string): ProtectedResource<AccountCollectionsIndexResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the heirlooms an account has obtained.
*/
declare function accountHeirloomsCollectionSummary(token: string): ProtectedResource<AccountHeirloomsCollectionSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the mounts an account has obtained.
*/
declare function accountMountsCollectionSummary(token: string): ProtectedResource<AccountMountsCollectionSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the battle pets an account has obtained.
*/
declare function accountPetsCollectionSummary(token: string): ProtectedResource<AccountPetsCollectionSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a profile summary for an account.
*/
declare function accountProfileSummary(token: string): ProtectedResource<AccountProfileSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the toys an account has obtained.
*/
declare function accountToysCollectionSummary(token: string): ProtectedResource<AccountToysCollectionSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the transmog unlocks an account has obtained.
*/
declare function accountTransmogsCollectionSummary(token: string): ProtectedResource<AccountTransmogsCollectionSummaryResponse>;
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param realmId The realm ID.
* @param characterId The character ID.
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a protected profile summary for a character.
*/
declare function protectedCharacterProfileSummary(realmId: number, characterId: number, token: string): ProtectedResource<ProtectedCharacterProfileSummaryResponse>;
//#endregion
export { accountProfileSummary as a, protectedCharacterProfileSummary as c, AccountMountsCollectionSummaryResponse as d, AccountPetsCollectionSummaryResponse as f, ProtectedCharacterProfileSummaryResponse as g, AccountTransmogsCollectionSummaryResponse as h, accountPetsCollectionSummary as i, AccountCollectionsIndexResponse as l, AccountToysCollectionSummaryResponse as m, accountHeirloomsCollectionSummary as n, accountToysCollectionSummary as o, AccountProfileSummaryResponse as p, accountMountsCollectionSummary as r, accountTransmogsCollectionSummary as s, accountCollectionsIndex as t, AccountHeirloomsCollectionSummaryResponse as u };
//# sourceMappingURL=index-BFxvElZH.d.ts.map