pokenode-ts 2.0.0 → 2.2.0

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/lib/index.d.ts CHANGED
@@ -1,19 +1,42 @@
1
- //#region src/models/Common/resource.d.ts
1
+ //#region src/models/common/resource.d.ts
2
+ /**
3
+ * Marks what a link points at.
4
+ *
5
+ * A type parameter that appears nowhere in an interface is not inferable, and
6
+ * every instantiation of it stays mutually assignable — so `NamedAPIResource<T>`
7
+ * needs somewhere to carry `T`. This key exists only in the type system: it is
8
+ * never present at runtime, and reading it is not the point.
9
+ *
10
+ * A `unique symbol` is nominal per declaration, and the package emits one set of
11
+ * declarations per module format — so a link crossing the ESM/CJS boundary keeps
12
+ * assigning structurally but stops carrying `T`, and comes back as `unknown`.
13
+ * Documented in `docs/src/clients/utility-client.md`, alongside the same split
14
+ * behind `PokenodeError.isPokenodeError`.
15
+ */
16
+ declare const RESOURCE_TYPE: unique symbol;
2
17
  /**
3
18
  * The name and the URL of the referenced resource.
19
+ *
20
+ * @template T - What the URL resolves to. Defaults to `unknown`, so a link whose
21
+ * target has not been declared still type-checks; pass it to
22
+ * {@link UtilityClient.getResourceByUrl} and the resource comes back typed.
4
23
  */
