-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.d.ts
119 lines (102 loc) Β· 2.6 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
declare module "hearthstonejson-client" {
export type BuildNumber = number;
export type Build = BuildNumber | "latest";
export type Locale = string;
export default class HearthstoneJSON {
public readonly fallback: boolean;
get(build: Build, locale?: Locale): Promise<CardData[]>;
getLatest(locale?: Locale): Promise<CardData[]>;
}
export class MercenariesJSON {
public readonly fallback: boolean;
get(build: Build, locale?: Locale): Promise<MercenaryData[]>;
getLatest(locale?: Locale): Promise<MercenaryData[]>;
}
export interface CardData {
id?: string;
dbfId?: number;
// enums
rarity?: string;
faction?: string;
set?: string;
cardClass?: string;
type?: string;
races?: string[];
multiClassGroup?: string;
// localized
name?: string;
text?: string;
collectionText?: string;
flavor?: string;
howToEarn?: string;
howToEarnGolden?: string;
targetingArrowText?: string;
// additional
collectible?: boolean;
elite?: boolean;
cost?: number;
attack?: number;
health?: number;
durability?: number;
overload?: number;
spellDamage?: number;
armor?: number;
techLevel?: number;
isBattlegroundsPoolMinion?: boolean;
battlegroundsHero?: boolean;
battlegroundsSkinParentId?: number;
battlegroundsPremiumDbfId?: number;
battlegroundsNormalDbfId?: number;
battlegroundsDarkmoonPrizeTurn?: number;
isBattlegroundsBuddy?: boolean;
battlegroundsBuddyDbfId?: number;
mercenariesAbilityCooldown?: number;
mercenariesRole?: number;
hasDiamondSkin?: boolean;
hideStats?: boolean;
hideCost?: boolean;
isMiniSet?: boolean;
heroPowerDbfId?: number;
countAsCopyOfDbfId?: number;
runeCost?: { blood?: number; frost?: number; unholy?: number };
classes?: string[]; // enum
mechanics?: string[]; // enum
referencedTags?: string[]; // enum
artist?: string;
}
export interface EquipmentTier {
crafting_cost?: number;
dbf_id?: number;
tier?: number;
}
export interface EquipmentData {
id?: number;
tiers?: EquipmentTier[];
}
export interface AbilityTier {
crafting_cost?: number;
dbf_id?: number;
tier?: number;
}
export interface AbilityData {
id?: number;
name?: string | { [key: string]: string };
tiers?: AbilityTier[];
}
export interface SpecializationData {
id?: number;
name?: string | { [key: string]: string };
abilities?: AbilityData[];
}
export interface MercenaryData {
id?: number;
collectible?: boolean;
craftingCost?: number;
defaultSkinDbfId?: number;
equipment?: EquipmentData[];
name?: string;
shortName?: string;
skinDbfIds?: string[];
specializations?: SpecializationData[];
}
}