@blizzard-api/classic-wow 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +362 -355
- package/dist/index.js +43 -43
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,16 +3,24 @@ import { BlizzardNamespaces, Resource, Locales, BaseSearchParameters, SearchResp
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* A record containing the RGBA values of a color.
|
|
8
|
+
*/
|
|
9
|
+
interface Color {
|
|
10
|
+
a: number;
|
|
11
|
+
b: number;
|
|
12
|
+
g: number;
|
|
13
|
+
r: number;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
16
|
+
* The playable gender names/descriptions in World of Warcraft.
|
|
11
17
|
*/
|
|
12
|
-
interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
interface GenderName {
|
|
19
|
+
female: string;
|
|
20
|
+
male: string;
|
|
21
|
+
}
|
|
22
|
+
interface Href {
|
|
23
|
+
href: string;
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* Base record interface containing key.href property that often appear in Blizzard API responses.
|
|
@@ -20,6 +28,14 @@ interface ResponseBase {
|
|
|
20
28
|
interface KeyBase {
|
|
21
29
|
key: Href;
|
|
22
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The media asset associated with a character or entity in World of Warcraft.
|
|
33
|
+
*/
|
|
34
|
+
interface MediaAsset$1 {
|
|
35
|
+
file_data_id: number;
|
|
36
|
+
key: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}
|
|
23
39
|
/**
|
|
24
40
|
* Base record interface containing name and id properties that often appear together in Blizzard API responses.
|
|
25
41
|
*/
|
|
@@ -33,28 +49,12 @@ interface NameId {
|
|
|
33
49
|
interface NameIdKey extends KeyBase, NameId {
|
|
34
50
|
}
|
|
35
51
|
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
interface Color {
|
|
39
|
-
a: number;
|
|
40
|
-
b: number;
|
|
41
|
-
g: number;
|
|
42
|
-
r: number;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The media asset associated with a character or entity in World of Warcraft.
|
|
46
|
-
*/
|
|
47
|
-
interface MediaAsset$1 {
|
|
48
|
-
file_data_id: number;
|
|
49
|
-
key: string;
|
|
50
|
-
value: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The playable gender names/descriptions in World of Warcraft.
|
|
52
|
+
* Base interface for Blizzard API responses.
|
|
54
53
|
*/
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
interface ResponseBase {
|
|
55
|
+
_links: {
|
|
56
|
+
self: Href;
|
|
57
|
+
};
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* The playable factions in World of Warcraft.
|
|
@@ -80,7 +80,7 @@ interface Realm$1 extends NameIdKey {
|
|
|
80
80
|
interface AuctionHouseIndexResponse extends ResponseBase {
|
|
81
81
|
auctions: Array<NameIdKey>;
|
|
82
82
|
}
|
|
83
|
-
interface AuctionsResponse extends
|
|
83
|
+
interface AuctionsResponse extends NameId, ResponseBase {
|
|
84
84
|
auctions: Array<Auction>;
|
|
85
85
|
connected_realm: {
|
|
86
86
|
href: string;
|
|
@@ -105,7 +105,7 @@ interface Auction {
|
|
|
105
105
|
* @param connectedRealmId The ID of the connected realm.
|
|
106
106
|
* @returns The auction house index. See {@link AuctionHouseIndexResponse}.
|
|
107
107
|
*/
|
|
108
|
-
declare function auctionHouseIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
108
|
+
declare function auctionHouseIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, connectedRealmId: number): Resource<AuctionHouseIndexResponse>;
|
|
109
109
|
/**
|
|
110
110
|
* Returns all active auctions for a specific auction house on a connected realm.
|
|
111
111
|
*
|
|
@@ -117,26 +117,13 @@ declare function auctionHouseIndex(namespace: Extract<BlizzardNamespaces, 'dynam
|
|
|
117
117
|
* @param auctionHouseId The ID of the auction house.
|
|
118
118
|
* @returns The auction house data. See {@link AuctionsResponse}.
|
|
119
119
|
*/
|
|
120
|
-
declare function auctions(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
120
|
+
declare function auctions(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, connectedRealmId: number, auctionHouseId: number): Resource<AuctionsResponse>;
|
|
121
121
|
|
|
122
|
-
type WithoutUnderscore<T extends string> = T extends `${infer Prefix}_${infer Suffix}` ? `${Prefix}${Suffix}` : never;
|
|
123
122
|
/**
|
|
124
123
|
* The category of a realm.
|
|
125
124
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
126
125
|
*/
|
|
127
126
|
type RealmCategory = 'Brazil' | 'English' | 'French' | 'German' | 'Italian' | 'Latin America' | 'Oceanic' | 'PS' | 'Russian' | 'Spanish' | 'United States' | '한국';
|
|
128
|
-
/**
|
|
129
|
-
* The timezone of a realm.
|
|
130
|
-
*/
|
|
131
|
-
type RealmTimezone = 'America/Chicago' | 'America/Denver' | 'America/Los_Angeles' | 'America/New_York' | 'America/Sao_Paulo' | 'Asia/Seoul' | 'Australia/Melbourne' | 'Europe/Paris';
|
|
132
|
-
/**
|
|
133
|
-
* The type of a realm, capitalized and shortended).
|
|
134
|
-
*/
|
|
135
|
-
type RealmTypeCapitalized = 'NORMAL' | 'RP';
|
|
136
|
-
/**
|
|
137
|
-
* The type of a realm, not capitalized or shortened.
|
|
138
|
-
*/
|
|
139
|
-
type RealmType = 'Normal' | 'Roleplaying';
|
|
140
127
|
/**
|
|
141
128
|
* The response for a realm index.
|
|
142
129
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -148,7 +135,7 @@ interface RealmIndexResponse extends ResponseBase {
|
|
|
148
135
|
* The response for a realm.
|
|
149
136
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
150
137
|
*/
|
|
151
|
-
interface RealmResponse extends
|
|
138
|
+
interface RealmResponse extends NameId, ResponseBase {
|
|
152
139
|
category: RealmCategory;
|
|
153
140
|
connected_realm: {
|
|
154
141
|
href: string;
|
|
@@ -195,10 +182,20 @@ interface RealmSearchResponseItem extends KeyBase {
|
|
|
195
182
|
};
|
|
196
183
|
};
|
|
197
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* The timezone of a realm.
|
|
187
|
+
*/
|
|
188
|
+
type RealmTimezone = 'America/Chicago' | 'America/Denver' | 'America/Los_Angeles' | 'America/New_York' | 'America/Sao_Paulo' | 'Asia/Seoul' | 'Australia/Melbourne' | 'Europe/Paris';
|
|
189
|
+
/**
|
|
190
|
+
* The type of a realm, not capitalized or shortened.
|
|
191
|
+
*/
|
|
192
|
+
type RealmType = 'Normal' | 'Roleplaying';
|
|
193
|
+
/**
|
|
194
|
+
* The type of a realm, capitalized and shortended).
|
|
195
|
+
*/
|
|
196
|
+
type RealmTypeCapitalized = 'NORMAL' | 'RP';
|
|
197
|
+
type WithoutUnderscore<T extends string> = T extends `${infer Prefix}_${infer Suffix}` ? `${Prefix}${Suffix}` : never;
|
|
198
198
|
|
|
199
|
-
type RealmPopulation = 'Full' | 'High' | 'Low' | 'Medium' | 'New Players';
|
|
200
|
-
type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED';
|
|
201
|
-
type RealmStatus = 'Down' | 'Up';
|
|
202
199
|
/**
|
|
203
200
|
* Connected Realm Index API response.
|
|
204
201
|
* @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis
|
|
@@ -208,27 +205,6 @@ interface ConnectedRealmIndexResponse extends ResponseBase {
|
|
|
208
205
|
href: string;
|
|
209
206
|
}>;
|
|
210
207
|
}
|
|
211
|
-
interface Realm {
|
|
212
|
-
category: RealmCategory;
|
|
213
|
-
connected_realm: {
|
|
214
|
-
href: string;
|
|
215
|
-
};
|
|
216
|
-
id: number;
|
|
217
|
-
is_tournament: boolean;
|
|
218
|
-
locale: WithoutUnderscore<Locales>;
|
|
219
|
-
name: string;
|
|
220
|
-
region: NameIdKey;
|
|
221
|
-
slug: string;
|
|
222
|
-
timezone: RealmTimezone;
|
|
223
|
-
type: {
|
|
224
|
-
name: RealmType;
|
|
225
|
-
type: RealmTypeCapitalized;
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
interface RealmLockedStatus {
|
|
229
|
-
is_locked_for_new_characters: boolean;
|
|
230
|
-
is_locked_for_pct: boolean;
|
|
231
|
-
}
|
|
232
208
|
/**
|
|
233
209
|
* Connected Realm API response.
|
|
234
210
|
* @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis
|
|
@@ -262,6 +238,44 @@ interface ConnectedRealmSearchParameters extends BaseSearchParameters {
|
|
|
262
238
|
'realms.timezone'?: RealmTimezone;
|
|
263
239
|
'status.type'?: Uppercase<RealmStatus>;
|
|
264
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Connected Realm Search API response item.
|
|
243
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
244
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
|
|
245
|
+
*/
|
|
246
|
+
interface ConnectedRealmSearchResponseItem extends KeyBase {
|
|
247
|
+
data: {
|
|
248
|
+
has_queue: boolean;
|
|
249
|
+
id: number;
|
|
250
|
+
population: SearchRealmPopulation;
|
|
251
|
+
realms: Array<SearchRealm>;
|
|
252
|
+
status: SearchRealmStatus;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
interface Realm {
|
|
256
|
+
category: RealmCategory;
|
|
257
|
+
connected_realm: {
|
|
258
|
+
href: string;
|
|
259
|
+
};
|
|
260
|
+
id: number;
|
|
261
|
+
is_tournament: boolean;
|
|
262
|
+
locale: WithoutUnderscore<Locales>;
|
|
263
|
+
name: string;
|
|
264
|
+
region: NameIdKey;
|
|
265
|
+
slug: string;
|
|
266
|
+
timezone: RealmTimezone;
|
|
267
|
+
type: {
|
|
268
|
+
name: RealmType;
|
|
269
|
+
type: RealmTypeCapitalized;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
interface RealmLockedStatus {
|
|
273
|
+
is_locked_for_new_characters: boolean;
|
|
274
|
+
is_locked_for_pct: boolean;
|
|
275
|
+
}
|
|
276
|
+
type RealmPopulation = 'Full' | 'High' | 'Low' | 'Medium' | 'New Players';
|
|
277
|
+
type RealmPopulationCapitalized = 'FULL' | 'HIGH' | 'LOW' | 'MEDIUM' | 'RECOMMENDED';
|
|
278
|
+
type RealmStatus = 'Down' | 'Up';
|
|
265
279
|
interface SearchRealm {
|
|
266
280
|
category: Record<Locales, string | undefined>;
|
|
267
281
|
id: number;
|
|
@@ -279,65 +293,36 @@ interface SearchRealm {
|
|
|
279
293
|
type: RealmTypeCapitalized;
|
|
280
294
|
};
|
|
281
295
|
}
|
|
282
|
-
interface SearchRealmStatus {
|
|
283
|
-
name: Record<Locales, string>;
|
|
284
|
-
type: Uppercase<RealmStatus>;
|
|
285
|
-
}
|
|
286
296
|
interface SearchRealmPopulation {
|
|
287
297
|
name: Record<Locales, string>;
|
|
288
298
|
type: RealmPopulationCapitalized;
|
|
289
299
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
|
|
294
|
-
*/
|
|
295
|
-
interface ConnectedRealmSearchResponseItem extends KeyBase {
|
|
296
|
-
data: {
|
|
297
|
-
has_queue: boolean;
|
|
298
|
-
id: number;
|
|
299
|
-
population: SearchRealmPopulation;
|
|
300
|
-
realms: Array<SearchRealm>;
|
|
301
|
-
status: SearchRealmStatus;
|
|
302
|
-
};
|
|
300
|
+
interface SearchRealmStatus {
|
|
301
|
+
name: Record<Locales, string>;
|
|
302
|
+
type: Uppercase<RealmStatus>;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
/**
|
|
306
|
-
* Returns an index of connected realms.
|
|
307
|
-
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
308
|
-
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
|
|
309
|
-
*/
|
|
310
|
-
declare function connectedRealmIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>): Resource<ConnectedRealmIndexResponse>;
|
|
311
305
|
/**
|
|
312
306
|
* Returns a connected realm by ID.
|
|
313
307
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
314
308
|
* @param connectedRealmId The connected realm ID.
|
|
315
309
|
* @returns The connected realm. See {@link ConnectedRealmResponse}.
|
|
316
310
|
*/
|
|
317
|
-
declare function connectedRealm(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
311
|
+
declare function connectedRealm(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, connectedRealmId: number): Resource<ConnectedRealmResponse>;
|
|
312
|
+
/**
|
|
313
|
+
* Returns an index of connected realms.
|
|
314
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
315
|
+
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
|
|
316
|
+
*/
|
|
317
|
+
declare function connectedRealmIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>): Resource<ConnectedRealmIndexResponse>;
|
|
318
318
|
/**
|
|
319
319
|
* Performs a search of connected realms.
|
|
320
320
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
321
321
|
* @param options The search parameters. See {@link ConnectedRealmSearchParameters}.
|
|
322
322
|
* @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}.
|
|
323
323
|
*/
|
|
324
|
-
declare function connectedRealmSearch(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
324
|
+
declare function connectedRealmSearch(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, options: ConnectedRealmSearchParameters): Resource<SearchResponse<ConnectedRealmSearchResponseItem>, ConnectedRealmSearchParameters>;
|
|
325
325
|
|
|
326
|
-
/**
|
|
327
|
-
* The response for a creature.
|
|
328
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
329
|
-
*/
|
|
330
|
-
interface CreatureResponse extends ResponseBase {
|
|
331
|
-
creature_displays: Array<CreatureDisplay>;
|
|
332
|
-
family: NameIdKey;
|
|
333
|
-
id: number;
|
|
334
|
-
is_tameable: boolean;
|
|
335
|
-
name: string;
|
|
336
|
-
type: NameIdKey;
|
|
337
|
-
}
|
|
338
|
-
interface CreatureDisplay extends KeyBase {
|
|
339
|
-
id: number;
|
|
340
|
-
}
|
|
341
326
|
/**
|
|
342
327
|
* The response for creature display media.
|
|
343
328
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -346,10 +331,6 @@ interface CreatureDisplayMediaResponse extends ResponseBase {
|
|
|
346
331
|
assets: Array<DisplayMediaAsset>;
|
|
347
332
|
id: number;
|
|
348
333
|
}
|
|
349
|
-
interface DisplayMediaAsset {
|
|
350
|
-
key: string;
|
|
351
|
-
value: string;
|
|
352
|
-
}
|
|
353
334
|
/**
|
|
354
335
|
* The response for a creature family index.
|
|
355
336
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -357,19 +338,6 @@ interface DisplayMediaAsset {
|
|
|
357
338
|
interface CreatureFamilyIndexResponse extends ResponseBase {
|
|
358
339
|
creature_families: Array<NameIdKey>;
|
|
359
340
|
}
|
|
360
|
-
/**
|
|
361
|
-
* The response for a creature family.
|
|
362
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
363
|
-
*/
|
|
364
|
-
interface CreatureFamilyResponse extends ResponseBase {
|
|
365
|
-
id: number;
|
|
366
|
-
media: Media$3;
|
|
367
|
-
name: string;
|
|
368
|
-
specialization: NameIdKey;
|
|
369
|
-
}
|
|
370
|
-
interface Media$3 extends KeyBase {
|
|
371
|
-
id: number;
|
|
372
|
-
}
|
|
373
341
|
/**
|
|
374
342
|
* The response for creature family media.
|
|
375
343
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -379,19 +347,26 @@ interface CreatureFamilyMediaResponse extends ResponseBase {
|
|
|
379
347
|
id: number;
|
|
380
348
|
}
|
|
381
349
|
/**
|
|
382
|
-
* The response for a creature
|
|
350
|
+
* The response for a creature family.
|
|
383
351
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
384
352
|
*/
|
|
385
|
-
interface
|
|
386
|
-
|
|
353
|
+
interface CreatureFamilyResponse extends ResponseBase {
|
|
354
|
+
id: number;
|
|
355
|
+
media: Media$3;
|
|
356
|
+
name: string;
|
|
357
|
+
specialization: NameIdKey;
|
|
387
358
|
}
|
|
388
359
|
/**
|
|
389
|
-
* The response for a creature
|
|
360
|
+
* The response for a creature.
|
|
390
361
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
391
362
|
*/
|
|
392
|
-
interface
|
|
363
|
+
interface CreatureResponse extends ResponseBase {
|
|
364
|
+
creature_displays: Array<CreatureDisplay>;
|
|
365
|
+
family: NameIdKey;
|
|
393
366
|
id: number;
|
|
367
|
+
is_tameable: boolean;
|
|
394
368
|
name: string;
|
|
369
|
+
type: NameIdKey;
|
|
395
370
|
}
|
|
396
371
|
/**
|
|
397
372
|
* The search parameters for a creature.
|
|
@@ -425,6 +400,31 @@ interface CreatureSearchResponseItem extends KeyBase {
|
|
|
425
400
|
};
|
|
426
401
|
};
|
|
427
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* The response for a creature type index.
|
|
405
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
406
|
+
*/
|
|
407
|
+
interface CreatureTypeIndexResponse extends ResponseBase {
|
|
408
|
+
creature_types: Array<NameIdKey>;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* The response for a creature type.
|
|
412
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
413
|
+
*/
|
|
414
|
+
interface CreatureTypeResponse extends ResponseBase {
|
|
415
|
+
id: number;
|
|
416
|
+
name: string;
|
|
417
|
+
}
|
|
418
|
+
interface CreatureDisplay extends KeyBase {
|
|
419
|
+
id: number;
|
|
420
|
+
}
|
|
421
|
+
interface DisplayMediaAsset {
|
|
422
|
+
key: string;
|
|
423
|
+
value: string;
|
|
424
|
+
}
|
|
425
|
+
interface Media$3 extends KeyBase {
|
|
426
|
+
id: number;
|
|
427
|
+
}
|
|
428
428
|
|
|
429
429
|
/**
|
|
430
430
|
* Returns a creature by ID.
|
|
@@ -432,55 +432,63 @@ interface CreatureSearchResponseItem extends KeyBase {
|
|
|
432
432
|
* @param creatureId The creature ID.
|
|
433
433
|
* @returns The creature. See {@link CreatureResponse}.
|
|
434
434
|
*/
|
|
435
|
-
declare function creature(namespace: Extract<BlizzardNamespaces, 'static-
|
|
435
|
+
declare function creature(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, creatureId: number): Resource<CreatureResponse>;
|
|
436
436
|
/**
|
|
437
437
|
* Returns media for a creature display by ID.
|
|
438
438
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
439
439
|
* @param creatureDisplayId The creature display ID.
|
|
440
440
|
* @returns The creature display media. See {@link CreatureDisplayMediaResponse}.
|
|
441
441
|
*/
|
|
442
|
-
declare function creatureDisplayMedia(namespace: Extract<BlizzardNamespaces, 'static-
|
|
442
|
+
declare function creatureDisplayMedia(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, creatureDisplayId: number): Resource<CreatureDisplayMediaResponse>;
|
|
443
443
|
/**
|
|
444
444
|
* Returns a creature family by ID.
|
|
445
445
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
446
446
|
* @param creatureFamilyId The creature family ID.
|
|
447
447
|
* @returns The creature family. See {@link CreatureFamilyResponse}.
|
|
448
448
|
*/
|
|
449
|
-
declare function creatureFamily(namespace: Extract<BlizzardNamespaces, 'static-
|
|
449
|
+
declare function creatureFamily(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, creatureFamilyId: number): Resource<CreatureFamilyResponse>;
|
|
450
450
|
/**
|
|
451
451
|
* Returns an index of creature families.
|
|
452
452
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
453
453
|
* @returns The creature family index. See {@link CreatureFamilyIndexResponse}.
|
|
454
454
|
*/
|
|
455
|
-
declare function creatureFamilyIndex(namespace: Extract<BlizzardNamespaces, 'static-
|
|
455
|
+
declare function creatureFamilyIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<CreatureFamilyIndexResponse>;
|
|
456
456
|
/**
|
|
457
457
|
* Returns media for a creature family by ID.
|
|
458
458
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
459
459
|
* @param creatureFamilyId The creature family ID.
|
|
460
460
|
* @returns The creature family media. See {@link CreatureFamilyMediaResponse}.
|
|
461
461
|
*/
|
|
462
|
-
declare function creatureFamilyMedia(namespace: Extract<BlizzardNamespaces, 'static-
|
|
462
|
+
declare function creatureFamilyMedia(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, creatureFamilyId: number): Resource<CreatureFamilyMediaResponse>;
|
|
463
|
+
/**
|
|
464
|
+
* Performs a search of creatures.
|
|
465
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
466
|
+
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
|
|
467
|
+
* @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
|
|
468
|
+
*/
|
|
469
|
+
declare function creatureSearch(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, options: CreatureSearchParameters): Resource<SearchResponse<CreatureSearchResponseItem>, Omit<CreatureSearchParameters, 'locale' | 'name'>>;
|
|
463
470
|
/**
|
|
464
471
|
* Returns a creature type by ID.
|
|
465
472
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
466
473
|
* @param creatureTypeId The creature type ID.
|
|
467
474
|
* @returns The creature type. See {@link CreatureTypeResponse}.
|
|
468
475
|
*/
|
|
469
|
-
declare function creatureType(namespace: Extract<BlizzardNamespaces, 'static-
|
|
476
|
+
declare function creatureType(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, creatureTypeId: number): Resource<CreatureTypeResponse>;
|
|
470
477
|
/**
|
|
471
478
|
* Returns an index of creature types.
|
|
472
479
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
473
480
|
* @returns The creature type index. See {@link CreatureTypeIndexResponse}.
|
|
474
481
|
*/
|
|
475
|
-
declare function creatureTypeIndex(namespace: Extract<BlizzardNamespaces, 'static-
|
|
482
|
+
declare function creatureTypeIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<CreatureTypeIndexResponse>;
|
|
483
|
+
|
|
476
484
|
/**
|
|
477
|
-
*
|
|
478
|
-
* @
|
|
479
|
-
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
|
|
480
|
-
* @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
|
|
485
|
+
* The response for a guild crest border or emblem.
|
|
486
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
481
487
|
*/
|
|
482
|
-
|
|
483
|
-
|
|
488
|
+
interface GuildCrestBorderEmblemResponse extends ResponseBase {
|
|
489
|
+
assets: Array<GuildCrestAsset>;
|
|
490
|
+
id: number;
|
|
491
|
+
}
|
|
484
492
|
/**
|
|
485
493
|
* The response for the guild crest components index.
|
|
486
494
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -490,21 +498,25 @@ interface GuildCrestComponentsIndexResponse extends ResponseBase {
|
|
|
490
498
|
colors: Colors;
|
|
491
499
|
emblems: Array<Border>;
|
|
492
500
|
}
|
|
493
|
-
interface
|
|
501
|
+
interface Background {
|
|
494
502
|
id: number;
|
|
495
|
-
|
|
503
|
+
rgba: RGBA;
|
|
496
504
|
}
|
|
497
|
-
interface
|
|
505
|
+
interface Border {
|
|
498
506
|
id: number;
|
|
507
|
+
media: Media$2;
|
|
499
508
|
}
|
|
500
509
|
interface Colors {
|
|
501
510
|
backgrounds: Array<Background>;
|
|
502
511
|
borders: Array<Background>;
|
|
503
512
|
emblems: Array<Background>;
|
|
504
513
|
}
|
|
505
|
-
interface
|
|
514
|
+
interface GuildCrestAsset {
|
|
515
|
+
key: string;
|
|
516
|
+
value: string;
|
|
517
|
+
}
|
|
518
|
+
interface Media$2 extends KeyBase {
|
|
506
519
|
id: number;
|
|
507
|
-
rgba: RGBA;
|
|
508
520
|
}
|
|
509
521
|
interface RGBA {
|
|
510
522
|
a: number;
|
|
@@ -512,55 +524,57 @@ interface RGBA {
|
|
|
512
524
|
g: number;
|
|
513
525
|
r: number;
|
|
514
526
|
}
|
|
515
|
-
/**
|
|
516
|
-
* The response for a guild crest border or emblem.
|
|
517
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
518
|
-
*/
|
|
519
|
-
interface GuildCrestBorderEmblemResponse extends ResponseBase {
|
|
520
|
-
assets: Array<GuildCrestAsset>;
|
|
521
|
-
id: number;
|
|
522
|
-
}
|
|
523
|
-
interface GuildCrestAsset {
|
|
524
|
-
key: string;
|
|
525
|
-
value: string;
|
|
526
|
-
}
|
|
527
527
|
|
|
528
|
-
/**
|
|
529
|
-
* Returns an index of guild crest media.
|
|
530
|
-
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
531
|
-
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
|
|
532
|
-
*/
|
|
533
|
-
declare function guildCrestComponentsIndex(namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>): Resource<GuildCrestComponentsIndexResponse>;
|
|
534
528
|
/**
|
|
535
529
|
* Returns media for a guild crest border by ID.
|
|
536
530
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
537
531
|
* @param borderId The guild crest border ID.
|
|
538
532
|
* @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.
|
|
539
533
|
*/
|
|
540
|
-
declare function guildCrestBorder(namespace: Extract<BlizzardNamespaces, 'static-
|
|
534
|
+
declare function guildCrestBorder(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, borderId: number): Resource<GuildCrestBorderEmblemResponse>;
|
|
535
|
+
/**
|
|
536
|
+
* Returns an index of guild crest media.
|
|
537
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
538
|
+
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
|
|
539
|
+
*/
|
|
540
|
+
declare function guildCrestComponentsIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<GuildCrestComponentsIndexResponse>;
|
|
541
541
|
/**
|
|
542
542
|
* Returns media for a guild crest emblem by ID.
|
|
543
543
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
544
544
|
* @param emblemId The guild crest emblem ID.
|
|
545
545
|
* @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.
|
|
546
546
|
*/
|
|
547
|
-
declare function guildCrestEmblem(namespace: Extract<BlizzardNamespaces, 'static-
|
|
547
|
+
declare function guildCrestEmblem(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, emblemId: number): Resource<GuildCrestBorderEmblemResponse>;
|
|
548
548
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
549
|
+
/**
|
|
550
|
+
* The response for an item class index.
|
|
551
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
552
|
+
*/
|
|
553
|
+
interface ItemClassIndexResponse extends ResponseBase {
|
|
554
|
+
item_classes: Array<NameIdKey>;
|
|
552
555
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
+
/**
|
|
557
|
+
* The response for an item class.
|
|
558
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
559
|
+
*/
|
|
560
|
+
interface ItemClassResponse extends ResponseBase {
|
|
561
|
+
class_id: number;
|
|
562
|
+
item_subclasses: Array<NameIdKey>;
|
|
563
|
+
name: string;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* The response for an item media.
|
|
567
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
568
|
+
*/
|
|
569
|
+
interface ItemMediaResponse extends ResponseBase {
|
|
570
|
+
assets: Array<MediaAsset$1>;
|
|
571
|
+
id: number;
|
|
556
572
|
}
|
|
557
|
-
type StatTypeCapitalized = 'AGILITY' | 'CRIT_RATING' | 'HASTE_RATING' | 'INTELLECT' | 'MASTERY' | 'STAMINA' | 'STRENGTH' | 'VERSATILITY';
|
|
558
|
-
type StatType = 'Agility' | 'Critical Strike' | 'Haste' | 'Intellect' | 'Mastery' | 'Stamina' | 'Strength' | 'Versatility';
|
|
559
573
|
/**
|
|
560
574
|
* The response for an item.
|
|
561
575
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
562
576
|
*/
|
|
563
|
-
interface ItemResponse extends
|
|
577
|
+
interface ItemResponse extends NameId, ResponseBase {
|
|
564
578
|
description?: string;
|
|
565
579
|
inventory_type: InventoryType;
|
|
566
580
|
is_equippable: boolean;
|
|
@@ -577,6 +591,87 @@ interface ItemResponse extends ResponseBase, NameId {
|
|
|
577
591
|
required_level: number;
|
|
578
592
|
sell_price: number;
|
|
579
593
|
}
|
|
594
|
+
/**
|
|
595
|
+
* The parameters for an item search.
|
|
596
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
597
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
|
|
598
|
+
*/
|
|
599
|
+
interface ItemSearchParameters extends BaseSearchParameters {
|
|
600
|
+
locale: Locales;
|
|
601
|
+
name: string;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* The response for an item search.
|
|
605
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
606
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
|
|
607
|
+
*/
|
|
608
|
+
interface ItemSearchResponseItem extends KeyBase {
|
|
609
|
+
data: {
|
|
610
|
+
id: number;
|
|
611
|
+
inventory_type: InventoryType;
|
|
612
|
+
is_equippable: boolean;
|
|
613
|
+
is_stackable: boolean;
|
|
614
|
+
item_class: {
|
|
615
|
+
id: number;
|
|
616
|
+
name: Record<Locales, string | undefined>;
|
|
617
|
+
};
|
|
618
|
+
item_subclass: {
|
|
619
|
+
id: number;
|
|
620
|
+
name: Record<Locales, string | undefined>;
|
|
621
|
+
};
|
|
622
|
+
level: number;
|
|
623
|
+
max_count: number;
|
|
624
|
+
media: {
|
|
625
|
+
id: number;
|
|
626
|
+
};
|
|
627
|
+
name: Record<Locales, string | undefined>;
|
|
628
|
+
purchase_price: number;
|
|
629
|
+
purchase_quantity: number;
|
|
630
|
+
quality: ItemQuality;
|
|
631
|
+
required_level: number;
|
|
632
|
+
sell_price: number;
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* The response for an item subclass.
|
|
637
|
+
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
638
|
+
*/
|
|
639
|
+
interface ItemSubClassResponse extends ResponseBase {
|
|
640
|
+
class_id: number;
|
|
641
|
+
display_name: string;
|
|
642
|
+
hide_subclass_in_tooltips: boolean;
|
|
643
|
+
subclass_id: number;
|
|
644
|
+
verbose_name: string;
|
|
645
|
+
}
|
|
646
|
+
interface Armor {
|
|
647
|
+
display: Display;
|
|
648
|
+
value: number;
|
|
649
|
+
}
|
|
650
|
+
interface Damage {
|
|
651
|
+
damage_class: {
|
|
652
|
+
name: string;
|
|
653
|
+
type: string;
|
|
654
|
+
};
|
|
655
|
+
display_string: string;
|
|
656
|
+
max_value: number;
|
|
657
|
+
min_value: number;
|
|
658
|
+
}
|
|
659
|
+
interface Display {
|
|
660
|
+
color: Color;
|
|
661
|
+
display_string: string;
|
|
662
|
+
}
|
|
663
|
+
interface Durability {
|
|
664
|
+
display_string: string;
|
|
665
|
+
value: number;
|
|
666
|
+
}
|
|
667
|
+
interface InventoryType {
|
|
668
|
+
name: Record<Locales, string | undefined>;
|
|
669
|
+
type: 'BACK' | 'BAG' | 'CHEST' | 'FEET' | 'FINGER' | 'HANDS' | 'HEAD' | 'LEGS' | 'NECK' | 'NON_EQUIP' | 'SHIRT' | 'SHOULDER' | 'TABARD' | 'TRINKET' | 'TWOHWEAPON' | 'WAIST' | 'WRIST';
|
|
670
|
+
}
|
|
671
|
+
interface ItemQuality {
|
|
672
|
+
name: Record<Locales, string | undefined>;
|
|
673
|
+
type: 'ARTIFACT' | 'COMMON' | 'EPIC' | 'HEIRLOOM' | 'LEGENDARY' | 'POOR' | 'RARE' | 'UNCOMMON';
|
|
674
|
+
}
|
|
580
675
|
interface Media$1 extends KeyBase {
|
|
581
676
|
id: number;
|
|
582
677
|
}
|
|
@@ -610,53 +705,11 @@ interface PreviewItem {
|
|
|
610
705
|
unique_equipped?: 'Unique';
|
|
611
706
|
weapon?: Weapon;
|
|
612
707
|
}
|
|
613
|
-
interface Armor {
|
|
614
|
-
display: Display;
|
|
615
|
-
value: number;
|
|
616
|
-
}
|
|
617
|
-
interface Durability {
|
|
618
|
-
display_string: string;
|
|
619
|
-
value: number;
|
|
620
|
-
}
|
|
621
|
-
interface Requirements {
|
|
622
|
-
level: Durability;
|
|
623
|
-
}
|
|
624
|
-
interface Spell {
|
|
625
|
-
description: string;
|
|
626
|
-
spell: NameIdKey;
|
|
627
|
-
}
|
|
628
|
-
interface Stat {
|
|
629
|
-
display: Display;
|
|
630
|
-
is_negated?: boolean;
|
|
631
|
-
type: {
|
|
632
|
-
name: StatType;
|
|
633
|
-
type: StatTypeCapitalized;
|
|
634
|
-
};
|
|
635
|
-
value: number;
|
|
636
|
-
}
|
|
637
|
-
interface Display {
|
|
638
|
-
color: Color;
|
|
639
|
-
display_string: string;
|
|
640
|
-
}
|
|
641
|
-
interface Weapon {
|
|
642
|
-
attack_speed: Durability;
|
|
643
|
-
damage: Damage;
|
|
644
|
-
dps: Durability;
|
|
645
|
-
}
|
|
646
|
-
interface Damage {
|
|
647
|
-
damage_class: {
|
|
648
|
-
name: string;
|
|
649
|
-
type: string;
|
|
650
|
-
};
|
|
651
|
-
display_string: string;
|
|
652
|
-
max_value: number;
|
|
653
|
-
min_value: number;
|
|
654
|
-
}
|
|
655
708
|
interface Recipe {
|
|
656
709
|
item: RecipeItem;
|
|
657
|
-
reagents: Array<{
|
|
710
|
+
reagents: Array<NameIdKey & {
|
|
658
711
|
quantity: number;
|
|
659
|
-
}
|
|
712
|
+
}>;
|
|
660
713
|
reagents_display_string: string;
|
|
661
714
|
}
|
|
662
715
|
interface RecipeItem {
|
|
@@ -688,125 +741,72 @@ interface RecipeItemDisplayStrings {
|
|
|
688
741
|
header: string;
|
|
689
742
|
silver: string;
|
|
690
743
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
694
|
-
*/
|
|
695
|
-
interface ItemClassIndexResponse extends ResponseBase {
|
|
696
|
-
item_classes: Array<NameIdKey>;
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* The response for an item class.
|
|
700
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
701
|
-
*/
|
|
702
|
-
interface ItemClassResponse extends ResponseBase {
|
|
703
|
-
class_id: number;
|
|
704
|
-
item_subclasses: Array<NameIdKey>;
|
|
705
|
-
name: string;
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* The response for an item media.
|
|
709
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
710
|
-
*/
|
|
711
|
-
interface ItemMediaResponse extends ResponseBase {
|
|
712
|
-
assets: Array<MediaAsset$1>;
|
|
713
|
-
id: number;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* The response for an item subclass.
|
|
717
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
718
|
-
*/
|
|
719
|
-
interface ItemSubClassResponse extends ResponseBase {
|
|
720
|
-
class_id: number;
|
|
721
|
-
display_name: string;
|
|
722
|
-
hide_subclass_in_tooltips: boolean;
|
|
723
|
-
subclass_id: number;
|
|
724
|
-
verbose_name: string;
|
|
744
|
+
interface Requirements {
|
|
745
|
+
level: Durability;
|
|
725
746
|
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
|
|
730
|
-
*/
|
|
731
|
-
interface ItemSearchParameters extends BaseSearchParameters {
|
|
732
|
-
locale: Locales;
|
|
733
|
-
name: string;
|
|
747
|
+
interface Spell {
|
|
748
|
+
description: string;
|
|
749
|
+
spell: NameIdKey;
|
|
734
750
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
data: {
|
|
742
|
-
id: number;
|
|
743
|
-
inventory_type: InventoryType;
|
|
744
|
-
is_equippable: boolean;
|
|
745
|
-
is_stackable: boolean;
|
|
746
|
-
item_class: {
|
|
747
|
-
id: number;
|
|
748
|
-
name: Record<Locales, string | undefined>;
|
|
749
|
-
};
|
|
750
|
-
item_subclass: {
|
|
751
|
-
id: number;
|
|
752
|
-
name: Record<Locales, string | undefined>;
|
|
753
|
-
};
|
|
754
|
-
level: number;
|
|
755
|
-
max_count: number;
|
|
756
|
-
media: {
|
|
757
|
-
id: number;
|
|
758
|
-
};
|
|
759
|
-
name: Record<Locales, string | undefined>;
|
|
760
|
-
purchase_price: number;
|
|
761
|
-
purchase_quantity: number;
|
|
762
|
-
quality: ItemQuality;
|
|
763
|
-
required_level: number;
|
|
764
|
-
sell_price: number;
|
|
751
|
+
interface Stat {
|
|
752
|
+
display: Display;
|
|
753
|
+
is_negated?: boolean;
|
|
754
|
+
type: {
|
|
755
|
+
name: StatType;
|
|
756
|
+
type: StatTypeCapitalized;
|
|
765
757
|
};
|
|
758
|
+
value: number;
|
|
759
|
+
}
|
|
760
|
+
type StatType = 'Agility' | 'Critical Strike' | 'Haste' | 'Intellect' | 'Mastery' | 'Stamina' | 'Strength' | 'Versatility';
|
|
761
|
+
type StatTypeCapitalized = 'AGILITY' | 'CRIT_RATING' | 'HASTE_RATING' | 'INTELLECT' | 'MASTERY' | 'STAMINA' | 'STRENGTH' | 'VERSATILITY';
|
|
762
|
+
interface Weapon {
|
|
763
|
+
attack_speed: Durability;
|
|
764
|
+
damage: Damage;
|
|
765
|
+
dps: Durability;
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
/**
|
|
769
|
-
* Get an item
|
|
769
|
+
* Get an item by ID.
|
|
770
770
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
771
|
-
* @
|
|
771
|
+
* @param itemId The item ID.
|
|
772
|
+
* @returns The item. See {@link ItemResponse}.
|
|
772
773
|
*/
|
|
773
|
-
declare function
|
|
774
|
+
declare function item(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, itemId: number): Resource<ItemResponse>;
|
|
774
775
|
/**
|
|
775
776
|
* Get an item class by ID.
|
|
776
777
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
777
778
|
* @param itemClassId The item class ID.
|
|
778
779
|
* @returns The item class. See {@link ItemClassResponse}.
|
|
779
780
|
*/
|
|
780
|
-
declare function itemClass(namespace: Extract<BlizzardNamespaces, 'static-
|
|
781
|
-
/**
|
|
782
|
-
* Get an item subclass by ID.
|
|
783
|
-
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
784
|
-
* @param itemClassId The item class ID.
|
|
785
|
-
* @param itemSubclassId The item subclass ID.
|
|
786
|
-
* @returns The item subclass. See {@link ItemSubClassResponse}.
|
|
787
|
-
*/
|
|
788
|
-
declare function itemSubClass(namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>, itemClassId: number, itemSubclassId: number): Resource<ItemSubClassResponse>;
|
|
781
|
+
declare function itemClass(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, itemClassId: number): Resource<ItemClassResponse>;
|
|
789
782
|
/**
|
|
790
|
-
* Get an item
|
|
783
|
+
* Get an item class index.
|
|
791
784
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
792
|
-
* @
|
|
793
|
-
* @returns The item. See {@link ItemResponse}.
|
|
785
|
+
* @returns The item class index. See {@link ItemClassIndexResponse}.
|
|
794
786
|
*/
|
|
795
|
-
declare function
|
|
787
|
+
declare function itemClassIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<ItemClassIndexResponse>;
|
|
796
788
|
/**
|
|
797
789
|
* Get item media by ID.
|
|
798
790
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
799
791
|
* @param itemId The item ID.
|
|
800
792
|
* @returns The item media. See {@link ItemMediaResponse}.
|
|
801
793
|
*/
|
|
802
|
-
declare function itemMedia(namespace: Extract<BlizzardNamespaces, 'static-
|
|
794
|
+
declare function itemMedia(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, itemId: number): Resource<ItemMediaResponse>;
|
|
803
795
|
/**
|
|
804
796
|
* Search for items.
|
|
805
797
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
806
798
|
* @param options The search parameters. See {@link ItemSearchParameters}.
|
|
807
799
|
* @returns The search results. See {@link SearchResponse}.
|
|
808
800
|
*/
|
|
809
|
-
declare function itemSearch(namespace: Extract<BlizzardNamespaces, 'static-
|
|
801
|
+
declare function itemSearch(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, options: ItemSearchParameters): Resource<SearchResponse<ItemSearchResponseItem>, Omit<ItemSearchParameters, 'locale' | 'name'>>;
|
|
802
|
+
/**
|
|
803
|
+
* Get an item subclass by ID.
|
|
804
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
805
|
+
* @param itemClassId The item class ID.
|
|
806
|
+
* @param itemSubclassId The item subclass ID.
|
|
807
|
+
* @returns The item subclass. See {@link ItemSubClassResponse}.
|
|
808
|
+
*/
|
|
809
|
+
declare function itemSubClass(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, itemClassId: number, itemSubclassId: number): Resource<ItemSubClassResponse>;
|
|
810
810
|
|
|
811
811
|
/**
|
|
812
812
|
* The search parameters for media.
|
|
@@ -835,10 +835,11 @@ interface MediaAsset {
|
|
|
835
835
|
|
|
836
836
|
/**
|
|
837
837
|
* Search for media.
|
|
838
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
838
839
|
* @param options The search parameters. See {@link MediaSearchParameters}.
|
|
839
840
|
* @returns The search results. See {@link SearchResponse}.
|
|
840
841
|
*/
|
|
841
|
-
declare function mediaSearch(namespace: Extract<BlizzardNamespaces, 'static-
|
|
842
|
+
declare function mediaSearch(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, options: MediaSearchParameters): Resource<SearchResponse<MediaSearchResponseItem>, MediaSearchParameters>;
|
|
842
843
|
|
|
843
844
|
/**
|
|
844
845
|
* The response for a playable class index.
|
|
@@ -860,7 +861,7 @@ interface PlayableClassMediaResponse extends ResponseBase {
|
|
|
860
861
|
* The response for a playable class.
|
|
861
862
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft-classic/game-data-apis}
|
|
862
863
|
*/
|
|
863
|
-
interface PlayableClassResponse extends
|
|
864
|
+
interface PlayableClassResponse extends NameId, ResponseBase {
|
|
864
865
|
gender_name: GenderName;
|
|
865
866
|
media: Media;
|
|
866
867
|
playable_races: Array<NameIdKey>;
|
|
@@ -879,20 +880,20 @@ interface Media extends KeyBase {
|
|
|
879
880
|
* @param playableClassId The playable class ID.
|
|
880
881
|
* @returns The playable class. See {@link PlayableClassResponse}.
|
|
881
882
|
*/
|
|
882
|
-
declare function playableClass(namespace: Extract<BlizzardNamespaces, 'static-
|
|
883
|
+
declare function playableClass(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, playableClassId: number): Resource<PlayableClassResponse>;
|
|
883
884
|
/**
|
|
884
885
|
* Get a playable class index.
|
|
885
886
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
886
887
|
* @returns The playable class index. See {@link PlayableClassIndexResponse}.
|
|
887
888
|
*/
|
|
888
|
-
declare function playableClassIndex(namespace: Extract<BlizzardNamespaces, 'static-
|
|
889
|
+
declare function playableClassIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<PlayableClassIndexResponse>;
|
|
889
890
|
/**
|
|
890
891
|
* Get playable class media by ID.
|
|
891
892
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
892
893
|
* @param playableClassId The playable class ID.
|
|
893
894
|
* @returns The playable class media. See {@link PlayableClassMediaResponse}.
|
|
894
895
|
*/
|
|
895
|
-
declare function playableClassMedia(namespace: Extract<BlizzardNamespaces, 'static-
|
|
896
|
+
declare function playableClassMedia(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, playableClassId: number): Resource<PlayableClassMediaResponse>;
|
|
896
897
|
|
|
897
898
|
/**
|
|
898
899
|
* The playable race index response.
|
|
@@ -905,7 +906,7 @@ interface PlayableRaceIndexResponse extends ResponseBase {
|
|
|
905
906
|
* The playable race response.
|
|
906
907
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
907
908
|
*/
|
|
908
|
-
interface PlayableRaceResponse extends
|
|
909
|
+
interface PlayableRaceResponse extends NameId, ResponseBase {
|
|
909
910
|
faction: Faction;
|
|
910
911
|
gender_name: GenderName;
|
|
911
912
|
is_allied_race: boolean;
|
|
@@ -919,13 +920,13 @@ interface PlayableRaceResponse extends ResponseBase, NameId {
|
|
|
919
920
|
* @param playableRaceId The playable race ID.
|
|
920
921
|
* @returns The playable race. See {@link PlayableRaceResponse}.
|
|
921
922
|
*/
|
|
922
|
-
declare function playableRace(namespace: Extract<BlizzardNamespaces, 'static-
|
|
923
|
+
declare function playableRace(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, playableRaceId: number): Resource<PlayableRaceResponse>;
|
|
923
924
|
/**
|
|
924
925
|
* Get a playable race index.
|
|
925
926
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
926
927
|
* @returns The playable race index. See {@link PlayableRaceIndexResponse}.
|
|
927
928
|
*/
|
|
928
|
-
declare function playableRaceIndex(namespace: Extract<BlizzardNamespaces, 'static-
|
|
929
|
+
declare function playableRaceIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<PlayableRaceIndexResponse>;
|
|
929
930
|
|
|
930
931
|
/**
|
|
931
932
|
* The response for a power type index.
|
|
@@ -938,7 +939,7 @@ interface PowerTypeIndexResponse extends ResponseBase {
|
|
|
938
939
|
* The response for a power type.
|
|
939
940
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
940
941
|
*/
|
|
941
|
-
interface PowerTypeResponse extends
|
|
942
|
+
interface PowerTypeResponse extends NameId, ResponseBase {
|
|
942
943
|
}
|
|
943
944
|
|
|
944
945
|
/**
|
|
@@ -947,13 +948,13 @@ interface PowerTypeResponse extends ResponseBase, NameId {
|
|
|
947
948
|
* @param powerTypeId The power type ID.
|
|
948
949
|
* @returns The power type. See {@link PowerTypeResponse}.
|
|
949
950
|
*/
|
|
950
|
-
declare function powerType(namespace: Extract<BlizzardNamespaces, 'static-
|
|
951
|
+
declare function powerType(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>, powerTypeId: number): Resource<PowerTypeResponse>;
|
|
951
952
|
/**
|
|
952
953
|
* Get a power type index.
|
|
953
954
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
954
955
|
* @returns The power type index. See {@link PowerTypeIndexResponse}.
|
|
955
956
|
*/
|
|
956
|
-
declare function powerTypeIndex(namespace: Extract<BlizzardNamespaces, 'static-
|
|
957
|
+
declare function powerTypeIndex(namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>): Resource<PowerTypeIndexResponse>;
|
|
957
958
|
|
|
958
959
|
/**
|
|
959
960
|
* The response for a PvP season index.
|
|
@@ -963,9 +964,6 @@ interface PvpSeasonIndexResponse extends ResponseBase {
|
|
|
963
964
|
current_season: Season;
|
|
964
965
|
seasons: Array<Season>;
|
|
965
966
|
}
|
|
966
|
-
interface Season extends KeyBase {
|
|
967
|
-
id: number;
|
|
968
|
-
}
|
|
969
967
|
/**
|
|
970
968
|
* The response for a PvP season.
|
|
971
969
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
@@ -981,60 +979,69 @@ interface PvpSeasonResponse extends ResponseBase {
|
|
|
981
979
|
season_name?: string;
|
|
982
980
|
season_start_timestamp: number;
|
|
983
981
|
}
|
|
982
|
+
interface Season extends KeyBase {
|
|
983
|
+
id: number;
|
|
984
|
+
}
|
|
984
985
|
|
|
985
986
|
/**
|
|
986
|
-
* Get a PvP season
|
|
987
|
+
* Get a PvP leaderboard by PvP season ID and bracket.
|
|
987
988
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
988
|
-
* @
|
|
989
|
+
* @param pvpRegionId The PvP region ID.
|
|
990
|
+
* @param pvpSeasonId The PvP season ID.
|
|
991
|
+
* @param pvpBracket The PvP bracket.
|
|
992
|
+
* @returns The PvP leaderboard.
|
|
989
993
|
*/
|
|
990
|
-
declare function
|
|
994
|
+
declare function pvpLeaderboard(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpRegionId: number, pvpSeasonId: number, pvpBracket: string): Resource<unknown>;
|
|
991
995
|
/**
|
|
992
|
-
*
|
|
996
|
+
* Returns an index of PvP leaderboards for a PvP season in a given PvP region.
|
|
997
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
998
|
+
* @param pvpRegionId The PvP region ID.
|
|
993
999
|
* @param pvpSeasonId The PvP season ID.
|
|
994
|
-
* @returns The PvP
|
|
1000
|
+
* @returns The PvP leaderboard index.
|
|
995
1001
|
*/
|
|
996
|
-
declare function
|
|
1002
|
+
declare function pvpLeaderboardIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpRegionId: number, pvpSeasonId: number): Resource<unknown>;
|
|
997
1003
|
/**
|
|
998
|
-
* Returns
|
|
1004
|
+
* Returns a PvP season by region ID and season ID.
|
|
999
1005
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1006
|
+
* @param pvpRegionId The PvP region ID.
|
|
1007
|
+
* @param pvpSeasonId The PvP season ID.
|
|
1008
|
+
* @returns The PvP season.
|
|
1000
1009
|
*/
|
|
1001
|
-
declare function
|
|
1010
|
+
declare function pvpRegionalSeason(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpRegionId: number, pvpSeasonId: number): Resource<unknown>;
|
|
1002
1011
|
/**
|
|
1003
1012
|
* Returns an index of PvP Seasons in a PvP region.
|
|
1004
1013
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1005
1014
|
* @param pvpRegionId The PvP region ID.
|
|
1006
1015
|
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
1007
1016
|
*/
|
|
1008
|
-
declare function pvpRegionalSeasonIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1017
|
+
declare function pvpRegionalSeasonIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpRegionId: number): Resource<PvpSeasonIndexResponse>;
|
|
1009
1018
|
/**
|
|
1010
|
-
* Returns
|
|
1019
|
+
* Returns an index of PvP Regions.
|
|
1011
1020
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1012
|
-
* @
|
|
1013
|
-
* @param pvpSeasonId The PvP season ID.
|
|
1021
|
+
* @returns The PvP region index.
|
|
1014
1022
|
*/
|
|
1015
|
-
declare function
|
|
1023
|
+
declare function pvpRegionIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>): Resource<unknown>;
|
|
1016
1024
|
/**
|
|
1017
|
-
* Returns an index of PvP
|
|
1025
|
+
* Returns an index of PvP rewards for a PvP season in a given PvP region.
|
|
1018
1026
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1019
1027
|
* @param pvpRegionId The PvP region ID.
|
|
1020
1028
|
* @param pvpSeasonId The PvP season ID.
|
|
1029
|
+
* @returns The PvP reward index.
|
|
1021
1030
|
*/
|
|
1022
|
-
declare function
|
|
1031
|
+
declare function pvpRewardsIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpRegionId: number, pvpSeasonId: number): Resource<unknown>;
|
|
1023
1032
|
/**
|
|
1024
|
-
* Get a PvP
|
|
1033
|
+
* Get a PvP season by ID.
|
|
1025
1034
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1026
|
-
* @param pvpRegionId The PvP region ID.
|
|
1027
1035
|
* @param pvpSeasonId The PvP season ID.
|
|
1028
|
-
* @
|
|
1036
|
+
* @returns The PvP season. See {@link PvpSeasonResponse}.
|
|
1029
1037
|
*/
|
|
1030
|
-
declare function
|
|
1038
|
+
declare function pvpSeason(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, pvpSeasonId: number): Resource<PvpSeasonResponse>;
|
|
1031
1039
|
/**
|
|
1032
|
-
*
|
|
1040
|
+
* Get a PvP season index.
|
|
1033
1041
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1034
|
-
* @
|
|
1035
|
-
* @param pvpSeasonId The PvP season ID.
|
|
1042
|
+
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
1036
1043
|
*/
|
|
1037
|
-
declare function
|
|
1044
|
+
declare function pvpSeasonIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>): Resource<PvpSeasonIndexResponse>;
|
|
1038
1045
|
|
|
1039
1046
|
/**
|
|
1040
1047
|
* Get a realm by slug.
|
|
@@ -1042,20 +1049,20 @@ declare function pvpRewardsIndex(namespace: Extract<BlizzardNamespaces, 'dynamic
|
|
|
1042
1049
|
* @param realmSlug The realm slug.
|
|
1043
1050
|
* @returns The realm. See {@link RealmResponse}.
|
|
1044
1051
|
*/
|
|
1045
|
-
declare function realm(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1052
|
+
declare function realm(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, realmSlug: string): Resource<RealmResponse>;
|
|
1046
1053
|
/**
|
|
1047
1054
|
* Get a realm index.
|
|
1048
1055
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1049
1056
|
* @returns The realm index. See {@link RealmIndexResponse}.
|
|
1050
1057
|
*/
|
|
1051
|
-
declare function realmIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1058
|
+
declare function realmIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>): Resource<RealmIndexResponse>;
|
|
1052
1059
|
/**
|
|
1053
1060
|
* Search for realms.
|
|
1054
1061
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1055
1062
|
* @param options The search parameters. See {@link RealmSearchParameters}.
|
|
1056
1063
|
* @returns The search results. See {@link SearchResponse}.
|
|
1057
1064
|
*/
|
|
1058
|
-
declare function realmSearch(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1065
|
+
declare function realmSearch(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, options: RealmSearchParameters): Resource<SearchResponse<RealmSearchResponseItem>, RealmSearchParameters>;
|
|
1059
1066
|
|
|
1060
1067
|
/**
|
|
1061
1068
|
* The response for a region index.
|
|
@@ -1070,7 +1077,7 @@ interface RegionIndexResponse extends ResponseBase {
|
|
|
1070
1077
|
* The response for a region.
|
|
1071
1078
|
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
|
|
1072
1079
|
*/
|
|
1073
|
-
interface RegionResponse extends
|
|
1080
|
+
interface RegionResponse extends NameId, ResponseBase {
|
|
1074
1081
|
patch_string: string;
|
|
1075
1082
|
tag: string;
|
|
1076
1083
|
}
|
|
@@ -1081,13 +1088,13 @@ interface RegionResponse extends ResponseBase, NameId {
|
|
|
1081
1088
|
* @param regionId The region ID.
|
|
1082
1089
|
* @returns The region. See {@link RegionResponse}.
|
|
1083
1090
|
*/
|
|
1084
|
-
declare function region(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1091
|
+
declare function region(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, regionId: number): Resource<RegionResponse>;
|
|
1085
1092
|
/**
|
|
1086
1093
|
* Get a region index.
|
|
1087
1094
|
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1088
1095
|
* @returns The region index. See {@link RegionIndexResponse}.
|
|
1089
1096
|
*/
|
|
1090
|
-
declare function regionIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-
|
|
1097
|
+
declare function regionIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>): Resource<RegionIndexResponse>;
|
|
1091
1098
|
|
|
1092
1099
|
declare const classicWow: {
|
|
1093
1100
|
auctionHouseIndex: typeof auctionHouseIndex;
|