@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
89 lines (88 loc) • 3.66 kB
TypeScript
import { BaseSearchParameters, KeyBase, Locales, MediaAsset, NameId, NameIdKey, Resource, ResponseBase, SearchResponseWithoutResults } from "@blizzard-api/core";
//#region src/azerite-essence/types.d.ts
/**
* Interface for a response from the azerite essence index endpoint.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface AzeriteEssenceIndexResponse extends ResponseBase {
azerite_essences: Array<NameIdKey>;
}
/**
* Interface for a response from the azerite essence media endpoint.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface AzeriteEssenceMediaResponse extends ResponseBase {
assets: Array<MediaAsset>;
id: number;
}
/**
* Interface for a response from the azerite essence endpoint.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface AzeriteEssenceResponse extends NameId, ResponseBase {
allowed_specializations: Array<NameIdKey>;
media: Media;
powers: Array<Power>;
}
/**
* Interface for search parameters for azerite essences.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
*/
interface AzeriteEssenceSearchParameters extends BaseSearchParameters {
'allowed_specializations.id'?: number;
}
/**
* Interface for a response item from the azerite essence search endpoint.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
*/
interface AzeriteEssenceSearchResponse extends SearchResponseWithoutResults {
results: Array<AzeriteEssenceSearchResponseItem>;
}
interface AzeriteEssenceSearchResponseItem extends KeyBase {
data: {
allowed_specializations: Array<{
id: number;
name: Record<Locales, string>;
}>;
name: Record<Locales, string>;
};
}
interface Media extends KeyBase {
id: number;
}
interface Power {
id: number;
main_power_spell: NameIdKey;
passive_power_spell: NameIdKey;
rank: number;
}
//#endregion
//#region src/azerite-essence/index.d.ts
/**
* Get an azerite essence by ID.
* @param azeriteEssenceId The azerite essence ID.
* @returns The azerite essence. See {@link AzeriteEssenceResponse}.
*/
declare function azeriteEssence(azeriteEssenceId: number): Resource<AzeriteEssenceResponse>;
/**
* Get an azerite essence index.
* @returns The azerite essence index. See {@link AzeriteEssenceIndexResponse}.
*/
declare function azeriteEssenceIndex(): Resource<AzeriteEssenceIndexResponse>;
/**
* Get azerite essence media by ID.
* @param azeriteEssenceId The azerite essence ID.
* @returns The azerite essence media. See {@link AzeriteEssenceMediaResponse}.
*/
declare function azeriteEssenceMedia(azeriteEssenceId: number): Resource<AzeriteEssenceMediaResponse>;
/**
* Search for azerite essences.
* @param options The search parameters. See {@link AzeriteEssenceSearchParameters}.
* @returns The search results. See {@link AzeriteEssenceSearchResponse}.
*/
declare function azeriteEssenceSearch(options: AzeriteEssenceSearchParameters): Resource<AzeriteEssenceSearchResponse, AzeriteEssenceSearchParameters>;
//#endregion
export { AzeriteEssenceIndexResponse as a, AzeriteEssenceSearchParameters as c, azeriteEssenceSearch as i, AzeriteEssenceSearchResponse as l, azeriteEssenceIndex as n, AzeriteEssenceMediaResponse as o, azeriteEssenceMedia as r, AzeriteEssenceResponse as s, azeriteEssence as t };
//# sourceMappingURL=index-BCTRyOrp.d.ts.map