@blizzard-api/classic-wow
Version:
A series of helpers to interact with the World of Warcraft Classic Blizzard API
79 lines (78 loc) • 2.93 kB
TypeScript
import { BaseSearchParameters, Href, KeyBase, Locales, NameId, NameIdKey, Realm, ResponseBase, SearchResponseWithoutResults } from "@blizzard-api/core";
//#region src/realm/types.d.ts
/**
* The category of a realm.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
type RealmCategory = 'Brazil' | 'English' | 'French' | 'German' | 'Italian' | 'Latin America' | 'Oceanic' | 'PS' | 'Russian' | 'Spanish' | 'United States' | '한국';
/**
* The response for a realm index.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface RealmIndexResponse extends ResponseBase {
realms: Array<Realm>;
}
type RealmLocales = 'deDE' | 'enGB' | 'enUS' | 'esES' | 'esMX' | 'frFR' | 'itIT' | 'koKR' | 'ptBR' | 'ptPT' | 'ruRU' | 'zhCN' | 'zhTW';
/**
* The response for a realm.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface RealmResponse extends NameId, ResponseBase {
category: RealmCategory;
connected_realm: Href;
is_tournament: boolean;
locale: RealmLocales;
region: NameIdKey;
slug: string;
timezone: RealmTimezone;
type: {
name: string;
type: RealmTypeCapitalized;
};
}
/**
* The search parameters for realms.
* @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 RealmSearchParameters extends BaseSearchParameters {
timezone?: RealmTimezone;
}
/**
* The response for a realm search.
* @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 RealmSearchResponse extends SearchResponseWithoutResults {
results: Array<RealmSearchResponseItem>;
}
/**
* The timezone of a realm.
*/
type RealmTimezone = 'America/Chicago' | 'America/Denver' | 'America/Los_Angeles' | 'America/New_York' | 'America/Sao_Paulo' | 'Asia/Seoul' | 'Australia/Melbourne' | 'Europe/Paris';
type RealmTypeCapitalized = 'NORMAL' | 'PVP' | 'PVP_RP' | 'RP';
/**
* The type of a realm, capitalized and shortended).
*/
interface RealmSearchResponseItem extends KeyBase {
data: {
category: Record<Locales, string>;
id: number;
is_tournament: boolean;
locale: RealmLocales;
name: Record<Locales, string | undefined>;
region: {
id: number;
name: Record<Locales, string>;
};
slug: string;
timezone: RealmTimezone;
type: {
name: Record<Locales, string>;
type: RealmTypeCapitalized;
};
};
}
//#endregion
export { RealmSearchParameters as a, RealmTypeCapitalized as c, RealmResponse as i, RealmIndexResponse as n, RealmSearchResponse as o, RealmLocales as r, RealmTimezone as s, RealmCategory as t };
//# sourceMappingURL=types-gA98D5Xw.d.ts.map