5
- interface NamedAPIResource {
24
+ interface NamedAPIResource<T = unknown> {
6
25
  /** The name of the referenced resource. */
7
26
  name: string;
8
27
  /** The URL of the referenced resource. */
9
28
  url: string;
29
+ /** Phantom. Never present at runtime. */
30
+ readonly [RESOURCE_TYPE]?: T;
10
31
  }
11
32
  /**
12
33
  * Calling any API endpoint without a resource ID or name will return a paginated list of available resources for that API.
13
34
  * By default, a list "page" will contain up to 20 resources. If you would like to change this just add a 'limit' query parameter
14
35
  * to the GET request, e.g. ?=60. You can use 'offset' to move to the next page, e.g. ?limit=60&offset=60.
36
+ *
37
+ * @template T - What the listed links resolve to.
15
38
  */
16
- interface NamedAPIResourceList {
39
+ interface NamedAPIResourceList<T = unknown> {
17
40
  /** The total number of resources available from this API. */
18
41
  count: number;
19
42
  /** The URL for the next page in the list. */
@@ -21,76 +44,40 @@ interface NamedAPIResourceList {
21
44
  /** The URL for the previous page in the list. */
22
45
  previous: string | null;
23
46
  /** A list of named API resources. */
24
- results: NamedAPIResource[];
25
- }
26
- /** A URL for another resource in the API. */
27
- interface APIResource {
28
- /** The URL of the referenced resource. */
29
- url: string;
30
- }
31
- //#endregion
32
- //#region src/models/Common/description.d.ts
33
- /**
34
- * The localized description for an API resource in a specific language.
35
- */
36
- interface Description {
37
- /** The localized description for an API resource in a specific language. */
38
- description: string;
39
- /** The language this name is in. */
40
- language: NamedAPIResource;
41
- }
42
- //#endregion
43
- //#region src/models/Common/effect.d.ts
44
- /**
45
- * The localized effect text for an API resource in a specific language.
46
- */
47
- interface Effect {
48
- /** The localized effect text for an API resource in a specific language. */
49
- effect: string;
50
- /** The language this effect is in. */
51
- language: NamedAPIResource;
52
- }
53
- //#endregion
54
- //#region src/models/Common/encounter.d.ts
55
- /** Information about a Pokémon encounter. */
56
- interface Encounter {
57
- /** The lowest level the Pokémon could be encountered at. */
58
- min_level: number;
59
- /** The highest level the Pokémon could be encountered at. */
60
- max_level: number;
61
- /** A list of condition values that must be in effect for this encounter to occur. */
62
- condition_values: NamedAPIResource[];
63
- /** Percent chance that this encounter will occur. */
64
- chance: number;
65
- /** The method by which this encounter happens. */
66
- method: NamedAPIResource;
47
+ results: NamedAPIResource<T>[];
67
48
  }
68
- //#endregion
69
- //#region src/models/Common/flavor-text.d.ts
70
49
  /**
71
- * The localized flavor text for an API resource in a specific language.
50
+ * A URL for another resource in the API.
51
+ *
52
+ * @template T - What the URL resolves to.
72
53
  */
73
- interface FlavorText {
74
- /** The localized flavor text for an API resource in a specific language. */
75
- flavor_text: string;
76
- /** The language this name is in. */
77
- language: NamedAPIResource;
78
- /** The game version this flavor text appears in. */
79
- version: NamedAPIResource;
54
+ interface APIResource<T = unknown> {
55
+ /** The URL of the referenced resource. */
56
+ url: string;
57
+ /** Phantom. Never present at runtime. */
58
+ readonly [RESOURCE_TYPE]?: T;
80
59
  }
81
- //#endregion
82
- //#region src/models/Common/generation.d.ts
83
60
  /**
84
- * The generation relevant to this game index.
61
+ * A paginated list whose entries are identified by URL alone.
62
+ *
63
+ * The `machine`, `contest-effect`, `super-contest-effect`, `evolution-chain` and
64
+ * `characteristic` sections have no names to list, so their entries carry a `url`
65
+ * and nothing else.
66
+ *
67
+ * @template T - What the listed links resolve to.
85
68
  */
86
- interface GenerationGameIndex {
87
- /** The internal id of an API resource within game data. */
88
- game_index: number;
89
- /** The generation relevant to this game index. */
90
- generation: NamedAPIResource;
69
+ interface APIResourceList<T = unknown> {
70
+ /** The total number of resources available from this API. */
71
+ count: number;
72
+ /** The URL for the next page in the list. */
73
+ next: string | null;
74
+ /** The URL for the previous page in the list. */
75
+ previous: string | null;
76
+ /** A list of unnamed API resources. */
77
+ results: APIResource<T>[];
91
78
  }
92
79
  //#endregion
93
- //#region src/models/Common/name.d.ts
80
+ //#region src/models/common/name.d.ts
94
81
  /**
95
82
  * The localized name for an API resource in a specific language.
96
83
  */
@@ -98,10 +85,10 @@ interface Name {
98
85
  /** The localized name for an API resource in a specific language. */
99
86
  name: string;
100
87
  /** The language this name is in. */
101
- language: NamedAPIResource;
88
+ language: NamedAPIResource<Language>;
102
89
  }
103
90
  //#endregion
104
- //#region src/models/Common/language.d.ts
91
+ //#region src/models/common/language.d.ts
105
92
  /**
106
93
  * Languages for translations of API resource information.
107
94
  */
@@ -120,154 +107,117 @@ interface Language {
120
107
  names: Name[];
121
108
  }
122
109
  //#endregion
123
- //#region src/models/Common/machine.d.ts
110
+ //#region src/models/common/description.d.ts
124
111
  /**
125
- * The machine that teaches a move from an item.
112
+ * The localized description for an API resource in a specific language.
126
113
  */
127
- interface MachineVersionDetail {
128
- /** The machine that teaches a move from an item. */
129
- machine: APIResource;
130
- /** The version group of this specific machine. */
131
- version_group: NamedAPIResource;
114
+ interface Description {
115
+ /** The localized description for an API resource in a specific language. */
116
+ description: string;
117
+ /** The language this name is in. */
118
+ language: NamedAPIResource<Language>;
132
119
  }
133
120
  //#endregion
134
- //#region src/models/Common/verbose.d.ts
121
+ //#region src/models/common/effect.d.ts
135
122
  /**
136
- * The localized effect for an API resource.
123
+ * The localized effect text for an API resource in a specific language.
137
124
  */
138
- interface VerboseEffect {
125
+ interface Effect {
139
126
  /** The localized effect text for an API resource in a specific language. */
140
127
  effect: string;
141
- /** The localized effect text in brief. */
142
- short_effect: string;
143
128
  /** The language this effect is in. */
144
- language: NamedAPIResource;
145
- }
146
- //#endregion
147
- //#region src/models/Common/version.d.ts
148
- /**
149
- * Encounters and their specific details.
150
- */
151
- interface VersionEncounterDetail {
152
- /** The game version this encounter happens in. */
153
- version: NamedAPIResource;
154
- /** The total percentage of all encounter potential. */
155
- max_chance: number;
156
- /** A list of encounters and their specifics. */
157
- encounter_details: Encounter[];
158
- }
159
- /**
160
- * The internal id and version of an API resource.
161
- */
162
- interface VersionGameIndex {
163
- /** The internal id of an API resource within game data. */
164
- game_index: number;
165
- /** The version relevant to this game index. */
166
- version: NamedAPIResource;
167
- }
168
- /**
169
- * The flavor text of an API resource.
170
- */
171
- interface VersionGroupFlavorText {
172
- /** The localized name for an API resource in a specific language. */
173
- text: string;
174
- /** The language this name is in. */
175
- language: NamedAPIResource;
176
- /** The version group which uses this flavor text. */
177
- version_group: NamedAPIResource;
129
+ language: NamedAPIResource<Language>;
178
130
  }
179
131
  //#endregion
180
- //#region src/models/Berry/berry.d.ts
132
+ //#region src/models/encounter/encounter.d.ts
181
133
  /**
182
- * ## Berry
183
- * Berries are small fruits that can provide HP and status condition restoration,
184
- * stat enhancement, and even damage negation when eaten by Pokémon.
134
+ * ## Encounter Method
135
+ * Methods by which the player can encounter Pokémon in the wild, e.g., walking in tall grass.
185
136
  *
186
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.
137
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Wild_Pok%C3%A9mon) for greater detail.
187
138
  */
188
- type Berry = {
139
+ interface EncounterMethod {
189
140
  /** The identifier for this resource. */
190
141
  id: number;
191
142
  /** The name for this resource. */
192
143
  name: string;
193
- /** Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked. */
194
- growth_time: number;
195
- /** The maximum number of these berries that can grow on one tree in Generation IV. */
196
- max_harvest: number;
197
- /** The power of the move "Natural Gift" when used with this Berry. */
198
- natural_gift_power: number;
199
- /** The size of this Berry, in millimeters. */
200
- size: number;
201
- /** The smoothness of this Berry, used in making Pokéblocks or Poffins. */
202
- smoothness: number;
203
- /** The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly. */
204
- soil_dryness: number;
205
- /** The firmness of this berry, used in making Pokéblocks or Poffins. */
206
- firmness: NamedAPIResource;
207
- /** A list of references to each flavor a berry can have and the potency of each of those flavors in regard to this berry. */
208
- flavors: BerryFlavorMap[];
209
- /** Berries are actually items. This is a reference to the item specific data for this berry. */
210
- item: NamedAPIResource;
211
- /** The type inherited by "Natural Gift" when used with this Berry. */
212
- natural_gift_type: NamedAPIResource;
213
- };
214
- /**
215
- * Reference to the flavor a berry can have and the potency of each of those flavors in regard to this berry.
216
- */
217
- type BerryFlavorMap = {
218
- /** How powerful the referenced flavor is for this berry. */
219
- potency: number;
220
- /** The referenced berry flavor. */
221
- flavor: NamedAPIResource;
222
- };
144
+ /** A good value for sorting. */
145
+ order: number;
146
+ /** The name of this resource listed in different languages. */
147
+ names: Name[];
148
+ }
223
149
  /**
224
- * ## Berry Flavor
225
- * Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on its nature.
150
+ * ## Encounter Condition
151
+ * Conditions which affect what Pokémon might appear in the wild, e.g., day or night.
226
152
  *
227
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
153
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
228
154
  */
229
- type BerryFlavor = {
155
+ interface EncounterCondition {
230
156
  /** The identifier for this resource. */
231
157
  id: number;
232
158
  /** The name for this resource. */
233
- name: "spicy" | "dry" | "sweet" | "bitter" | "sour";
234
- /** A list of the berries with this flavor. */
235
- berries: FlavorBerryMap[];
236
- /** The contest type that correlates with this berry flavor. */
237
- contest_type: NamedAPIResource;
159
+ name: string;
238
160
  /** The name of this resource listed in different languages. */
239
161
  names: Name[];
240
- };
241
- /**
242
- * Berry with the given flavor.
243
- */
244
- type FlavorBerryMap = {
245
- /** How powerful the referenced flavor is for this berry. */
246
- potency: number;
247
- /** The berry with the referenced flavor. */
248
- berry: NamedAPIResource;
249
- };
162
+ /** A list of possible values for this encounter condition. */
163
+ values: NamedAPIResource<EncounterConditionValue>[];
164
+ }
250
165
  /**
251
- * ## Berry Firmness
252
- * Berries can be soft, very soft, hard, super hard or very hard.
166
+ * ## Encounter Condition Value
167
+ * Encounter condition values are the various states that an encounter
168
+ * condition can have, i.e., time of day can be either **day** or **night**
253
169
  *
254
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.
170
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
255
171
  */
256
- type BerryFirmness = {
172
+ interface EncounterConditionValue {
257
173
  /** The identifier for this resource. */
258
174
  id: number;
259
175
  /** The name for this resource. */
260
- name: "very-soft" | "soft" | "hard" | "very-hard" | "super-hard";
261
- /** A list of the berries with this firmness. */
262
- berries: NamedAPIResource[];
176
+ name: string;
177
+ /** The condition this encounter condition value pertains to. */
178
+ condition: NamedAPIResource<EncounterCondition>;
263
179
  /** The name of this resource listed in different languages. */
264
180
  names: Name[];
265
- };
181
+ }
182
+ //#endregion
183
+ //#region src/models/common/encounter.d.ts
184
+ /**
185
+ * How the encountered Pokémon itself is generated, where a game constrains it.
186
+ *
187
+ * Only the games that impose such constraints populate this — guaranteed
188
+ * perfect IVs, forced or forbidden shininess, and Legends: Arceus alphas.
189
+ */
190
+ interface EncounterPokemonDetail {
191
+ /** How many IVs are guaranteed to be perfect, if the game guarantees any. */
192
+ min_perfect_ivs: number | null;
193
+ /** Whether the encountered Pokémon is always shiny. */
194
+ always_shiny: boolean;
195
+ /** Whether the encountered Pokémon can never be shiny. */
196
+ never_shiny: boolean;
197
+ /** Whether the encountered Pokémon is an alpha. */
198
+ is_alpha: boolean;
199
+ }
200
+ /** Information about a Pokémon encounter. */
201
+ interface Encounter {
202
+ /** The lowest level the Pokémon could be encountered at. */
203
+ min_level: number;
204
+ /** The highest level the Pokémon could be encountered at. */
205
+ max_level: number;
206
+ /** A list of condition values that must be in effect for this encounter to occur. */
207
+ condition_values: NamedAPIResource<EncounterConditionValue>[];
208
+ /** Percent chance that this encounter will occur. */
209
+ chance: number;
210
+ /** The method by which this encounter happens. */
211
+ method: NamedAPIResource<EncounterMethod>;
212
+ /** How the encountered Pokémon is generated, where the game constrains it. */
213
+ pokemon_details: EncounterPokemonDetail | null;
214
+ }
266
215
  //#endregion
267
- //#region src/models/Contest/contest.d.ts
216
+ //#region src/models/contest/contest.d.ts
268
217
  /**
269
218
  * ## Contest Type
270
219
  * Contest types are categories judges used to weigh a Pokémon's condition in Pokémon contests.
220
+ *
271
221
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Contest_condition) for greater detail.
272
222
  */
273
223
  interface ContestType {
@@ -276,7 +226,7 @@ interface ContestType {
276
226
  /** The name for this resource. */
277
227
  name: "cool" | "beauty" | "cute" | "smart" | "tough";
278
228
  /** The berry flavor that correlates with this contest type. */
279
- berry_flavor: NamedAPIResource;
229
+ berry_flavor: NamedAPIResource<BerryFlavor>;
280
230
  /** The name of this contest type listed in different languages. */
281
231
  names: ContestName[];
282
232
  }
@@ -289,7 +239,19 @@ interface ContestName {
289
239
  /** The color associated with this contest's name. */
290
240
  color: string;
291
241
  /** The language that this name is in. */
292
- language: NamedAPIResource;
242
+ language: NamedAPIResource<Language>;
243
+ }
244
+ /**
245
+ * Flavor text for a contest effect, in a single language.
246
+ *
247
+ * Deliberately not the shared `FlavorText`: contest effects are not tied to a
248
+ * game, so the API omits the `version` that type carries.
249
+ */
250
+ interface ContestFlavorText {
251
+ /** The localized flavor text. */
252
+ flavor_text: string;
253
+ /** The language this flavor text is in. */
254
+ language: NamedAPIResource<Language>;
293
255
  }
294
256
  /**
295
257
  * ## Contest Effect
@@ -305,7 +267,7 @@ interface ContestEffect {
305
267
  /** The result of this contest effect listed in different languages. */
306
268
  effect_entries: Effect[];
307
269
  /** The flavor text of this contest effect listed in different languages. */
308
- flavor_text_entries: FlavorText[];
270
+ flavor_text_entries: ContestFlavorText[];
309
271
  }
310
272
  /**
311
273
  * ## Super Contest Effect
@@ -315,6 +277,7 @@ interface ContestEffect {
315
277
  * specifically in [Diamond, Pearl](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Diamond_and_Pearl_Versions),
316
278
  * and [Platinum](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Platinum_Version).
317
279
  * In it, Pokémon are rated on their appearance and performance, rather than strength.
280
+ *
318
281
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Super_Contest).
319
282
  */
320
283
  interface SuperContestEffect {
@@ -323,17 +286,18 @@ interface SuperContestEffect {
323
286
  /** The level of appeal this super contest effect has. */
324
287
  appeal: number;
325
288
  /** The flavor text of this super contest effect listed in different languages. */
326
- flavor_text_entries: FlavorText[];
289
+ flavor_text_entries: ContestFlavorText[];
327
290
  /** A list of moves that have the effect when used in super contests. */
328
- moves: NamedAPIResource[];
291
+ moves: NamedAPIResource<Move>[];
329
292
  }
330
293
  //#endregion
331
- //#region src/models/Currency/currency.d.ts
294
+ //#region src/models/currency/currency.d.ts
332
295
  /**
333
296
  * ## Currency
334
297
  * Currencies are what items are bought and sold with. Most items are priced in
335
298
  * Pokémon Dollars, but a shop can trade in anything from Battle Points to
336
299
  * Volcanic Ash.
300
+ *
337
301
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Currency) for greater detail.
338
302
  */
339
303
  interface Currency {
@@ -345,74 +309,379 @@ interface Currency {
345
309
  names: Name[];
346
310
  }
347
311
  //#endregion
348
- //#region src/models/Encounter/encounter.d.ts
312
+ //#region src/models/item/item.d.ts
349
313
  /**
350
- * ## Encounter Method
351
- * Methods by which the player can encounter Pokémon in the wild, e.g., walking in tall grass.
352
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Wild_Pok%C3%A9mon) for greater detail.
314
+ * Sprites used to depict the given item in the game.
353
315
  */
354
- interface EncounterMethod {
316
+ interface ItemSprites {
317
+ /** The default depiction of this item. */
318
+ default: string;
319
+ }
320
+ /**
321
+ * Pokémon that might be found in the wild holding the given item.
322
+ */
323
+ interface ItemHolderPokemon {
324
+ /** The Pokémon that holds this item. */
325
+ pokemon: NamedAPIResource<Pokemon>;
326
+ /** The details for the version that this item is held in by the Pokémon. */
327
+ version_details: ItemHolderPokemonVersionDetail[];
328
+ }
329
+ /**
330
+ * The details for the version that the given item is held in by the Pokémon.
331
+ */
332
+ interface ItemHolderPokemonVersionDetail {
333
+ /** How often this Pokémon holds this item in this version. */
334
+ rarity: number;
335
+ /** The version that this item is held in by the Pokémon. */
336
+ version: NamedAPIResource<Version>;
337
+ }
338
+ /**
339
+ * ## Item Attribute
340
+ * Item attributes define particular aspects of items, e.g. "usable in battle" or "consumable".
341
+ */
342
+ interface ItemAttribute {
355
343
  /** The identifier for this resource. */
356
344
  id: number;
357
345
  /** The name for this resource. */
358
346
  name: string;
359
- /** A good value for sorting. */
360
- order: number;
361
- /** The name of this resource listed in different languages. */
347
+ /** A list of items that have this attribute. */
348
+ items: NamedAPIResource<Item>[];
349
+ /** The name of this item attribute listed in different languages. */
362
350
  names: Name[];
351
+ /** The description of this item attribute listed in different languages. */
352
+ descriptions: Description[];
363
353
  }
364
354
  /**
365
- * ## Encounter Condition
366
- * Conditions which affect what Pokémon might appear in the wild, e.g., day or night.
367
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
355
+ * ## Item Category
356
+ * Item categories determine where items will be placed in the player's bag.
368
357
  */
369
- interface EncounterCondition {
358
+ interface ItemCategory {
370
359
  /** The identifier for this resource. */
371
360
  id: number;
372
361
  /** The name for this resource. */
373
362
  name: string;
374
- /** The name of this resource listed in different languages. */
363
+ /** A list of items that are a part of this category. */
364
+ items: NamedAPIResource<Item>[];
365
+ /** The name of this item category listed in different languages. */
375
366
  names: Name[];
376
- /** A list of possible values for this encounter condition. */
377
- values: NamedAPIResource[];
367
+ /** The pocket items in this category would be put in. */
368
+ pocket: NamedAPIResource<ItemPocket>;
378
369
  }
379
370
  /**
380
- * ## Encounter Condition Value
381
- * Encounter condition values are the various states that an encounter
382
- * condition can have, i.e., time of day can be either **day** or **night**
383
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
371
+ * ## Item Fling Effect
372
+ * The various effects of the move "Fling" when used with different items.
384
373
  */
385
- interface EncounterConditionValue {
374
+ interface ItemFlingEffect {
386
375
  /** The identifier for this resource. */
387
376
  id: number;
388
377
  /** The name for this resource. */
389
378
  name: string;
390
- /** The condition this encounter condition value pertains to. */
391
- condition: NamedAPIResource;
379
+ /** The result of this fling effect listed in different languages. */
380
+ effect_entries: Effect[];
381
+ /** A list of items that have this fling effect. */
382
+ items: NamedAPIResource<Item>[];
383
+ }
384
+ /**
385
+ * ## Item Pocket
386
+ * Pockets within the player's bag used for storing items by category.
387
+ */
388
+ interface ItemPocket {
389
+ /** The identifier for this resource. */
390
+ id: number;
391
+ /** The name for this resource. */
392
+ name: string;
393
+ /** A list of item categories that are relevant to this item pocket. */
394
+ categories: NamedAPIResource<ItemCategory>[];
395
+ /** The name of this resource listed in different languages. */
396
+ names: Name[];
397
+ }
398
+ /** The price of an item in a single version group. */
399
+ interface ItemPrice {
400
+ /** The currency used for this price. */
401
+ currency: NamedAPIResource<Currency>;
402
+ /** The purchase price of this item in this version group. Null if the item cannot be purchased. */
403
+ purchase_price: number | null;
404
+ /** The sell price of this item in this version group. Null if the item cannot be sold. */
405
+ sell_price: number | null;
406
+ /** The version group these prices apply to. */
407
+ version_group: NamedAPIResource<VersionGroup>;
408
+ }
409
+ /**
410
+ * ## Item
411
+ * An item is an object in the games which the player can pick up, keep in their bag, and use in some manner.
412
+ * They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area.
413
+ *
414
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Item).
415
+ */
416
+ interface Item {
417
+ /** The identifier for this resource. */
418
+ id: number;
419
+ /** The name for this resource. */
420
+ name: string;
421
+ /** The purchase and sell prices of this item for each version group. */
422
+ prices: ItemPrice[];
423
+ /** The power of the move Fling when used with this item. */
424
+ fling_power: number | null;
425
+ /** The effect of the move Fling when used with this item. */
426
+ fling_effect: NamedAPIResource<ItemFlingEffect> | null;
427
+ /** A list of attributes this item has. */
428
+ attributes: NamedAPIResource<ItemAttribute>[];
429
+ /** The category of items this item falls into. */
430
+ category: NamedAPIResource<ItemCategory>;
431
+ /** The effect of this ability listed in different languages. */
432
+ effect_entries: VerboseEffect[];
433
+ /** The flavor text of this ability listed in different languages. */
434
+ flavor_text_entries: VersionGroupFlavorText[];
435
+ /** A list of game indices relevant to this item by generation. */
436
+ game_indices: GenerationGameIndex[];
437
+ /** The name of this item listed in different languages. */
438
+ names: Name[];
439
+ /** A set of sprites used to depict this item in the game. */
440
+ sprites: ItemSprites;
441
+ /** A list of Pokémon that might be found in the wild holding this item. */
442
+ held_by_pokemon: ItemHolderPokemon[];
443
+ /** An evolution chain this item requires to produce a baby during mating. */
444
+ baby_trigger_for: APIResource<EvolutionChain> | null;
445
+ /** A list of the machines related to this item. */
446
+ machines: MachineVersionDetail[];
447
+ }
448
+ //#endregion
449
+ //#region src/models/location/encounter.d.ts
450
+ /**
451
+ * Method in which Pokémon may be encountered in the given area
452
+ * and how likely the method will occur depending on the version of the game.
453
+ */
454
+ interface EncounterMethodRate {
455
+ /** The method in which Pokémon may be encountered in an area. */
456
+ encounter_method: NamedAPIResource<EncounterMethod>;
457
+ /** The chance of the encounter to occur on a version of the game. */
458
+ version_details: EncounterVersionDetails[];
459
+ }
460
+ /**
461
+ * The chance of the encounter to occur on a version of the game.
462
+ */
463
+ interface EncounterVersionDetails {
464
+ /** The chance of an encounter to occur. */
465
+ rate: number;
466
+ /** The version of the game in which the encounter can occur with the given chance. */
467
+ version: NamedAPIResource<Version>;
468
+ }
469
+ /**
470
+ * Describes a pokémon encounter in a given area.
471
+ */
472
+ interface PokemonEncounter {
473
+ /** The Pokémon being encountered. */
474
+ pokemon: NamedAPIResource<Pokemon>;
475
+ /** A list of versions and encounters with Pokémon that might happen in the referenced location area. */
476
+ version_details: VersionEncounterDetail[];
477
+ }
478
+ //#endregion
479
+ //#region src/models/location/location.d.ts
480
+ /**
481
+ * ## Location
482
+ * Locations that can be visited within the games.
483
+ * Locations make up sizable portions of regions, like cities or routes.
484
+ *
485
+ * - See the [List of Locations](https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name).
486
+ */
487
+ interface Location {
488
+ /** The identifier for this resource. */
489
+ id: number;
490
+ /** The name for this resource. */
491
+ name: string;
492
+ /** The region this location can be found in. */
493
+ region: NamedAPIResource<Region> | null;
494
+ /** The name of this resource listed in different languages. */
495
+ names: Name[];
496
+ /** A list of game indices relevant to this location by generation. */
497
+ game_indices: GenerationGameIndex[];
498
+ /** Areas that can be found within this location. */
499
+ areas: NamedAPIResource<LocationArea>[];
500
+ }
501
+ /**
502
+ * ## Location Area
503
+ * Location areas are sections of areas, such as floors in a building or cave.
504
+ * Each area has its own set of possible Pokémon encounters.
505
+ *
506
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Area) for greater detail.
507
+ */
508
+ interface LocationArea {
509
+ /** The identifier for this resource. */
510
+ id: number;
511
+ /** The name for this resource. */
512
+ name: string;
513
+ /** The internal id of an API resource within game data. */
514
+ game_index: number;
515
+ /** A list of methods in which Pokémon may be encountered in this area and how likely the method will occur depending on the version of the game. */
516
+ encounter_method_rates: EncounterMethodRate[];
517
+ /** The region this location area can be found in. */
518
+ location: NamedAPIResource<Location>;
519
+ /** The name of this resource listed in different languages. */
520
+ names: Name[];
521
+ /** A list of Pokémon that can be encountered in this area along with version specific details about the encounter. */
522
+ pokemon_encounters: PokemonEncounter[];
523
+ }
524
+ //#endregion
525
+ //#region src/models/pokemon/type.d.ts
526
+ /**
527
+ * Details of Pokémon for a specific type.
528
+ */
529
+ interface TypePokemon {
530
+ /** The order the Pokémon's types are listed in. */
531
+ slot: number;
532
+ /** The Pokémon that has the referenced type. */
533
+ pokemon: NamedAPIResource<Pokemon>;
534
+ }
535
+ /**
536
+ * Detail of how effective a type is toward others and vice versa.
537
+ */
538
+ interface TypeRelations {
539
+ /** A list of types this type has no effect on. */
540
+ no_damage_to: NamedAPIResource<Type>[];
541
+ /** A list of types this type is not very effective against. */
542
+ half_damage_to: NamedAPIResource<Type>[];
543
+ /** A list of types this type is very effective against. */
544
+ double_damage_to: NamedAPIResource<Type>[];
545
+ /** A list of types that have no effect on this type. */
546
+ no_damage_from: NamedAPIResource<Type>[];
547
+ /** A list of types that are not very effective against this type. */
548
+ half_damage_from: NamedAPIResource<Type>[];
549
+ /** A list of types that are very effective against this type. */
550
+ double_damage_from: NamedAPIResource<Type>[];
551
+ }
552
+ /**
553
+ * Details of how effective this type was toward others and vice versa in a previous generation.
554
+ */
555
+ interface TypeRelationsPast {
556
+ /** The last generation in which the referenced type had the listed damage relations. */
557
+ generation: NamedAPIResource<Generation>;
558
+ /** The damage relations the referenced type had up to and including the listed generation. */
559
+ damage_relations: TypeRelations;
560
+ }
561
+ /**
562
+ * The pair of icons a single game uses to depict a type.
563
+ *
564
+ * `symbol_icon` is the type's bare glyph and `name_icon` spells the name out;
565
+ * games that only ever shipped one of the two leave the other `null`.
566
+ */
567
+ interface TypeGameSprites {
568
+ /** The icon spelling out the type's name. */
569
+ name_icon: string | null;
570
+ /** The icon showing the type's symbol alone. */
571
+ symbol_icon: string | null;
572
+ }
573
+ /** Generation-III type icons, by game. */
574
+ interface GenerationIIITypeSprites {
575
+ colosseum: TypeGameSprites;
576
+ emerald: TypeGameSprites;
577
+ "firered-leafgreen": TypeGameSprites;
578
+ "ruby-sapphire": TypeGameSprites;
579
+ xd: TypeGameSprites;
580
+ }
581
+ /** Generation-IV type icons, by game. */
582
+ interface GenerationIVTypeSprites {
583
+ "diamond-pearl": TypeGameSprites;
584
+ "heartgold-soulsilver": TypeGameSprites;
585
+ platinum: TypeGameSprites;
586
+ }
587
+ /** Generation-V type icons, by game. */
588
+ interface GenerationVTypeSprites {
589
+ "black-2-white-2": TypeGameSprites;
590
+ "black-white": TypeGameSprites;
591
+ }
592
+ /** Generation-VI type icons, by game. */
593
+ interface GenerationVITypeSprites {
594
+ "omega-ruby-alpha-sapphire": TypeGameSprites;
595
+ "x-y": TypeGameSprites;
596
+ }
597
+ /** Generation-VII type icons, by game. */
598
+ interface GenerationVIITypeSprites {
599
+ "lets-go-pikachu-lets-go-eevee": TypeGameSprites;
600
+ "sun-moon": TypeGameSprites;
601
+ "ultra-sun-ultra-moon": TypeGameSprites;
602
+ }
603
+ /** Generation-VIII type icons, by game. */
604
+ interface GenerationVIIITypeSprites {
605
+ "brilliant-diamond-shining-pearl": TypeGameSprites;
606
+ "legends-arceus": TypeGameSprites;
607
+ "sword-shield": TypeGameSprites;
608
+ }
609
+ /** Generation-IX type icons, by game. */
610
+ interface GenerationIXTypeSprites {
611
+ "scarlet-violet": TypeGameSprites;
612
+ }
613
+ /**
614
+ * The icons used to depict a type, by generation and game.
615
+ *
616
+ * Generations I and II are absent: neither displayed type icons in-game.
617
+ */
618
+ interface TypeSprites {
619
+ /** Generation-III type icons. */
620
+ "generation-iii": GenerationIIITypeSprites;
621
+ /** Generation-IV type icons. */
622
+ "generation-iv": GenerationIVTypeSprites;
623
+ /** Generation-V type icons. */
624
+ "generation-v": GenerationVTypeSprites;
625
+ /** Generation-VI type icons. */
626
+ "generation-vi": GenerationVITypeSprites;
627
+ /** Generation-VII type icons. */
628
+ "generation-vii": GenerationVIITypeSprites;
629
+ /** Generation-VIII type icons. */
630
+ "generation-viii": GenerationVIIITypeSprites;
631
+ /** Generation-IX type icons. */
632
+ "generation-ix": GenerationIXTypeSprites;
633
+ }
634
+ /**
635
+ * ## Type
636
+ * Types are properties for Pokémon and their moves.
637
+ * Each type has three properties: which types of Pokémon it is super effective against,
638
+ * which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.
639
+ */
640
+ interface Type {
641
+ /** The identifier for this resource. */
642
+ id: number;
643
+ /** The name for this resource. */
644
+ name: string;
645
+ /** A detail of how effective this type is toward others and vice versa. */
646
+ damage_relations: TypeRelations;
647
+ /** A list of details of how effective this type was toward others and vice versa in previous generations. */
648
+ past_damage_relations: TypeRelationsPast[];
649
+ /** A list of game indices relevant to this item by generation. */
650
+ game_indices: GenerationGameIndex[];
651
+ /** The generation this type was introduced in. */
652
+ generation: NamedAPIResource<Generation>;
653
+ /** The class of damage inflicted by this type. */
654
+ move_damage_class: NamedAPIResource<MoveDamageClass>;
392
655
  /** The name of this resource listed in different languages. */
393
656
  names: Name[];
657
+ /** A list of details of Pokémon that have this type. */
658
+ pokemon: TypePokemon[];
659
+ /** A list of moves that have this type. */
660
+ moves: NamedAPIResource<Move>[];
661
+ /** The icons used to depict this type, by generation and game. */
662
+ sprites: TypeSprites;
394
663
  }
395
664
  //#endregion
396
- //#region src/models/Evolution/evolution.d.ts
665
+ //#region src/models/evolution/evolution.d.ts
397
666
  /**
398
667
  * ## Evolution Detail
399
668
  * All details regarding the specific details of the referenced Pokémon species evolution.
400
669
  */
401
670
  interface EvolutionDetail {
402
671
  /** The item required to cause evolution into this Pokémon species. */
403
- item: NamedAPIResource | null;
672
+ item: NamedAPIResource<Item> | null;
404
673
  /** The type of event that triggers evolution into this Pokémon species. */
405
- trigger: NamedAPIResource;
674
+ trigger: NamedAPIResource<EvolutionTrigger>;
406
675
  /** The gender the evolving Pokémon species must be in order to evolve into this Pokémon species. */
407
676
  gender: number | null;
408
677
  /** The item the evolving Pokémon species must be holding during the evolution trigger event to evolve into this Pokémon species. */
409
- held_item: NamedAPIResource | null;
678
+ held_item: NamedAPIResource<Item> | null;
410
679
  /** The move that must be known by the evolving Pokémon species during the evolution trigger event in order to evolve into this Pokémon species. */
411
- known_move: NamedAPIResource | null;
680
+ known_move: NamedAPIResource<Move> | null;
412
681
  /** The evolving Pokémon species must know a move with this type during the evolution trigger event in order to evolve into this Pokémon species. */
413
- known_move_type: NamedAPIResource | null;
682
+ known_move_type: NamedAPIResource<Type> | null;
414
683
  /** The location the evolution must be triggered at. */
415
- location: NamedAPIResource | null;
684
+ location: NamedAPIResource<Location> | null;
416
685
  /** The minimum required level the evolving Pokémon species must reach to evolve into this Pokémon species. */
417
686
  min_level: number | null;
418
687
  /** The minimum required level of happiness the evolving Pokémon species must have to evolve into this Pokémon species. */
@@ -424,22 +693,22 @@ interface EvolutionDetail {
424
693
  /** Whether or not it must be raining in the overworld to cause evolution into this Pokémon species. */
425
694
  needs_overworld_rain: boolean;
426
695
  /** The Pokémon species that must be in the player's party in order for the evolving Pokémon species to evolve into this Pokémon species. */
427
- party_species: NamedAPIResource | null;
696
+ party_species: NamedAPIResource<PokemonSpecies> | null;
428
697
  /**
429
698
  * The player must have a Pokémon of this type in their party during the evolution trigger event
430
699
  * in order for the evolving Pokémon species to evolve into this Pokémon species.
431
700
  */
432
- party_type: NamedAPIResource | null;
701
+ party_type: NamedAPIResource<Type> | null;
433
702
  /** The required relation between the Pokémon's Attack and Defense stats. 1 means Attack > Defense. 0 means Attack = Defense. -1 means Attack < Defense. */
434
703
  relative_physical_stats: 1 | 0 | -1 | null;
435
704
  /** The required time of day. Day or night. */
436
705
  time_of_day: "Day" | "Night" | "";
437
706
  /** Pokémon species for which this one must be traded. */
438
- trade_species: NamedAPIResource | null;
707
+ trade_species: NamedAPIResource<PokemonSpecies> | null;
439
708
  /** Whether or not the 3DS needs to be turned upside-down as this Pokémon levels up. */
440
709
  turn_upside_down: boolean;
441
710
  /** The version group in which the evolution was introduced. */
442
- version_group: NamedAPIResource;
711
+ version_group: NamedAPIResource<VersionGroup>;
443
712
  /**
444
713
  * Whether the evolution is the expected one in a main series game. Each Pokémon variety of a line
445
714
  * capable of evolution has exactly one default evolution per distinct variety it evolves into.
@@ -450,16 +719,16 @@ interface EvolutionDetail {
450
719
  /** Whether or not multiplayer link play is needed to evolve into this species, e.g. Union Circle. */
451
720
  needs_multiplayer: boolean;
452
721
  /** The region this evolution must occur in. */
453
- region: NamedAPIResource | null;
722
+ region: NamedAPIResource<Region> | null;
454
723
  /** The form the evolving Pokémon must be in for this evolution to occur. */
455
- base_form: NamedAPIResource | null;
724
+ base_form: NamedAPIResource<PokemonForm> | null;
456
725
  /** The form this evolution produces. */
457
- evolved_form: NamedAPIResource | null;
726
+ evolved_form: NamedAPIResource<PokemonForm> | null;
458
727
  /**
459
728
  * The move that must be used by the evolving Pokémon species during the evolution trigger event
460
729
  * in order to evolve into this Pokémon species.
461
730
  */
462
- used_move: NamedAPIResource | null;
731
+ used_move: NamedAPIResource<Move> | null;
463
732
  /** The minimum number of times `used_move` must be used to evolve into this species. */
464
733
  min_move_count: number | null;
465
734
  /** The minimum number of steps that must be taken to evolve into this species. */
@@ -479,7 +748,7 @@ interface ChainLink {
479
748
  /** Whether or not this link is for a baby Pokémon. This would only ever be true on the base link. */
480
749
  is_baby: boolean;
481
750
  /** The Pokémon species at this point in the evolution chain. */
482
- species: NamedAPIResource;
751
+ species: NamedAPIResource<PokemonSpecies>;
483
752
  /** All details regarding the specific details of the referenced Pokémon species evolution. */
484
753
  evolution_details: EvolutionDetail[];
485
754
  /** A list of chain objects. */
@@ -499,7 +768,7 @@ interface EvolutionChain {
499
768
  * The item that a Pokémon would be holding when mating that would trigger
500
769
  * the egg hatching a baby Pokémon rather than a basic Pokémon.
501
770
  */
502
- baby_trigger_item: NamedAPIResource | null;
771
+ baby_trigger_item: NamedAPIResource<Item> | null;
503
772
  /**
504
773
  * The base chain link object. Each link contains evolution details for a Pokémon in the chain.
505
774
  * Each link references the next Pokémon in the natural evolution order.
@@ -512,6 +781,7 @@ interface EvolutionChain {
512
781
  * There are numerous methods of evolution which define how and when Pokémon evolve.
513
782
  * Most Pokémon will evolve by leveling up while others evolve through specific means,
514
783
  * such as being traded, achieving a certain amount of friendship or leveling at certain times, among others.
784
+ *
515
785
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Methods_of_evolution) for greater detail.
516
786
  */
517
787
  interface EvolutionTrigger {
@@ -522,38 +792,10 @@ interface EvolutionTrigger {
522
792
  /** The name of this resource listed in different languages. */
523
793
  names: Name[];
524
794
  /** A list of Pokémon species that result from this evolution trigger. */
525
- pokemon_species: NamedAPIResource[];
526
- }
527
- //#endregion
528
- //#region src/models/Game/generation.d.ts
529
- /**
530
- * ## Generation
531
- * A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include.
532
- * In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released.
533
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Generation) for greater detail.
534
- */
535
- interface Generation {
536
- /** The identifier for this resource. */
537
- id: number;
538
- /** The name for this resource. */
539
- name: string;
540
- /** A list of abilities that were introduced in this generation. */
541
- abilities: NamedAPIResource[];
542
- /** The name of this resource listed in different languages. */
543
- names: Name[];
544
- /** The main region travelled in this generation. */
545
- main_region: NamedAPIResource;
546
- /** A list of moves that were introduced in this generation. */
547
- moves: NamedAPIResource[];
548
- /** A list of Pokémon species that were introduced in this generation. */
549
- pokemon_species: NamedAPIResource[];
550
- /** A list of types that were introduced in this generation. */
551
- types: NamedAPIResource[];
552
- /** A list of version groups that were introduced in this generation. */
553
- version_groups: NamedAPIResource[];
795
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
554
796
  }
555
797
  //#endregion
556
- //#region src/models/Game/pokemon-entry.d.ts
798
+ //#region src/models/game/pokemon-entry.d.ts
557
799
  /**
558
800
  * A Pokémon catalogued in a Pokédex.
559
801
  */
@@ -561,15 +803,16 @@ interface PokemonEntry {
561
803
  /** The index of this Pokémon species entry within the Pokédex. */
562
804
  entry_number: number;
563
805
  /** The Pokémon species being encountered. */
564
- pokemon_species: NamedAPIResource;
806
+ pokemon_species: NamedAPIResource<PokemonSpecies>;
565
807
  }
566
808
  //#endregion
567
- //#region src/models/Game/pokedex.d.ts
809
+ //#region src/models/game/pokedex.d.ts
568
810
  /**
569
811
  * ## Pokédex
570
812
  * A Pokédex is a handheld electronic encyclopedia device;
571
813
  * one which is capable of recording and retaining information of the various Pokémon in a given region
572
814
  * with the exception of the national dex and some smaller dexes related to portions of a region.
815
+ *
573
816
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9dex) for greater detail.
574
817
  */
575
818
  interface Pokedex {
@@ -586,288 +829,39 @@ interface Pokedex {
586
829
  /** A list of Pokémon catalogued in this Pokédex and their indexes. */
587
830
  pokemon_entries: PokemonEntry[];
588
831
  /** The region this Pokédex catalogues Pokémon for. */
589
- region: NamedAPIResource | null;
832
+ region: NamedAPIResource<Region> | null;
590
833
  /** A list of version groups this Pokédex is relevant to. */
591
- version_groups: NamedAPIResource[];
834
+ version_groups: NamedAPIResource<VersionGroup>[];
592
835
  }
593
836
  //#endregion
594
- //#region src/models/Game/version.d.ts
837
+ //#region src/models/location/palpark.d.ts
595
838
  /**
596
- * ## Version
597
- * Versions of the games, e.g. Red, Blue or Yellow.
598
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Core_series) for greater detail.
839
+ * ## Pal Park Area
840
+ * Areas used for grouping Pokémon encounters in Pal Park.
841
+ * They're like habitats that are specific to Pal Park.
842
+ * Pal Park is divided into five separate areas:
843
+ *
844
+ * - [Field](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Field)
845
+ * - [Forest](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Forest)
846
+ * - [Mountain](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Mountain)
847
+ * - [Pond](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Pound)
848
+ * - [Sea](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Sea)
849
+ * - [Trivia](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Trivia)
850
+ *
851
+ * See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pal_Park) for greater detail.
599
852
  */
600
- interface Version {
853
+ interface PalParkArea {
601
854
  /** The identifier for this resource. */
602
855
  id: number;
603
856
  /** The name for this resource. */
604
857
  name: string;
605
858
  /** The name of this resource listed in different languages. */
606
859
  names: Name[];
607
- /** The version group this version belongs to. */
608
- version_group: NamedAPIResource;
860
+ /** A list of Pokémon encountered in this pal park area along with details. */
861
+ pokemon_encounters: PalParkEncounterSpecies[];
609
862
  }
610
863
  /**
611
- * ## Version Group
612
- * Version groups categorize highly similar versions of the games.
613
- */
614
- interface VersionGroup {
615
- /** The identifier for this resource. */
616
- id: number;
617
- /** The name for this resource. */
618
- name: string;
619
- /** Order for sorting. Almost by date of release, except similar versions are grouped together. */
620
- order: number;
621
- /** The generation this version was introduced in. */
622
- generation: NamedAPIResource;
623
- /** A list of methods in which Pokémon can learn moves in this version group. */
624
- move_learn_methods: NamedAPIResource[];
625
- /** A list of Pokédexes introduced in this version group. */
626
- pokedexes: NamedAPIResource[];
627
- /** A list of regions that can be visited in this version group. */
628
- regions: NamedAPIResource[];
629
- /** The versions this version group owns. */
630
- versions: NamedAPIResource[];
631
- }
632
- //#endregion
633
- //#region src/models/Item/item.d.ts
634
- /**
635
- * Sprites used to depict the given item in the game.
636
- */
637
- interface ItemSprites {
638
- /** The default depiction of this item. */
639
- default: string;
640
- }
641
- /**
642
- * Pokémon that might be found in the wild holding the given item.
643
- */
644
- interface ItemHolderPokemon {
645
- /** The Pokémon that holds this item. */
646
- pokemon: NamedAPIResource;
647
- /** The details for the version that this item is held in by the Pokémon. */
648
- version_details: ItemHolderPokemonVersionDetail[];
649
- }
650
- /**
651
- * The details for the version that the given item is held in by the Pokémon.
652
- */
653
- interface ItemHolderPokemonVersionDetail {
654
- /** How often this Pokémon holds this item in this version. */
655
- rarity: number;
656
- /** The version that this item is held in by the Pokémon. */
657
- version: NamedAPIResource;
658
- }
659
- /**
660
- * ## Item Attribute
661
- * Item attributes define particular aspects of items, e.g. "usable in battle" or "consumable".
662
- */
663
- interface ItemAttribute {
664
- /** The identifier for this resource. */
665
- id: number;
666
- /** The name for this resource. */
667
- name: string;
668
- /** A list of items that have this attribute. */
669
- items: NamedAPIResource[];
670
- /** The name of this item attribute listed in different languages. */
671
- names: Name[];
672
- /** The description of this item attribute listed in different languages. */
673
- descriptions: Description[];
674
- }
675
- /**
676
- * ## Item Category
677
- * Item categories determine where items will be placed in the player's bag.
678
- */
679
- interface ItemCategory {
680
- /** The identifier for this resource. */
681
- id: number;
682
- /** The name for this resource. */
683
- name: string;
684
- /** A list of items that are a part of this category. */
685
- items: NamedAPIResource[];
686
- /** The name of this item category listed in different languages. */
687
- names: Name[];
688
- /** The pocket items in this category would be put in. */
689
- pocket: NamedAPIResource;
690
- }
691
- /**
692
- * ## Item Fling Effect
693
- * The various effects of the move "Fling" when used with different items.
694
- */
695
- interface ItemFlingEffect {
696
- /** The identifier for this resource. */
697
- id: number;
698
- /** The name for this resource. */
699
- name: string;
700
- /** The result of this fling effect listed in different languages. */
701
- effect_entries: Effect[];
702
- /** A list of items that have this fling effect. */
703
- items: NamedAPIResource[];
704
- }
705
- /**
706
- * ## Item Pocket
707
- * Pockets within the player's bag used for storing items by category.
708
- */
709
- interface ItemPocket {
710
- /** The identifier for this resource. */
711
- id: number;
712
- /** The name for this resource. */
713
- name: string;
714
- /** A list of item categories that are relevant to this item pocket. */
715
- categories: NamedAPIResource[];
716
- /** The name of this resource listed in different languages. */
717
- names: Name[];
718
- }
719
- /** The price of an item in a single version group. */
720
- interface ItemPrice {
721
- /** The currency used for this price. */
722
- currency: NamedAPIResource;
723
- /** The purchase price of this item in this version group. Null if the item cannot be purchased. */
724
- purchase_price: number | null;
725
- /** The sell price of this item in this version group. Null if the item cannot be sold. */
726
- sell_price: number | null;
727
- /** The version group these prices apply to. */
728
- version_group: NamedAPIResource;
729
- }
730
- /**
731
- * ## Item
732
- * An item is an object in the games which the player can pick up, keep in their bag, and use in some manner.
733
- * They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area.
734
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Item).
735
- */
736
- interface Item {
737
- /** The identifier for this resource. */
738
- id: number;
739
- /** The name for this resource. */
740
- name: string;
741
- /** The purchase and sell prices of this item for each version group. */
742
- prices: ItemPrice[];
743
- /** The power of the move Fling when used with this item. */
744
- fling_power: number | null;
745
- /** The effect of the move Fling when used with this item. */
746
- fling_effect: NamedAPIResource | null;
747
- /** A list of attributes this item has. */
748
- attributes: NamedAPIResource[];
749
- /** The category of items this item falls into. */
750
- category: NamedAPIResource;
751
- /** The effect of this ability listed in different languages. */
752
- effect_entries: VerboseEffect[];
753
- /** The flavor text of this ability listed in different languages. */
754
- flavor_text_entries: VersionGroupFlavorText[];
755
- /** A list of game indices relevant to this item by generation. */
756
- game_indices: GenerationGameIndex[];
757
- /** The name of this item listed in different languages. */
758
- names: Name[];
759
- /** A set of sprites used to depict this item in the game. */
760
- sprites: ItemSprites;
761
- /** A list of Pokémon that might be found in the wild holding this item. */
762
- held_by_pokemon: ItemHolderPokemon[];
763
- /** An evolution chain this item requires to produce a baby during mating. */
764
- baby_trigger_for: APIResource | null;
765
- /** A list of the machines related to this item. */
766
- machines: MachineVersionDetail[];
767
- }
768
- //#endregion
769
- //#region src/models/Location/encounter.d.ts
770
- /**
771
- * Method in which Pokémon may be encountered in the given area
772
- * and how likely the method will occur depending on the version of the game.
773
- */
774
- interface EncounterMethodRate {
775
- /** The method in which Pokémon may be encountered in an area. */
776
- encounter_method: NamedAPIResource;
777
- /** The chance of the encounter to occur on a version of the game. */
778
- version_details: EncounterVersionDetails[];
779
- }
780
- /**
781
- * The chance of the encounter to occur on a version of the game.
782
- */
783
- interface EncounterVersionDetails {
784
- /** The chance of an encounter to occur. */
785
- rate: number;
786
- /** The version of the game in which the encounter can occur with the given chance. */
787
- version: NamedAPIResource;
788
- }
789
- /**
790
- * Describes a pokémon encounter in a given area.
791
- */
792
- interface PokemonEncounter {
793
- /** The Pokémon being encountered. */
794
- pokemon: NamedAPIResource;
795
- /** A list of versions and encounters with Pokémon that might happen in the referenced location area. */
796
- version_details: VersionEncounterDetail[];
797
- }
798
- //#endregion
799
- //#region src/models/Location/location.d.ts
800
- /**
801
- * ## Location
802
- * Locations that can be visited within the games.
803
- * Locations make up sizable portions of regions, like cities or routes.
804
- * - See the [List of Locations](https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name).
805
- */
806
- interface Location {
807
- /** The identifier for this resource. */
808
- id: number;
809
- /** The name for this resource. */
810
- name: string;
811
- /** The region this location can be found in. */
812
- region: NamedAPIResource | null;
813
- /** The name of this resource listed in different languages. */
814
- names: Name[];
815
- /** A list of game indices relevant to this location by generation. */
816
- game_indices: GenerationGameIndex[];
817
- /** Areas that can be found within this location. */
818
- areas: NamedAPIResource[];
819
- }
820
- /**
821
- * ## Location Area
822
- * Location areas are sections of areas, such as floors in a building or cave.
823
- * Each area has its own set of possible Pokémon encounters.
824
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Area) for greater detail.
825
- */
826
- interface LocationArea {
827
- /** The identifier for this resource. */
828
- id: number;
829
- /** The name for this resource. */
830
- name: string;
831
- /** The internal id of an API resource within game data. */
832
- game_index: number;
833
- /** A list of methods in which Pokémon may be encountered in this area and how likely the method will occur depending on the version of the game. */
834
- encounter_method_rates: EncounterMethodRate[];
835
- /** The region this location area can be found in. */
836
- location: NamedAPIResource;
837
- /** The name of this resource listed in different languages. */
838
- names: Name[];
839
- /** A list of Pokémon that can be encountered in this area along with version specific details about the encounter. */
840
- pokemon_encounters: PokemonEncounter[];
841
- }
842
- //#endregion
843
- //#region src/models/Location/palpark.d.ts
844
- /**
845
- * ## Pal Park Area
846
- * Areas used for grouping Pokémon encounters in Pal Park.
847
- * They're like habitats that are specific to Pal Park.
848
- * Pal Park is divided into five separate areas:
849
- * ---
850
- * - [Field](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Field)
851
- * - [Forest](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Forest)
852
- * - [Mountain](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Mountain)
853
- * - [Pond](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Pound)
854
- * - [Sea](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Sea)
855
- * - [Trivia](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Trivia)
856
- * ---
857
- * See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pal_Park) for greater detail.
858
- */
859
- interface PalParkArea {
860
- /** The identifier for this resource. */
861
- id: number;
862
- /** The name for this resource. */
863
- name: string;
864
- /** The name of this resource listed in different languages. */
865
- names: Name[];
866
- /** A list of Pokémon encountered in this pal park area along with details. */
867
- pokemon_encounters: PalParkEncounterSpecies[];
868
- }
869
- /**
870
- * Details of a Pokémon encountered in this Pal Park area.
864
+ * Details of a Pokémon encountered in this Pal Park area.
871
865
  */
872
866
  interface PalParkEncounterSpecies {
873
867
  /** The base score given to the player when this Pokémon is caught during a pal park run. */
@@ -875,181 +869,29 @@ interface PalParkEncounterSpecies {
875
869
  /** The base rate for encountering this Pokémon in this pal park area. */
876
870
  rate: number;
877
871
  /** The Pokémon species being encountered. */
878
- pokemon_species: NamedAPIResource;
879
- }
880
- //#endregion
881
- //#region src/models/Location/region.d.ts
882
- /**
883
- * ## Region
884
- * A region is an organized area of the Pokémon world.
885
- * Most often, the main difference between regions is
886
- * the species of Pokémon that can be encountered within them.
887
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Region) for greater detail.
888
- */
889
- type Region = {
890
- /** The identifier for this resource. */
891
- id: number;
892
- /** A list of locations that can be found in this region. */
893
- locations: NamedAPIResource[];
894
- /** The name for this resource. */
895
- name: string;
896
- /** The name of this resource listed in different languages. */
897
- names: Name[];
898
- /** The generation this region was introduced in. */
899
- main_generation: NamedAPIResource;
900
- /** A list of Pokédexes that catalogue Pokémon in this region. */
901
- pokedexes: NamedAPIResource[];
902
- /** A list of version groups where this region can be visited. */
903
- version_groups: NamedAPIResource[];
904
- };
905
- //#endregion
906
- //#region src/models/Machine/machine.d.ts
907
- /**
908
- * ## Machine
909
- * Machines are the representation of items that teach moves to Pokémon.
910
- * They vary from version to version, so it is not certain that one specific
911
- * [TM (Technical Machine)](https://bulbapedia.bulbagarden.net/wiki/TM) or
912
- * [HM (Hidden Machine)](https://bulbapedia.bulbagarden.net/wiki/HM) corresponds to a single Machine.
913
- */
914
- type Machine = {
915
- /** The identifier for this resource. */
916
- id: number;
917
- /** The TM or HM item that corresponds to this machine. */
918
- item: NamedAPIResource;
919
- /** The move that is taught by this machine. */
920
- move: NamedAPIResource;
921
- /** The version group that this machine applies to. */
922
- version_group: NamedAPIResource;
923
- };
924
- //#endregion
925
- //#region src/models/Pokemon/ability.d.ts
926
- /**
927
- * ## Ability
928
- * Abilities provide passive effects for Pokémon in battle or in the overworld.
929
- * Pokémon have multiple possible abilities but can have only one ability at a time.
930
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail.
931
- */
932
- interface Ability {
933
- /** The identifier for this resource. */
934
- id: number;
935
- /** The name for this resource. */
936
- name: string;
937
- /** Whether or not this ability originated in the main series of the video games. */
938
- is_main_series: boolean;
939
- /** The generation this ability originated in. */
940
- generation: NamedAPIResource;
941
- /** The name of this resource listed in different languages. */
942
- names: Name[];
943
- /** The effect of this ability listed in different languages. */
944
- effect_entries: VerboseEffect[];
945
- /** The list of previous effects this ability has had across version groups. */
946
- effect_changes: AbilityEffectChange[];
947
- /** The flavor text of this ability listed in different languages. */
948
- flavor_text_entries: AbilityFlavorText[];
949
- /** A list of Pokémon that could potentially have this ability. */
950
- pokemon: AbilityPokemon[];
951
- }
952
- /**
953
- * Previous effects an ability has had across version groups.
954
- */
955
- interface AbilityEffectChange {
956
- /** The previous effect of this ability listed in different languages. */
957
- effect_entries: Effect[];
958
- /** The version group in which the previous effect of this ability originated. */
959
- version_group: NamedAPIResource;
960
- }
961
- /**
962
- * The flavor text of an ability.
963
- */
964
- interface AbilityFlavorText {
965
- /** The localized name for an API resource in a specific language. */
966
- flavor_text: string;
967
- /** The language this text resource is in. */
968
- language: NamedAPIResource;
969
- /** The version group that uses this flavor text. */
970
- version_group: NamedAPIResource;
971
- }
972
- /**
973
- * Pokémon that could potentially have the given ability.
974
- */
975
- interface AbilityPokemon {
976
- /** Whether or not this is a hidden ability for the referenced Pokémon. */
977
- is_hidden: boolean;
978
- /**
979
- * Pokémon have 3 ability 'slots' which hold references to possible abilities they could have.
980
- * This is the slot of this ability for the referenced pokemon.
981
- */
982
- slot: number;
983
- /** The Pokémon this ability could belong to. */
984
- pokemon: NamedAPIResource;
985
- }
986
- //#endregion
987
- //#region src/models/Pokemon/characteristics.d.ts
988
- /**
989
- * ## Characteristic
990
- * Characteristics indicate which stat contains a Pokémon's highest IV.
991
- * A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo).
992
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Characteristic) for greater detail.
993
- */
994
- interface Characteristic {
995
- /** The identifier for this resource. */
996
- id: number;
997
- /** The remainder of the highest stat/IV divided by 5. */
998
- gene_modulo: number;
999
- /** The possible values of the highest stat that would result in a Pokémon receiving this characteristic when divided by 5. */
1000
- possible_values: number[];
1001
- /** The highest stat for the referenced characteristic. */
1002
- highest_stat: NamedAPIResource;
1003
- /** Descriptions for the referenced characteristic. */
1004
- descriptions: Description[];
872
+ pokemon_species: NamedAPIResource<PokemonSpecies>;
1005
873
  }
1006
874
  //#endregion
1007
- //#region src/models/Pokemon/egg-group.d.ts
875
+ //#region src/models/pokemon/egg-group.d.ts
1008
876
  /**
1009
877
  * ## Egg Group
1010
878
  * Egg Groups are categories which determine which Pokémon are able to interbreed.
1011
879
  * Pokémon may belong to either one or two Egg Groups.
880
+ *
1012
881
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Egg_Group) for greater detail.
1013
882
  */
1014
- interface EggGroup {
1015
- /** The identifier for this resource. */
1016
- id: number;
1017
- /** The name for this resource. */
1018
- name: "monster" | "water1" | "water2" | "water3" | "bug" | "flying" | "ground" | "fairy" | "plant" | "humanshape" | "mineral" | "indeterminate" | "ditto" | "dragon" | "no-eggs";
1019
- /** The name of this resource listed in different languages. */
1020
- names: Name[];
1021
- /** A list of all Pokémon species that are members of this egg group. */
1022
- pokemon_species: NamedAPIResource[];
1023
- }
1024
- //#endregion
1025
- //#region src/models/Pokemon/gender.d.ts
1026
- /**
1027
- * ## Gender
1028
- * Genders were introduced in Generation II for the purposes of breeding Pokémon
1029
- * but can also result in visual differences or even different evolutionary lines.
1030
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Gender) for greater detail.
1031
- */
1032
- interface Gender {
883
+ interface EggGroup {
1033
884
  /** The identifier for this resource. */
1034
885
  id: number;
1035
886
  /** The name for this resource. */
1036
- name: "male" | "female" | "genderless";
1037
- /** A list of Pokémon species that can be this gender and how likely it is that they will be. */
1038
- pokemon_species_details: PokemonSpeciesGender[];
1039
- /** A list of Pokémon species that required this gender in order for a Pokémon to evolve into them. */
1040
- required_for_evolution: NamedAPIResource[];
1041
- }
1042
- /**
1043
- * Pokémon species that can be this gender and how likely it is that they will be.
1044
- */
1045
- interface PokemonSpeciesGender {
1046
- /** The chance of this Pokémon being female, in eighths; or -1 for genderless. */
1047
- rate: number;
1048
- /** A Pokémon species that can be the referenced gender. */
1049
- pokemon_species: NamedAPIResource;
887
+ name: "monster" | "water1" | "water2" | "water3" | "bug" | "flying" | "ground" | "fairy" | "plant" | "humanshape" | "mineral" | "indeterminate" | "ditto" | "dragon" | "no-eggs";
888
+ /** The name of this resource listed in different languages. */
889
+ names: Name[];
890
+ /** A list of all Pokémon species that are members of this egg group. */
891
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
1050
892
  }
1051
893
  //#endregion
1052
- //#region src/models/Pokemon/growth-rates.d.ts
894
+ //#region src/models/pokemon/growth-rate.d.ts
1053
895
  /**
1054
896
  * Levels and the amount of experience needed to attain them based on the given growth rate.
1055
897
  */
@@ -1062,6 +904,7 @@ interface GrowthRateExperienceLevel {
1062
904
  /**
1063
905
  * ## Growth Rate
1064
906
  * Growth rates are the speed with which Pokémon gain levels through experience.
907
+ *
1065
908
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Experience) for greater detail.
1066
909
  */
1067
910
  interface GrowthRate {
@@ -1076,13 +919,72 @@ interface GrowthRate {
1076
919
  /** A list of levels and the amount of experience needed to attain them based on this growth rate. */
1077
920
  levels: GrowthRateExperienceLevel[];
1078
921
  /** A list of Pokémon species that gain levels at this growth rate. */
1079
- pokemon_species: NamedAPIResource[];
922
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
923
+ }
924
+ //#endregion
925
+ //#region src/models/pokemon/characteristic.d.ts
926
+ /**
927
+ * ## Characteristic
928
+ * Characteristics indicate which stat contains a Pokémon's highest IV.
929
+ * A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo).
930
+ *
931
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Characteristic) for greater detail.
932
+ */
933
+ interface Characteristic {
934
+ /** The identifier for this resource. */
935
+ id: number;
936
+ /** The remainder of the highest stat/IV divided by 5. */
937
+ gene_modulo: number;
938
+ /** The possible values of the highest stat that would result in a Pokémon receiving this characteristic when divided by 5. */
939
+ possible_values: number[];
940
+ /** The highest stat for the referenced characteristic. */
941
+ highest_stat: NamedAPIResource<Stat>;
942
+ /** Descriptions for the referenced characteristic. */
943
+ descriptions: Description[];
944
+ }
945
+ //#endregion
946
+ //#region src/models/pokemon/pokeathlon-stat.d.ts
947
+ /**
948
+ * ## Pokéathlon Stat
949
+ * Pokéathlon Stats are different attributes of a Pokémon's performance in Pokéathlons.
950
+ * In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats.
951
+ *
952
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.
953
+ */
954
+ interface PokeathlonStat {
955
+ /** The identifier for this resource. */
956
+ id: number;
957
+ /** The name for this resource. */
958
+ name: "speed" | "power" | "skill" | "stamina" | "jump";
959
+ /** The name of this resource listed in different languages. */
960
+ names: Name[];
961
+ /** A detail of natures which affect this Pokéathlon stat positively or negatively. */
962
+ affecting_natures: NaturePokeathlonStatAffectSets;
963
+ }
964
+ /**
965
+ * A nature and how it changes the referenced Pokéathlon stat.
966
+ */
967
+ interface NaturePokeathlonStatAffect {
968
+ /** The maximum amount of change to the referenced Pokéathlon stat. */
969
+ max_change: -1 | -2 | 1 | 2;
970
+ /** The nature causing the change. */
971
+ nature: NamedAPIResource<Nature>;
972
+ }
973
+ /**
974
+ * A detail of natures which affect this Pokéathlon stat positively or negatively.
975
+ */
976
+ interface NaturePokeathlonStatAffectSets {
977
+ /** A list of natures and how they change the referenced Pokéathlon stat. */
978
+ increase: NaturePokeathlonStatAffect[];
979
+ /** A list of natures and how they change the referenced Pokéathlon stat. */
980
+ decrease: NaturePokeathlonStatAffect[];
1080
981
  }
1081
982
  //#endregion
1082
- //#region src/models/Pokemon/nature.d.ts
983
+ //#region src/models/pokemon/nature.d.ts
1083
984
  /**
1084
985
  * ## Nature
1085
986
  * Natures influence how a Pokémon's stats grow.
987
+ *
1086
988
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Nature) for greater detail.
1087
989
  */
1088
990
  interface Nature {
@@ -1091,13 +993,13 @@ interface Nature {
1091
993
  /** The name for this resource. */
1092
994
  name: string;
1093
995
  /** The stat decreased by 10% in Pokémon with this nature. */
1094
- decreased_stat: NamedAPIResource | null;
996
+ decreased_stat: NamedAPIResource<Stat> | null;
1095
997
  /** The stat increased by 10% in Pokémon with this nature. */
1096
- increased_stat: NamedAPIResource | null;
998
+ increased_stat: NamedAPIResource<Stat> | null;
1097
999
  /** The flavor hated by Pokémon with this nature. */
1098
- hates_flavor: NamedAPIResource | null;
1000
+ hates_flavor: NamedAPIResource<BerryFlavor> | null;
1099
1001
  /** The flavor liked by Pokémon with this nature. */
1100
- likes_flavor: NamedAPIResource | null;
1002
+ likes_flavor: NamedAPIResource<BerryFlavor> | null;
1101
1003
  /** A list of Pokéathlon stats this nature affects and by how much. */
1102
1004
  pokeathlon_stat_changes: NatureStatChange[];
1103
1005
  /** A list of battle styles and how likely a Pokémon with this nature is to use them in the Battle Palace or Battle Tent. */
@@ -1112,7 +1014,7 @@ interface NatureStatChange {
1112
1014
  /** The amount of change. */
1113
1015
  max_change: -1 | 1 | -2 | 2;
1114
1016
  /** The stat being affected. */
1115
- pokeathlon_stat: NamedAPIResource;
1017
+ pokeathlon_stat: NamedAPIResource<PokeathlonStat>;
1116
1018
  }
1117
1019
  /**
1118
1020
  * Battle Style and how likely a Pokémon with the given nature is to use them
@@ -1124,52 +1026,73 @@ interface MoveBattleStylePreference {
1124
1026
  /** Chance of using the move, in percent, if HP is over one half. */
1125
1027
  high_hp_preference: number;
1126
1028
  /** The move battle style. */
1127
- move_battle_style: NamedAPIResource;
1029
+ move_battle_style: NamedAPIResource<MoveBattleStyle>;
1128
1030
  }
1129
1031
  //#endregion
1130
- //#region src/models/Pokemon/pokeathlon-stat.d.ts
1032
+ //#region src/models/pokemon/stat.d.ts
1131
1033
  /**
1132
- * ## Pokéathlon Stat
1133
- * Pokéathlon Stats are different attributes of a Pokémon's performance in Pokéathlons.
1134
- * In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats.
1135
- * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.
1034
+ * ## Stat
1035
+ * Stats determine certain aspects of battles. Each Pokémon has a value for each stat
1036
+ * which grows as they gain levels and can be altered momentarily by effects in battles.
1136
1037
  */
1137
- interface PokeathlonStat {
1038
+ interface Stat {
1138
1039
  /** The identifier for this resource. */
1139
1040
  id: number;
1140
1041
  /** The name for this resource. */
1141
- name: "speed" | "power" | "skill" | "stamina" | "jump";
1042
+ name: "hp" | "attack" | "defense" | "special-attack" | "special-defense" | "speed" | "accuracy" | "evasion";
1043
+ /** ID the games use for this stat. */
1044
+ game_index: number;
1045
+ /** Whether this stat only exists within a battle. */
1046
+ is_battle_only: boolean;
1047
+ /** A detail of moves which affect this stat positively or negatively. */
1048
+ affecting_moves: MoveStatAffectSets;
1049
+ /** A detail of natures which affect this stat positively or negatively. */
1050
+ affecting_natures: NatureStatAffectSets;
1051
+ /** A list of items which affect this stat. */
1052
+ affecting_items: NamedAPIResource<Item>[];
1053
+ /** A list of characteristics that are set on a Pokémon when its highest base stat is this stat. */
1054
+ characteristics: APIResource<Characteristic>[];
1055
+ /** The class of damage this stat is directly related to. */
1056
+ move_damage_class: NamedAPIResource<MoveDamageClass> | null;
1142
1057
  /** The name of this resource listed in different languages. */
1143
1058
  names: Name[];
1144
- /** A detail of natures which affect this Pokéathlon stat positively or negatively. */
1145
- affecting_natures: NaturePokeathlonStatAffectSets;
1146
1059
  }
1147
1060
  /**
1148
- * A nature and how it changes the referenced Pokéathlon stat.
1061
+ * A detail of natures which affect the given stat positively or negatively.
1149
1062
  */
1150
- interface NaturePokeathlonStatAffect {
1151
- /** The maximum amount of change to the referenced Pokéathlon stat. */
1152
- max_change: -1 | -2 | 1 | 2;
1153
- /** The nature causing the change. */
1154
- nature: NamedAPIResource;
1063
+ interface NatureStatAffectSets {
1064
+ /** A list of natures and how they change the referenced stat. */
1065
+ increase: NamedAPIResource<Nature>[];
1066
+ /** A list of natures and how they change the referenced stat. */
1067
+ decrease: NamedAPIResource<Nature>[];
1155
1068
  }
1156
1069
  /**
1157
- * A detail of natures which affect this Pokéathlon stat positively or negatively.
1070
+ * A move and how it changes the referenced stat.
1158
1071
  */
1159
- interface NaturePokeathlonStatAffectSets {
1160
- /** A list of natures and how they change the referenced Pokéathlon stat. */
1161
- increase: NaturePokeathlonStatAffect[];
1162
- /** A list of natures and how they change the referenced Pokéathlon stat. */
1163
- decrease: NaturePokeathlonStatAffect[];
1072
+ interface MoveStatAffect {
1073
+ /** The maximum amount of change to the referenced stat. */
1074
+ change: -1 | -2 | 1 | 2;
1075
+ /** The move causing the change. */
1076
+ move: NamedAPIResource<Move>;
1077
+ }
1078
+ /**
1079
+ * A detail of moves which affect a stat positively or negatively.
1080
+ */
1081
+ interface MoveStatAffectSets {
1082
+ /** A list of moves and how they change the referenced stat. */
1083
+ increase: MoveStatAffect[];
1084
+ /** A list of moves and how they change the referenced stat. */
1085
+ decrease: MoveStatAffect[];
1164
1086
  }
1165
1087
  //#endregion
1166
- //#region src/models/Pokemon/pokemon.d.ts
1088
+ //#region src/models/pokemon/pokemon.d.ts
1167
1089
  /**
1168
1090
  * ## Pokémon
1169
1091
  * Pokémon are the creatures that inhabit the world of the Pokémon games.
1170
1092
  * They can be caught using Pokéballs and trained by battling with other Pokémon.
1171
1093
  * Each Pokémon belongs to a specific species but may take on a variant
1172
1094
  * which makes it differ from other Pokémon of the same species, such as base stats, available abilities and typings.
1095
+ *
1173
1096
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_(species)) for greater detail.
1174
1097
  */
1175
1098
  interface Pokemon {
@@ -1190,7 +1113,7 @@ interface Pokemon {
1190
1113
  /** A list of abilities this Pokémon could potentially have. */
1191
1114
  abilities: PokemonAbility[];
1192
1115
  /** A list of forms this Pokémon can take on. */
1193
- forms: NamedAPIResource[];
1116
+ forms: NamedAPIResource<PokemonForm>[];
1194
1117
  /** A list of game indices relevant to this Pokémon by generation. */
1195
1118
  game_indices: VersionGameIndex[];
1196
1119
  /** A list of items this Pokémon may be holding when encountered. */
@@ -1204,7 +1127,7 @@ interface Pokemon {
1204
1127
  /** A set of cries used to depict this Pokémon in the game. */
1205
1128
  cries: PokemonCries;
1206
1129
  /** The species this Pokémon belongs to. */
1207
- species: NamedAPIResource;
1130
+ species: NamedAPIResource<PokemonSpecies>;
1208
1131
  /** A list of base stat values for this Pokémon. */
1209
1132
  stats: PokemonStat[];
1210
1133
  /** A list of details showing types this Pokémon has. */
@@ -1232,7 +1155,7 @@ interface PokemonAbility {
1232
1155
  /** The slot this ability occupies in this Pokémon species. */
1233
1156
  slot: number;
1234
1157
  /** The ability the Pokémon may have. */
1235
- ability: NamedAPIResource;
1158
+ ability: NamedAPIResource<Ability>;
1236
1159
  }
1237
1160
  /**
1238
1161
  * Details showing types the given Pokémon has.
@@ -1241,14 +1164,14 @@ interface PokemonType {
1241
1164
  /** The order the Pokémon's types are listed in. */
1242
1165
  slot: number;
1243
1166
  /** The type the referenced Pokémon has. */
1244
- type: NamedAPIResource;
1167
+ type: NamedAPIResource<Type>;
1245
1168
  }
1246
1169
  /**
1247
1170
  * Data describing a Pokémon's types in a previous generation.
1248
1171
  */
1249
1172
  interface PokemonPastType {
1250
1173
  /** The generation of this Pokémon Type. */
1251
- generation: NamedAPIResource;
1174
+ generation: NamedAPIResource<Generation>;
1252
1175
  /** The types this Pokémon had in a previous generation. */
1253
1176
  types: PokemonType[];
1254
1177
  }
@@ -1259,19 +1182,19 @@ interface PokemonPastAbilitySlot {
1259
1182
  /** The slot this ability occupied in this Pokémon species. */
1260
1183
  slot: number;
1261
1184
  /** The ability that occupied the slot, or `null` when the slot was empty. */
1262
- ability: NamedAPIResource | null;
1185
+ ability: NamedAPIResource<Ability> | null;
1263
1186
  }
1264
1187
  /** Data describing a Pokémon's abilities in a previous generation. */
1265
1188
  interface PokemonPastAbility {
1266
1189
  /** The last generation in which the referenced Pokémon had the listed abilities. */
1267
- generation: NamedAPIResource;
1190
+ generation: NamedAPIResource<Generation>;
1268
1191
  /** The abilities the referenced Pokémon had up to and including the listed generation. */
1269
1192
  abilities: PokemonPastAbilitySlot[];
1270
1193
  }
1271
1194
  /** Data describing a Pokémon's stats in a previous generation. */
1272
1195
  interface PokemonPastStat {
1273
1196
  /** The last generation in which the referenced Pokémon had the listed stats. */
1274
- generation: NamedAPIResource;
1197
+ generation: NamedAPIResource<Generation>;
1275
1198
  /** The stats the Pokémon had up to and including the listed generation. */
1276
1199
  stats: PokemonStat[];
1277
1200
  }
@@ -1280,7 +1203,7 @@ interface PokemonPastStat {
1280
1203
  */
1281
1204
  interface PokemonHeldItem {
1282
1205
  /** The item the referenced Pokémon holds. */
1283
- item: NamedAPIResource;
1206
+ item: NamedAPIResource<Item>;
1284
1207
  /** The details of the different versions in which the item is held. */
1285
1208
  version_details: PokemonHeldItemVersion[];
1286
1209
  }
@@ -1289,7 +1212,7 @@ interface PokemonHeldItem {
1289
1212
  */
1290
1213
  interface PokemonHeldItemVersion {
1291
1214
  /** The version in which the item is held. */
1292
- version: NamedAPIResource;
1215
+ version: NamedAPIResource<Version>;
1293
1216
  /** How often the item is held. */
1294
1217
  rarity: number;
1295
1218
  }
@@ -1298,7 +1221,7 @@ interface PokemonHeldItemVersion {
1298
1221
  */
1299
1222
  interface PokemonMove {
1300
1223
  /** The move the Pokémon can learn. */
1301
- move: NamedAPIResource;
1224
+ move: NamedAPIResource<Move>;
1302
1225
  /** The details of the version in which the Pokémon can learn the move. */
1303
1226
  version_group_details: PokemonMoveVersion[];
1304
1227
  }
@@ -1307,9 +1230,9 @@ interface PokemonMove {
1307
1230
  */
1308
1231
  interface PokemonMoveVersion {
1309
1232
  /** The method by which the move is learned. */
1310
- move_learn_method: NamedAPIResource;
1233
+ move_learn_method: NamedAPIResource<MoveLearnMethod>;
1311
1234
  /** The version group in which the move is learned. */
1312
- version_group: NamedAPIResource;
1235
+ version_group: NamedAPIResource<VersionGroup>;
1313
1236
  /** The minimum level to learn the move. */
1314
1237
  level_learned_at: number;
1315
1238
  /**
@@ -1323,7 +1246,7 @@ interface PokemonMoveVersion {
1323
1246
  */
1324
1247
  interface PokemonStat {
1325
1248
  /** The stat the Pokémon has. */
1326
- stat: NamedAPIResource;
1249
+ stat: NamedAPIResource<Stat>;
1327
1250
  /** The effort points (EV) the Pokémon has in the stat. */
1328
1251
  effort: number;
1329
1252
  /** The base value of the stat. */
@@ -1347,6 +1270,8 @@ interface VersionSprites {
1347
1270
  "generation-vii": GenerationVIISprites;
1348
1271
  /** Generation-VIII Sprites of this Pokémon. */
1349
1272
  "generation-viii": GenerationVIIISprites;
1273
+ /** Generation-IX Sprites of this Pokémon. */
1274
+ "generation-ix": GenerationIXSprites;
1350
1275
  }
1351
1276
  /**
1352
1277
  * A set of sprites used to depict this Pokémon in the game.
@@ -1396,6 +1321,8 @@ interface DreamWorld {
1396
1321
  interface OfficialArtwork {
1397
1322
  /** The default depiction of this Pokémon from the front in battle. */
1398
1323
  front_default: string | null;
1324
+ /** The shiny depiction of this Pokémon from the front in battle. */
1325
+ front_shiny: string | null;
1399
1326
  }
1400
1327
  /** Home sprites. */
1401
1328
  interface Home {
@@ -1725,6 +1652,8 @@ interface UltraSunUltraMoon {
1725
1652
  interface GenerationVIIISprites {
1726
1653
  /** Icon sprites of this Pokémon. */
1727
1654
  icons: GenerationViiiIcons;
1655
+ /** Brilliant Diamond and Shining Pearl sprites of this Pokémon. */
1656
+ "brilliant-diamond-shining-pearl": BrilliantDiamondShiningPearl;
1728
1657
  }
1729
1658
  /** Generation VIII icons. */
1730
1659
  interface GenerationViiiIcons {
@@ -1733,13 +1662,32 @@ interface GenerationViiiIcons {
1733
1662
  /** The female depiction of this Pokémon from the front in battle. */
1734
1663
  front_female: string | null;
1735
1664
  }
1665
+ /** Brilliant Diamond and Shining Pearl sprites. */
1666
+ interface BrilliantDiamondShiningPearl {
1667
+ /** The default depiction of this Pokémon from the front in battle. */
1668
+ front_default: string | null;
1669
+ /** The female depiction of this Pokémon from the front in battle. */
1670
+ front_female: string | null;
1671
+ }
1672
+ /** Generation-IX Sprites */
1673
+ interface GenerationIXSprites {
1674
+ /** Scarlet and Violet sprites of this Pokémon. */
1675
+ "scarlet-violet": ScarletViolet;
1676
+ }
1677
+ /** Scarlet and Violet sprites. */
1678
+ interface ScarletViolet {
1679
+ /** The default depiction of this Pokémon from the front in battle. */
1680
+ front_default: string | null;
1681
+ /** The female depiction of this Pokémon from the front in battle. */
1682
+ front_female: string | null;
1683
+ }
1736
1684
  /**
1737
1685
  * ## Location Area Encounter
1738
1686
  * Pokémon location areas where Pokémon can be found.
1739
1687
  */
1740
1688
  interface LocationAreaEncounter {
1741
1689
  /** The location area the referenced Pokémon can be encountered in. */
1742
- location_area: NamedAPIResource;
1690
+ location_area: NamedAPIResource<LocationArea>;
1743
1691
  /** A list of versions and encounters with the referenced Pokémon that might happen. */
1744
1692
  version_details: VersionEncounterDetail[];
1745
1693
  }
@@ -1757,7 +1705,7 @@ interface PokemonColor {
1757
1705
  /** The name of this resource listed in different languages. */
1758
1706
  names: Name[];
1759
1707
  /** A list of the Pokémon species that have this color. */
1760
- pokemon_species: NamedAPIResource[];
1708
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
1761
1709
  }
1762
1710
  /**
1763
1711
  * ## Pokémon Form
@@ -1785,11 +1733,11 @@ interface PokemonForm {
1785
1733
  /** The name of this form. */
1786
1734
  form_name: string;
1787
1735
  /** The Pokémon that can take on this form. */
1788
- pokemon: NamedAPIResource;
1736
+ pokemon: NamedAPIResource<Pokemon>;
1789
1737
  /** A set of sprites used to depict this Pokémon form in the game. */
1790
1738
  sprites: PokemonFormSprites;
1791
1739
  /** The version group this Pokémon form was introduced in. */
1792
- version_group: NamedAPIResource;
1740
+ version_group: NamedAPIResource<VersionGroup>;
1793
1741
  /** The form specific full name of this Pokémon form, or empty if the form does not have a specific name. */
1794
1742
  names: Name[];
1795
1743
  /** The form specific form name of this Pokémon form, or empty if the form does not have a specific name. */
@@ -1811,7 +1759,7 @@ interface PokemonFormCondition {
1811
1759
  /** What kind of resource triggers the form, e.g. `held-item` or `ability`. */
1812
1760
  trigger: string;
1813
1761
  /** The form the Pokémon changes from, when the condition switches between two forms. */
1814
- base_form?: NamedAPIResource;
1762
+ base_form?: NamedAPIResource<PokemonForm>;
1815
1763
  }
1816
1764
  /**
1817
1765
  * Sprites used to depict this Pokémon form in the game.
@@ -1833,6 +1781,25 @@ interface PokemonFormSprites {
1833
1781
  back_shiny: string | null;
1834
1782
  /** The shiny female depiction of this Pokémon form from the back in battle. */
1835
1783
  back_shiny_female: string | null;
1784
+ /** Version Sprites of this Pokémon form. */
1785
+ versions: PokemonFormVersionSprites;
1786
+ }
1787
+ /**
1788
+ * Version sprites of a Pokémon form.
1789
+ *
1790
+ * Only the two generations that ship form-specific sprites appear, which is why
1791
+ * this is not the Pokémon-level {@link VersionSprites}.
1792
+ */
1793
+ interface PokemonFormVersionSprites {
1794
+ /** Generation-VIII Sprites of this Pokémon form. */
1795
+ "generation-viii": PokemonFormGenerationVIIISprites;
1796
+ /** Generation-IX Sprites of this Pokémon form. */
1797
+ "generation-ix": GenerationIXSprites;
1798
+ }
1799
+ /** Generation-VIII sprites of a Pokémon form. */
1800
+ interface PokemonFormGenerationVIIISprites {
1801
+ /** Brilliant Diamond and Shining Pearl sprites of this Pokémon form. */
1802
+ "brilliant-diamond-shining-pearl": BrilliantDiamondShiningPearl;
1836
1803
  }
1837
1804
  /**
1838
1805
  * ## Pokémon Habitat
@@ -1847,7 +1814,7 @@ interface PokemonHabitat {
1847
1814
  /** The name of this resource listed in different languages. */
1848
1815
  names: Name[];
1849
1816
  /** A list of the Pokémon species that can be found in this habitat. */
1850
- pokemon_species: NamedAPIResource[];
1817
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
1851
1818
  }
1852
1819
  /**
1853
1820
  * ## Pokémon Shape
@@ -1863,7 +1830,7 @@ interface PokemonShape {
1863
1830
  /** The name of this resource listed in different languages. */
1864
1831
  names: Name[];
1865
1832
  /** A list of the Pokémon species that have this shape. */
1866
- pokemon_species: NamedAPIResource[];
1833
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
1867
1834
  }
1868
1835
  /**
1869
1836
  * The "scientific" name of the Pokémon shape listed in different languages.
@@ -1872,7 +1839,7 @@ interface AwesomeName {
1872
1839
  /** The localized "scientific" name for an API resource in a specific language. */
1873
1840
  awesome_name: string;
1874
1841
  /** The language this "scientific" name is in. */
1875
- language: NamedAPIResource;
1842
+ language: NamedAPIResource<Language>;
1876
1843
  }
1877
1844
  /**
1878
1845
  * ## Pokémon Species
@@ -1906,23 +1873,23 @@ interface PokemonSpecies {
1906
1873
  /** Whether or not this Pokémon has multiple forms and can switch between them. */
1907
1874
  forms_switchable: boolean;
1908
1875
  /** The rate at which this Pokémon species gains levels. */
1909
- growth_rate: NamedAPIResource;
1876
+ growth_rate: NamedAPIResource<GrowthRate>;
1910
1877
  /** A list of Pokédexes and the indexes reserved within them for this Pokémon species. */
1911
1878
  pokedex_numbers: PokemonSpeciesDexEntry[];
1912
1879
  /** A list of egg groups this Pokémon species is a member of. */
1913
- egg_groups: NamedAPIResource[];
1880
+ egg_groups: NamedAPIResource<EggGroup>[];
1914
1881
  /** The color of this Pokémon for Pokédex search. */
1915
- color: NamedAPIResource;
1882
+ color: NamedAPIResource<PokemonColor>;
1916
1883
  /** The shape of this Pokémon for Pokédex search. */
1917
- shape: NamedAPIResource;
1918
- /** The Pokémon species that evolves into this Pokémon species. */
1919
- evolves_from_species: NamedAPIResource;
1884
+ shape: NamedAPIResource<PokemonShape>;
1885
+ /** The Pokémon species that evolves into this Pokémon species, if any. */
1886
+ evolves_from_species: NamedAPIResource<PokemonSpecies> | null;
1920
1887
  /** The evolution chain this Pokémon species is a member of. */
1921
- evolution_chain: APIResource;
1888
+ evolution_chain: APIResource<EvolutionChain>;
1922
1889
  /** The habitat this Pokémon species can be encountered in. */
1923
- habitat: NamedAPIResource;
1890
+ habitat: NamedAPIResource<PokemonHabitat>;
1924
1891
  /** The generation this Pokémon species was introduced in. */
1925
- generation: NamedAPIResource;
1892
+ generation: NamedAPIResource<Generation>;
1926
1893
  /** The name of this resource listed in different languages. */
1927
1894
  names: Name[];
1928
1895
  /** A list of encounters that can be had with this Pokémon species in pal park. */
@@ -1943,14 +1910,14 @@ interface Genus {
1943
1910
  /** The localized genus for the referenced Pokémon species. */
1944
1911
  genus: string;
1945
1912
  /** The language this genus is in. */
1946
- language: NamedAPIResource;
1913
+ language: NamedAPIResource<Language>;
1947
1914
  }
1948
1915
  /** Pokédexes and the indexes reserved within them for the given Pokémon species. */
1949
1916
  interface PokemonSpeciesDexEntry {
1950
1917
  /** The index number within the Pokédex. */
1951
1918
  entry_number: number;
1952
1919
  /** The Pokédex the referenced Pokémon species can be found in. */
1953
- pokedex: NamedAPIResource;
1920
+ pokedex: NamedAPIResource<Pokedex>;
1954
1921
  }
1955
1922
  /**
1956
1923
  * Encounter that can be had with the given Pokémon species in pal park.
@@ -1961,7 +1928,7 @@ interface PalParkEncounterArea {
1961
1928
  /** The base rate for encountering the referenced Pokémon in this pal park area. */
1962
1929
  rate: number;
1963
1930
  /** The pal park area where this encounter happens. */
1964
- area: NamedAPIResource;
1931
+ area: NamedAPIResource<PalParkArea>;
1965
1932
  }
1966
1933
  /**
1967
1934
  * Pokémon that exist within this Pokémon species.
@@ -1970,129 +1937,101 @@ interface PokemonSpeciesVariety {
1970
1937
  /** Whether this variety is the default variety. */
1971
1938
  is_default: boolean;
1972
1939
  /** The Pokémon variety. */
1973
- pokemon: NamedAPIResource;
1940
+ pokemon: NamedAPIResource<Pokemon>;
1974
1941
  }
1975
1942
  //#endregion
1976
- //#region src/models/Pokemon/stats.d.ts
1943
+ //#region src/models/pokemon/ability.d.ts
1977
1944
  /**
1978
- * ## Stat
1979
- * Stats determine certain aspects of battles. Each Pokémon has a value for each stat
1980
- * which grows as they gain levels and can be altered momentarily by effects in battles.
1945
+ * ## Ability
1946
+ * Abilities provide passive effects for Pokémon in battle or in the overworld.
1947
+ * Pokémon have multiple possible abilities but can have only one ability at a time.
1948
+ *
1949
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail.
1981
1950
  */
1982
- interface Stat {
1951
+ interface Ability {
1983
1952
  /** The identifier for this resource. */
1984
1953
  id: number;
1985
1954
  /** The name for this resource. */
1986
- name: "hp" | "attack" | "defense" | "special-attack" | "special-defense" | "speed" | "accuracy" | "evasion";
1987
- /** ID the games use for this stat. */
1988
- game_index: number;
1989
- /** Whether this stat only exists within a battle. */
1990
- is_battle_only: boolean;
1991
- /** A detail of moves which affect this stat positively or negatively. */
1992
- affecting_moves: MoveStatAffectSets;
1993
- /** A detail of natures which affect this stat positively or negatively. */
1994
- affecting_natures: NatureStatAffectSets;
1995
- /** A list of characteristics that are set on a Pokémon when its highest base stat is this stat. */
1996
- characteristics: APIResource[];
1997
- /** The class of damage this stat is directly related to. */
1998
- move_damage_class: NamedAPIResource | null;
1955
+ name: string;
1956
+ /** Whether or not this ability originated in the main series of the video games. */
1957
+ is_main_series: boolean;
1958
+ /** The generation this ability originated in. */
1959
+ generation: NamedAPIResource<Generation>;
1999
1960
  /** The name of this resource listed in different languages. */
2000
1961
  names: Name[];
1962
+ /** The effect of this ability listed in different languages. */
1963
+ effect_entries: VerboseEffect[];
1964
+ /** The list of previous effects this ability has had across version groups. */
1965
+ effect_changes: AbilityEffectChange[];
1966
+ /** The flavor text of this ability listed in different languages. */
1967
+ flavor_text_entries: AbilityFlavorText[];
1968
+ /** A list of Pokémon that could potentially have this ability. */
1969
+ pokemon: AbilityPokemon[];
2001
1970
  }
2002
1971
  /**
2003
- * A detail of natures which affect the given stat positively or negatively.
2004
- */
2005
- interface NatureStatAffectSets {
2006
- /** A list of natures and how they change the referenced stat. */
2007
- increase: NamedAPIResource[];
2008
- /** A list of natures and how they change the referenced stat. */
2009
- decrease: NamedAPIResource[];
2010
- }
2011
- /**
2012
- * A move and how it changes the referenced stat.
1972
+ * Previous effects an ability has had across version groups.
2013
1973
  */
2014
- interface MoveStatAffect {
2015
- /** The maximum amount of change to the referenced stat. */
2016
- change: -1 | -2 | 1 | 2;
2017
- /** The move causing the change. */
2018
- move: NamedAPIResource;
1974
+ interface AbilityEffectChange {
1975
+ /** The previous effect of this ability listed in different languages. */
1976
+ effect_entries: Effect[];
1977
+ /** The version group in which the previous effect of this ability originated. */
1978
+ version_group: NamedAPIResource<VersionGroup>;
2019
1979
  }
2020
1980
  /**
2021
- * A detail of moves which affect a stat positively or negatively.
1981
+ * The flavor text of an ability.
2022
1982
  */
2023
- interface MoveStatAffectSets {
2024
- /** A list of moves and how they change the referenced stat. */
2025
- increase: MoveStatAffect[];
2026
- /** A list of moves and how they change the referenced stat. */
2027
- decrease: MoveStatAffect[];
1983
+ interface AbilityFlavorText {
1984
+ /** The localized name for an API resource in a specific language. */
1985
+ flavor_text: string;
1986
+ /** The language this text resource is in. */
1987
+ language: NamedAPIResource<Language>;
1988
+ /** The version group that uses this flavor text. */
1989
+ version_group: NamedAPIResource<VersionGroup>;
2028
1990
  }
2029
- //#endregion
2030
- //#region src/models/Pokemon/type.d.ts
2031
1991
  /**
2032
- * Details of Pokémon for a specific type.
1992
+ * Pokémon that could potentially have the given ability.
2033
1993
  */
2034
- interface TypePokemon {
2035
- /** The order the Pokémon's types are listed in. */
1994
+ interface AbilityPokemon {
1995
+ /** Whether or not this is a hidden ability for the referenced Pokémon. */
1996
+ is_hidden: boolean;
1997
+ /**
1998
+ * Pokémon have 3 ability 'slots' which hold references to possible abilities they could have.
1999
+ * This is the slot of this ability for the referenced pokemon.
2000
+ */
2036
2001
  slot: number;
2037
- /** The Pokémon that has the referenced type. */
2038
- pokemon: NamedAPIResource;
2039
- }
2040
- /**
2041
- * Detail of how effective a type is toward others and vice versa.
2042
- */
2043
- interface TypeRelations {
2044
- /** A list of types this type has no effect on. */
2045
- no_damage_to: NamedAPIResource[];
2046
- /** A list of types this type is not very effective against. */
2047
- half_damage_to: NamedAPIResource[];
2048
- /** A list of types this type is very effective against. */
2049
- double_damage_to: NamedAPIResource[];
2050
- /** A list of types that have no effect on this type. */
2051
- no_damage_from: NamedAPIResource[];
2052
- /** A list of types that are not very effective against this type. */
2053
- half_damage_from: NamedAPIResource[];
2054
- /** A list of types that are very effective against this type. */
2055
- double_damage_from: NamedAPIResource[];
2002
+ /** The Pokémon this ability could belong to. */
2003
+ pokemon: NamedAPIResource<Pokemon>;
2056
2004
  }
2005
+ //#endregion
2006
+ //#region src/models/pokemon/gender.d.ts
2057
2007
  /**
2058
- * Details of how effective this type was toward others and vice versa in a previous generation.
2008
+ * ## Gender
2009
+ * Genders were introduced in Generation II for the purposes of breeding Pokémon
2010
+ * but can also result in visual differences or even different evolutionary lines.
2011
+ *
2012
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Gender) for greater detail.
2059
2013
  */
2060
- interface TypeRelationsPast {
2061
- /** The last generation in which the referenced type had the listed damage relations. */
2062
- generation: NamedAPIResource;
2063
- /** The damage relations the referenced type had up to and including the listed generation. */
2064
- damage_relations: TypeRelations;
2065
- }
2066
- /**
2067
- * ## Type
2068
- * Types are properties for Pokémon and their moves.
2069
- * Each type has three properties: which types of Pokémon it is super effective against,
2070
- * which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.
2014
+ interface Gender {
2015
+ /** The identifier for this resource. */
2016
+ id: number;
2017
+ /** The name for this resource. */
2018
+ name: "male" | "female" | "genderless";
2019
+ /** A list of Pokémon species that can be this gender and how likely it is that they will be. */
2020
+ pokemon_species_details: PokemonSpeciesGender[];
2021
+ /** A list of Pokémon species that required this gender in order for a Pokémon to evolve into them. */
2022
+ required_for_evolution: NamedAPIResource<PokemonSpecies>[];
2023
+ }
2024
+ /**
2025
+ * Pokémon species that can be this gender and how likely it is that they will be.
2071
2026
  */
2072
- interface Type {
2073
- /** The identifier for this resource. */
2074
- id: number;
2075
- /** The name for this resource. */
2076
- name: string;
2077
- /** A detail of how effective this type is toward others and vice versa. */
2078
- damage_relations: TypeRelations;
2079
- /** A list of details of how effective this type was toward others and vice versa in previous generations. */
2080
- past_damage_relations: TypeRelationsPast[];
2081
- /** A list of game indices relevant to this item by generation. */
2082
- game_indices: GenerationGameIndex[];
2083
- /** The generation this type was introduced in. */
2084
- generation: NamedAPIResource;
2085
- /** The class of damage inflicted by this type. */
2086
- move_damage_class: NamedAPIResource;
2087
- /** The name of this resource listed in different languages. */
2088
- names: Name[];
2089
- /** A list of details of Pokémon that have this type. */
2090
- pokemon: TypePokemon[];
2091
- /** A list of moves that have this type. */
2092
- moves: NamedAPIResource[];
2027
+ interface PokemonSpeciesGender {
2028
+ /** The chance of this Pokémon being female, in eighths; or -1 for genderless. */
2029
+ rate: number;
2030
+ /** A Pokémon species that can be the referenced gender. */
2031
+ pokemon_species: NamedAPIResource<PokemonSpecies>;
2093
2032
  }
2094
2033
  //#endregion
2095
- //#region src/models/Moves/moves.d.ts
2034
+ //#region src/models/move/move.d.ts
2096
2035
  /**
2097
2036
  * ## Move Target
2098
2037
  * Targets moves can be directed at during battle. Targets can be Pokémon, environments or even other moves.
@@ -2105,7 +2044,7 @@ interface MoveTarget {
2105
2044
  /** The description of this resource listed in different languages. */
2106
2045
  descriptions: Description[];
2107
2046
  /** A list of moves that are directed at this target. */
2108
- moves: NamedAPIResource[];
2047
+ moves: NamedAPIResource<Move>[];
2109
2048
  /** The name of this resource listed in different languages. */
2110
2049
  names: Name[];
2111
2050
  }
@@ -2123,7 +2062,7 @@ interface MoveLearnMethod {
2123
2062
  /** The name of this resource listed in different languages. */
2124
2063
  names: Name[];
2125
2064
  /** A list of version groups where moves can be learned through this method. */
2126
- version_groups: NamedAPIResource[];
2065
+ version_groups: NamedAPIResource<VersionGroup>[];
2127
2066
  }
2128
2067
  /**
2129
2068
  * ## Move Damage Class
@@ -2137,7 +2076,7 @@ interface MoveDamageClass {
2137
2076
  /** The description of this resource listed in different languages. */
2138
2077
  descriptions: Description[];
2139
2078
  /** A list of moves that fall into this damage class. */
2140
- moves: NamedAPIResource[];
2079
+ moves: NamedAPIResource<Move>[];
2141
2080
  /** The name of this resource listed in different languages. */
2142
2081
  names: Name[];
2143
2082
  }
@@ -2151,13 +2090,14 @@ interface MoveCategory {
2151
2090
  /** The name for this resource. */
2152
2091
  name: string;
2153
2092
  /** A list of moves that fall into this category. */
2154
- moves: NamedAPIResource[];
2093
+ moves: NamedAPIResource<Move>[];
2155
2094
  /** The description of this resource listed in different languages. */
2156
2095
  descriptions: Description[];
2157
2096
  }
2158
2097
  /**
2159
2098
  * ## Move Battle Style
2160
2099
  * Styles of moves when used in the Battle Palace.
2100
+ *
2161
2101
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Battle_Frontier_(Generation_III)) for greater detail.
2162
2102
  */
2163
2103
  interface MoveBattleStyle {
@@ -2171,6 +2111,7 @@ interface MoveBattleStyle {
2171
2111
  /**
2172
2112
  * ## Move Ailment
2173
2113
  * Move Ailments are status conditions caused by moves used during battle.
2114
+ *
2174
2115
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Status_condition) for greater detail.
2175
2116
  */
2176
2117
  interface MoveAilment {
@@ -2179,7 +2120,7 @@ interface MoveAilment {
2179
2120
  /** The name for this resource. */
2180
2121
  name: string;
2181
2122
  /** A list of moves that cause this ailment. */
2182
- moves: NamedAPIResource[];
2123
+ moves: NamedAPIResource<Move>[];
2183
2124
  /** The name of this resource listed in different languages. */
2184
2125
  names: Name[];
2185
2126
  }
@@ -2196,23 +2137,23 @@ interface PastMoveStatValues {
2196
2137
  /** The effect of this move listed in different languages. */
2197
2138
  effect_entries: VerboseEffect[];
2198
2139
  /** The elemental type of this move. */
2199
- type: NamedAPIResource | null;
2140
+ type: NamedAPIResource<Type> | null;
2200
2141
  /** The version group in which these move stat values were in effect. */
2201
- version_group: NamedAPIResource;
2142
+ version_group: NamedAPIResource<VersionGroup>;
2202
2143
  }
2203
2144
  /** A stat this move changes, and by how much. */
2204
2145
  interface MoveStatChange {
2205
2146
  /** The amount of change. */
2206
2147
  change: number;
2207
2148
  /** The stat being affected. */
2208
- stat: NamedAPIResource;
2149
+ stat: NamedAPIResource<Stat>;
2209
2150
  }
2210
2151
  /** Metadata about a move. */
2211
2152
  interface MoveMetaData {
2212
2153
  /** The status ailment this move inflicts on its target. */
2213
- ailment: NamedAPIResource;
2154
+ ailment: NamedAPIResource<MoveAilment>;
2214
2155
  /** The category of move this move falls under, e.g. damage or ailment. */
2215
- category: NamedAPIResource;
2156
+ category: NamedAPIResource<MoveCategory>;
2216
2157
  /** The minimum number of times this move hits. Null if it always only hits once. */
2217
2158
  min_hits: number | null;
2218
2159
  /** The maximum number of times this move hits. Null if it always only hits once. */
@@ -2241,18 +2182,18 @@ interface MoveFlavorText {
2241
2182
  /** The localized flavor text for an API resource in a specific language. */
2242
2183
  flavor_text: string;
2243
2184
  /** The language this name is in. */
2244
- language: NamedAPIResource;
2185
+ language: NamedAPIResource<Language>;
2245
2186
  /** The version group that uses this flavor text. */
2246
- version_group: NamedAPIResource;
2187
+ version_group: NamedAPIResource<VersionGroup>;
2247
2188
  }
2248
2189
  /**
2249
2190
  * A detail of moves this move can be used before or after, granting additional appeal points in super contests.
2250
2191
  */
2251
2192
  interface ContestComboDetail {
2252
2193
  /** A list of moves to use before this move. */
2253
- use_before: NamedAPIResource[] | null;
2194
+ use_before: NamedAPIResource<Move>[] | null;
2254
2195
  /** A list of moves to use after this move. */
2255
- use_after: NamedAPIResource[] | null;
2196
+ use_after: NamedAPIResource<Move>[] | null;
2256
2197
  }
2257
2198
  /**
2258
2199
  * A detail of normal and super contest combos that require this move.
@@ -2268,6 +2209,7 @@ interface ContestComboSets {
2268
2209
  * Moves are the skills of Pokémon in battle. In battle, a Pokémon uses one move each turn.
2269
2210
  * Some moves (including those learned by Hidden Machine) can be used outside of battle as well,
2270
2211
  * usually for the purpose of removing obstacles or exploring new areas.
2212
+ *
2271
2213
  * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Move) for greater detail.
2272
2214
  */
2273
2215
  interface Move {
@@ -2291,11 +2233,11 @@ interface Move {
2291
2233
  /** A detail of normal and super contest combos that require this move. */
2292
2234
  contest_combos: ContestComboSets | null;
2293
2235
  /** The type of appeal this move gives a Pokémon when used in a contest. */
2294
- contest_type: NamedAPIResource | null;
2236
+ contest_type: NamedAPIResource<ContestType> | null;
2295
2237
  /** The effect the move has when used in a contest. */
2296
- contest_effect: APIResource | null;
2238
+ contest_effect: APIResource<ContestEffect> | null;
2297
2239
  /** The type of damage the move inflicts on the target, e.g. physical. */
2298
- damage_class: NamedAPIResource | null;
2240
+ damage_class: NamedAPIResource<MoveDamageClass> | null;
2299
2241
  /** The effect of this move listed in different languages. */
2300
2242
  effect_entries: VerboseEffect[];
2301
2243
  /** The list of previous effects this move has had across version groups of the games. */
@@ -2303,26 +2245,308 @@ interface Move {
2303
2245
  /** The flavor text of this move listed in different languages. */
2304
2246
  flavor_text_entries: MoveFlavorText[];
2305
2247
  /** The generation in which this move was introduced. */
2306
- generation: NamedAPIResource;
2248
+ generation: NamedAPIResource<Generation>;
2307
2249
  /** A list of the machines that teach this move. */
2308
2250
  machines: MachineVersionDetail[];
2309
2251
  /** Metadata about this move. */
2310
2252
  meta: MoveMetaData | null;
2311
2253
  /** The name of this resource listed in different languages. */
2312
2254
  names: Name[];
2313
- /** A list of move resource value changes across version groups of the game. */
2314
- past_values: PastMoveStatValues[];
2315
- /** A list of stats this move affects and by how much. */
2316
- stat_changes: MoveStatChange[];
2317
- /** The effect the move has when used in a super contest. */
2318
- super_contest_effect: APIResource | null;
2319
- /** The type of target that will receive the effects of the attack. */
2320
- target: NamedAPIResource;
2321
- /** The elemental type of this move. */
2322
- type: NamedAPIResource;
2323
- /** A list of Pokémon that learned this move. */
2324
- learned_by_pokemon: NamedAPIResource[];
2325
- }
2255
+ /** A list of move resource value changes across version groups of the game. */
2256
+ past_values: PastMoveStatValues[];
2257
+ /** A list of stats this move affects and by how much. */
2258
+ stat_changes: MoveStatChange[];
2259
+ /** The effect the move has when used in a super contest. */
2260
+ super_contest_effect: APIResource<SuperContestEffect> | null;
2261
+ /** The type of target that will receive the effects of the attack. */
2262
+ target: NamedAPIResource<MoveTarget>;
2263
+ /** The elemental type of this move. */
2264
+ type: NamedAPIResource<Type>;
2265
+ /** A list of Pokémon that learned this move. */
2266
+ learned_by_pokemon: NamedAPIResource<Pokemon>[];
2267
+ }
2268
+ //#endregion
2269
+ //#region src/models/game/generation.d.ts
2270
+ /**
2271
+ * ## Generation
2272
+ * A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include.
2273
+ * In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released.
2274
+ *
2275
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Generation) for greater detail.
2276
+ */
2277
+ interface Generation {
2278
+ /** The identifier for this resource. */
2279
+ id: number;
2280
+ /** The name for this resource. */
2281
+ name: string;
2282
+ /** A list of abilities that were introduced in this generation. */
2283
+ abilities: NamedAPIResource<Ability>[];
2284
+ /** The name of this resource listed in different languages. */
2285
+ names: Name[];
2286
+ /** The main region travelled in this generation. */
2287
+ main_region: NamedAPIResource<Region>;
2288
+ /** A list of moves that were introduced in this generation. */
2289
+ moves: NamedAPIResource<Move>[];
2290
+ /** A list of Pokémon species that were introduced in this generation. */
2291
+ pokemon_species: NamedAPIResource<PokemonSpecies>[];
2292
+ /** A list of types that were introduced in this generation. */
2293
+ types: NamedAPIResource<Type>[];
2294
+ /** A list of version groups that were introduced in this generation. */
2295
+ version_groups: NamedAPIResource<VersionGroup>[];
2296
+ }
2297
+ //#endregion
2298
+ //#region src/models/location/region.d.ts
2299
+ /**
2300
+ * ## Region
2301
+ * A region is an organized area of the Pokémon world.
2302
+ * Most often, the main difference between regions is
2303
+ * the species of Pokémon that can be encountered within them.
2304
+ *
2305
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Region) for greater detail.
2306
+ */
2307
+ type Region = {
2308
+ /** The identifier for this resource. */
2309
+ id: number;
2310
+ /** A list of locations that can be found in this region. */
2311
+ locations: NamedAPIResource<Location>[];
2312
+ /** The name for this resource. */
2313
+ name: string;
2314
+ /** The name of this resource listed in different languages. */
2315
+ names: Name[];
2316
+ /** The generation this region was introduced in. */
2317
+ main_generation: NamedAPIResource<Generation>;
2318
+ /** A list of Pokédexes that catalogue Pokémon in this region. */
2319
+ pokedexes: NamedAPIResource<Pokedex>[];
2320
+ /** A list of version groups where this region can be visited. */
2321
+ version_groups: NamedAPIResource<VersionGroup>[];
2322
+ };
2323
+ //#endregion
2324
+ //#region src/models/game/version.d.ts
2325
+ /**
2326
+ * ## Version
2327
+ * Versions of the games, e.g. Red, Blue or Yellow.
2328
+ *
2329
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Core_series) for greater detail.
2330
+ */
2331
+ interface Version {
2332
+ /** The identifier for this resource. */
2333
+ id: number;
2334
+ /** The name for this resource. */
2335
+ name: string;
2336
+ /** The name of this resource listed in different languages. */
2337
+ names: Name[];
2338
+ /** The version group this version belongs to. */
2339
+ version_group: NamedAPIResource<VersionGroup>;
2340
+ }
2341
+ /**
2342
+ * ## Version Group
2343
+ * Version groups categorize highly similar versions of the games.
2344
+ */
2345
+ interface VersionGroup {
2346
+ /** The identifier for this resource. */
2347
+ id: number;
2348
+ /** The name for this resource. */
2349
+ name: string;
2350
+ /** Order for sorting. Almost by date of release, except similar versions are grouped together. */
2351
+ order: number;
2352
+ /** The generation this version was introduced in. */
2353
+ generation: NamedAPIResource<Generation>;
2354
+ /** A list of methods in which Pokémon can learn moves in this version group. */
2355
+ move_learn_methods: NamedAPIResource<MoveLearnMethod>[];
2356
+ /** A list of Pokédexes introduced in this version group. */
2357
+ pokedexes: NamedAPIResource<Pokedex>[];
2358
+ /** A list of regions that can be visited in this version group. */
2359
+ regions: NamedAPIResource<Region>[];
2360
+ /** The versions this version group owns. */
2361
+ versions: NamedAPIResource<Version>[];
2362
+ }
2363
+ //#endregion
2364
+ //#region src/models/common/flavor-text.d.ts
2365
+ /**
2366
+ * The localized flavor text for an API resource in a specific language.
2367
+ */
2368
+ interface FlavorText {
2369
+ /** The localized flavor text for an API resource in a specific language. */
2370
+ flavor_text: string;
2371
+ /** The language this name is in. */
2372
+ language: NamedAPIResource<Language>;
2373
+ /** The game version this flavor text appears in. */
2374
+ version: NamedAPIResource<Version>;
2375
+ }
2376
+ //#endregion
2377
+ //#region src/models/common/generation.d.ts
2378
+ /**
2379
+ * The generation relevant to this game index.
2380
+ */
2381
+ interface GenerationGameIndex {
2382
+ /** The internal id of an API resource within game data. */
2383
+ game_index: number;
2384
+ /** The generation relevant to this game index. */
2385
+ generation: NamedAPIResource<Generation>;
2386
+ }
2387
+ //#endregion
2388
+ //#region src/models/machine/machine.d.ts
2389
+ /**
2390
+ * ## Machine
2391
+ * Machines are the representation of items that teach moves to Pokémon.
2392
+ * They vary from version to version, so it is not certain that one specific
2393
+ * [TM (Technical Machine)](https://bulbapedia.bulbagarden.net/wiki/TM) or
2394
+ * [HM (Hidden Machine)](https://bulbapedia.bulbagarden.net/wiki/HM) corresponds to a single Machine.
2395
+ */
2396
+ type Machine = {
2397
+ /** The identifier for this resource. */
2398
+ id: number;
2399
+ /** The TM or HM item that corresponds to this machine. */
2400
+ item: NamedAPIResource<Item>;
2401
+ /** The move that is taught by this machine. */
2402
+ move: NamedAPIResource<Move>;
2403
+ /** The version group that this machine applies to. */
2404
+ version_group: NamedAPIResource<VersionGroup>;
2405
+ };
2406
+ //#endregion
2407
+ //#region src/models/common/machine.d.ts
2408
+ /**
2409
+ * The machine that teaches a move from an item.
2410
+ */
2411
+ interface MachineVersionDetail {
2412
+ /** The machine that teaches a move from an item. */
2413
+ machine: APIResource<Machine>;
2414
+ /** The version group of this specific machine. */
2415
+ version_group: NamedAPIResource<VersionGroup>;
2416
+ }
2417
+ //#endregion
2418
+ //#region src/models/common/verbose.d.ts
2419
+ /**
2420
+ * The localized effect for an API resource.
2421
+ */
2422
+ interface VerboseEffect {
2423
+ /** The localized effect text for an API resource in a specific language. */
2424
+ effect: string;
2425
+ /** The localized effect text in brief. */
2426
+ short_effect: string;
2427
+ /** The language this effect is in. */
2428
+ language: NamedAPIResource<Language>;
2429
+ }
2430
+ //#endregion
2431
+ //#region src/models/common/version.d.ts
2432
+ /**
2433
+ * Encounters and their specific details.
2434
+ */
2435
+ interface VersionEncounterDetail {
2436
+ /** The game version this encounter happens in. */
2437
+ version: NamedAPIResource<Version>;
2438
+ /** The total percentage of all encounter potential. */
2439
+ max_chance: number;
2440
+ /** A list of encounters and their specifics. */
2441
+ encounter_details: Encounter[];
2442
+ }
2443
+ /**
2444
+ * The internal id and version of an API resource.
2445
+ */
2446
+ interface VersionGameIndex {
2447
+ /** The internal id of an API resource within game data. */
2448
+ game_index: number;
2449
+ /** The version relevant to this game index. */
2450
+ version: NamedAPIResource<Version>;
2451
+ }
2452
+ /**
2453
+ * The flavor text of an API resource.
2454
+ */
2455
+ interface VersionGroupFlavorText {
2456
+ /** The localized name for an API resource in a specific language. */
2457
+ text: string;
2458
+ /** The language this name is in. */
2459
+ language: NamedAPIResource<Language>;
2460
+ /** The version group which uses this flavor text. */
2461
+ version_group: NamedAPIResource<VersionGroup>;
2462
+ }
2463
+ //#endregion
2464
+ //#region src/models/berry/berry.d.ts
2465
+ /**
2466
+ * ## Berry
2467
+ * Berries are small fruits that can provide HP and status condition restoration,
2468
+ * stat enhancement, and even damage negation when eaten by Pokémon.
2469
+ *
2470
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.
2471
+ */
2472
+ type Berry = {
2473
+ /** The identifier for this resource. */
2474
+ id: number;
2475
+ /** The name for this resource. */
2476
+ name: string;
2477
+ /** Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked. */
2478
+ growth_time: number;
2479
+ /** The maximum number of these berries that can grow on one tree in Generation IV. */
2480
+ max_harvest: number;
2481
+ /** The power of the move "Natural Gift" when used with this Berry. */
2482
+ natural_gift_power: number;
2483
+ /** The size of this Berry, in millimeters. */
2484
+ size: number;
2485
+ /** The smoothness of this Berry, used in making Pokéblocks or Poffins. */
2486
+ smoothness: number;
2487
+ /** The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly. */
2488
+ soil_dryness: number;
2489
+ /** The firmness of this berry, used in making Pokéblocks or Poffins. */
2490
+ firmness: NamedAPIResource<BerryFirmness>;
2491
+ /** A list of references to each flavor a berry can have and the potency of each of those flavors in regard to this berry. */
2492
+ flavors: BerryFlavorMap[];
2493
+ /** Berries are actually items. This is a reference to the item specific data for this berry. */
2494
+ item: NamedAPIResource<Item>;
2495
+ /** The type inherited by "Natural Gift" when used with this Berry. */
2496
+ natural_gift_type: NamedAPIResource<Type>;
2497
+ };
2498
+ /**
2499
+ * Reference to the flavor a berry can have and the potency of each of those flavors in regard to this berry.
2500
+ */
2501
+ type BerryFlavorMap = {
2502
+ /** How powerful the referenced flavor is for this berry. */
2503
+ potency: number;
2504
+ /** The referenced berry flavor. */
2505
+ flavor: NamedAPIResource<BerryFlavor>;
2506
+ };
2507
+ /**
2508
+ * ## Berry Flavor
2509
+ * Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on its nature.
2510
+ *
2511
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
2512
+ */
2513
+ type BerryFlavor = {
2514
+ /** The identifier for this resource. */
2515
+ id: number;
2516
+ /** The name for this resource. */
2517
+ name: "spicy" | "dry" | "sweet" | "bitter" | "sour";
2518
+ /** A list of the berries with this flavor. */
2519
+ berries: FlavorBerryMap[];
2520
+ /** The contest type that correlates with this berry flavor. */
2521
+ contest_type: NamedAPIResource<ContestType>;
2522
+ /** The name of this resource listed in different languages. */
2523
+ names: Name[];
2524
+ };
2525
+ /**
2526
+ * Berry with the given flavor.
2527
+ */
2528
+ type FlavorBerryMap = {
2529
+ /** How powerful the referenced flavor is for this berry. */
2530
+ potency: number;
2531
+ /** The berry with the referenced flavor. */
2532
+ berry: NamedAPIResource<Berry>;
2533
+ };
2534
+ /**
2535
+ * ## Berry Firmness
2536
+ * Berries can be soft, very soft, hard, super hard or very hard.
2537
+ *
2538
+ * - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.
2539
+ */
2540
+ type BerryFirmness = {
2541
+ /** The identifier for this resource. */
2542
+ id: number;
2543
+ /** The name for this resource. */
2544
+ name: "very-soft" | "soft" | "hard" | "very-hard" | "super-hard";
2545
+ /** A list of the berries with this firmness. */
2546
+ berries: NamedAPIResource<Berry>[];
2547
+ /** The name of this resource listed in different languages. */
2548
+ names: Name[];
2549
+ };
2326
2550
  //#endregion
2327
2551
  //#region src/config/cache.d.ts
2328
2552
  /**
@@ -2346,7 +2570,10 @@ interface CacheStore {
2346
2570
  interface MemoryCacheOptions {
2347
2571
  /** How long a cached response stays fresh, in milliseconds. Defaults to 5 minutes. */
2348
2572
  ttl?: number;
2349
- /** Maximum number of responses kept. The least recently used entry is evicted. Defaults to 500. */
2573
+ /**
2574
+ * Maximum number of responses kept. The least recently used entry is evicted.
2575
+ * Defaults to 500; zero keeps none.
2576
+ */
2350
2577
  maxEntries?: number;
2351
2578
  }
2352
2579
  /**
@@ -2366,31 +2593,266 @@ declare class MemoryCache implements CacheStore {
2366
2593
  delete(key: string): void;
2367
2594
  clear(): void;
2368
2595
  }
2596
+ /**
2597
+ * ## Etag Entry
2598
+ * What a URL last answered with, and the validator that says so.
2599
+ */
2600
+ interface EtagEntry {
2601
+ /** The `ETag` the response carried. */
2602
+ etag: string;
2603
+ /** The parsed body that `etag` identifies. */
2604
+ value: unknown;
2605
+ }
2606
+ /**
2607
+ * ## Etag Store Options
2608
+ * Used to configure an {@link EtagStore}.
2609
+ */
2610
+ interface EtagStoreOptions {
2611
+ /**
2612
+ * How many URLs to remember. The least recently used is evicted. Defaults to
2613
+ * 500; zero remembers none.
2614
+ */
2615
+ maxEntries?: number;
2616
+ }
2617
+ /**
2618
+ * ## Etag Store
2619
+ * Remembers the `ETag` each URL answered with, and the body it identified, so an
2620
+ * expired cache entry can be revalidated instead of downloaded again.
2621
+ *
2622
+ * Deliberately not a {@link CacheStore}: the two answer different questions. A
2623
+ * `CacheStore` says "this response is still fresh, use it"; this says "here is
2624
+ * what the response was last time, ask the server whether it still holds". They
2625
+ * are kept apart so that a store someone else owns — a shared Redis — is never
2626
+ * given a second key shape, and `cache.get(url)` keeps returning the resource
2627
+ * itself.
2628
+ *
2629
+ * Entries live in memory and are never persisted: an `ETag` is only worth what
2630
+ * the body beside it is, and the body is what would cost memory to keep.
2631
+ */
2632
+ declare class EtagStore {
2633
+ private readonly entries;
2634
+ private readonly maxEntries;
2635
+ constructor(options?: EtagStoreOptions);
2636
+ get(url: string): EtagEntry | undefined;
2637
+ set(url: string, entry: EtagEntry): void;
2638
+ clear(): void;
2639
+ }
2640
+ /**
2641
+ * ## Web Storage Like
2642
+ * The part of the browser's `Storage` interface a {@link WebStorageCache} uses.
2643
+ *
2644
+ * Declared structurally rather than as the DOM's `Storage`: the package compiles
2645
+ * without `lib.dom`, and stays usable anywhere the same shape exists.
2646
+ *
2647
+ * Every method may return a promise, so a React Native `AsyncStorage` works as-is.
2648
+ * Key enumeration is the one place the two shapes differ: `Storage` exposes
2649
+ * `length` and `key(index)`, `AsyncStorage` exposes `getAllKeys`, and a property
2650
+ * cannot be awaited — so both are accepted, and a storage offering neither still
2651
+ * caches; it just never evicts or clears.
2652
+ */
2653
+ interface WebStorageLike {
2654
+ getItem(key: string): string | null | Promise<string | null>;
2655
+ setItem(key: string, value: string): void | Promise<void>;
2656
+ removeItem(key: string): void | Promise<void>;
2657
+ /** Every key held, this store's and the application's alike. */
2658
+ getAllKeys?(): readonly string[] | Promise<readonly string[]>;
2659
+ key?(index: number): string | null;
2660
+ readonly length?: number;
2661
+ }
2662
+ /**
2663
+ * ## Web Storage Cache Options
2664
+ * Used to configure a store backed by `localStorage` or `sessionStorage`.
2665
+ */
2666
+ interface WebStorageCacheOptions {
2667
+ /**
2668
+ * Where entries are kept. Pass `localStorage`, `sessionStorage`, a React Native
2669
+ * `AsyncStorage`, or anything else matching {@link WebStorageLike}.
2670
+ */
2671
+ storage: WebStorageLike;
2672
+ /** How long a cached response stays fresh, in milliseconds. Defaults to 5 minutes. */
2673
+ ttl?: number;
2674
+ /** Namespace for the keys this store writes. Defaults to `pokenode:`. */
2675
+ prefix?: string;
2676
+ }
2677
+ /**
2678
+ * ## Web Storage Cache
2679
+ * A {@link CacheStore} backed by `localStorage` or `sessionStorage`, so a cached
2680
+ * response survives a page reload.
2681
+ *
2682
+ * ```ts
2683
+ * const api = new PokemonClient({ cache: new WebStorageCache({ storage: localStorage }) });
2684
+ * ```
2685
+ *
2686
+ * Only keys under {@link WebStorageCacheOptions.prefix} are ever read, evicted or
2687
+ * cleared — the storage is assumed to be shared with the surrounding application.
2688
+ *
2689
+ * Values round-trip through JSON, so unlike {@link MemoryCache} every hit returns a
2690
+ * fresh copy. Anything a `JSON.stringify` cannot represent does not survive, which
2691
+ * covers every PokéAPI response.
2692
+ *
2693
+ * A storage that throws instead of answering is treated as empty: a read is a miss
2694
+ * and a write is dropped, because neither is worth failing the request that
2695
+ * triggered it over.
2696
+ */
2697
+ declare class WebStorageCache implements CacheStore {
2698
+ private readonly storage;
2699
+ private readonly ttl;
2700
+ private readonly prefix;
2701
+ constructor(options: WebStorageCacheOptions);
2702
+ get(key: string): Promise<unknown>;
2703
+ set(key: string, value: unknown): Promise<void>;
2704
+ delete(key: string): Promise<void>;
2705
+ clear(): Promise<void>;
2706
+ /** Reads a namespaced key, treating unreadable content as a miss. */
2707
+ private read;
2708
+ /**
2709
+ * Frees space by dropping expired entries, falling back to the ones closest to
2710
+ * expiring when nothing has expired yet.
2711
+ */
2712
+ private evict;
2713
+ /**
2714
+ * Collects this store's keys before any removal: `key(index)` walks a list that
2715
+ * shifts underneath a loop that deletes as it goes.
2716
+ */
2717
+ private ownKeys;
2718
+ /**
2719
+ * Every key the storage holds, however it is willing to list them. A storage
2720
+ * offering no enumeration at all reports none, which leaves eviction and
2721
+ * `clear` as no-ops rather than an error on a path that only tidies up.
2722
+ */
2723
+ private allKeys;
2724
+ /** Removes a key on a path that is only tidying up, where a refusal is moot. */
2725
+ private remove;
2726
+ }
2369
2727
  //#endregion
2370
2728
  //#region src/config/logger.d.ts
2729
+ /**
2730
+ * Fields shared by every payload.
2731
+ *
2732
+ * The text is carried twice on purpose. pino, bunyan and roarr read `msg`;
2733
+ * winston reads `message`. Sending both is what lets a logger from either family
2734
+ * be passed straight in, with no adapter to write and nothing logged as
2735
+ * `undefined`.
2736
+ */
2737
+ interface LogFields {
2738
+ /** Which point of the request lifecycle this is, for filtering. */
2739
+ event: "request" | "response" | "retry" | "cancelled" | "error";
2740
+ msg: string;
2741
+ message: string;
2742
+ /** The request URL, with any credentials the base URL carried removed. */
2743
+ url: string;
2744
+ }
2745
+ /**
2746
+ * ## Log Request Payload
2747
+ * A request is about to be resolved, from cache or over the network.
2748
+ */
2749
+ interface LogRequestPayload extends LogFields {
2750
+ event: "request";
2751
+ /** The HTTP method, uppercase, as RFC 9110 and OpenTelemetry both expect. */
2752
+ method: string;
2753
+ }
2754
+ /**
2755
+ * ## Log Response Payload
2756
+ * A response was produced.
2757
+ */
2758
+ interface LogResponsePayload extends LogFields {
2759
+ event: "response";
2760
+ status: number;
2761
+ /**
2762
+ * Where the response came from.
2763
+ *
2764
+ * - `network` — a round trip was made.
2765
+ * - `cache` — served by the {@link CacheStore}; nothing left the process.
2766
+ * - `in-flight` — an identical request was already on the wire and this caller
2767
+ * shared it, so it made no round trip of its own.
2768
+ * - `revalidated` — a round trip was made, the API answered 304, and the body
2769
+ * already held for that URL was reused. Cheap, but not free.
2770
+ *
2771
+ * Counting `network` and `revalidated` gives the number of requests the
2772
+ * PokéAPI actually saw. Every caller reports, so counting all four gives the
2773
+ * number of calls the application made.
2774
+ */
2775
+ source: "network" | "cache" | "in-flight" | "revalidated";
2776
+ /** How long the client took to resolve the request, in milliseconds. */
2777
+ durationMs: number;
2778
+ }
2779
+ /**
2780
+ * ## Log Retry Payload
2781
+ * An attempt failed and another one is coming.
2782
+ *
2783
+ * Only emitted when `retry` is configured, and never for the attempt that gives
2784
+ * up — that one is a `response` or an `error` like any other. Counting these
2785
+ * gives the round trips the PokéAPI saw beyond the ones it answered.
2786
+ */
2787
+ interface LogRetryPayload extends LogFields {
2788
+ event: "retry";
2789
+ /** Which attempt just failed, counting from one. */
2790
+ attempt: number;
2791
+ /** How long the client will wait before the next one, in milliseconds. */
2792
+ delayMs: number;
2793
+ /** The status that failed. Absent when the attempt never got a response. */
2794
+ status?: number;
2795
+ }
2796
+ /**
2797
+ * ## Log Cancelled Payload
2798
+ * A request was cancelled by the scope it was made through.
2799
+ *
2800
+ * A caller that hangs up asked for this, so it is not a failure and does not
2801
+ * reach `error`: a handler that scopes every request would otherwise report its
2802
+ * own timeouts as its error rate. Counting `response` and `cancelled` together
2803
+ * accounts for every `request` logged.
2804
+ */
2805
+ interface LogCancelledPayload extends LogFields {
2806
+ event: "cancelled";
2807
+ /** `signal.reason`, or the `TimeoutError` a scoped timeout raised. */
2808
+ reason: unknown;
2809
+ /** How long the request had been running when it was cancelled, in milliseconds. */
2810
+ durationMs: number;
2811
+ }
2812
+ /**
2813
+ * ## Log Error Payload
2814
+ * A request failed.
2815
+ *
2816
+ * The error is carried twice for the same reason the message is: pino runs its
2817
+ * error serializer on `err` and nothing else, so an `Error` under any other key
2818
+ * would reach the log as `{}` — no message, no stack.
2819
+ */
2820
+ interface LogErrorPayload extends LogFields {
2821
+ event: "error";
2822
+ /** Whatever `fetch` or the API produced. */
2823
+ err: unknown;
2824
+ error: unknown;
2825
+ }
2371
2826
  /**
2372
2827
  * ## Logger
2373
- * Receives one call per request lifecycle event.
2828
+ * Where a client reports what it did.
2829
+ *
2830
+ * Deliberately the shape every logging library already has, so one can be passed
2831
+ * without glue:
2832
+ *
2833
+ * ```ts
2834
+ * new PokemonClient({ logger: pino() });
2835
+ * new PokemonClient({ logger: console });
2836
+ * new PokemonClient({ logger: winston.createLogger() });
2837
+ * ```
2374
2838
  *
2375
- * Pass one as `ClientOptions.logger`; leave it unset and a client logs nothing.
2376
- * Use {@link consoleLogger}, or forward to pino, winston, or a metrics collector.
2839
+ * Requests, responses and cancellations go to `debug`; failures go to `error`.
2840
+ * Nothing is logged unless a logger is passed, and a client never picks a level
2841
+ * of its own.
2377
2842
  */
2378
2843
  interface Logger {
2379
- /** A request is about to be resolved, from cache or over the network. */
2380
- request(method: string, url: string): void;
2381
- /** A response was produced. `cached` distinguishes a cache hit from a round trip. */
2382
- response(status: number, cached: boolean): void;
2383
- /** A request failed. The error is whatever `fetch` or the API produced. */
2384
- error(error: unknown): void;
2385
- }
2386
- /** A {@link Logger} that writes the request lifecycle to the console. */
2844
+ debug(payload: LogRequestPayload | LogResponsePayload | LogRetryPayload | LogCancelledPayload): void;
2845
+ error(payload: LogErrorPayload): void;
2846
+ }
2847
+ /**
2848
+ * A {@link Logger} that writes the request lifecycle to the console as one
2849
+ * formatted line per event.
2850
+ *
2851
+ * `console` itself is a valid {@link Logger} and logs the payload as an object;
2852
+ * this is for when the terminal should stay readable.
2853
+ */
2387
2854
  declare const consoleLogger: Logger;
2388
2855
  //#endregion
2389
- //#region src/constants/base.d.ts
2390
- declare const BASE_URL: {
2391
- readonly REST: "https://pokeapi.co/api/v2";
2392
- };
2393
- //#endregion
2394
2856
  //#region src/constants/berries.d.ts
2395
2857
  /** Enum of Berries (NAME - ID) */
2396
2858
  declare const BERRIES: {
@@ -2956,7 +3418,7 @@ declare const MOVE_TARGETS: {
2956
3418
  readonly ALL_ALLIES: 15;
2957
3419
  };
2958
3420
  //#endregion
2959
- //#region src/constants/pokemons.d.ts
3421
+ //#region src/constants/pokemon.d.ts
2960
3422
  declare const EGG_GROUPS: {
2961
3423
  readonly MONSTER: 1;
2962
3424
  readonly WATER1: 2;
@@ -3093,6 +3555,13 @@ declare const TYPES: {
3093
3555
  readonly SHADOW: 10002;
3094
3556
  };
3095
3557
  //#endregion
3558
+ //#region src/constants/urls.d.ts
3559
+ declare const BASE_URL: {
3560
+ readonly REST: "https://pokeapi.co/api/v2";
3561
+ /** Root of the sprite repository the API's own sprite URLs point at. */
3562
+ readonly SPRITES: "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites";
3563
+ };
3564
+ //#endregion
3096
3565
  //#region src/constants/utilities.d.ts
3097
3566
  declare const LANGUAGES: {
3098
3567
  readonly JA_HRKT: 1;
@@ -3108,6 +3577,7 @@ declare const LANGUAGES: {
3108
3577
  readonly JA: 11;
3109
3578
  readonly ZH_HANS: 12;
3110
3579
  readonly PT_BR: 13;
3580
+ readonly ES_419: 14;
3111
3581
  };
3112
3582
  declare namespace index_d_exports {
3113
3583
  export { BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, CONTEST_TYPES, CURRENCIES, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Endpoint, GENDERS, GENERATIONS, GROWTH_RATES, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, LANGUAGES, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, NATURES, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, REGIONS, STATS, TYPES, VERSIONS, VERSION_GROUPS };
@@ -3119,6 +3589,46 @@ declare namespace index_d_exports {
3119
3589
  * A `fetch` implementation taking a string URL, as every client call does.
3120
3590
  */
3121
3591
  type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
3592
+ /**
3593
+ * ## Resource Link
3594
+ * Something naming a single resource: a link taken from a response, or its URL
3595
+ * as a bare string.
3596
+ *
3597
+ * A link carries what it points at, so passing one infers `T`; a string does
3598
+ * not, and needs `T` named.
3599
+ */
3600
+ type ResourceLink<T> = string | NamedAPIResource<T> | APIResource<T>;
3601
+ /**
3602
+ * ## Retry Options
3603
+ * When a failed request is worth attempting again.
3604
+ *
3605
+ * Retrying is off unless this is given — a client that quietly triples its own
3606
+ * traffic is not something to opt out of after the fact.
3607
+ */
3608
+ interface RetryOptions {
3609
+ /** Attempts in total, the first one included. Defaults to 3. */
3610
+ attempts?: number;
3611
+ /** Statuses worth another attempt. Defaults to 429, 500, 502, 503 and 504. */
3612
+ statuses?: number[];
3613
+ /** The first wait, in milliseconds, doubling from there. Defaults to 300. */
3614
+ initialDelay?: number;
3615
+ /** The longest this client will ever wait between attempts. Defaults to 5000. */
3616
+ maxDelay?: number;
3617
+ }
3618
+ /**
3619
+ * ## Request Scope
3620
+ * Cancellation applied to every request a client makes.
3621
+ *
3622
+ * Passed to {@link ClientFacade.with}, not to the constructor: a signal belongs
3623
+ * to one unit of work, while a client outlives many, and a client holding a
3624
+ * signal for its whole life is dead the first time that signal aborts.
3625
+ */
3626
+ interface RequestScope {
3627
+ /** Aborts the requests made through this scope. */
3628
+ signal?: AbortSignal;
3629
+ /** How long a request may take, in milliseconds, before it is aborted. */
3630
+ timeout?: number;
3631
+ }
3122
3632
  /**
3123
3633
  * ## Client Options
3124
3634
  * Optional configuration accepted by every client.
@@ -3140,68 +3650,229 @@ interface ClientOptions {
3140
3650
  * Custom `fetch` implementation, for proxies, retries, cancellation or
3141
3651
  * instrumentation. Defaults to the global `fetch`.
3142
3652
  *
3143
- * Requests carry no timeout of their own: supply an `AbortSignal` here if you
3144
- * want one.
3653
+ * Requests carry no timeout of their own: derive a scoped client with
3654
+ * {@link ClientFacade.with} if you want one.
3145
3655
  */
3146
3656
  fetch?: FetchLike;
3657
+ /**
3658
+ * When to attempt a failed request again. Leave empty to attempt each request
3659
+ * exactly once.
3660
+ */
3661
+ retry?: RetryOptions;
3662
+ /**
3663
+ * Ask the PokéAPI whether a response has changed, rather than downloading it
3664
+ * again, once the {@link CacheStore} entry for it has expired.
3665
+ *
3666
+ * Pass `true` for a default {@link EtagStore}, or one of your own to size it.
3667
+ * Leave empty and every expired entry is refetched in full.
3668
+ */
3669
+ revalidate?: boolean | EtagStore;
3147
3670
  }
3148
3671
  /**
3149
- * ## Base Client
3150
- * Base class for every section client. Handles requests to the PokéAPI, along
3151
- * with caching and logging.
3672
+ * ## List Page
3673
+ * The part of a resource list a walk needs: how much there is, and this page of
3674
+ * it. Both {@link NamedAPIResourceList} and {@link APIResourceList} qualify.
3675
+ */
3676
+ interface ListPage<L> {
3677
+ count: number;
3678
+ results: L[];
3679
+ }
3680
+ /**
3681
+ * ## List Fn
3682
+ * A list method, called with the offset and the limit of the page to fetch.
3683
+ */
3684
+ type ListFn<L> = (offset: number, limit: number) => Promise<ListPage<L>>;
3685
+ /**
3686
+ * ## List Method
3687
+ * The shape every `list*` method on a section client has.
3152
3688
  */
3153
- declare class BaseClient {
3689
+ type ListMethod = (offset?: number, limit?: number) => Promise<ListPage<APIResource<unknown>>>;
3690
+ /**
3691
+ * ## List Method Name
3692
+ * The names of `C`'s own list methods, and nothing else — so naming one to
3693
+ * {@link BaseClient.paginate} is checked and completed by the compiler.
3694
+ */
3695
+ type ListMethodName<C> = { [K in keyof C]: C[K] extends ListMethod ? K : never; }[keyof C];
3696
+ /** What a list method's page is made of. */
3697
+ type Listed<F> = F extends ((offset?: number, limit?: number) => Promise<ListPage<infer L>>) ? L : never;
3698
+ /** What a listed link resolves to. */
3699
+ type Resolves<L> = L extends APIResource<infer T> ? T : never;
3700
+ /**
3701
+ * ## Paginate Options
3702
+ * How {@link BaseClient.paginate} walks a list endpoint.
3703
+ */
3704
+ interface PaginateOptions {
3705
+ /** Entries fetched per request. Defaults to 20. */
3706
+ pageSize?: number;
3707
+ /** Fetch each link and yield the resource instead. Defaults to `false`. */
3708
+ resolve?: boolean;
3709
+ /** Links resolved at a time, when `resolve` is set. Defaults to 4. */
3710
+ concurrency?: number;
3711
+ }
3712
+ /**
3713
+ * ## Resolve Options
3714
+ * How {@link ClientFacade.resolveAll} fetches the links it was given.
3715
+ */
3716
+ interface ResolveOptions {
3717
+ /** Links fetched at a time. Defaults to 4. */
3718
+ concurrency?: number;
3719
+ }
3720
+ /**
3721
+ * ## Client Facade
3722
+ * What every client is, underneath: something that owns a transport and talks
3723
+ * to it. Holds the members {@link BaseClient} and {@link MainClient} would
3724
+ * otherwise each declare — the cache, the scope, and following a link.
3725
+ *
3726
+ * The transport is a `#private` field rather than a `protected` one so that
3727
+ * nothing about it reaches the published types: a `protected` member keeps its
3728
+ * type in the emitted `.d.ts`, which would put the whole internal transport
3729
+ * surface in front of consumers who cannot name it.
3730
+ */
3731
+ declare abstract class ClientFacade {
3732
+ #private;
3733
+ constructor(options?: ClientOptions);
3154
3734
  /** The store backing this client, or `undefined` when caching is disabled. */
3155
- readonly cache: CacheStore | undefined;
3156
- private readonly baseURL;
3157
- private readonly logger;
3158
- private readonly fetch;
3159
- /** Requests already on the wire, so concurrent callers share one round trip. */
3160
- private readonly inFlight;
3161
- constructor(clientOptions?: ClientOptions);
3735
+ get cache(): CacheStore | undefined;
3736
+ /**
3737
+ * Derives a client whose requests carry a signal, a timeout, or both.
3738
+ *
3739
+ * The clone shares this client's transport its cache, its validators and the
3740
+ * requests already on the wire — so a scoped call still joins an identical
3741
+ * unscoped one instead of repeating it. Cloning is cheap, but not free: derive
3742
+ * one per unit of work — a request handler, a job — rather than one per call.
3743
+ *
3744
+ * ```ts
3745
+ * const scoped = api.with({ signal: request.signal, timeout: 2_000 });
3746
+ * ```
3747
+ */
3748
+ with(scope: RequestScope): this;
3162
3749
  /**
3163
- * Drops every cached response. A {@link CacheStore} that does not implement
3164
- * `clear` is left alone.
3750
+ * Drops every cached response, and any `ETag` learned for one — otherwise the
3751
+ * next request revalidates and is answered with the body just dropped.
3752
+ *
3753
+ * A {@link CacheStore} that does not implement `clear` is left alone.
3754
+ *
3755
+ * The store is the transport's, so a client sharing one with others clears
3756
+ * theirs too.
3165
3757
  */
3166
3758
  clearCache(): Promise<void>;
3167
3759
  /**
3168
- * Resolves a resource through the cache, then through any identical request
3169
- * already in flight, and only then over the network.
3760
+ * Fetches what a link points at, through this client's cache and scope.
3170
3761
  *
3171
- * The URL is joined by concatenation: `new URL(path, base)` would discard the
3172
- * base's own `/api/v2` path.
3762
+ * A link carries what it points at, so the result is typed without saying so:
3763
+ *
3764
+ * ```ts
3765
+ * const pokemon = await api.getPokemonByName('luxray');
3766
+ * const species = await api.resolve(pokemon.species);
3767
+ * // ^? PokemonSpecies
3768
+ * ```
3769
+ *
3770
+ * A link names a resource, not a section, so any client resolves any link.
3771
+ *
3772
+ * @throws {TypeError} If the URL is not valid, or names no PokéAPI endpoint.
3773
+ */
3774
+ resolve<T>(resource: ResourceLink<T>): Promise<T>;
3775
+ /**
3776
+ * Fetches what several links point at, in the order they were given.
3777
+ *
3778
+ * At most `concurrency` requests run at a time — four by default, because the
3779
+ * PokéAPI's fair-use policy asks clients not to flood it. The first failure
3780
+ * rejects, and no further link is fetched.
3781
+ *
3782
+ * ```ts
3783
+ * const types = await api.resolveAll(pokemon.types.map((slot) => slot.type));
3784
+ * // ^? Type[]
3785
+ * ```
3173
3786
  */
3174
- private request;
3175
- private fetchResource;
3787
+ resolveAll<T>(resources: readonly ResourceLink<T>[], options?: ResolveOptions): Promise<T[]>;
3176
3788
  /**
3177
3789
  * Retrieves a single resource from the PokéAPI by its endpoint and identifier.
3178
3790
  *
3179
- * @template T - The type of the resource to be returned.
3180
- * @param endpoint - The endpoint of the resource.
3181
- * @param identifier - The identifier of the resource, or a path below the endpoint.
3182
- * Omit it to address the endpoint itself.
3183
- * @returns A promise that resolves to the requested resource.
3791
+ * @param segments - The identifier of the resource, followed by any path below
3792
+ * it. Each is percent-encoded, so pass `id, 'encounters'` rather than
3793
+ * `` `${id}/encounters` ``. Omit them to address the endpoint itself.
3184
3794
  */
3185
- protected getResource<T>(endpoint: Endpoint, identifier?: string | number): Promise<T>;
3795
+ protected getResource<T>(endpoint: Endpoint, ...segments: (string | number)[]): Promise<T>;
3186
3796
  /**
3187
- * Retrieves a resource by its URL.
3797
+ * Retrieves a resource by its URL, or by a link taken from another response.
3798
+ *
3799
+ * A link knows what it points at, so passing one infers `T`; a bare string
3800
+ * does not, and needs `T` named.
3188
3801
  *
3189
- * @template T - The type of the resource to be returned.
3190
- * @param url - The URL of the resource.
3191
- * @param baseURL - The base URL to use. Defaults to the one the client was built with.
3192
- * @returns A promise that resolves to the requested resource.
3193
- * @throws {TypeError} If `url` is not a valid URL, or names no endpoint under `baseURL`.
3802
+ * @throws {TypeError} If the URL is not valid, or names no endpoint under `baseURL`.
3194
3803
  */
3195
- protected getResourceByURL<T>(url: string, baseURL?: string): Promise<T>;
3804
+ protected getResourceByURL<T>(resource: ResourceLink<T>, baseURL?: string): Promise<T>;
3196
3805
  /**
3197
3806
  * Retrieves a list of resources from the PokéAPI with pagination support.
3198
3807
  *
3199
- * @param endpoint - The endpoint of the resource.
3200
- * @param offset - The offset for pagination. Defaults to 0.
3201
- * @param limit - The limit for pagination. Defaults to 20.
3202
- * @returns A promise that resolves to a list of named API resources.
3808
+ * @template T - What the listed links resolve to.
3203
3809
  */
3204
- protected getListResource(endpoint: Endpoint, offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3810
+ protected getListResource<T = unknown>(endpoint: Endpoint, offset?: number, limit?: number): Promise<NamedAPIResourceList<T>>;
3811
+ /**
3812
+ * Retrieves a list of resources that have no name to list, with pagination support.
3813
+ *
3814
+ * @template T - What the listed links resolve to.
3815
+ */
3816
+ protected getUnnamedListResource<T = unknown>(endpoint: Endpoint, offset?: number, limit?: number): Promise<APIResourceList<T>>;
3817
+ /**
3818
+ * Walks every page of a list, yielding one entry at a time. The bridge
3819
+ * {@link BaseClient.paginate} reaches the transport through, so that no
3820
+ * signature here has to name one.
3821
+ */
3822
+ protected walk<T>(list: ListFn<APIResource<T>>, options?: PaginateOptions): AsyncGenerator<APIResource<T> | T>;
3823
+ }
3824
+ /**
3825
+ * ## Base Client
3826
+ * Base class for every section client. Names endpoints; the transport behind
3827
+ * {@link ClientFacade} does everything else — requests, caching, coalescing,
3828
+ * retries and logs.
3829
+ *
3830
+ * A {@link MainClient} builds one transport and hands it to all twelve of its
3831
+ * section clients, which is what makes them share a cache and a round trip.
3832
+ */
3833
+ declare class BaseClient extends ClientFacade {
3834
+ /**
3835
+ * Walks every page of a list endpoint, yielding one entry at a time.
3836
+ *
3837
+ * Name the list method to walk; the offset and the limit are this method's to
3838
+ * manage.
3839
+ *
3840
+ * ```ts
3841
+ * for await (const berry of api.berry.paginate('listBerries')) {
3842
+ * console.log(berry.name);
3843
+ * }
3844
+ * ```
3845
+ *
3846
+ * With `resolve`, each link is fetched and the resource is yielded instead of
3847
+ * the link. Requests are capped at `concurrency` at a time — the default is
3848
+ * deliberately low, because walking a section is exactly the traffic the
3849
+ * PokéAPI's fair-use policy asks clients to keep gentle.
3850
+ *
3851
+ * ```ts
3852
+ * for await (const berry of api.berry.paginate('listBerries', { resolve: true })) {
3853
+ * console.log(berry.growth_time);
3854
+ * }
3855
+ * ```
3856
+ *
3857
+ * A function is accepted too, for a list this client does not carry — a page
3858
+ * of a foreign endpoint, or one narrowed before the walk sees it.
3859
+ *
3860
+ * ```ts
3861
+ * api.berry.paginate((offset, limit) => api.berry.listBerries(offset, limit));
3862
+ * ```
3863
+ */
3864
+ paginate<K extends ListMethodName<this>>(list: K, options?: PaginateOptions & {
3865
+ resolve?: false;
3866
+ }): AsyncGenerator<Listed<this[K]>>;
3867
+ paginate<K extends ListMethodName<this>>(list: K, options: PaginateOptions & {
3868
+ resolve: true;
3869
+ }): AsyncGenerator<Resolves<Listed<this[K]>>>;
3870
+ paginate<L extends APIResource<unknown>>(list: ListFn<L>, options?: PaginateOptions & {
3871
+ resolve?: false;
3872
+ }): AsyncGenerator<L>;
3873
+ paginate<T>(list: ListFn<APIResource<T>>, options: PaginateOptions & {
3874
+ resolve: true;
3875
+ }): AsyncGenerator<T>;
3205
3876
  }
3206
3877
  //#endregion
3207
3878
  //#region src/clients/berry.client.d.ts
@@ -3209,78 +3880,32 @@ declare class BaseClient {
3209
3880
  * ### Berry Client
3210
3881
  *
3211
3882
  * Client used to access the Berry Endpoints:
3212
- * - [Berries](https://pokeapi.co/docs/v2#berries)
3213
- * - [Berry Firmnesses](https://pokeapi.co/docs/v2#berry-firmnesses)
3214
- * - [Berry Flavors](https://pokeapi.co/docs/v2#berry-flavors)
3215
- * ---
3883
+ *
3884
+ * - [Berries](https://pokeapi.co/docs/v2#berries)
3885
+ * - [Berry Firmnesses](https://pokeapi.co/docs/v2#berry-firmnesses)
3886
+ * - [Berry Flavors](https://pokeapi.co/docs/v2#berry-flavors)
3887
+ *
3216
3888
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#berries-section)
3217
3889
  */
3218
3890
  declare class BerryClient extends BaseClient {
3219
- /**
3220
- * Get a Berry by its name.
3221
- * @param name The Berry name.
3222
- * @returns The matching Berry.
3223
- */
3891
+ /** Get a Berry by its name. */
3224
3892
  getBerryByName(name: string): Promise<Berry>;
3225
- /**
3226
- * Get a Berry by its ID.
3227
- * @param id The Berry ID.
3228
- * @returns The matching Berry.
3229
- */
3893
+ /** Get a Berry by its ID. */
3230
3894
  getBerryById(id: number): Promise<Berry>;
3231
- /**
3232
- * Get a Berry Firmness by its ID.
3233
- * @param id The Berry Firmness ID.
3234
- * @returns The matching Berry Firmness.
3235
- */
3895
+ /** Get a Berry Firmness by its ID. */
3236
3896
  getBerryFirmnessById(id: number): Promise<BerryFirmness>;
3237
- /**
3238
- * Get a Berry Firmness by its name.
3239
- * @param name The Berry Firmness name.
3240
- * @returns The matching Berry Firmness.
3241
- */
3897
+ /** Get a Berry Firmness by its name. */
3242
3898
  getBerryFirmnessByName(name: string): Promise<BerryFirmness>;
3243
- /**
3244
- * Get a Berry Flavor by its ID.
3245
- *
3246
- * Flavors determine whether a Pokémon benefits or suffers from eating a berry,
3247
- * based on its nature. See
3248
- * [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
3249
- * @param id The Berry Flavor ID.
3250
- * @returns The matching Berry Flavor.
3251
- */
3899
+ /** Get a Berry Flavor by its ID. */
3252
3900
  getBerryFlavorById(id: number): Promise<BerryFlavor>;
3253
- /**
3254
- * Get a Berry Flavor by its name.
3255
- *
3256
- * Flavors determine whether a Pokémon benefits or suffers from eating a berry,
3257
- * based on its nature. See
3258
- * [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
3259
- * @param name The Berry Flavor name.
3260
- * @returns The matching Berry Flavor.
3261
- */
3901
+ /** Get a Berry Flavor by its name. */
3262
3902
  getBerryFlavorByName(name: string): Promise<BerryFlavor>;
3263
- /**
3264
- * List Berries.
3265
- * @param offset Index of the first resource returned. Defaults to 0.
3266
- * @param limit How many resources per page. Defaults to 20.
3267
- * @returns A paginated list of Berries.
3268
- */
3269
- listBerries(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3270
- /**
3271
- * List Berry Firmnesses.
3272
- * @param offset Index of the first resource returned. Defaults to 0.
3273
- * @param limit How many resources per page. Defaults to 20.
3274
- * @returns A paginated list of Berry Firmnesses.
3275
- */
3276
- listBerryFirmnesses(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3277
- /**
3278
- * List Berry Flavors.
3279
- * @param offset Index of the first resource returned. Defaults to 0.
3280
- * @param limit How many resources per page. Defaults to 20.
3281
- * @returns A paginated list of Berry Flavors.
3282
- */
3283
- listBerryFlavors(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3903
+ /** List Berries. Page defaults to 20 entries from offset 0. */
3904
+ listBerries(offset?: number, limit?: number): Promise<NamedAPIResourceList<Berry>>;
3905
+ /** List Berry Firmnesses. Page defaults to 20 entries from offset 0. */
3906
+ listBerryFirmnesses(offset?: number, limit?: number): Promise<NamedAPIResourceList<BerryFirmness>>;
3907
+ /** List Berry Flavors. Page defaults to 20 entries from offset 0. */
3908
+ listBerryFlavors(offset?: number, limit?: number): Promise<NamedAPIResourceList<BerryFlavor>>;
3284
3909
  }
3285
3910
  //#endregion
3286
3911
  //#region src/clients/contest.client.d.ts
@@ -3288,58 +3913,28 @@ declare class BerryClient extends BaseClient {
3288
3913
  * ### Contest Client
3289
3914
  *
3290
3915
  * Client used to access the Contest Endpoints:
3291
- * - [Contest Types](https://pokeapi.co/docs/v2#contest-types)
3292
- * - [Contest Effects](https://pokeapi.co/docs/v2#contest-effects)
3293
- * - [Super Contest Effects](https://pokeapi.co/docs/v2#super-contest-effects)
3294
- * ---
3916
+ *
3917
+ * - [Contest Types](https://pokeapi.co/docs/v2#contest-types)
3918
+ * - [Contest Effects](https://pokeapi.co/docs/v2#contest-effects)
3919
+ * - [Super Contest Effects](https://pokeapi.co/docs/v2#super-contest-effects)
3920
+ *
3295
3921
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#contests-section)
3296
3922
  */
3297
3923
  declare class ContestClient extends BaseClient {
3298
- /**
3299
- * Get a Contest Type by its name.
3300
- * @param name The Contest Type name.
3301
- * @returns The matching Contest Type.
3302
- */
3924
+ /** Get a Contest Type by its name. */
3303
3925
  getContestTypeByName(name: string): Promise<ContestType>;
3304
- /**
3305
- * Get a Contest Type by its ID.
3306
- * @param id The Contest Type ID.
3307
- * @returns The matching Contest Type.
3308
- */
3926
+ /** Get a Contest Type by its ID. */
3309
3927
  getContestTypeById(id: number): Promise<ContestType>;
3310
- /**
3311
- * Get a Contest Effect by its ID.
3312
- * @param id The Contest Effect ID.
3313
- * @returns The matching Contest Effect.
3314
- */
3928
+ /** Get a Contest Effect by its ID. */
3315
3929
  getContestEffectById(id: number): Promise<ContestEffect>;
3316
- /**
3317
- * Get a Super Contest Effect by its ID.
3318
- * @param id The Super Contest Effect ID.
3319
- * @returns The matching Super Contest Effect.
3320
- */
3930
+ /** Get a Super Contest Effect by its ID. */
3321
3931
  getSuperContestEffectById(id: number): Promise<SuperContestEffect>;
3322
- /**
3323
- * List Contest Types.
3324
- * @param offset Index of the first resource returned. Defaults to 0.
3325
- * @param limit How many resources per page. Defaults to 20.
3326
- * @returns A paginated list of Contest Types.
3327
- */
3328
- listContestTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3329
- /**
3330
- * List Contest Effects.
3331
- * @param offset Index of the first resource returned. Defaults to 0.
3332
- * @param limit How many resources per page. Defaults to 20.
3333
- * @returns A paginated list of Contest Effects.
3334
- */
3335
- listContestEffects(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3336
- /**
3337
- * List Super Contest Effects.
3338
- * @param offset Index of the first resource returned. Defaults to 0.
3339
- * @param limit How many resources per page. Defaults to 20.
3340
- * @returns A paginated list of Super Contest Effects.
3341
- */
3342
- listSuperContestEffects(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3932
+ /** List Contest Types. Page defaults to 20 entries from offset 0. */
3933
+ listContestTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList<ContestType>>;
3934
+ /** List Contest Effects. Page defaults to 20 entries from offset 0. */
3935
+ listContestEffects(offset?: number, limit?: number): Promise<APIResourceList<ContestEffect>>;
3936
+ /** List Super Contest Effects. Page defaults to 20 entries from offset 0. */
3937
+ listSuperContestEffects(offset?: number, limit?: number): Promise<APIResourceList<SuperContestEffect>>;
3343
3938
  }
3344
3939
  //#endregion
3345
3940
  //#region src/clients/currency.client.d.ts
@@ -3347,30 +3942,18 @@ declare class ContestClient extends BaseClient {
3347
3942
  * ### Currency Client
3348
3943
  *
3349
3944
  * Client used to access the Currency Endpoints:
3350
- * - [Currencies](https://pokeapi.co/docs/v2#currencies)
3351
- * ---
3945
+ *
3946
+ * - [Currencies](https://pokeapi.co/docs/v2#currencies)
3947
+ *
3352
3948
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#currencies-section)
3353
3949
  */
3354
3950
  declare class CurrencyClient extends BaseClient {
3355
- /**
3356
- * Get a Currency by its name.
3357
- * @param name The Currency name.
3358
- * @returns The matching Currency.
3359
- */
3951
+ /** Get a Currency by its name. */
3360
3952
  getCurrencyByName(name: string): Promise<Currency>;
3361
- /**
3362
- * Get a Currency by its ID.
3363
- * @param id The Currency ID.
3364
- * @returns The matching Currency.
3365
- */
3953
+ /** Get a Currency by its ID. */
3366
3954
  getCurrencyById(id: number): Promise<Currency>;
3367
- /**
3368
- * List Currencies.
3369
- * @param offset Index of the first resource returned. Defaults to 0.
3370
- * @param limit How many resources per page. Defaults to 20.
3371
- * @returns A paginated list of Currencies.
3372
- */
3373
- listCurrencies(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3955
+ /** List Currencies. Page defaults to 20 entries from offset 0. */
3956
+ listCurrencies(offset?: number, limit?: number): Promise<NamedAPIResourceList<Currency>>;
3374
3957
  }
3375
3958
  //#endregion
3376
3959
  //#region src/clients/encounter.client.d.ts
@@ -3378,70 +3961,32 @@ declare class CurrencyClient extends BaseClient {
3378
3961
  * ### Encounter Client
3379
3962
  *
3380
3963
  * Client used to access the Encounter Endpoints:
3381
- * - [Encounter Methods](https://pokeapi.co/docs/v2#encounter-methods)
3382
- * - [Encounter Conditions](https://pokeapi.co/docs/v2#encounter-conditions)
3383
- * - [Encounter Condition Values](https://pokeapi.co/docs/v2#encounter-condition-values)
3384
- * ---
3964
+ *
3965
+ * - [Encounter Methods](https://pokeapi.co/docs/v2#encounter-methods)
3966
+ * - [Encounter Conditions](https://pokeapi.co/docs/v2#encounter-conditions)
3967
+ * - [Encounter Condition Values](https://pokeapi.co/docs/v2#encounter-condition-values)
3968
+ *
3385
3969
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#encounters-section)
3386
3970
  */
3387
3971
  declare class EncounterClient extends BaseClient {
3388
- /**
3389
- * Get an Encounter Method by its name.
3390
- * @param name The Encounter Method name.
3391
- * @returns The matching Encounter Method.
3392
- */
3972
+ /** Get an Encounter Method by its name. */
3393
3973
  getEncounterMethodByName(name: string): Promise<EncounterMethod>;
3394
- /**
3395
- * Get an Encounter Method by its ID.
3396
- * @param id The Encounter Method ID.
3397
- * @returns The matching Encounter Method.
3398
- */
3974
+ /** Get an Encounter Method by its ID. */
3399
3975
  getEncounterMethodById(id: number): Promise<EncounterMethod>;
3400
- /**
3401
- * Get an Encounter Condition by its ID.
3402
- * @param id The Encounter Condition ID.
3403
- * @returns The matching Encounter Condition.
3404
- */
3976
+ /** Get an Encounter Condition by its ID. */
3405
3977
  getEncounterConditionById(id: number): Promise<EncounterCondition>;
3406
- /**
3407
- * Get an Encounter Condition by its name.
3408
- * @param name The Encounter Condition name.
3409
- * @returns The matching Encounter Condition.
3410
- */
3978
+ /** Get an Encounter Condition by its name. */
3411
3979
  getEncounterConditionByName(name: string): Promise<EncounterCondition>;
3412
- /**
3413
- * Get an Encounter Condition Value by its name.
3414
- * @param name The Encounter Condition Value name.
3415
- * @returns The matching Encounter Condition Value.
3416
- */
3980
+ /** Get an Encounter Condition Value by its name. */
3417
3981
  getEncounterConditionValueByName(name: string): Promise<EncounterConditionValue>;
3418
- /**
3419
- * Get an Encounter Condition Value by its ID.
3420
- * @param id The Encounter Condition Value ID.
3421
- * @returns The matching Encounter Condition Value.
3422
- */
3982
+ /** Get an Encounter Condition Value by its ID. */
3423
3983
  getEncounterConditionValueById(id: number): Promise<EncounterConditionValue>;
3424
- /**
3425
- * List Encounter Methods.
3426
- * @param offset Index of the first resource returned. Defaults to 0.
3427
- * @param limit How many resources per page. Defaults to 20.
3428
- * @returns A paginated list of Encounter Methods.
3429
- */
3430
- listEncounterMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3431
- /**
3432
- * List Encounter Conditions.
3433
- * @param offset Index of the first resource returned. Defaults to 0.
3434
- * @param limit How many resources per page. Defaults to 20.
3435
- * @returns A paginated list of Encounter Conditions.
3436
- */
3437
- listEncounterConditions(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3438
- /**
3439
- * List Encounter Condition Values.
3440
- * @param offset Index of the first resource returned. Defaults to 0.
3441
- * @param limit How many resources per page. Defaults to 20.
3442
- * @returns A paginated list of Encounter Condition Values.
3443
- */
3444
- listEncounterConditionValues(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3984
+ /** List Encounter Methods. Page defaults to 20 entries from offset 0. */
3985
+ listEncounterMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterMethod>>;
3986
+ /** List Encounter Conditions. Page defaults to 20 entries from offset 0. */
3987
+ listEncounterConditions(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterCondition>>;
3988
+ /** List Encounter Condition Values. Page defaults to 20 entries from offset 0. */
3989
+ listEncounterConditionValues(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterConditionValue>>;
3445
3990
  }
3446
3991
  //#endregion
3447
3992
  //#region src/clients/evolution.client.d.ts
@@ -3449,44 +3994,23 @@ declare class EncounterClient extends BaseClient {
3449
3994
  * ### Evolution Client
3450
3995
  *
3451
3996
  * Client used to access the Evolution Endpoints:
3452
- * - [Evolution Chains](https://pokeapi.co/docs/v2#evolution-chains)
3453
- * - [Evolution Triggers](https://pokeapi.co/docs/v2#evolution-triggers)
3454
- * ---
3997
+ *
3998
+ * - [Evolution Chains](https://pokeapi.co/docs/v2#evolution-chains)
3999
+ * - [Evolution Triggers](https://pokeapi.co/docs/v2#evolution-triggers)
4000
+ *
3455
4001
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#evolution-section)
3456
4002
  */
3457
4003
  declare class EvolutionClient extends BaseClient {
3458
- /**
3459
- * Get an Evolution Chain by its ID.
3460
- * @param id The Evolution Chain ID.
3461
- * @returns The matching Evolution Chain.
3462
- */
4004
+ /** Get an Evolution Chain by its ID. */
3463
4005
  getEvolutionChainById(id: number): Promise<EvolutionChain>;
3464
- /**
3465
- * Get an Evolution Trigger by its ID.
3466
- * @param id The Evolution Trigger ID.
3467
- * @returns The matching Evolution Trigger.
3468
- */
4006
+ /** Get an Evolution Trigger by its ID. */
3469
4007
  getEvolutionTriggerById(id: number): Promise<EvolutionTrigger>;
3470
- /**
3471
- * Get an Evolution Trigger by its name.
3472
- * @param name The Evolution Trigger name.
3473
- * @returns The matching Evolution Trigger.
3474
- */
4008
+ /** Get an Evolution Trigger by its name. */
3475
4009
  getEvolutionTriggerByName(name: string): Promise<EvolutionTrigger>;
3476
- /**
3477
- * List Evolution Chains.
3478
- * @param offset Index of the first resource returned. Defaults to 0.
3479
- * @param limit How many resources per page. Defaults to 20.
3480
- * @returns A paginated list of Evolution Chains.
3481
- */
3482
- listEvolutionChains(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3483
- /**
3484
- * List Evolution Triggers.
3485
- * @param offset Index of the first resource returned. Defaults to 0.
3486
- * @param limit How many resources per page. Defaults to 20.
3487
- * @returns A paginated list of Evolution Triggers.
3488
- */
3489
- listEvolutionTriggers(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4010
+ /** List Evolution Chains. Page defaults to 20 entries from offset 0. */
4011
+ listEvolutionChains(offset?: number, limit?: number): Promise<APIResourceList<EvolutionChain>>;
4012
+ /** List Evolution Triggers. Page defaults to 20 entries from offset 0. */
4013
+ listEvolutionTriggers(offset?: number, limit?: number): Promise<NamedAPIResourceList<EvolutionTrigger>>;
3490
4014
  }
3491
4015
  //#endregion
3492
4016
  //#region src/clients/game.client.d.ts
@@ -3494,90 +4018,39 @@ declare class EvolutionClient extends BaseClient {
3494
4018
  * ### Game Client
3495
4019
  *
3496
4020
  * Client used to access the Game Endpoints:
3497
- * - [Generations](https://pokeapi.co/docs/v2#generations)
3498
- * - [Pokédexes](https://pokeapi.co/docs/v2#pokedexes)
3499
- * - [Versions](https://pokeapi.co/docs/v2#version)
3500
- * - [Version Groups](https://pokeapi.co/docs/v2#version-groups)
3501
- * ---
4021
+ *
4022
+ * - [Generations](https://pokeapi.co/docs/v2#generations)
4023
+ * - [Pokédexes](https://pokeapi.co/docs/v2#pokedexes)
4024
+ * - [Versions](https://pokeapi.co/docs/v2#version)
4025
+ * - [Version Groups](https://pokeapi.co/docs/v2#version-groups)
4026
+ *
3502
4027
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#games-section)
3503
4028
  */
3504
4029
  declare class GameClient extends BaseClient {
3505
- /**
3506
- * Get a Generation by its name.
3507
- * @param name The Generation name.
3508
- * @returns The matching Generation.
3509
- */
4030
+ /** Get a Generation by its name. */
3510
4031
  getGenerationByName(name: string): Promise<Generation>;
3511
- /**
3512
- * Get a Generation by its ID.
3513
- * @param id The Generation ID.
3514
- * @returns The matching Generation.
3515
- */
3516
- getGenerationById(id: number): Promise<Generation>;
3517
- /**
3518
- * Get a Pokédex by its name.
3519
- * @param name The Pokédex name.
3520
- * @returns The matching Pokédex.
3521
- */
4032
+ /** Get a Generation by its ID. */
4033
+ getGenerationById(id: number): Promise<Generation>;
4034
+ /** Get a Pokédex by its name. */
3522
4035
  getPokedexByName(name: string): Promise<Pokedex>;
3523
- /**
3524
- * Get a Pokédex by its ID.
3525
- * @param id The Pokédex ID.
3526
- * @returns The matching Pokédex.
3527
- */
4036
+ /** Get a Pokédex by its ID. */
3528
4037
  getPokedexById(id: number): Promise<Pokedex>;
3529
- /**
3530
- * Get a Version by its name.
3531
- * @param name The Version name.
3532
- * @returns The matching Version.
3533
- */
4038
+ /** Get a Version by its name. */
3534
4039
  getVersionByName(name: string): Promise<Version>;
3535
- /**
3536
- * Get a Version by its ID.
3537
- * @param id The Version ID.
3538
- * @returns The matching Version.
3539
- */
4040
+ /** Get a Version by its ID. */
3540
4041
  getVersionById(id: number): Promise<Version>;
3541
- /**
3542
- * Get a Version Group by its name.
3543
- * @param name The Version Group name.
3544
- * @returns The matching Version Group.
3545
- */
4042
+ /** Get a Version Group by its name. */
3546
4043
  getVersionGroupByName(name: string): Promise<VersionGroup>;
3547
- /**
3548
- * Get a Version Group by its ID.
3549
- * @param id The Version Group ID.
3550
- * @returns The matching Version Group.
3551
- */
4044
+ /** Get a Version Group by its ID. */
3552
4045
  getVersionGroupById(id: number): Promise<VersionGroup>;
3553
- /**
3554
- * List Generations.
3555
- * @param offset Index of the first resource returned. Defaults to 0.
3556
- * @param limit How many resources per page. Defaults to 20.
3557
- * @returns A paginated list of Generations.
3558
- */
3559
- listGenerations(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3560
- /**
3561
- * List Pokédexes.
3562
- * @param offset Index of the first resource returned. Defaults to 0.
3563
- * @param limit How many resources per page. Defaults to 20.
3564
- * @returns A paginated list of Pokédexes.
3565
- */
3566
- listPokedexes(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3567
- /**
3568
- * List Versions.
3569
- * @param offset Index of the first resource returned. Defaults to 0.
3570
- * @param limit How many resources per page. Defaults to 20.
3571
- * @returns A paginated list of Versions.
3572
- */
3573
- listVersions(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3574
- /**
3575
- * List Version Groups.
3576
- * @param offset Index of the first resource returned. Defaults to 0.
3577
- * @param limit How many resources per page. Defaults to 20.
3578
- * @returns A paginated list of Version Groups.
3579
- */
3580
- listVersionGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4046
+ /** List Generations. Page defaults to 20 entries from offset 0. */
4047
+ listGenerations(offset?: number, limit?: number): Promise<NamedAPIResourceList<Generation>>;
4048
+ /** List Pokédexes. Page defaults to 20 entries from offset 0. */
4049
+ listPokedexes(offset?: number, limit?: number): Promise<NamedAPIResourceList<Pokedex>>;
4050
+ /** List Versions. Page defaults to 20 entries from offset 0. */
4051
+ listVersions(offset?: number, limit?: number): Promise<NamedAPIResourceList<Version>>;
4052
+ /** List Version Groups. Page defaults to 20 entries from offset 0. */
4053
+ listVersionGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList<VersionGroup>>;
3581
4054
  }
3582
4055
  //#endregion
3583
4056
  //#region src/clients/item.client.d.ts
@@ -3585,110 +4058,46 @@ declare class GameClient extends BaseClient {
3585
4058
  * ### Item Client
3586
4059
  *
3587
4060
  * Client used to access the Item Endpoints:
3588
- * - [Items](https://pokeapi.co/docs/v2#item)
3589
- * - [Item Attributes](https://pokeapi.co/docs/v2#item-attributes)
3590
- * - [Item Categories](https://pokeapi.co/docs/v2#item-categories)
3591
- * - [Item Fling Effects](https://pokeapi.co/docs/v2#item-fling-effects)
3592
- * - [Item Pockets](https://pokeapi.co/docs/v2#item-pockets)
3593
- * ---
4061
+ *
4062
+ * - [Items](https://pokeapi.co/docs/v2#item)
4063
+ * - [Item Attributes](https://pokeapi.co/docs/v2#item-attributes)
4064
+ * - [Item Categories](https://pokeapi.co/docs/v2#item-categories)
4065
+ * - [Item Fling Effects](https://pokeapi.co/docs/v2#item-fling-effects)
4066
+ * - [Item Pockets](https://pokeapi.co/docs/v2#item-pockets)
4067
+ *
3594
4068
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#items-section)
3595
4069
  */
3596
4070
  declare class ItemClient extends BaseClient {
3597
- /**
3598
- * Get an Item by its name.
3599
- * @param name The Item name.
3600
- * @returns The matching Item.
3601
- */
4071
+ /** Get an Item by its name. */
3602
4072
  getItemByName(name: string): Promise<Item>;
3603
- /**
3604
- * Get an Item by its ID.
3605
- * @param id The Item ID.
3606
- * @returns The matching Item.
3607
- */
4073
+ /** Get an Item by its ID. */
3608
4074
  getItemById(id: number): Promise<Item>;
3609
- /**
3610
- * Get an Item Attribute by its name.
3611
- * @param name The Item Attribute name.
3612
- * @returns The matching Item Attribute.
3613
- */
4075
+ /** Get an Item Attribute by its name. */
3614
4076
  getItemAttributeByName(name: string): Promise<ItemAttribute>;
3615
- /**
3616
- * Get an Item Attribute by its ID.
3617
- * @param id The Item Attribute ID.
3618
- * @returns The matching Item Attribute.
3619
- */
4077
+ /** Get an Item Attribute by its ID. */
3620
4078
  getItemAttributeById(id: number): Promise<ItemAttribute>;
3621
- /**
3622
- * Get an Item Category by its name.
3623
- * @param name The Item Category name.
3624
- * @returns The matching Item Category.
3625
- */
4079
+ /** Get an Item Category by its name. */
3626
4080
  getItemCategoryByName(name: string): Promise<ItemCategory>;
3627
- /**
3628
- * Get an Item Category by its ID.
3629
- * @param id The Item Category ID.
3630
- * @returns The matching Item Category.
3631
- */
4081
+ /** Get an Item Category by its ID. */
3632
4082
  getItemCategoryById(id: number): Promise<ItemCategory>;
3633
- /**
3634
- * Get an Item Fling Effect by its name.
3635
- * @param name The Item Fling Effect name.
3636
- * @returns The matching Item Fling Effect.
3637
- */
4083
+ /** Get an Item Fling Effect by its name. */
3638
4084
  getItemFlingEffectByName(name: string): Promise<ItemFlingEffect>;
3639
- /**
3640
- * Get an Item Fling Effect by its ID.
3641
- * @param id The Item Fling Effect ID.
3642
- * @returns The matching Item Fling Effect.
3643
- */
4085
+ /** Get an Item Fling Effect by its ID. */
3644
4086
  getItemFlingEffectById(id: number): Promise<ItemFlingEffect>;
3645
- /**
3646
- * Get an Item Pocket by its name.
3647
- * @param name The Item Pocket name.
3648
- * @returns The matching Item Pocket.
3649
- */
4087
+ /** Get an Item Pocket by its name. */
3650
4088
  getItemPocketByName(name: string): Promise<ItemPocket>;
3651
- /**
3652
- * Get an Item Pocket by its ID.
3653
- * @param id The Item Pocket ID.
3654
- * @returns The matching Item Pocket.
3655
- */
4089
+ /** Get an Item Pocket by its ID. */
3656
4090
  getItemPocketById(id: number): Promise<ItemPocket>;
3657
- /**
3658
- * List Items.
3659
- * @param offset Index of the first resource returned. Defaults to 0.
3660
- * @param limit How many resources per page. Defaults to 20.
3661
- * @returns A paginated list of Items.
3662
- */
3663
- listItems(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3664
- /**
3665
- * List Item Attributes.
3666
- * @param offset Index of the first resource returned. Defaults to 0.
3667
- * @param limit How many resources per page. Defaults to 20.
3668
- * @returns A paginated list of Item Attributes.
3669
- */
3670
- listItemAttributes(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3671
- /**
3672
- * List Item Categories.
3673
- * @param offset Index of the first resource returned. Defaults to 0.
3674
- * @param limit How many resources per page. Defaults to 20.
3675
- * @returns A paginated list of Item Categories.
3676
- */
3677
- listItemCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3678
- /**
3679
- * List Item Fling Effects.
3680
- * @param offset Index of the first resource returned. Defaults to 0.
3681
- * @param limit How many resources per page. Defaults to 20.
3682
- * @returns A paginated list of Item Fling Effects.
3683
- */
3684
- listItemFlingEffects(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3685
- /**
3686
- * List Item Pockets.
3687
- * @param offset Index of the first resource returned. Defaults to 0.
3688
- * @param limit How many resources per page. Defaults to 20.
3689
- * @returns A paginated list of Item Pockets.
3690
- */
3691
- listItemPockets(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4091
+ /** List Items. Page defaults to 20 entries from offset 0. */
4092
+ listItems(offset?: number, limit?: number): Promise<NamedAPIResourceList<Item>>;
4093
+ /** List Item Attributes. Page defaults to 20 entries from offset 0. */
4094
+ listItemAttributes(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemAttribute>>;
4095
+ /** List Item Categories. Page defaults to 20 entries from offset 0. */
4096
+ listItemCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemCategory>>;
4097
+ /** List Item Fling Effects. Page defaults to 20 entries from offset 0. */
4098
+ listItemFlingEffects(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemFlingEffect>>;
4099
+ /** List Item Pockets. Page defaults to 20 entries from offset 0. */
4100
+ listItemPockets(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemPocket>>;
3692
4101
  }
3693
4102
  //#endregion
3694
4103
  //#region src/clients/location.client.d.ts
@@ -3696,90 +4105,39 @@ declare class ItemClient extends BaseClient {
3696
4105
  * ### Location Client
3697
4106
  *
3698
4107
  * Client used to access the Location Endpoints:
3699
- * - [Locations](https://pokeapi.co/docs/v2#locations)
3700
- * - [Location Areas](https://pokeapi.co/docs/v2#location-areas)
3701
- * - [Pal Park Areas](https://pokeapi.co/docs/v2#pal-park-areas)
3702
- * - [Regions](https://pokeapi.co/docs/v2#regions)
3703
- * ---
4108
+ *
4109
+ * - [Locations](https://pokeapi.co/docs/v2#locations)
4110
+ * - [Location Areas](https://pokeapi.co/docs/v2#location-areas)
4111
+ * - [Pal Park Areas](https://pokeapi.co/docs/v2#pal-park-areas)
4112
+ * - [Regions](https://pokeapi.co/docs/v2#regions)
4113
+ *
3704
4114
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#locations-section)
3705
4115
  */
3706
4116
  declare class LocationClient extends BaseClient {
3707
- /**
3708
- * Get a Location by its name.
3709
- * @param name The Location name.
3710
- * @returns The matching Location.
3711
- */
4117
+ /** Get a Location by its name. */
3712
4118
  getLocationByName(name: string): Promise<Location>;
3713
- /**
3714
- * Get a Location by its ID.
3715
- * @param id The Location ID.
3716
- * @returns The matching Location.
3717
- */
4119
+ /** Get a Location by its ID. */
3718
4120
  getLocationById(id: number): Promise<Location>;
3719
- /**
3720
- * Get a Location Area by its name.
3721
- * @param name The Location Area name.
3722
- * @returns The matching Location Area.
3723
- */
4121
+ /** Get a Location Area by its name. */
3724
4122
  getLocationAreaByName(name: string): Promise<LocationArea>;
3725
- /**
3726
- * Get a Location Area by its ID.
3727
- * @param id The Location Area ID.
3728
- * @returns The matching Location Area.
3729
- */
4123
+ /** Get a Location Area by its ID. */
3730
4124
  getLocationAreaById(id: number): Promise<LocationArea>;
3731
- /**
3732
- * Get a Pal Park Area by its name.
3733
- * @param name The Pal Park Area name.
3734
- * @returns The matching Pal Park Area.
3735
- */
4125
+ /** Get a Pal Park Area by its name. */
3736
4126
  getPalParkAreaByName(name: string): Promise<PalParkArea>;
3737
- /**
3738
- * Get a Pal Park Area by its ID.
3739
- * @param id The Pal Park Area ID.
3740
- * @returns The matching Pal Park Area.
3741
- */
4127
+ /** Get a Pal Park Area by its ID. */
3742
4128
  getPalParkAreaById(id: number): Promise<PalParkArea>;
3743
- /**
3744
- * Get a Region by its name.
3745
- * @param name The Region name.
3746
- * @returns The matching Region.
3747
- */
4129
+ /** Get a Region by its name. */
3748
4130
  getRegionByName(name: string): Promise<Region>;
3749
- /**
3750
- * Get a Region by its ID.
3751
- * @param id The Region ID.
3752
- * @returns The matching Region.
3753
- */
4131
+ /** Get a Region by its ID. */
3754
4132
  getRegionById(id: number): Promise<Region>;
3755
- /**
3756
- * List Locations.
3757
- * @param offset Index of the first resource returned. Defaults to 0.
3758
- * @param limit How many resources per page. Defaults to 20.
3759
- * @returns A paginated list of Locations.
3760
- */
3761
- listLocations(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3762
- /**
3763
- * List Location Areas.
3764
- * @param offset Index of the first resource returned. Defaults to 0.
3765
- * @param limit How many resources per page. Defaults to 20.
3766
- * @returns A paginated list of Location Areas.
3767
- */
3768
- listLocationAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3769
- /**
3770
- * List Pal Park Areas.
3771
- * @param offset Index of the first resource returned. Defaults to 0.
3772
- * @param limit How many resources per page. Defaults to 20.
3773
- * @returns A paginated list of Pal Park Areas.
3774
- */
3775
- listPalParkAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3776
- /**
3777
- * List Regions.
3778
- * @param offset Index of the first resource returned. Defaults to 0.
3779
- * @param limit How many resources per page. Defaults to 20.
3780
- * @returns A paginated list of Regions.
3781
- */
3782
- listRegions(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4133
+ /** List Locations. Page defaults to 20 entries from offset 0. */
4134
+ listLocations(offset?: number, limit?: number): Promise<NamedAPIResourceList<Location>>;
4135
+ /** List Location Areas. Page defaults to 20 entries from offset 0. */
4136
+ listLocationAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList<LocationArea>>;
4137
+ /** List Pal Park Areas. Page defaults to 20 entries from offset 0. */
4138
+ listPalParkAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList<PalParkArea>>;
4139
+ /** List Regions. Page defaults to 20 entries from offset 0. */
4140
+ listRegions(offset?: number, limit?: number): Promise<NamedAPIResourceList<Region>>;
3783
4141
  }
3784
4142
  //#endregion
3785
4143
  //#region src/clients/machine.client.d.ts
@@ -3787,24 +4145,16 @@ declare class LocationClient extends BaseClient {
3787
4145
  * ### Machine Client
3788
4146
  *
3789
4147
  * Client used to access the Machine Endpoints:
3790
- * - [Machines](https://pokeapi.co/docs/v2#machines)
3791
- * ---
4148
+ *
4149
+ * - [Machines](https://pokeapi.co/docs/v2#machines)
4150
+ *
3792
4151
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#machines-section)
3793
4152
  */
3794
4153
  declare class MachineClient extends BaseClient {
3795
- /**
3796
- * Get a Machine by its ID.
3797
- * @param id The Machine ID.
3798
- * @returns The matching Machine.
3799
- */
4154
+ /** Get a Machine by its ID. */
3800
4155
  getMachineById(id: number): Promise<Machine>;
3801
- /**
3802
- * List Machines.
3803
- * @param offset Index of the first resource returned. Defaults to 0.
3804
- * @param limit How many resources per page. Defaults to 20.
3805
- * @returns A paginated list of Machines.
3806
- */
3807
- listMachines(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4156
+ /** List Machines. Page defaults to 20 entries from offset 0. */
4157
+ listMachines(offset?: number, limit?: number): Promise<APIResourceList<Machine>>;
3808
4158
  }
3809
4159
  //#endregion
3810
4160
  //#region src/clients/move.client.d.ts
@@ -3812,150 +4162,60 @@ declare class MachineClient extends BaseClient {
3812
4162
  * ### Move Client
3813
4163
  *
3814
4164
  * Client used to access the Move Endpoints:
3815
- * - [Moves](https://pokeapi.co/docs/v2#moves)
3816
- * - [Move Ailments](https://pokeapi.co/docs/v2#move-ailments)
3817
- * - [Move Battle Styles](https://pokeapi.co/docs/v2#move-battle-styles)
3818
- * - [Move Categories](https://pokeapi.co/docs/v2#move-categories)
3819
- * - [Move Damage Classes](https://pokeapi.co/docs/v2#move-damage-classes)
3820
- * - [Move Learn Methods](https://pokeapi.co/docs/v2#move-learn-methods)
3821
- * - [Move Targets](https://pokeapi.co/docs/v2#move-targets)
3822
- * ---
4165
+ *
4166
+ * - [Moves](https://pokeapi.co/docs/v2#moves)
4167
+ * - [Move Ailments](https://pokeapi.co/docs/v2#move-ailments)
4168
+ * - [Move Battle Styles](https://pokeapi.co/docs/v2#move-battle-styles)
4169
+ * - [Move Categories](https://pokeapi.co/docs/v2#move-categories)
4170
+ * - [Move Damage Classes](https://pokeapi.co/docs/v2#move-damage-classes)
4171
+ * - [Move Learn Methods](https://pokeapi.co/docs/v2#move-learn-methods)
4172
+ * - [Move Targets](https://pokeapi.co/docs/v2#move-targets)
4173
+ *
3823
4174
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#moves-section)
3824
4175
  */
3825
4176
  declare class MoveClient extends BaseClient {
3826
- /**
3827
- * Get a Move by its name.
3828
- * @param name The Move name.
3829
- * @returns The matching Move.
3830
- */
4177
+ /** Get a Move by its name. */
3831
4178
  getMoveByName(name: string): Promise<Move>;
3832
- /**
3833
- * Get a Move by its ID.
3834
- * @param id The Move ID.
3835
- * @returns The matching Move.
3836
- */
4179
+ /** Get a Move by its ID. */
3837
4180
  getMoveById(id: number): Promise<Move>;
3838
- /**
3839
- * Get a Move Ailment by its name.
3840
- * @param name The Move Ailment name.
3841
- * @returns The matching Move Ailment.
3842
- */
4181
+ /** Get a Move Ailment by its name. */
3843
4182
  getMoveAilmentByName(name: string): Promise<MoveAilment>;
3844
- /**
3845
- * Get a Move Ailment by its ID.
3846
- * @param id The Move Ailment ID.
3847
- * @returns The matching Move Ailment.
3848
- */
4183
+ /** Get a Move Ailment by its ID. */
3849
4184
  getMoveAilmentById(id: number): Promise<MoveAilment>;
3850
- /**
3851
- * Get a Move Battle Style by its name.
3852
- * @param name The Move Battle Style name.
3853
- * @returns The matching Move Battle Style.
3854
- */
4185
+ /** Get a Move Battle Style by its name. */
3855
4186
  getMoveBattleStyleByName(name: string): Promise<MoveBattleStyle>;
3856
- /**
3857
- * Get a Move Battle Style by its ID.
3858
- * @param id The Move Battle Style ID.
3859
- * @returns The matching Move Battle Style.
3860
- */
4187
+ /** Get a Move Battle Style by its ID. */
3861
4188
  getMoveBattleStyleById(id: number): Promise<MoveBattleStyle>;
3862
- /**
3863
- * Get a Move Category by its name.
3864
- * @param name The Move Category name.
3865
- * @returns The matching Move Category.
3866
- */
4189
+ /** Get a Move Category by its name. */
3867
4190
  getMoveCategoryByName(name: string): Promise<MoveCategory>;
3868
- /**
3869
- * Get a Move Category by its ID.
3870
- * @param id The Move Category ID.
3871
- * @returns The matching Move Category.
3872
- */
4191
+ /** Get a Move Category by its ID. */
3873
4192
  getMoveCategoryById(id: number): Promise<MoveCategory>;
3874
- /**
3875
- * Get a Move Damage Class by its name.
3876
- * @param name The Move Damage Class name.
3877
- * @returns The matching Move Damage Class.
3878
- */
4193
+ /** Get a Move Damage Class by its name. */
3879
4194
  getMoveDamageClassByName(name: string): Promise<MoveDamageClass>;
3880
- /**
3881
- * Get a Move Damage Class by its ID.
3882
- * @param id The Move Damage Class ID.
3883
- * @returns The matching Move Damage Class.
3884
- */
4195
+ /** Get a Move Damage Class by its ID. */
3885
4196
  getMoveDamageClassById(id: number): Promise<MoveDamageClass>;
3886
- /**
3887
- * Get a Move Learn Method by its name.
3888
- * @param name The Move Learn Method name.
3889
- * @returns The matching Move Learn Method.
3890
- */
4197
+ /** Get a Move Learn Method by its name. */
3891
4198
  getMoveLearnMethodByName(name: string): Promise<MoveLearnMethod>;
3892
- /**
3893
- * Get a Move Learn Method by its ID.
3894
- * @param id The Move Learn Method ID.
3895
- * @returns The matching Move Learn Method.
3896
- */
4199
+ /** Get a Move Learn Method by its ID. */
3897
4200
  getMoveLearnMethodById(id: number): Promise<MoveLearnMethod>;
3898
- /**
3899
- * Get a Move Target by its name.
3900
- * @param name The Move Target name.
3901
- * @returns The matching Move Target.
3902
- */
4201
+ /** Get a Move Target by its name. */
3903
4202
  getMoveTargetByName(name: string): Promise<MoveTarget>;
3904
- /**
3905
- * Get a Move Target by its ID.
3906
- * @param id The Move Target ID.
3907
- * @returns The matching Move Target.
3908
- */
4203
+ /** Get a Move Target by its ID. */
3909
4204
  getMoveTargetById(id: number): Promise<MoveTarget>;
3910
- /**
3911
- * List Moves.
3912
- * @param offset Index of the first resource returned. Defaults to 0.
3913
- * @param limit How many resources per page. Defaults to 20.
3914
- * @returns A paginated list of Moves.
3915
- */
3916
- listMoves(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3917
- /**
3918
- * List Move Ailments.
3919
- * @param offset Index of the first resource returned. Defaults to 0.
3920
- * @param limit How many resources per page. Defaults to 20.
3921
- * @returns A paginated list of Move Ailments.
3922
- */
3923
- listMoveAilments(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3924
- /**
3925
- * List Move Battle Styles.
3926
- * @param offset Index of the first resource returned. Defaults to 0.
3927
- * @param limit How many resources per page. Defaults to 20.
3928
- * @returns A paginated list of Move Battle Styles.
3929
- */
3930
- listMoveBattleStyles(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3931
- /**
3932
- * List Move Categories.
3933
- * @param offset Index of the first resource returned. Defaults to 0.
3934
- * @param limit How many resources per page. Defaults to 20.
3935
- * @returns A paginated list of Move Categories.
3936
- */
3937
- listMoveCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3938
- /**
3939
- * List Move Damage Classes.
3940
- * @param offset Index of the first resource returned. Defaults to 0.
3941
- * @param limit How many resources per page. Defaults to 20.
3942
- * @returns A paginated list of Move Damage Classes.
3943
- */
3944
- listMoveDamageClasses(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3945
- /**
3946
- * List Move Learn Methods.
3947
- * @param offset Index of the first resource returned. Defaults to 0.
3948
- * @param limit How many resources per page. Defaults to 20.
3949
- * @returns A paginated list of Move Learn Methods.
3950
- */
3951
- listMoveLearnMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
3952
- /**
3953
- * List Move Targets.
3954
- * @param offset Index of the first resource returned. Defaults to 0.
3955
- * @param limit How many resources per page. Defaults to 20.
3956
- * @returns A paginated list of Move Targets.
3957
- */
3958
- listMoveTargets(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4205
+ /** List Moves. Page defaults to 20 entries from offset 0. */
4206
+ listMoves(offset?: number, limit?: number): Promise<NamedAPIResourceList<Move>>;
4207
+ /** List Move Ailments. Page defaults to 20 entries from offset 0. */
4208
+ listMoveAilments(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveAilment>>;
4209
+ /** List Move Battle Styles. Page defaults to 20 entries from offset 0. */
4210
+ listMoveBattleStyles(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveBattleStyle>>;
4211
+ /** List Move Categories. Page defaults to 20 entries from offset 0. */
4212
+ listMoveCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveCategory>>;
4213
+ /** List Move Damage Classes. Page defaults to 20 entries from offset 0. */
4214
+ listMoveDamageClasses(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveDamageClass>>;
4215
+ /** List Move Learn Methods. Page defaults to 20 entries from offset 0. */
4216
+ listMoveLearnMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveLearnMethod>>;
4217
+ /** List Move Targets. Page defaults to 20 entries from offset 0. */
4218
+ listMoveTargets(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveTarget>>;
3959
4219
  }
3960
4220
  //#endregion
3961
4221
  //#region src/clients/pokemon.client.d.ts
@@ -3963,311 +4223,120 @@ declare class MoveClient extends BaseClient {
3963
4223
  * ### Pokémon Client
3964
4224
  *
3965
4225
  * Client used to access the Pokémon Endpoints:
3966
- * - [Abilities](https://pokeapi.co/docs/v2#abilities)
3967
- * - [Characteristics](https://pokeapi.co/docs/v2#characteristics)
3968
- * - [Egg Groups](https://pokeapi.co/docs/v2#egg-groups)
3969
- * - [Genders](https://pokeapi.co/docs/v2#genders)
3970
- * - [Growth Rates](https://pokeapi.co/docs/v2#growth-rates)
3971
- * - [Natures](https://pokeapi.co/docs/v2#natures)
3972
- * - [Pokéathlon Stats](https://pokeapi.co/docs/v2#pokeathlon-stats)
3973
- * - [Pokémon](https://pokeapi.co/docs/v2#pokemon)
3974
- * - [Pokémon Location Areas](https://pokeapi.co/docs/v2#pokemon-location-areas)
3975
- * - [Pokémon Colors](https://pokeapi.co/docs/v2#pokemon-colors)
3976
- * - [Pokémon Forms](https://pokeapi.co/docs/v2#pokemon-forms)
3977
- * - [Pokémon Habitats](https://pokeapi.co/docs/v2#pokemon-habitats)
3978
- * - [Pokémon Shapes](https://pokeapi.co/docs/v2#pokemon-shapes)
3979
- * - [Pokémon Species](https://pokeapi.co/docs/v2#pokemon-species)
3980
- * - [Stats](https://pokeapi.co/docs/v2#stats)
3981
- * - [Types](https://pokeapi.co/docs/v2#types)
3982
- * ---
4226
+ *
4227
+ * - [Abilities](https://pokeapi.co/docs/v2#abilities)
4228
+ * - [Characteristics](https://pokeapi.co/docs/v2#characteristics)
4229
+ * - [Egg Groups](https://pokeapi.co/docs/v2#egg-groups)
4230
+ * - [Genders](https://pokeapi.co/docs/v2#genders)
4231
+ * - [Growth Rates](https://pokeapi.co/docs/v2#growth-rates)
4232
+ * - [Natures](https://pokeapi.co/docs/v2#natures)
4233
+ * - [Pokéathlon Stats](https://pokeapi.co/docs/v2#pokeathlon-stats)
4234
+ * - [Pokémon](https://pokeapi.co/docs/v2#pokemon)
4235
+ * - [Pokémon Location Areas](https://pokeapi.co/docs/v2#pokemon-location-areas)
4236
+ * - [Pokémon Colors](https://pokeapi.co/docs/v2#pokemon-colors)
4237
+ * - [Pokémon Forms](https://pokeapi.co/docs/v2#pokemon-forms)
4238
+ * - [Pokémon Habitats](https://pokeapi.co/docs/v2#pokemon-habitats)
4239
+ * - [Pokémon Shapes](https://pokeapi.co/docs/v2#pokemon-shapes)
4240
+ * - [Pokémon Species](https://pokeapi.co/docs/v2#pokemon-species)
4241
+ * - [Stats](https://pokeapi.co/docs/v2#stats)
4242
+ * - [Types](https://pokeapi.co/docs/v2#types)
4243
+ *
3983
4244
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#pokemon-section)
3984
4245
  */
3985
4246
  declare class PokemonClient extends BaseClient {
3986
- /**
3987
- * Get an Ability by its name.
3988
- * @param name The Ability name.
3989
- * @returns The matching Ability.
3990
- */
4247
+ /** Get an Ability by its name. */
3991
4248
  getAbilityByName(name: string): Promise<Ability>;
3992
- /**
3993
- * Get an Ability by its ID.
3994
- * @param id The Ability ID.
3995
- * @returns The matching Ability.
3996
- */
4249
+ /** Get an Ability by its ID. */
3997
4250
  getAbilityById(id: number): Promise<Ability>;
3998
- /**
3999
- * Get a Characteristic by its ID.
4000
- * @param id The Characteristic ID.
4001
- * @returns The matching Characteristic.
4002
- */
4251
+ /** Get a Characteristic by its ID. */
4003
4252
  getCharacteristicById(id: number): Promise<Characteristic>;
4004
- /**
4005
- * Get an Egg Group by its name.
4006
- * @param name The Egg Group name.
4007
- * @returns The matching Egg Group.
4008
- */
4253
+ /** Get an Egg Group by its name. */
4009
4254
  getEggGroupByName(name: string): Promise<EggGroup>;
4010
- /**
4011
- * Get an Egg Group by its ID.
4012
- * @param id The Egg Group ID.
4013
- * @returns The matching Egg Group.
4014
- */
4255
+ /** Get an Egg Group by its ID. */
4015
4256
  getEggGroupById(id: number): Promise<EggGroup>;
4016
- /**
4017
- * Get a Gender by its name.
4018
- * @param name The Gender name.
4019
- * @returns The matching Gender.
4020
- */
4257
+ /** Get a Gender by its name. */
4021
4258
  getGenderByName(name: string): Promise<Gender>;
4022
- /**
4023
- * Get a Gender by its ID.
4024
- * @param id The Gender ID.
4025
- * @returns The matching Gender.
4026
- */
4259
+ /** Get a Gender by its ID. */
4027
4260
  getGenderById(id: number): Promise<Gender>;
4028
- /**
4029
- * Get a Growth Rate by its name.
4030
- * @param name The Growth Rate name.
4031
- * @returns The matching Growth Rate.
4032
- */
4261
+ /** Get a Growth Rate by its name. */
4033
4262
  getGrowthRateByName(name: string): Promise<GrowthRate>;
4034
- /**
4035
- * Get a Growth Rate by its ID.
4036
- * @param id The Growth Rate ID.
4037
- * @returns The matching Growth Rate.
4038
- */
4263
+ /** Get a Growth Rate by its ID. */
4039
4264
  getGrowthRateById(id: number): Promise<GrowthRate>;
4040
- /**
4041
- * Get a Nature by its name.
4042
- * @param name The Nature name.
4043
- * @returns The matching Nature.
4044
- */
4265
+ /** Get a Nature by its name. */
4045
4266
  getNatureByName(name: string): Promise<Nature>;
4046
- /**
4047
- * Get a Nature by its ID.
4048
- * @param id The Nature ID.
4049
- * @returns The matching Nature.
4050
- */
4267
+ /** Get a Nature by its ID. */
4051
4268
  getNatureById(id: number): Promise<Nature>;
4052
- /**
4053
- * Get a Pokéathlon Stat by its name.
4054
- * @param name The Pokéathlon Stat name.
4055
- * @returns The matching Pokéathlon Stat.
4056
- */
4269
+ /** Get a Pokéathlon Stat by its name. */
4057
4270
  getPokeathlonStatByName(name: string): Promise<PokeathlonStat>;
4058
- /**
4059
- * Get a Pokéathlon Stat by its ID.
4060
- * @param id The Pokéathlon Stat ID.
4061
- * @returns The matching Pokéathlon Stat.
4062
- */
4271
+ /** Get a Pokéathlon Stat by its ID. */
4063
4272
  getPokeathlonStatById(id: number): Promise<PokeathlonStat>;
4064
- /**
4065
- * Get a Pokémon by its name.
4066
- * @param name The Pokémon name.
4067
- * @returns The matching Pokémon.
4068
- */
4273
+ /** Get a Pokémon by its name. */
4069
4274
  getPokemonByName(name: string): Promise<Pokemon>;
4070
- /**
4071
- * Get a Pokémon by its ID.
4072
- * @param id The Pokémon ID.
4073
- * @returns The matching Pokémon.
4074
- */
4275
+ /** Get a Pokémon by its ID. */
4075
4276
  getPokemonById(id: number): Promise<Pokemon>;
4076
4277
  /**
4077
4278
  * Get the areas a Pokémon can be encountered in, by its ID.
4078
- * @param id The Pokémon ID.
4079
4279
  * @returns Every location area the Pokémon appears in, with its encounter details.
4080
4280
  */
4081
4281
  getPokemonLocationAreaById(id: number): Promise<LocationAreaEncounter[]>;
4082
- /**
4083
- * Get a Pokémon Color by its name.
4084
- * @param name The Pokémon Color name.
4085
- * @returns The matching Pokémon Color.
4086
- */
4282
+ /** Get a Pokémon Color by its name. */
4087
4283
  getPokemonColorByName(name: string): Promise<PokemonColor>;
4088
- /**
4089
- * Get a Pokémon Color by its ID.
4090
- * @param id The Pokémon Color ID.
4091
- * @returns The matching Pokémon Color.
4092
- */
4284
+ /** Get a Pokémon Color by its ID. */
4093
4285
  getPokemonColorById(id: number): Promise<PokemonColor>;
4094
- /**
4095
- * Get a Pokémon Form by its name.
4096
- * @param name The Pokémon Form name.
4097
- * @returns The matching Pokémon Form.
4098
- */
4286
+ /** Get a Pokémon Form by its name. */
4099
4287
  getPokemonFormByName(name: string): Promise<PokemonForm>;
4100
- /**
4101
- * Get a Pokémon Form by its ID.
4102
- * @param id The Pokémon Form ID.
4103
- * @returns The matching Pokémon Form.
4104
- */
4288
+ /** Get a Pokémon Form by its ID. */
4105
4289
  getPokemonFormById(id: number): Promise<PokemonForm>;
4106
- /**
4107
- * Get a Pokémon Habitat by its name.
4108
- * @param name The Pokémon Habitat name.
4109
- * @returns The matching Pokémon Habitat.
4110
- */
4290
+ /** Get a Pokémon Habitat by its name. */
4111
4291
  getPokemonHabitatByName(name: string): Promise<PokemonHabitat>;
4112
- /**
4113
- * Get a Pokémon Habitat by its ID.
4114
- * @param id The Pokémon Habitat ID.
4115
- * @returns The matching Pokémon Habitat.
4116
- */
4292
+ /** Get a Pokémon Habitat by its ID. */
4117
4293
  getPokemonHabitatById(id: number): Promise<PokemonHabitat>;
4118
- /**
4119
- * Get a Pokémon Shape by its name.
4120
- * @param name The Pokémon Shape name.
4121
- * @returns The matching Pokémon Shape.
4122
- */
4294
+ /** Get a Pokémon Shape by its name. */
4123
4295
  getPokemonShapeByName(name: string): Promise<PokemonShape>;
4124
- /**
4125
- * Get a Pokémon Shape by its ID.
4126
- * @param id The Pokémon Shape ID.
4127
- * @returns The matching Pokémon Shape.
4128
- */
4296
+ /** Get a Pokémon Shape by its ID. */
4129
4297
  getPokemonShapeById(id: number): Promise<PokemonShape>;
4130
- /**
4131
- * Get a Pokémon Species by its name.
4132
- * @param name The Pokémon Species name.
4133
- * @returns The matching Pokémon Species.
4134
- */
4298
+ /** Get a Pokémon Species by its name. */
4135
4299
  getPokemonSpeciesByName(name: string): Promise<PokemonSpecies>;
4136
- /**
4137
- * Get a Pokémon Species by its ID.
4138
- * @param id The Pokémon Species ID.
4139
- * @returns The matching Pokémon Species.
4140
- */
4300
+ /** Get a Pokémon Species by its ID. */
4141
4301
  getPokemonSpeciesById(id: number): Promise<PokemonSpecies>;
4142
- /**
4143
- * Get a Stat by its name.
4144
- * @param name The Stat name.
4145
- * @returns The matching Stat.
4146
- */
4302
+ /** Get a Stat by its name. */
4147
4303
  getStatByName(name: string): Promise<Stat>;
4148
- /**
4149
- * Get a Stat by its ID.
4150
- * @param id The Stat ID.
4151
- * @returns The matching Stat.
4152
- */
4304
+ /** Get a Stat by its ID. */
4153
4305
  getStatById(id: number): Promise<Stat>;
4154
- /**
4155
- * Get a Type by its name.
4156
- * @param name The Type name.
4157
- * @returns The matching Type.
4158
- */
4306
+ /** Get a Type by its name. */
4159
4307
  getTypeByName(name: string): Promise<Type>;
4160
- /**
4161
- * Get a Type by its ID.
4162
- * @param id The Type ID.
4163
- * @returns The matching Type.
4164
- */
4308
+ /** Get a Type by its ID. */
4165
4309
  getTypeById(id: number): Promise<Type>;
4166
- /**
4167
- * List Abilities.
4168
- * @param offset Index of the first resource returned. Defaults to 0.
4169
- * @param limit How many resources per page. Defaults to 20.
4170
- * @returns A paginated list of Abilities.
4171
- */
4172
- listAbilities(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4173
- /**
4174
- * List Characteristics.
4175
- * @param offset Index of the first resource returned. Defaults to 0.
4176
- * @param limit How many resources per page. Defaults to 20.
4177
- * @returns A paginated list of Characteristics.
4178
- */
4179
- listCharacteristics(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4180
- /**
4181
- * List Egg Groups.
4182
- * @param offset Index of the first resource returned. Defaults to 0.
4183
- * @param limit How many resources per page. Defaults to 20.
4184
- * @returns A paginated list of Egg Groups.
4185
- */
4186
- listEggGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4187
- /**
4188
- * List Genders.
4189
- * @param offset Index of the first resource returned. Defaults to 0.
4190
- * @param limit How many resources per page. Defaults to 20.
4191
- * @returns A paginated list of Genders.
4192
- */
4193
- listGenders(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4194
- /**
4195
- * List Growth Rates.
4196
- * @param offset Index of the first resource returned. Defaults to 0.
4197
- * @param limit How many resources per page. Defaults to 20.
4198
- * @returns A paginated list of Growth Rates.
4199
- */
4200
- listGrowthRates(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4201
- /**
4202
- * List Natures.
4203
- * @param offset Index of the first resource returned. Defaults to 0.
4204
- * @param limit How many resources per page. Defaults to 20.
4205
- * @returns A paginated list of Natures.
4206
- */
4207
- listNatures(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4208
- /**
4209
- * List Pokéathlon Stats.
4210
- * @param offset Index of the first resource returned. Defaults to 0.
4211
- * @param limit How many resources per page. Defaults to 20.
4212
- * @returns A paginated list of Pokéathlon Stats.
4213
- */
4214
- listPokeathlonStats(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4215
- /**
4216
- * List Pokémon.
4217
- * @param offset Index of the first resource returned. Defaults to 0.
4218
- * @param limit How many resources per page. Defaults to 20.
4219
- * @returns A paginated list of Pokémon.
4220
- */
4221
- listPokemons(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4222
- /**
4223
- * List Pokémon Colors.
4224
- * @param offset Index of the first resource returned. Defaults to 0.
4225
- * @param limit How many resources per page. Defaults to 20.
4226
- * @returns A paginated list of Pokémon Colors.
4227
- */
4228
- listPokemonColors(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4229
- /**
4230
- * List Pokémon Forms.
4231
- * @param offset Index of the first resource returned. Defaults to 0.
4232
- * @param limit How many resources per page. Defaults to 20.
4233
- * @returns A paginated list of Pokémon Forms.
4234
- */
4235
- listPokemonForms(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4236
- /**
4237
- * List Pokémon Habitats.
4238
- * @param offset Index of the first resource returned. Defaults to 0.
4239
- * @param limit How many resources per page. Defaults to 20.
4240
- * @returns A paginated list of Pokémon Habitats.
4241
- */
4242
- listPokemonHabitats(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4243
- /**
4244
- * List Pokémon Shapes.
4245
- * @param offset Index of the first resource returned. Defaults to 0.
4246
- * @param limit How many resources per page. Defaults to 20.
4247
- * @returns A paginated list of Pokémon Shapes.
4248
- */
4249
- listPokemonShapes(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4250
- /**
4251
- * List Pokémon Species.
4252
- * @param offset Index of the first resource returned. Defaults to 0.
4253
- * @param limit How many resources per page. Defaults to 20.
4254
- * @returns A paginated list of Pokémon Species.
4255
- */
4256
- listPokemonSpecies(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4257
- /**
4258
- * List Stats.
4259
- * @param offset Index of the first resource returned. Defaults to 0.
4260
- * @param limit How many resources per page. Defaults to 20.
4261
- * @returns A paginated list of Stats.
4262
- */
4263
- listStats(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4264
- /**
4265
- * List Types.
4266
- * @param offset Index of the first resource returned. Defaults to 0.
4267
- * @param limit How many resources per page. Defaults to 20.
4268
- * @returns A paginated list of Types.
4269
- */
4270
- listTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4310
+ /** List Abilities. Page defaults to 20 entries from offset 0. */
4311
+ listAbilities(offset?: number, limit?: number): Promise<NamedAPIResourceList<Ability>>;
4312
+ /** List Characteristics. Page defaults to 20 entries from offset 0. */
4313
+ listCharacteristics(offset?: number, limit?: number): Promise<APIResourceList<Characteristic>>;
4314
+ /** List Egg Groups. Page defaults to 20 entries from offset 0. */
4315
+ listEggGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList<EggGroup>>;
4316
+ /** List Genders. Page defaults to 20 entries from offset 0. */
4317
+ listGenders(offset?: number, limit?: number): Promise<NamedAPIResourceList<Gender>>;
4318
+ /** List Growth Rates. Page defaults to 20 entries from offset 0. */
4319
+ listGrowthRates(offset?: number, limit?: number): Promise<NamedAPIResourceList<GrowthRate>>;
4320
+ /** List Natures. Page defaults to 20 entries from offset 0. */
4321
+ listNatures(offset?: number, limit?: number): Promise<NamedAPIResourceList<Nature>>;
4322
+ /** List Pokéathlon Stats. Page defaults to 20 entries from offset 0. */
4323
+ listPokeathlonStats(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokeathlonStat>>;
4324
+ /** List Pokémon. Page defaults to 20 entries from offset 0. */
4325
+ listPokemons(offset?: number, limit?: number): Promise<NamedAPIResourceList<Pokemon>>;
4326
+ /** List Pokémon Colors. Page defaults to 20 entries from offset 0. */
4327
+ listPokemonColors(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonColor>>;
4328
+ /** List Pokémon Forms. Page defaults to 20 entries from offset 0. */
4329
+ listPokemonForms(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonForm>>;
4330
+ /** List Pokémon Habitats. Page defaults to 20 entries from offset 0. */
4331
+ listPokemonHabitats(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonHabitat>>;
4332
+ /** List Pokémon Shapes. Page defaults to 20 entries from offset 0. */
4333
+ listPokemonShapes(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonShape>>;
4334
+ /** List Pokémon Species. Page defaults to 20 entries from offset 0. */
4335
+ listPokemonSpecies(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonSpecies>>;
4336
+ /** List Stats. Page defaults to 20 entries from offset 0. */
4337
+ listStats(offset?: number, limit?: number): Promise<NamedAPIResourceList<Stat>>;
4338
+ /** List Types. Page defaults to 20 entries from offset 0. */
4339
+ listTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList<Type>>;
4271
4340
  }
4272
4341
  //#endregion
4273
4342
  //#region src/clients/utility.client.d.ts
@@ -4275,38 +4344,36 @@ declare class PokemonClient extends BaseClient {
4275
4344
  * ### Utility Client
4276
4345
  *
4277
4346
  * Client used to access the Utility Endpoints:
4278
- * - [Languages](https://pokeapi.co/docs/v2#languages)
4279
- * - [Resources](https://pokeapi.co/docs/v2#resource-listspagination-section)
4280
- * ---
4347
+ *
4348
+ * - [Languages](https://pokeapi.co/docs/v2#languages)
4349
+ * - [Resources](https://pokeapi.co/docs/v2#resource-listspagination-section)
4350
+ *
4281
4351
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#utility-section)
4282
4352
  */
4283
4353
  declare class UtilityClient extends BaseClient {
4284
- /**
4285
- * Get a Language by its ID.
4286
- * @param id The Language ID.
4287
- * @returns The matching Language.
4288
- */
4354
+ /** Get a Language by its ID. */
4289
4355
  getLanguageById(id: number): Promise<Language>;
4290
- /**
4291
- * Get a Language by its name.
4292
- * @param name The Language name.
4293
- * @returns The matching Language.
4294
- */
4356
+ /** Get a Language by its name. */
4295
4357
  getLanguageByName(name: string): Promise<Language>;
4296
4358
  /**
4297
- * Get any resource by its URL, as returned inside a PokéAPI response.
4298
- * @param url The absolute URL of the resource.
4359
+ * Get any resource by its URL, or by a link taken from another response.
4360
+ *
4361
+ * ```ts
4362
+ * const pokemon = await api.pokemon.getPokemonByName('luxray');
4363
+ * const species = await api.utility.getResourceByUrl(pokemon.species);
4364
+ * // ^? PokemonSpecies
4365
+ * ```
4366
+ *
4367
+ * Every client carries {@link BaseClient.resolve}, which does the same thing;
4368
+ * this is the name it went out under, and it stays.
4369
+ *
4370
+ * @param resource The absolute URL of the resource, or a link to it.
4299
4371
  * @returns The resource the URL points at.
4300
- * @throws {TypeError} If `url` is not a valid URL, or names no PokéAPI endpoint.
4301
- */
4302
- getResourceByUrl<T>(url: string): Promise<T>;
4303
- /**
4304
- * List Languages.
4305
- * @param offset Index of the first resource returned. Defaults to 0.
4306
- * @param limit How many resources per page. Defaults to 20.
4307
- * @returns A paginated list of Languages.
4372
+ * @throws {TypeError} If the URL is not valid, or names no PokéAPI endpoint.
4308
4373
  */
4309
- listLanguages(offset?: number, limit?: number): Promise<NamedAPIResourceList>;
4374
+ getResourceByUrl<T>(resource: ResourceLink<T>): Promise<T>;
4375
+ /** List Languages. Page defaults to 20 entries from offset 0. */
4376
+ listLanguages(offset?: number, limit?: number): Promise<NamedAPIResourceList<Language>>;
4310
4377
  }
4311
4378
  //#endregion
4312
4379
  //#region src/clients/main.client.d.ts
@@ -4314,26 +4381,31 @@ declare class UtilityClient extends BaseClient {
4314
4381
  * ### Main Client
4315
4382
  *
4316
4383
  * The main client used to access all the PokéAPI Endpoints:
4317
- * - [Berries](https://pokeapi.co/docs/v2#berries-section)
4318
- * - [Contests](https://pokeapi.co/docs/v2#contests-section)
4319
- * - [Currencies](https://pokeapi.co/docs/v2#currencies-section)
4320
- * - [Encounters](https://pokeapi.co/docs/v2#encounters-section)
4321
- * - [Evolution](https://pokeapi.co/docs/v2#evolution-section)
4322
- * - [Games](https://pokeapi.co/docs/v2#games-section)
4323
- * - [Items](https://pokeapi.co/docs/v2#items-section)
4324
- * - [Locations](https://pokeapi.co/docs/v2#locations-section)
4325
- * - [Machines](https://pokeapi.co/docs/v2#machines-section)
4326
- * - [Moves](https://pokeapi.co/docs/v2#moves-section)
4327
- * - [Pokémon](https://pokeapi.co/docs/v2#pokemon-section)
4328
- * - [Utility](https://pokeapi.co/docs/v2#utility-section)
4329
- * ---
4330
- * All the clients below share a single cache, so a resource fetched through one
4331
- * of them is served from memory by the rest.
4384
+ *
4385
+ * - [Berries](https://pokeapi.co/docs/v2#berries-section)
4386
+ * - [Contests](https://pokeapi.co/docs/v2#contests-section)
4387
+ * - [Currencies](https://pokeapi.co/docs/v2#currencies-section)
4388
+ * - [Encounters](https://pokeapi.co/docs/v2#encounters-section)
4389
+ * - [Evolution](https://pokeapi.co/docs/v2#evolution-section)
4390
+ * - [Games](https://pokeapi.co/docs/v2#games-section)
4391
+ * - [Items](https://pokeapi.co/docs/v2#items-section)
4392
+ * - [Locations](https://pokeapi.co/docs/v2#locations-section)
4393
+ * - [Machines](https://pokeapi.co/docs/v2#machines-section)
4394
+ * - [Moves](https://pokeapi.co/docs/v2#moves-section)
4395
+ * - [Pokémon](https://pokeapi.co/docs/v2#pokemon-section)
4396
+ * - [Utility](https://pokeapi.co/docs/v2#utility-section)
4397
+ *
4398
+ * All the clients below share a single transport, so a resource fetched through
4399
+ * one of them is served from cache by the rest — and two of them asking for the
4400
+ * same URL at once make one round trip, not two.
4401
+ *
4402
+ * Composes its sections rather than inheriting from them: it extends
4403
+ * {@link ClientFacade}, not {@link BaseClient}, so it carries no endpoint of its
4404
+ * own.
4332
4405
  *
4333
4406
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2)
4334
4407
  */
4335
- declare class MainClient {
4336
- readonly cache: CacheStore | undefined;
4408
+ declare class MainClient extends ClientFacade {
4337
4409
  readonly berry: BerryClient;
4338
4410
  readonly contest: ContestClient;
4339
4411
  readonly currency: CurrencyClient;
@@ -4346,9 +4418,7 @@ declare class MainClient {
4346
4418
  readonly move: MoveClient;
4347
4419
  readonly pokemon: PokemonClient;
4348
4420
  readonly utility: UtilityClient;
4349
- constructor(clientOptions?: ClientOptions);
4350
- /** Drops every cached response, for all the clients at once. */
4351
- clearCache(): Promise<void>;
4421
+ constructor(options?: ClientOptions);
4352
4422
  }
4353
4423
  //#endregion
4354
4424
  //#region src/config/errors.d.ts
@@ -4368,10 +4438,107 @@ declare class PokenodeError extends Error {
4368
4438
  readonly url: string;
4369
4439
  /** Parsed response body, when the error response carried JSON. */
4370
4440
  readonly body: unknown;
4371
- constructor(response: Response, body: unknown);
4441
+ /**
4442
+ * @param message Overrides the default text, for a status whose failure is not
4443
+ * self-explanatory.
4444
+ */
4445
+ constructor(response: Response, body: unknown, message?: string);
4372
4446
  /** Whether the error came from a pokenode-ts client. */
4373
4447
  static isPokenodeError(error: unknown): error is PokenodeError;
4374
4448
  }
4375
4449
  //#endregion
4376
- export { APIResource, Ability, AbilityEffectChange, AbilityFlavorText, AbilityPokemon, Animated, AwesomeName, BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, Berry, BerryClient, BerryFirmness, BerryFlavor, BerryFlavorMap, BlackWhite, index_d_exports as CONSTANTS, CONTEST_TYPES, CURRENCIES, type CacheStore, ChainLink, Characteristic, type ClientOptions, ContestClient, ContestComboDetail, ContestComboSets, ContestEffect, ContestName, ContestType, Crystal, Currency, CurrencyClient, Description, DiamondPearl, DreamWorld, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Effect, EggGroup, Emerald, Encounter, EncounterClient, EncounterCondition, EncounterConditionValue, EncounterMethod, EncounterMethodRate, EncounterVersionDetails, Endpoint, EvolutionChain, EvolutionClient, EvolutionDetail, EvolutionTrigger, type FetchLike, FireredLeafgreen, FlavorBerryMap, FlavorText, GENDERS, GENERATIONS, GROWTH_RATES, GameClient, Gender, Generation, GenerationGameIndex, GenerationIIISprites, GenerationIISprites, GenerationISprites, GenerationIVSprites, GenerationVIIISprites, GenerationVIISprites, GenerationVISprites, GenerationVSprites, GenerationViiIcons, GenerationViiiIcons, Genus, Gold, GrowthRate, GrowthRateExperienceLevel, HeartgoldSoulsilver, Home, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, Item, ItemAttribute, ItemCategory, ItemClient, ItemFlingEffect, ItemHolderPokemon, ItemHolderPokemonVersionDetail, ItemPocket, ItemPrice, ItemSprites, LANGUAGES, Language, Location, LocationArea, LocationAreaEncounter, LocationClient, type Logger, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, Machine, MachineClient, MachineVersionDetail, MainClient, MemoryCache, type MemoryCacheOptions, Move, MoveAilment, MoveBattleStyle, MoveBattleStylePreference, MoveCategory, MoveClient, MoveDamageClass, MoveFlavorText, MoveLearnMethod, MoveMetaData, MoveStatAffect, MoveStatAffectSets, MoveStatChange, MoveTarget, NATURES, Name, NamedAPIResource, NamedAPIResourceList, Nature, NaturePokeathlonStatAffect, NaturePokeathlonStatAffectSets, NatureStatAffectSets, NatureStatChange, OfficialArtwork, OmegarubyAlphasapphire, OtherPokemonSprites, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, PalParkArea, PalParkEncounterArea, PalParkEncounterSpecies, PastMoveStatValues, Platinum, PokeathlonStat, Pokedex, Pokemon, PokemonAbility, PokemonClient, PokemonColor, PokemonCries, PokemonEncounter, PokemonEntry, PokemonForm, PokemonFormCondition, PokemonFormSprites, PokemonHabitat, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonPastAbility, PokemonPastAbilitySlot, PokemonPastStat, PokemonPastType, PokemonShape, PokemonSpecies, PokemonSpeciesDexEntry, PokemonSpeciesGender, PokemonSpeciesVariety, PokemonSprites, PokemonStat, PokemonType, PokenodeError, REGIONS, RedBlue, Region, RubySapphire, STATS, Showdown, Silver, Stat, SuperContestEffect, TYPES, Type, TypePokemon, TypeRelations, TypeRelationsPast, UltraSunUltraMoon, UtilityClient, VERSIONS, VERSION_GROUPS, VerboseEffect, Version, VersionEncounterDetail, VersionGameIndex, VersionGroup, VersionGroupFlavorText, VersionSprites, XY, Yellow, consoleLogger };
4450
+ //#region src/utils/localize.d.ts
4451
+ /**
4452
+ * ## Localized
4453
+ * An entry the PokéAPI publishes once per language — a `Name`, `FlavorText`,
4454
+ * `Description`, `Effect`, `VerboseEffect`, and everything shaped like them.
4455
+ */
4456
+ interface Localized {
4457
+ language: NamedAPIResource<Language>;
4458
+ }
4459
+ /**
4460
+ * Picks the entry written in `language`, by the name the PokéAPI gives that
4461
+ * language: `en`, `ja`, `ja-hrkt`, `zh-hans`, `es-419`, and so on.
4462
+ *
4463
+ * ```ts
4464
+ * const species = await api.pokemon.getPokemonSpeciesByName('eevee');
4465
+ *
4466
+ * localize(species.names)?.name; // 'Eevee'
4467
+ * localize(species.names, 'ja')?.name; // 'イーブイ'
4468
+ * ```
4469
+ *
4470
+ * Matched without regard to case: the PokéAPI writes these tags in lower case,
4471
+ * while BCP 47 capitalizes the script subtag — `ja-Hrkt` is the form anyone used
4472
+ * to language tags will reach for, and it should not silently match nothing.
4473
+ *
4474
+ * A section may list several entries for one language — flavor text, one per
4475
+ * version — and the first is the one returned. Filter first when you want a
4476
+ * particular version.
4477
+ *
4478
+ * @returns The entry, or `undefined` when that language is absent. Which
4479
+ * language to try instead is the caller's decision, so nothing is guessed here.
4480
+ */
4481
+ declare const localize: <T extends Localized>(entries: readonly T[], language?: string) => T | undefined;
4482
+ //#endregion
4483
+ //#region src/utils/sprites.d.ts
4484
+ /**
4485
+ * ## Sprite Variant
4486
+ * The sprite sets the PokéAPI publishes for a Pokémon.
4487
+ */
4488
+ type SpriteVariant = "default" | "official-artwork" | "home" | "dream-world" | "showdown";
4489
+ /**
4490
+ * ## Pokemon Sprite Options
4491
+ * Which sprite to build a URL for.
4492
+ *
4493
+ * The sets do not carry the same images, so the options are constrained per
4494
+ * variant: only `default` and `showdown` have back-facing sprites, and only
4495
+ * `official-artwork` has no gendered ones.
4496
+ */
4497
+ type PokemonSpriteOptions = {
4498
+ variant?: "default";
4499
+ shiny?: boolean;
4500
+ back?: boolean;
4501
+ female?: boolean;
4502
+ } | {
4503
+ variant: "showdown";
4504
+ shiny?: boolean;
4505
+ back?: boolean;
4506
+ female?: boolean;
4507
+ } | {
4508
+ variant: "home";
4509
+ shiny?: boolean;
4510
+ female?: boolean;
4511
+ back?: never;
4512
+ } | {
4513
+ variant: "official-artwork";
4514
+ shiny?: boolean;
4515
+ back?: never;
4516
+ female?: never;
4517
+ } | {
4518
+ variant: "dream-world";
4519
+ female?: boolean;
4520
+ shiny?: never;
4521
+ back?: never;
4522
+ };
4523
+ /**
4524
+ * Builds the URL of a Pokémon sprite, without a request.
4525
+ *
4526
+ * ```ts
4527
+ * getPokemonSpriteUrl(25); // front, default set
4528
+ * getPokemonSpriteUrl(25, { variant: "official-artwork" });
4529
+ * getPokemonSpriteUrl(25, { variant: "showdown", back: true, shiny: true });
4530
+ * ```
4531
+ *
4532
+ * The sprite repository does not hold every combination for every Pokémon — a
4533
+ * back-facing sprite of a recent generation, or a gendered form of a species with
4534
+ * one appearance, simply does not exist. This builds a well-formed URL; it does
4535
+ * not promise the file is there.
4536
+ *
4537
+ * @param id The Pokémon ID. Names are not addressable — the sprites are keyed by ID.
4538
+ * @param options Which sprite set and which facing to build for.
4539
+ * @returns The URL of the sprite.
4540
+ */
4541
+ declare const getPokemonSpriteUrl: (id: number, options?: PokemonSpriteOptions) => string;
4542
+ //#endregion
4543
+ export { APIResource, APIResourceList, Ability, AbilityEffectChange, AbilityFlavorText, AbilityPokemon, Animated, AwesomeName, BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, Berry, BerryClient, BerryFirmness, BerryFlavor, BerryFlavorMap, BlackWhite, BrilliantDiamondShiningPearl, index_d_exports as CONSTANTS, CONTEST_TYPES, CURRENCIES, type CacheStore, ChainLink, Characteristic, type ClientOptions, ContestClient, ContestComboDetail, ContestComboSets, ContestEffect, ContestFlavorText, ContestName, ContestType, Crystal, Currency, CurrencyClient, Description, DiamondPearl, DreamWorld, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Effect, EggGroup, Emerald, Encounter, EncounterClient, EncounterCondition, EncounterConditionValue, EncounterMethod, EncounterMethodRate, EncounterPokemonDetail, EncounterVersionDetails, Endpoint, type EtagEntry, EtagStore, type EtagStoreOptions, EvolutionChain, EvolutionClient, EvolutionDetail, EvolutionTrigger, type FetchLike, FireredLeafgreen, FlavorBerryMap, FlavorText, GENDERS, GENERATIONS, GROWTH_RATES, GameClient, Gender, Generation, GenerationGameIndex, GenerationIIISprites, GenerationIIITypeSprites, GenerationIISprites, GenerationISprites, GenerationIVSprites, GenerationIVTypeSprites, GenerationIXSprites, GenerationIXTypeSprites, GenerationVIIISprites, GenerationVIIITypeSprites, GenerationVIISprites, GenerationVIITypeSprites, GenerationVISprites, GenerationVITypeSprites, GenerationVSprites, GenerationVTypeSprites, GenerationViiIcons, GenerationViiiIcons, Genus, Gold, GrowthRate, GrowthRateExperienceLevel, HeartgoldSoulsilver, Home, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, Item, ItemAttribute, ItemCategory, ItemClient, ItemFlingEffect, ItemHolderPokemon, ItemHolderPokemonVersionDetail, ItemPocket, ItemPrice, ItemSprites, LANGUAGES, Language, type ListFn, type ListMethodName, type ListPage, type Localized, Location, LocationArea, LocationAreaEncounter, LocationClient, type LogCancelledPayload, type LogErrorPayload, type LogRequestPayload, type LogResponsePayload, type LogRetryPayload, type Logger, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, Machine, MachineClient, MachineVersionDetail, MainClient, MemoryCache, type MemoryCacheOptions, Move, MoveAilment, MoveBattleStyle, MoveBattleStylePreference, MoveCategory, MoveClient, MoveDamageClass, MoveFlavorText, MoveLearnMethod, MoveMetaData, MoveStatAffect, MoveStatAffectSets, MoveStatChange, MoveTarget, NATURES, Name, NamedAPIResource, NamedAPIResourceList, Nature, NaturePokeathlonStatAffect, NaturePokeathlonStatAffectSets, NatureStatAffectSets, NatureStatChange, OfficialArtwork, OmegarubyAlphasapphire, OtherPokemonSprites, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, type PaginateOptions, PalParkArea, PalParkEncounterArea, PalParkEncounterSpecies, PastMoveStatValues, Platinum, PokeathlonStat, Pokedex, Pokemon, PokemonAbility, PokemonClient, PokemonColor, PokemonCries, PokemonEncounter, PokemonEntry, PokemonForm, PokemonFormCondition, PokemonFormGenerationVIIISprites, PokemonFormSprites, PokemonFormVersionSprites, PokemonHabitat, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonPastAbility, PokemonPastAbilitySlot, PokemonPastStat, PokemonPastType, PokemonShape, PokemonSpecies, PokemonSpeciesDexEntry, PokemonSpeciesGender, PokemonSpeciesVariety, type PokemonSpriteOptions, PokemonSprites, PokemonStat, PokemonType, PokenodeError, REGIONS, RedBlue, Region, type RequestScope, type ResolveOptions, type ResourceLink, type RetryOptions, RubySapphire, STATS, ScarletViolet, Showdown, Silver, type SpriteVariant, Stat, SuperContestEffect, TYPES, Type, TypeGameSprites, TypePokemon, TypeRelations, TypeRelationsPast, TypeSprites, UltraSunUltraMoon, UtilityClient, VERSIONS, VERSION_GROUPS, VerboseEffect, Version, VersionEncounterDetail, VersionGameIndex, VersionGroup, VersionGroupFlavorText, VersionSprites, WebStorageCache, type WebStorageCacheOptions, type WebStorageLike, XY, Yellow, consoleLogger, getPokemonSpriteUrl, localize };
4377
4544
  //# sourceMappingURL=index.d.ts.map