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