pokenode-ts 2.0.0 → 2.1.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/README.md +0 -1
- package/lib/index.cjs +16 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1571 -1765
- package/lib/index.d.ts +1571 -1765
- package/lib/index.js +16 -1
- package/lib/index.js.map +1 -1
- package/lib/rolldown-runtime-C_bSAL1r.js +16 -0
- package/package.json +20 -3
- package/lib/rolldown-runtime-DK3Fl9T5.js +0 -1
package/lib/index.d.cts
CHANGED
|
@@ -1,20 +1,43 @@
|
|
|
1
1
|
//#endregion
|
|
2
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,73 +45,37 @@ 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
|
-
*
|
|
51
|
+
* A URL for another resource in the API.
|
|
52
|
+
*
|
|
53
|
+
* @template T - What the URL resolves to.
|
|
73
54
|
*/
|
|
74
|
-
interface
|
|
75
|
-
/** The
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
|
|
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
|
-
*
|
|
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
|
|
88
|
-
/** The
|
|
89
|
-
|
|
90
|
-
/** The
|
|
91
|
-
|
|
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
81
|
//#region src/models/Common/name.d.ts
|
|
@@ -99,7 +86,7 @@ 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
92
|
//#region src/models/Common/language.d.ts
|
|
@@ -121,149 +108,108 @@ interface Language {
|
|
|
121
108
|
names: Name[];
|
|
122
109
|
}
|
|
123
110
|
//#endregion
|
|
124
|
-
//#region src/models/Common/
|
|
111
|
+
//#region src/models/Common/description.d.ts
|
|
125
112
|
/**
|
|
126
|
-
* The
|
|
113
|
+
* The localized description for an API resource in a specific language.
|
|
127
114
|
*/
|
|
128
|
-
interface
|
|
129
|
-
/** The
|
|
130
|
-
|
|
131
|
-
/** The
|
|
132
|
-
|
|
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/
|
|
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
|
|
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/
|
|
133
|
+
//#region src/models/Encounter/encounter.d.ts
|
|
182
134
|
/**
|
|
183
|
-
* ##
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.
|
|
135
|
+
* ## Encounter Method
|
|
136
|
+
* Methods by which the player can encounter Pokémon in the wild, e.g., walking in tall grass.
|
|
137
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Wild_Pok%C3%A9mon) for greater detail.
|
|
188
138
|
*/
|
|
189
|
-
|
|
139
|
+
interface EncounterMethod {
|
|
190
140
|
/** The identifier for this resource. */
|
|
191
141
|
id: number;
|
|
192
142
|
/** The name for this resource. */
|
|
193
143
|
name: string;
|
|
194
|
-
/**
|
|
195
|
-
|
|
196
|
-
/** The
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
};
|
|
144
|
+
/** A good value for sorting. */
|
|
145
|
+
order: number;
|
|
146
|
+
/** The name of this resource listed in different languages. */
|
|
147
|
+
names: Name[];
|
|
148
|
+
}
|
|
224
149
|
/**
|
|
225
|
-
* ##
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
|
|
150
|
+
* ## Encounter Condition
|
|
151
|
+
* Conditions which affect what Pokémon might appear in the wild, e.g., day or night.
|
|
152
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
|
|
229
153
|
*/
|
|
230
|
-
|
|
154
|
+
interface EncounterCondition {
|
|
231
155
|
/** The identifier for this resource. */
|
|
232
156
|
id: number;
|
|
233
157
|
/** The name for this resource. */
|
|
234
|
-
name:
|
|
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;
|
|
158
|
+
name: string;
|
|
239
159
|
/** The name of this resource listed in different languages. */
|
|
240
160
|
names: Name[];
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
};
|
|
161
|
+
/** A list of possible values for this encounter condition. */
|
|
162
|
+
values: NamedAPIResource<EncounterConditionValue>[];
|
|
163
|
+
}
|
|
251
164
|
/**
|
|
252
|
-
* ##
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/
|
|
165
|
+
* ## Encounter Condition Value
|
|
166
|
+
* Encounter condition values are the various states that an encounter
|
|
167
|
+
* condition can have, i.e., time of day can be either **day** or **night**
|
|
168
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Time).
|
|
256
169
|
*/
|
|
257
|
-
|
|
170
|
+
interface EncounterConditionValue {
|
|
258
171
|
/** The identifier for this resource. */
|
|
259
172
|
id: number;
|
|
260
173
|
/** The name for this resource. */
|
|
261
|
-
name:
|
|
262
|
-
/**
|
|
263
|
-
|
|
174
|
+
name: string;
|
|
175
|
+
/** The condition this encounter condition value pertains to. */
|
|
176
|
+
condition: NamedAPIResource<EncounterCondition>;
|
|
264
177
|
/** The name of this resource listed in different languages. */
|
|
265
178
|
names: Name[];
|
|
266
|
-
}
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/models/Common/encounter.d.ts
|
|
182
|
+
/**
|
|
183
|
+
* How the encountered Pokémon itself is generated, where a game constrains it.
|
|
184
|
+
*
|
|
185
|
+
* Only the games that impose such constraints populate this — guaranteed
|
|
186
|
+
* perfect IVs, forced or forbidden shininess, and Legends: Arceus alphas.
|
|
187
|
+
*/
|
|
188
|
+
interface EncounterPokemonDetail {
|
|
189
|
+
/** How many IVs are guaranteed to be perfect, if the game guarantees any. */
|
|
190
|
+
min_perfect_ivs: number | null;
|
|
191
|
+
/** Whether the encountered Pokémon is always shiny. */
|
|
192
|
+
always_shiny: boolean;
|
|
193
|
+
/** Whether the encountered Pokémon can never be shiny. */
|
|
194
|
+
never_shiny: boolean;
|
|
195
|
+
/** Whether the encountered Pokémon is an alpha. */
|
|
196
|
+
is_alpha: boolean;
|
|
197
|
+
}
|
|
198
|
+
/** Information about a Pokémon encounter. */
|
|
199
|
+
interface Encounter {
|
|
200
|
+
/** The lowest level the Pokémon could be encountered at. */
|
|
201
|
+
min_level: number;
|
|
202
|
+
/** The highest level the Pokémon could be encountered at. */
|
|
203
|
+
max_level: number;
|
|
204
|
+
/** A list of condition values that must be in effect for this encounter to occur. */
|
|
205
|
+
condition_values: NamedAPIResource<EncounterConditionValue>[];
|
|
206
|
+
/** Percent chance that this encounter will occur. */
|
|
207
|
+
chance: number;
|
|
208
|
+
/** The method by which this encounter happens. */
|
|
209
|
+
method: NamedAPIResource<EncounterMethod>;
|
|
210
|
+
/** How the encountered Pokémon is generated, where the game constrains it. */
|
|
211
|
+
pokemon_details: EncounterPokemonDetail | null;
|
|
212
|
+
}
|
|
267
213
|
//#endregion
|
|
268
214
|
//#region src/models/Contest/contest.d.ts
|
|
269
215
|
/**
|
|
@@ -277,7 +223,7 @@ interface ContestType {
|
|
|
277
223
|
/** The name for this resource. */
|
|
278
224
|
name: "cool" | "beauty" | "cute" | "smart" | "tough";
|
|
279
225
|
/** The berry flavor that correlates with this contest type. */
|
|
280
|
-
berry_flavor: NamedAPIResource
|
|
226
|
+
berry_flavor: NamedAPIResource<BerryFlavor>;
|
|
281
227
|
/** The name of this contest type listed in different languages. */
|
|
282
228
|
names: ContestName[];
|
|
283
229
|
}
|
|
@@ -290,7 +236,19 @@ interface ContestName {
|
|
|
290
236
|
/** The color associated with this contest's name. */
|
|
291
237
|
color: string;
|
|
292
238
|
/** The language that this name is in. */
|
|
293
|
-
language: NamedAPIResource
|
|
239
|
+
language: NamedAPIResource<Language>;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Flavor text for a contest effect, in a single language.
|
|
243
|
+
*
|
|
244
|
+
* Deliberately not the shared `FlavorText`: contest effects are not tied to a
|
|
245
|
+
* game, so the API omits the `version` that type carries.
|
|
246
|
+
*/
|
|
247
|
+
interface ContestFlavorText {
|
|
248
|
+
/** The localized flavor text. */
|
|
249
|
+
flavor_text: string;
|
|
250
|
+
/** The language this flavor text is in. */
|
|
251
|
+
language: NamedAPIResource<Language>;
|
|
294
252
|
}
|
|
295
253
|
/**
|
|
296
254
|
* ## Contest Effect
|
|
@@ -306,7 +264,7 @@ interface ContestEffect {
|
|
|
306
264
|
/** The result of this contest effect listed in different languages. */
|
|
307
265
|
effect_entries: Effect[];
|
|
308
266
|
/** The flavor text of this contest effect listed in different languages. */
|
|
309
|
-
flavor_text_entries:
|
|
267
|
+
flavor_text_entries: ContestFlavorText[];
|
|
310
268
|
}
|
|
311
269
|
/**
|
|
312
270
|
* ## Super Contest Effect
|
|
@@ -324,9 +282,9 @@ interface SuperContestEffect {
|
|
|
324
282
|
/** The level of appeal this super contest effect has. */
|
|
325
283
|
appeal: number;
|
|
326
284
|
/** The flavor text of this super contest effect listed in different languages. */
|
|
327
|
-
flavor_text_entries:
|
|
285
|
+
flavor_text_entries: ContestFlavorText[];
|
|
328
286
|
/** A list of moves that have the effect when used in super contests. */
|
|
329
|
-
moves: NamedAPIResource[];
|
|
287
|
+
moves: NamedAPIResource<Move>[];
|
|
330
288
|
}
|
|
331
289
|
//#endregion
|
|
332
290
|
//#region src/models/Currency/currency.d.ts
|
|
@@ -346,52 +304,354 @@ interface Currency {
|
|
|
346
304
|
names: Name[];
|
|
347
305
|
}
|
|
348
306
|
//#endregion
|
|
349
|
-
//#region src/models/
|
|
307
|
+
//#region src/models/Item/item.d.ts
|
|
350
308
|
/**
|
|
351
|
-
*
|
|
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.
|
|
309
|
+
* Sprites used to depict the given item in the game.
|
|
354
310
|
*/
|
|
355
|
-
interface
|
|
311
|
+
interface ItemSprites {
|
|
312
|
+
/** The default depiction of this item. */
|
|
313
|
+
default: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Pokémon that might be found in the wild holding the given item.
|
|
317
|
+
*/
|
|
318
|
+
interface ItemHolderPokemon {
|
|
319
|
+
/** The Pokémon that holds this item. */
|
|
320
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
321
|
+
/** The details for the version that this item is held in by the Pokémon. */
|
|
322
|
+
version_details: ItemHolderPokemonVersionDetail[];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* The details for the version that the given item is held in by the Pokémon.
|
|
326
|
+
*/
|
|
327
|
+
interface ItemHolderPokemonVersionDetail {
|
|
328
|
+
/** How often this Pokémon holds this item in this version. */
|
|
329
|
+
rarity: number;
|
|
330
|
+
/** The version that this item is held in by the Pokémon. */
|
|
331
|
+
version: NamedAPIResource<Version>;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* ## Item Attribute
|
|
335
|
+
* Item attributes define particular aspects of items, e.g. "usable in battle" or "consumable".
|
|
336
|
+
*/
|
|
337
|
+
interface ItemAttribute {
|
|
356
338
|
/** The identifier for this resource. */
|
|
357
339
|
id: number;
|
|
358
340
|
/** The name for this resource. */
|
|
359
341
|
name: string;
|
|
360
|
-
/** A
|
|
361
|
-
|
|
342
|
+
/** A list of items that have this attribute. */
|
|
343
|
+
items: NamedAPIResource<Item>[];
|
|
344
|
+
/** The name of this item attribute listed in different languages. */
|
|
345
|
+
names: Name[];
|
|
346
|
+
/** The description of this item attribute listed in different languages. */
|
|
347
|
+
descriptions: Description[];
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* ## Item Category
|
|
351
|
+
* Item categories determine where items will be placed in the player's bag.
|
|
352
|
+
*/
|
|
353
|
+
interface ItemCategory {
|
|
354
|
+
/** The identifier for this resource. */
|
|
355
|
+
id: number;
|
|
356
|
+
/** The name for this resource. */
|
|
357
|
+
name: string;
|
|
358
|
+
/** A list of items that are a part of this category. */
|
|
359
|
+
items: NamedAPIResource<Item>[];
|
|
360
|
+
/** The name of this item category listed in different languages. */
|
|
361
|
+
names: Name[];
|
|
362
|
+
/** The pocket items in this category would be put in. */
|
|
363
|
+
pocket: NamedAPIResource<ItemPocket>;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* ## Item Fling Effect
|
|
367
|
+
* The various effects of the move "Fling" when used with different items.
|
|
368
|
+
*/
|
|
369
|
+
interface ItemFlingEffect {
|
|
370
|
+
/** The identifier for this resource. */
|
|
371
|
+
id: number;
|
|
372
|
+
/** The name for this resource. */
|
|
373
|
+
name: string;
|
|
374
|
+
/** The result of this fling effect listed in different languages. */
|
|
375
|
+
effect_entries: Effect[];
|
|
376
|
+
/** A list of items that have this fling effect. */
|
|
377
|
+
items: NamedAPIResource<Item>[];
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* ## Item Pocket
|
|
381
|
+
* Pockets within the player's bag used for storing items by category.
|
|
382
|
+
*/
|
|
383
|
+
interface ItemPocket {
|
|
384
|
+
/** The identifier for this resource. */
|
|
385
|
+
id: number;
|
|
386
|
+
/** The name for this resource. */
|
|
387
|
+
name: string;
|
|
388
|
+
/** A list of item categories that are relevant to this item pocket. */
|
|
389
|
+
categories: NamedAPIResource<ItemCategory>[];
|
|
362
390
|
/** The name of this resource listed in different languages. */
|
|
363
391
|
names: Name[];
|
|
364
392
|
}
|
|
393
|
+
/** The price of an item in a single version group. */
|
|
394
|
+
interface ItemPrice {
|
|
395
|
+
/** The currency used for this price. */
|
|
396
|
+
currency: NamedAPIResource<Currency>;
|
|
397
|
+
/** The purchase price of this item in this version group. Null if the item cannot be purchased. */
|
|
398
|
+
purchase_price: number | null;
|
|
399
|
+
/** The sell price of this item in this version group. Null if the item cannot be sold. */
|
|
400
|
+
sell_price: number | null;
|
|
401
|
+
/** The version group these prices apply to. */
|
|
402
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
403
|
+
}
|
|
365
404
|
/**
|
|
366
|
-
* ##
|
|
367
|
-
*
|
|
368
|
-
*
|
|
405
|
+
* ## Item
|
|
406
|
+
* An item is an object in the games which the player can pick up, keep in their bag, and use in some manner.
|
|
407
|
+
* They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area.
|
|
408
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Item).
|
|
369
409
|
*/
|
|
370
|
-
interface
|
|
410
|
+
interface Item {
|
|
411
|
+
/** The identifier for this resource. */
|
|
412
|
+
id: number;
|
|
413
|
+
/** The name for this resource. */
|
|
414
|
+
name: string;
|
|
415
|
+
/** The purchase and sell prices of this item for each version group. */
|
|
416
|
+
prices: ItemPrice[];
|
|
417
|
+
/** The power of the move Fling when used with this item. */
|
|
418
|
+
fling_power: number | null;
|
|
419
|
+
/** The effect of the move Fling when used with this item. */
|
|
420
|
+
fling_effect: NamedAPIResource<ItemFlingEffect> | null;
|
|
421
|
+
/** A list of attributes this item has. */
|
|
422
|
+
attributes: NamedAPIResource<ItemAttribute>[];
|
|
423
|
+
/** The category of items this item falls into. */
|
|
424
|
+
category: NamedAPIResource<ItemCategory>;
|
|
425
|
+
/** The effect of this ability listed in different languages. */
|
|
426
|
+
effect_entries: VerboseEffect[];
|
|
427
|
+
/** The flavor text of this ability listed in different languages. */
|
|
428
|
+
flavor_text_entries: VersionGroupFlavorText[];
|
|
429
|
+
/** A list of game indices relevant to this item by generation. */
|
|
430
|
+
game_indices: GenerationGameIndex[];
|
|
431
|
+
/** The name of this item listed in different languages. */
|
|
432
|
+
names: Name[];
|
|
433
|
+
/** A set of sprites used to depict this item in the game. */
|
|
434
|
+
sprites: ItemSprites;
|
|
435
|
+
/** A list of Pokémon that might be found in the wild holding this item. */
|
|
436
|
+
held_by_pokemon: ItemHolderPokemon[];
|
|
437
|
+
/** An evolution chain this item requires to produce a baby during mating. */
|
|
438
|
+
baby_trigger_for: APIResource<EvolutionChain> | null;
|
|
439
|
+
/** A list of the machines related to this item. */
|
|
440
|
+
machines: MachineVersionDetail[];
|
|
441
|
+
}
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region src/models/Location/encounter.d.ts
|
|
444
|
+
/**
|
|
445
|
+
* Method in which Pokémon may be encountered in the given area
|
|
446
|
+
* and how likely the method will occur depending on the version of the game.
|
|
447
|
+
*/
|
|
448
|
+
interface EncounterMethodRate {
|
|
449
|
+
/** The method in which Pokémon may be encountered in an area. */
|
|
450
|
+
encounter_method: NamedAPIResource<EncounterMethod>;
|
|
451
|
+
/** The chance of the encounter to occur on a version of the game. */
|
|
452
|
+
version_details: EncounterVersionDetails[];
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* The chance of the encounter to occur on a version of the game.
|
|
456
|
+
*/
|
|
457
|
+
interface EncounterVersionDetails {
|
|
458
|
+
/** The chance of an encounter to occur. */
|
|
459
|
+
rate: number;
|
|
460
|
+
/** The version of the game in which the encounter can occur with the given chance. */
|
|
461
|
+
version: NamedAPIResource<Version>;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Describes a pokémon encounter in a given area.
|
|
465
|
+
*/
|
|
466
|
+
interface PokemonEncounter {
|
|
467
|
+
/** The Pokémon being encountered. */
|
|
468
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
469
|
+
/** A list of versions and encounters with Pokémon that might happen in the referenced location area. */
|
|
470
|
+
version_details: VersionEncounterDetail[];
|
|
471
|
+
}
|
|
472
|
+
//#endregion
|
|
473
|
+
//#region src/models/Location/location.d.ts
|
|
474
|
+
/**
|
|
475
|
+
* ## Location
|
|
476
|
+
* Locations that can be visited within the games.
|
|
477
|
+
* Locations make up sizable portions of regions, like cities or routes.
|
|
478
|
+
* - See the [List of Locations](https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name).
|
|
479
|
+
*/
|
|
480
|
+
interface Location {
|
|
371
481
|
/** The identifier for this resource. */
|
|
372
482
|
id: number;
|
|
373
483
|
/** The name for this resource. */
|
|
374
484
|
name: string;
|
|
485
|
+
/** The region this location can be found in. */
|
|
486
|
+
region: NamedAPIResource<Region> | null;
|
|
375
487
|
/** The name of this resource listed in different languages. */
|
|
376
488
|
names: Name[];
|
|
377
|
-
/** A list of
|
|
378
|
-
|
|
489
|
+
/** A list of game indices relevant to this location by generation. */
|
|
490
|
+
game_indices: GenerationGameIndex[];
|
|
491
|
+
/** Areas that can be found within this location. */
|
|
492
|
+
areas: NamedAPIResource<LocationArea>[];
|
|
379
493
|
}
|
|
380
494
|
/**
|
|
381
|
-
* ##
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/
|
|
495
|
+
* ## Location Area
|
|
496
|
+
* Location areas are sections of areas, such as floors in a building or cave.
|
|
497
|
+
* Each area has its own set of possible Pokémon encounters.
|
|
498
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Area) for greater detail.
|
|
385
499
|
*/
|
|
386
|
-
interface
|
|
500
|
+
interface LocationArea {
|
|
387
501
|
/** The identifier for this resource. */
|
|
388
502
|
id: number;
|
|
389
503
|
/** The name for this resource. */
|
|
390
504
|
name: string;
|
|
391
|
-
/** The
|
|
392
|
-
|
|
505
|
+
/** The internal id of an API resource within game data. */
|
|
506
|
+
game_index: number;
|
|
507
|
+
/** 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. */
|
|
508
|
+
encounter_method_rates: EncounterMethodRate[];
|
|
509
|
+
/** The region this location area can be found in. */
|
|
510
|
+
location: NamedAPIResource<Location>;
|
|
511
|
+
/** The name of this resource listed in different languages. */
|
|
512
|
+
names: Name[];
|
|
513
|
+
/** A list of Pokémon that can be encountered in this area along with version specific details about the encounter. */
|
|
514
|
+
pokemon_encounters: PokemonEncounter[];
|
|
515
|
+
}
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/models/Pokemon/type.d.ts
|
|
518
|
+
/**
|
|
519
|
+
* Details of Pokémon for a specific type.
|
|
520
|
+
*/
|
|
521
|
+
interface TypePokemon {
|
|
522
|
+
/** The order the Pokémon's types are listed in. */
|
|
523
|
+
slot: number;
|
|
524
|
+
/** The Pokémon that has the referenced type. */
|
|
525
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Detail of how effective a type is toward others and vice versa.
|
|
529
|
+
*/
|
|
530
|
+
interface TypeRelations {
|
|
531
|
+
/** A list of types this type has no effect on. */
|
|
532
|
+
no_damage_to: NamedAPIResource<Type>[];
|
|
533
|
+
/** A list of types this type is not very effective against. */
|
|
534
|
+
half_damage_to: NamedAPIResource<Type>[];
|
|
535
|
+
/** A list of types this type is very effective against. */
|
|
536
|
+
double_damage_to: NamedAPIResource<Type>[];
|
|
537
|
+
/** A list of types that have no effect on this type. */
|
|
538
|
+
no_damage_from: NamedAPIResource<Type>[];
|
|
539
|
+
/** A list of types that are not very effective against this type. */
|
|
540
|
+
half_damage_from: NamedAPIResource<Type>[];
|
|
541
|
+
/** A list of types that are very effective against this type. */
|
|
542
|
+
double_damage_from: NamedAPIResource<Type>[];
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Details of how effective this type was toward others and vice versa in a previous generation.
|
|
546
|
+
*/
|
|
547
|
+
interface TypeRelationsPast {
|
|
548
|
+
/** The last generation in which the referenced type had the listed damage relations. */
|
|
549
|
+
generation: NamedAPIResource<Generation>;
|
|
550
|
+
/** The damage relations the referenced type had up to and including the listed generation. */
|
|
551
|
+
damage_relations: TypeRelations;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* The pair of icons a single game uses to depict a type.
|
|
555
|
+
*
|
|
556
|
+
* `symbol_icon` is the type's bare glyph and `name_icon` spells the name out;
|
|
557
|
+
* games that only ever shipped one of the two leave the other `null`.
|
|
558
|
+
*/
|
|
559
|
+
interface TypeGameSprites {
|
|
560
|
+
/** The icon spelling out the type's name. */
|
|
561
|
+
name_icon: string | null;
|
|
562
|
+
/** The icon showing the type's symbol alone. */
|
|
563
|
+
symbol_icon: string | null;
|
|
564
|
+
}
|
|
565
|
+
/** Generation-III type icons, by game. */
|
|
566
|
+
interface GenerationIIITypeSprites {
|
|
567
|
+
colosseum: TypeGameSprites;
|
|
568
|
+
emerald: TypeGameSprites;
|
|
569
|
+
"firered-leafgreen": TypeGameSprites;
|
|
570
|
+
"ruby-sapphire": TypeGameSprites;
|
|
571
|
+
xd: TypeGameSprites;
|
|
572
|
+
}
|
|
573
|
+
/** Generation-IV type icons, by game. */
|
|
574
|
+
interface GenerationIVTypeSprites {
|
|
575
|
+
"diamond-pearl": TypeGameSprites;
|
|
576
|
+
"heartgold-soulsilver": TypeGameSprites;
|
|
577
|
+
platinum: TypeGameSprites;
|
|
578
|
+
}
|
|
579
|
+
/** Generation-V type icons, by game. */
|
|
580
|
+
interface GenerationVTypeSprites {
|
|
581
|
+
"black-2-white-2": TypeGameSprites;
|
|
582
|
+
"black-white": TypeGameSprites;
|
|
583
|
+
}
|
|
584
|
+
/** Generation-VI type icons, by game. */
|
|
585
|
+
interface GenerationVITypeSprites {
|
|
586
|
+
"omega-ruby-alpha-sapphire": TypeGameSprites;
|
|
587
|
+
"x-y": TypeGameSprites;
|
|
588
|
+
}
|
|
589
|
+
/** Generation-VII type icons, by game. */
|
|
590
|
+
interface GenerationVIITypeSprites {
|
|
591
|
+
"lets-go-pikachu-lets-go-eevee": TypeGameSprites;
|
|
592
|
+
"sun-moon": TypeGameSprites;
|
|
593
|
+
"ultra-sun-ultra-moon": TypeGameSprites;
|
|
594
|
+
}
|
|
595
|
+
/** Generation-VIII type icons, by game. */
|
|
596
|
+
interface GenerationVIIITypeSprites {
|
|
597
|
+
"brilliant-diamond-shining-pearl": TypeGameSprites;
|
|
598
|
+
"legends-arceus": TypeGameSprites;
|
|
599
|
+
"sword-shield": TypeGameSprites;
|
|
600
|
+
}
|
|
601
|
+
/** Generation-IX type icons, by game. */
|
|
602
|
+
interface GenerationIXTypeSprites {
|
|
603
|
+
"scarlet-violet": TypeGameSprites;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* The icons used to depict a type, by generation and game.
|
|
607
|
+
*
|
|
608
|
+
* Generations I and II are absent: neither displayed type icons in-game.
|
|
609
|
+
*/
|
|
610
|
+
interface TypeSprites {
|
|
611
|
+
/** Generation-III type icons. */
|
|
612
|
+
"generation-iii": GenerationIIITypeSprites;
|
|
613
|
+
/** Generation-IV type icons. */
|
|
614
|
+
"generation-iv": GenerationIVTypeSprites;
|
|
615
|
+
/** Generation-V type icons. */
|
|
616
|
+
"generation-v": GenerationVTypeSprites;
|
|
617
|
+
/** Generation-VI type icons. */
|
|
618
|
+
"generation-vi": GenerationVITypeSprites;
|
|
619
|
+
/** Generation-VII type icons. */
|
|
620
|
+
"generation-vii": GenerationVIITypeSprites;
|
|
621
|
+
/** Generation-VIII type icons. */
|
|
622
|
+
"generation-viii": GenerationVIIITypeSprites;
|
|
623
|
+
/** Generation-IX type icons. */
|
|
624
|
+
"generation-ix": GenerationIXTypeSprites;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* ## Type
|
|
628
|
+
* Types are properties for Pokémon and their moves.
|
|
629
|
+
* Each type has three properties: which types of Pokémon it is super effective against,
|
|
630
|
+
* which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.
|
|
631
|
+
*/
|
|
632
|
+
interface Type {
|
|
633
|
+
/** The identifier for this resource. */
|
|
634
|
+
id: number;
|
|
635
|
+
/** The name for this resource. */
|
|
636
|
+
name: string;
|
|
637
|
+
/** A detail of how effective this type is toward others and vice versa. */
|
|
638
|
+
damage_relations: TypeRelations;
|
|
639
|
+
/** A list of details of how effective this type was toward others and vice versa in previous generations. */
|
|
640
|
+
past_damage_relations: TypeRelationsPast[];
|
|
641
|
+
/** A list of game indices relevant to this item by generation. */
|
|
642
|
+
game_indices: GenerationGameIndex[];
|
|
643
|
+
/** The generation this type was introduced in. */
|
|
644
|
+
generation: NamedAPIResource<Generation>;
|
|
645
|
+
/** The class of damage inflicted by this type. */
|
|
646
|
+
move_damage_class: NamedAPIResource<MoveDamageClass>;
|
|
393
647
|
/** The name of this resource listed in different languages. */
|
|
394
648
|
names: Name[];
|
|
649
|
+
/** A list of details of Pokémon that have this type. */
|
|
650
|
+
pokemon: TypePokemon[];
|
|
651
|
+
/** A list of moves that have this type. */
|
|
652
|
+
moves: NamedAPIResource<Move>[];
|
|
653
|
+
/** The icons used to depict this type, by generation and game. */
|
|
654
|
+
sprites: TypeSprites;
|
|
395
655
|
}
|
|
396
656
|
//#endregion
|
|
397
657
|
//#region src/models/Evolution/evolution.d.ts
|
|
@@ -401,19 +661,19 @@ interface EncounterConditionValue {
|
|
|
401
661
|
*/
|
|
402
662
|
interface EvolutionDetail {
|
|
403
663
|
/** The item required to cause evolution into this Pokémon species. */
|
|
404
|
-
item: NamedAPIResource | null;
|
|
664
|
+
item: NamedAPIResource<Item> | null;
|
|
405
665
|
/** The type of event that triggers evolution into this Pokémon species. */
|
|
406
|
-
trigger: NamedAPIResource
|
|
666
|
+
trigger: NamedAPIResource<EvolutionTrigger>;
|
|
407
667
|
/** The gender the evolving Pokémon species must be in order to evolve into this Pokémon species. */
|
|
408
668
|
gender: number | null;
|
|
409
669
|
/** 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;
|
|
670
|
+
held_item: NamedAPIResource<Item> | null;
|
|
411
671
|
/** 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;
|
|
672
|
+
known_move: NamedAPIResource<Move> | null;
|
|
413
673
|
/** 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;
|
|
674
|
+
known_move_type: NamedAPIResource<Type> | null;
|
|
415
675
|
/** The location the evolution must be triggered at. */
|
|
416
|
-
location: NamedAPIResource | null;
|
|
676
|
+
location: NamedAPIResource<Location> | null;
|
|
417
677
|
/** The minimum required level the evolving Pokémon species must reach to evolve into this Pokémon species. */
|
|
418
678
|
min_level: number | null;
|
|
419
679
|
/** The minimum required level of happiness the evolving Pokémon species must have to evolve into this Pokémon species. */
|
|
@@ -425,22 +685,22 @@ interface EvolutionDetail {
|
|
|
425
685
|
/** Whether or not it must be raining in the overworld to cause evolution into this Pokémon species. */
|
|
426
686
|
needs_overworld_rain: boolean;
|
|
427
687
|
/** 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;
|
|
688
|
+
party_species: NamedAPIResource<PokemonSpecies> | null;
|
|
429
689
|
/**
|
|
430
690
|
* The player must have a Pokémon of this type in their party during the evolution trigger event
|
|
431
691
|
* in order for the evolving Pokémon species to evolve into this Pokémon species.
|
|
432
692
|
*/
|
|
433
|
-
party_type: NamedAPIResource | null;
|
|
693
|
+
party_type: NamedAPIResource<Type> | null;
|
|
434
694
|
/** 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
695
|
relative_physical_stats: 1 | 0 | -1 | null;
|
|
436
696
|
/** The required time of day. Day or night. */
|
|
437
697
|
time_of_day: "Day" | "Night" | "";
|
|
438
698
|
/** Pokémon species for which this one must be traded. */
|
|
439
|
-
trade_species: NamedAPIResource | null;
|
|
699
|
+
trade_species: NamedAPIResource<PokemonSpecies> | null;
|
|
440
700
|
/** Whether or not the 3DS needs to be turned upside-down as this Pokémon levels up. */
|
|
441
701
|
turn_upside_down: boolean;
|
|
442
702
|
/** The version group in which the evolution was introduced. */
|
|
443
|
-
version_group: NamedAPIResource
|
|
703
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
444
704
|
/**
|
|
445
705
|
* Whether the evolution is the expected one in a main series game. Each Pokémon variety of a line
|
|
446
706
|
* capable of evolution has exactly one default evolution per distinct variety it evolves into.
|
|
@@ -451,16 +711,16 @@ interface EvolutionDetail {
|
|
|
451
711
|
/** Whether or not multiplayer link play is needed to evolve into this species, e.g. Union Circle. */
|
|
452
712
|
needs_multiplayer: boolean;
|
|
453
713
|
/** The region this evolution must occur in. */
|
|
454
|
-
region: NamedAPIResource | null;
|
|
714
|
+
region: NamedAPIResource<Region> | null;
|
|
455
715
|
/** The form the evolving Pokémon must be in for this evolution to occur. */
|
|
456
|
-
base_form: NamedAPIResource | null;
|
|
716
|
+
base_form: NamedAPIResource<PokemonForm> | null;
|
|
457
717
|
/** The form this evolution produces. */
|
|
458
|
-
evolved_form: NamedAPIResource | null;
|
|
718
|
+
evolved_form: NamedAPIResource<PokemonForm> | null;
|
|
459
719
|
/**
|
|
460
720
|
* The move that must be used by the evolving Pokémon species during the evolution trigger event
|
|
461
721
|
* in order to evolve into this Pokémon species.
|
|
462
722
|
*/
|
|
463
|
-
used_move: NamedAPIResource | null;
|
|
723
|
+
used_move: NamedAPIResource<Move> | null;
|
|
464
724
|
/** The minimum number of times `used_move` must be used to evolve into this species. */
|
|
465
725
|
min_move_count: number | null;
|
|
466
726
|
/** The minimum number of steps that must be taken to evolve into this species. */
|
|
@@ -480,7 +740,7 @@ interface ChainLink {
|
|
|
480
740
|
/** Whether or not this link is for a baby Pokémon. This would only ever be true on the base link. */
|
|
481
741
|
is_baby: boolean;
|
|
482
742
|
/** The Pokémon species at this point in the evolution chain. */
|
|
483
|
-
species: NamedAPIResource
|
|
743
|
+
species: NamedAPIResource<PokemonSpecies>;
|
|
484
744
|
/** All details regarding the specific details of the referenced Pokémon species evolution. */
|
|
485
745
|
evolution_details: EvolutionDetail[];
|
|
486
746
|
/** A list of chain objects. */
|
|
@@ -500,7 +760,7 @@ interface EvolutionChain {
|
|
|
500
760
|
* The item that a Pokémon would be holding when mating that would trigger
|
|
501
761
|
* the egg hatching a baby Pokémon rather than a basic Pokémon.
|
|
502
762
|
*/
|
|
503
|
-
baby_trigger_item: NamedAPIResource | null;
|
|
763
|
+
baby_trigger_item: NamedAPIResource<Item> | null;
|
|
504
764
|
/**
|
|
505
765
|
* The base chain link object. Each link contains evolution details for a Pokémon in the chain.
|
|
506
766
|
* Each link references the next Pokémon in the natural evolution order.
|
|
@@ -523,35 +783,7 @@ interface EvolutionTrigger {
|
|
|
523
783
|
/** The name of this resource listed in different languages. */
|
|
524
784
|
names: Name[];
|
|
525
785
|
/** 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[];
|
|
786
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
555
787
|
}
|
|
556
788
|
//#endregion
|
|
557
789
|
//#region src/models/Game/pokemon-entry.d.ts
|
|
@@ -562,7 +794,7 @@ interface PokemonEntry {
|
|
|
562
794
|
/** The index of this Pokémon species entry within the Pokédex. */
|
|
563
795
|
entry_number: number;
|
|
564
796
|
/** The Pokémon species being encountered. */
|
|
565
|
-
pokemon_species: NamedAPIResource
|
|
797
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>;
|
|
566
798
|
}
|
|
567
799
|
//#endregion
|
|
568
800
|
//#region src/models/Game/pokedex.d.ts
|
|
@@ -587,422 +819,47 @@ interface Pokedex {
|
|
|
587
819
|
/** A list of Pokémon catalogued in this Pokédex and their indexes. */
|
|
588
820
|
pokemon_entries: PokemonEntry[];
|
|
589
821
|
/** The region this Pokédex catalogues Pokémon for. */
|
|
590
|
-
region: NamedAPIResource | null;
|
|
822
|
+
region: NamedAPIResource<Region> | null;
|
|
591
823
|
/** A list of version groups this Pokédex is relevant to. */
|
|
592
|
-
version_groups: NamedAPIResource[];
|
|
824
|
+
version_groups: NamedAPIResource<VersionGroup>[];
|
|
593
825
|
}
|
|
594
826
|
//#endregion
|
|
595
|
-
//#region src/models/
|
|
827
|
+
//#region src/models/Location/palpark.d.ts
|
|
596
828
|
/**
|
|
597
|
-
* ##
|
|
598
|
-
*
|
|
599
|
-
*
|
|
829
|
+
* ## Pal Park Area
|
|
830
|
+
* Areas used for grouping Pokémon encounters in Pal Park.
|
|
831
|
+
* They're like habitats that are specific to Pal Park.
|
|
832
|
+
* Pal Park is divided into five separate areas:
|
|
833
|
+
* ---
|
|
834
|
+
* - [Field](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Field)
|
|
835
|
+
* - [Forest](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Forest)
|
|
836
|
+
* - [Mountain](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Mountain)
|
|
837
|
+
* - [Pond](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Pound)
|
|
838
|
+
* - [Sea](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Sea)
|
|
839
|
+
* - [Trivia](https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_Pal_Park_location#Trivia)
|
|
840
|
+
* ---
|
|
841
|
+
* See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pal_Park) for greater detail.
|
|
600
842
|
*/
|
|
601
|
-
interface
|
|
843
|
+
interface PalParkArea {
|
|
602
844
|
/** The identifier for this resource. */
|
|
603
845
|
id: number;
|
|
604
846
|
/** The name for this resource. */
|
|
605
847
|
name: string;
|
|
606
848
|
/** The name of this resource listed in different languages. */
|
|
607
849
|
names: Name[];
|
|
608
|
-
/**
|
|
609
|
-
|
|
850
|
+
/** A list of Pokémon encountered in this pal park area along with details. */
|
|
851
|
+
pokemon_encounters: PalParkEncounterSpecies[];
|
|
610
852
|
}
|
|
611
853
|
/**
|
|
612
|
-
*
|
|
613
|
-
* Version groups categorize highly similar versions of the games.
|
|
854
|
+
* Details of a Pokémon encountered in this Pal Park area.
|
|
614
855
|
*/
|
|
615
|
-
interface
|
|
616
|
-
/** The
|
|
617
|
-
|
|
618
|
-
/** The
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
|
|
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.
|
|
872
|
-
*/
|
|
873
|
-
interface PalParkEncounterSpecies {
|
|
874
|
-
/** The base score given to the player when this Pokémon is caught during a pal park run. */
|
|
875
|
-
base_score: number;
|
|
876
|
-
/** The base rate for encountering this Pokémon in this pal park area. */
|
|
877
|
-
rate: number;
|
|
878
|
-
/** 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[];
|
|
856
|
+
interface PalParkEncounterSpecies {
|
|
857
|
+
/** The base score given to the player when this Pokémon is caught during a pal park run. */
|
|
858
|
+
base_score: number;
|
|
859
|
+
/** The base rate for encountering this Pokémon in this pal park area. */
|
|
860
|
+
rate: number;
|
|
861
|
+
/** The Pokémon species being encountered. */
|
|
862
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>;
|
|
1006
863
|
}
|
|
1007
864
|
//#endregion
|
|
1008
865
|
//#region src/models/Pokemon/egg-group.d.ts
|
|
@@ -1020,34 +877,7 @@ interface EggGroup {
|
|
|
1020
877
|
/** The name of this resource listed in different languages. */
|
|
1021
878
|
names: Name[];
|
|
1022
879
|
/** 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 {
|
|
1034
|
-
/** The identifier for this resource. */
|
|
1035
|
-
id: number;
|
|
1036
|
-
/** 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;
|
|
880
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
1051
881
|
}
|
|
1052
882
|
//#endregion
|
|
1053
883
|
//#region src/models/Pokemon/growth-rates.d.ts
|
|
@@ -1077,7 +907,63 @@ interface GrowthRate {
|
|
|
1077
907
|
/** A list of levels and the amount of experience needed to attain them based on this growth rate. */
|
|
1078
908
|
levels: GrowthRateExperienceLevel[];
|
|
1079
909
|
/** A list of Pokémon species that gain levels at this growth rate. */
|
|
1080
|
-
pokemon_species: NamedAPIResource[];
|
|
910
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
911
|
+
}
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region src/models/Pokemon/characteristics.d.ts
|
|
914
|
+
/**
|
|
915
|
+
* ## Characteristic
|
|
916
|
+
* Characteristics indicate which stat contains a Pokémon's highest IV.
|
|
917
|
+
* A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo).
|
|
918
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Characteristic) for greater detail.
|
|
919
|
+
*/
|
|
920
|
+
interface Characteristic {
|
|
921
|
+
/** The identifier for this resource. */
|
|
922
|
+
id: number;
|
|
923
|
+
/** The remainder of the highest stat/IV divided by 5. */
|
|
924
|
+
gene_modulo: number;
|
|
925
|
+
/** The possible values of the highest stat that would result in a Pokémon receiving this characteristic when divided by 5. */
|
|
926
|
+
possible_values: number[];
|
|
927
|
+
/** The highest stat for the referenced characteristic. */
|
|
928
|
+
highest_stat: NamedAPIResource<Stat>;
|
|
929
|
+
/** Descriptions for the referenced characteristic. */
|
|
930
|
+
descriptions: Description[];
|
|
931
|
+
}
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region src/models/Pokemon/pokeathlon-stat.d.ts
|
|
934
|
+
/**
|
|
935
|
+
* ## Pokéathlon Stat
|
|
936
|
+
* Pokéathlon Stats are different attributes of a Pokémon's performance in Pokéathlons.
|
|
937
|
+
* In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats.
|
|
938
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.
|
|
939
|
+
*/
|
|
940
|
+
interface PokeathlonStat {
|
|
941
|
+
/** The identifier for this resource. */
|
|
942
|
+
id: number;
|
|
943
|
+
/** The name for this resource. */
|
|
944
|
+
name: "speed" | "power" | "skill" | "stamina" | "jump";
|
|
945
|
+
/** The name of this resource listed in different languages. */
|
|
946
|
+
names: Name[];
|
|
947
|
+
/** A detail of natures which affect this Pokéathlon stat positively or negatively. */
|
|
948
|
+
affecting_natures: NaturePokeathlonStatAffectSets;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* A nature and how it changes the referenced Pokéathlon stat.
|
|
952
|
+
*/
|
|
953
|
+
interface NaturePokeathlonStatAffect {
|
|
954
|
+
/** The maximum amount of change to the referenced Pokéathlon stat. */
|
|
955
|
+
max_change: -1 | -2 | 1 | 2;
|
|
956
|
+
/** The nature causing the change. */
|
|
957
|
+
nature: NamedAPIResource<Nature>;
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* A detail of natures which affect this Pokéathlon stat positively or negatively.
|
|
961
|
+
*/
|
|
962
|
+
interface NaturePokeathlonStatAffectSets {
|
|
963
|
+
/** A list of natures and how they change the referenced Pokéathlon stat. */
|
|
964
|
+
increase: NaturePokeathlonStatAffect[];
|
|
965
|
+
/** A list of natures and how they change the referenced Pokéathlon stat. */
|
|
966
|
+
decrease: NaturePokeathlonStatAffect[];
|
|
1081
967
|
}
|
|
1082
968
|
//#endregion
|
|
1083
969
|
//#region src/models/Pokemon/nature.d.ts
|
|
@@ -1092,13 +978,13 @@ interface Nature {
|
|
|
1092
978
|
/** The name for this resource. */
|
|
1093
979
|
name: string;
|
|
1094
980
|
/** The stat decreased by 10% in Pokémon with this nature. */
|
|
1095
|
-
decreased_stat: NamedAPIResource | null;
|
|
981
|
+
decreased_stat: NamedAPIResource<Stat> | null;
|
|
1096
982
|
/** The stat increased by 10% in Pokémon with this nature. */
|
|
1097
|
-
increased_stat: NamedAPIResource | null;
|
|
983
|
+
increased_stat: NamedAPIResource<Stat> | null;
|
|
1098
984
|
/** The flavor hated by Pokémon with this nature. */
|
|
1099
|
-
hates_flavor: NamedAPIResource | null;
|
|
985
|
+
hates_flavor: NamedAPIResource<BerryFlavor> | null;
|
|
1100
986
|
/** The flavor liked by Pokémon with this nature. */
|
|
1101
|
-
likes_flavor: NamedAPIResource | null;
|
|
987
|
+
likes_flavor: NamedAPIResource<BerryFlavor> | null;
|
|
1102
988
|
/** A list of Pokéathlon stats this nature affects and by how much. */
|
|
1103
989
|
pokeathlon_stat_changes: NatureStatChange[];
|
|
1104
990
|
/** 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 +999,7 @@ interface NatureStatChange {
|
|
|
1113
999
|
/** The amount of change. */
|
|
1114
1000
|
max_change: -1 | 1 | -2 | 2;
|
|
1115
1001
|
/** The stat being affected. */
|
|
1116
|
-
pokeathlon_stat: NamedAPIResource
|
|
1002
|
+
pokeathlon_stat: NamedAPIResource<PokeathlonStat>;
|
|
1117
1003
|
}
|
|
1118
1004
|
/**
|
|
1119
1005
|
* Battle Style and how likely a Pokémon with the given nature is to use them
|
|
@@ -1125,43 +1011,63 @@ interface MoveBattleStylePreference {
|
|
|
1125
1011
|
/** Chance of using the move, in percent, if HP is over one half. */
|
|
1126
1012
|
high_hp_preference: number;
|
|
1127
1013
|
/** The move battle style. */
|
|
1128
|
-
move_battle_style: NamedAPIResource
|
|
1014
|
+
move_battle_style: NamedAPIResource<MoveBattleStyle>;
|
|
1129
1015
|
}
|
|
1130
1016
|
//#endregion
|
|
1131
|
-
//#region src/models/Pokemon/
|
|
1017
|
+
//#region src/models/Pokemon/stats.d.ts
|
|
1132
1018
|
/**
|
|
1133
|
-
* ##
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1136
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.
|
|
1019
|
+
* ## Stat
|
|
1020
|
+
* Stats determine certain aspects of battles. Each Pokémon has a value for each stat
|
|
1021
|
+
* which grows as they gain levels and can be altered momentarily by effects in battles.
|
|
1137
1022
|
*/
|
|
1138
|
-
interface
|
|
1023
|
+
interface Stat {
|
|
1139
1024
|
/** The identifier for this resource. */
|
|
1140
1025
|
id: number;
|
|
1141
1026
|
/** The name for this resource. */
|
|
1142
|
-
name: "
|
|
1027
|
+
name: "hp" | "attack" | "defense" | "special-attack" | "special-defense" | "speed" | "accuracy" | "evasion";
|
|
1028
|
+
/** ID the games use for this stat. */
|
|
1029
|
+
game_index: number;
|
|
1030
|
+
/** Whether this stat only exists within a battle. */
|
|
1031
|
+
is_battle_only: boolean;
|
|
1032
|
+
/** A detail of moves which affect this stat positively or negatively. */
|
|
1033
|
+
affecting_moves: MoveStatAffectSets;
|
|
1034
|
+
/** A detail of natures which affect this stat positively or negatively. */
|
|
1035
|
+
affecting_natures: NatureStatAffectSets;
|
|
1036
|
+
/** A list of items which affect this stat. */
|
|
1037
|
+
affecting_items: NamedAPIResource<Item>[];
|
|
1038
|
+
/** A list of characteristics that are set on a Pokémon when its highest base stat is this stat. */
|
|
1039
|
+
characteristics: APIResource<Characteristic>[];
|
|
1040
|
+
/** The class of damage this stat is directly related to. */
|
|
1041
|
+
move_damage_class: NamedAPIResource<MoveDamageClass> | null;
|
|
1143
1042
|
/** The name of this resource listed in different languages. */
|
|
1144
1043
|
names: Name[];
|
|
1145
|
-
/** A detail of natures which affect this Pokéathlon stat positively or negatively. */
|
|
1146
|
-
affecting_natures: NaturePokeathlonStatAffectSets;
|
|
1147
1044
|
}
|
|
1148
1045
|
/**
|
|
1149
|
-
* A
|
|
1046
|
+
* A detail of natures which affect the given stat positively or negatively.
|
|
1150
1047
|
*/
|
|
1151
|
-
interface
|
|
1152
|
-
/**
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
|
|
1048
|
+
interface NatureStatAffectSets {
|
|
1049
|
+
/** A list of natures and how they change the referenced stat. */
|
|
1050
|
+
increase: NamedAPIResource<Nature>[];
|
|
1051
|
+
/** A list of natures and how they change the referenced stat. */
|
|
1052
|
+
decrease: NamedAPIResource<Nature>[];
|
|
1156
1053
|
}
|
|
1157
1054
|
/**
|
|
1158
|
-
* A
|
|
1055
|
+
* A move and how it changes the referenced stat.
|
|
1159
1056
|
*/
|
|
1160
|
-
interface
|
|
1161
|
-
/**
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
|
|
1057
|
+
interface MoveStatAffect {
|
|
1058
|
+
/** The maximum amount of change to the referenced stat. */
|
|
1059
|
+
change: -1 | -2 | 1 | 2;
|
|
1060
|
+
/** The move causing the change. */
|
|
1061
|
+
move: NamedAPIResource<Move>;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* A detail of moves which affect a stat positively or negatively.
|
|
1065
|
+
*/
|
|
1066
|
+
interface MoveStatAffectSets {
|
|
1067
|
+
/** A list of moves and how they change the referenced stat. */
|
|
1068
|
+
increase: MoveStatAffect[];
|
|
1069
|
+
/** A list of moves and how they change the referenced stat. */
|
|
1070
|
+
decrease: MoveStatAffect[];
|
|
1165
1071
|
}
|
|
1166
1072
|
//#endregion
|
|
1167
1073
|
//#region src/models/Pokemon/pokemon.d.ts
|
|
@@ -1191,7 +1097,7 @@ interface Pokemon {
|
|
|
1191
1097
|
/** A list of abilities this Pokémon could potentially have. */
|
|
1192
1098
|
abilities: PokemonAbility[];
|
|
1193
1099
|
/** A list of forms this Pokémon can take on. */
|
|
1194
|
-
forms: NamedAPIResource[];
|
|
1100
|
+
forms: NamedAPIResource<PokemonForm>[];
|
|
1195
1101
|
/** A list of game indices relevant to this Pokémon by generation. */
|
|
1196
1102
|
game_indices: VersionGameIndex[];
|
|
1197
1103
|
/** A list of items this Pokémon may be holding when encountered. */
|
|
@@ -1205,7 +1111,7 @@ interface Pokemon {
|
|
|
1205
1111
|
/** A set of cries used to depict this Pokémon in the game. */
|
|
1206
1112
|
cries: PokemonCries;
|
|
1207
1113
|
/** The species this Pokémon belongs to. */
|
|
1208
|
-
species: NamedAPIResource
|
|
1114
|
+
species: NamedAPIResource<PokemonSpecies>;
|
|
1209
1115
|
/** A list of base stat values for this Pokémon. */
|
|
1210
1116
|
stats: PokemonStat[];
|
|
1211
1117
|
/** A list of details showing types this Pokémon has. */
|
|
@@ -1233,7 +1139,7 @@ interface PokemonAbility {
|
|
|
1233
1139
|
/** The slot this ability occupies in this Pokémon species. */
|
|
1234
1140
|
slot: number;
|
|
1235
1141
|
/** The ability the Pokémon may have. */
|
|
1236
|
-
ability: NamedAPIResource
|
|
1142
|
+
ability: NamedAPIResource<Ability>;
|
|
1237
1143
|
}
|
|
1238
1144
|
/**
|
|
1239
1145
|
* Details showing types the given Pokémon has.
|
|
@@ -1242,14 +1148,14 @@ interface PokemonType {
|
|
|
1242
1148
|
/** The order the Pokémon's types are listed in. */
|
|
1243
1149
|
slot: number;
|
|
1244
1150
|
/** The type the referenced Pokémon has. */
|
|
1245
|
-
type: NamedAPIResource
|
|
1151
|
+
type: NamedAPIResource<Type>;
|
|
1246
1152
|
}
|
|
1247
1153
|
/**
|
|
1248
1154
|
* Data describing a Pokémon's types in a previous generation.
|
|
1249
1155
|
*/
|
|
1250
1156
|
interface PokemonPastType {
|
|
1251
1157
|
/** The generation of this Pokémon Type. */
|
|
1252
|
-
generation: NamedAPIResource
|
|
1158
|
+
generation: NamedAPIResource<Generation>;
|
|
1253
1159
|
/** The types this Pokémon had in a previous generation. */
|
|
1254
1160
|
types: PokemonType[];
|
|
1255
1161
|
}
|
|
@@ -1260,19 +1166,19 @@ interface PokemonPastAbilitySlot {
|
|
|
1260
1166
|
/** The slot this ability occupied in this Pokémon species. */
|
|
1261
1167
|
slot: number;
|
|
1262
1168
|
/** The ability that occupied the slot, or `null` when the slot was empty. */
|
|
1263
|
-
ability: NamedAPIResource | null;
|
|
1169
|
+
ability: NamedAPIResource<Ability> | null;
|
|
1264
1170
|
}
|
|
1265
1171
|
/** Data describing a Pokémon's abilities in a previous generation. */
|
|
1266
1172
|
interface PokemonPastAbility {
|
|
1267
1173
|
/** The last generation in which the referenced Pokémon had the listed abilities. */
|
|
1268
|
-
generation: NamedAPIResource
|
|
1174
|
+
generation: NamedAPIResource<Generation>;
|
|
1269
1175
|
/** The abilities the referenced Pokémon had up to and including the listed generation. */
|
|
1270
1176
|
abilities: PokemonPastAbilitySlot[];
|
|
1271
1177
|
}
|
|
1272
1178
|
/** Data describing a Pokémon's stats in a previous generation. */
|
|
1273
1179
|
interface PokemonPastStat {
|
|
1274
1180
|
/** The last generation in which the referenced Pokémon had the listed stats. */
|
|
1275
|
-
generation: NamedAPIResource
|
|
1181
|
+
generation: NamedAPIResource<Generation>;
|
|
1276
1182
|
/** The stats the Pokémon had up to and including the listed generation. */
|
|
1277
1183
|
stats: PokemonStat[];
|
|
1278
1184
|
}
|
|
@@ -1281,7 +1187,7 @@ interface PokemonPastStat {
|
|
|
1281
1187
|
*/
|
|
1282
1188
|
interface PokemonHeldItem {
|
|
1283
1189
|
/** The item the referenced Pokémon holds. */
|
|
1284
|
-
item: NamedAPIResource
|
|
1190
|
+
item: NamedAPIResource<Item>;
|
|
1285
1191
|
/** The details of the different versions in which the item is held. */
|
|
1286
1192
|
version_details: PokemonHeldItemVersion[];
|
|
1287
1193
|
}
|
|
@@ -1290,7 +1196,7 @@ interface PokemonHeldItem {
|
|
|
1290
1196
|
*/
|
|
1291
1197
|
interface PokemonHeldItemVersion {
|
|
1292
1198
|
/** The version in which the item is held. */
|
|
1293
|
-
version: NamedAPIResource
|
|
1199
|
+
version: NamedAPIResource<Version>;
|
|
1294
1200
|
/** How often the item is held. */
|
|
1295
1201
|
rarity: number;
|
|
1296
1202
|
}
|
|
@@ -1299,7 +1205,7 @@ interface PokemonHeldItemVersion {
|
|
|
1299
1205
|
*/
|
|
1300
1206
|
interface PokemonMove {
|
|
1301
1207
|
/** The move the Pokémon can learn. */
|
|
1302
|
-
move: NamedAPIResource
|
|
1208
|
+
move: NamedAPIResource<Move>;
|
|
1303
1209
|
/** The details of the version in which the Pokémon can learn the move. */
|
|
1304
1210
|
version_group_details: PokemonMoveVersion[];
|
|
1305
1211
|
}
|
|
@@ -1308,9 +1214,9 @@ interface PokemonMove {
|
|
|
1308
1214
|
*/
|
|
1309
1215
|
interface PokemonMoveVersion {
|
|
1310
1216
|
/** The method by which the move is learned. */
|
|
1311
|
-
move_learn_method: NamedAPIResource
|
|
1217
|
+
move_learn_method: NamedAPIResource<MoveLearnMethod>;
|
|
1312
1218
|
/** The version group in which the move is learned. */
|
|
1313
|
-
version_group: NamedAPIResource
|
|
1219
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
1314
1220
|
/** The minimum level to learn the move. */
|
|
1315
1221
|
level_learned_at: number;
|
|
1316
1222
|
/**
|
|
@@ -1324,7 +1230,7 @@ interface PokemonMoveVersion {
|
|
|
1324
1230
|
*/
|
|
1325
1231
|
interface PokemonStat {
|
|
1326
1232
|
/** The stat the Pokémon has. */
|
|
1327
|
-
stat: NamedAPIResource
|
|
1233
|
+
stat: NamedAPIResource<Stat>;
|
|
1328
1234
|
/** The effort points (EV) the Pokémon has in the stat. */
|
|
1329
1235
|
effort: number;
|
|
1330
1236
|
/** The base value of the stat. */
|
|
@@ -1348,6 +1254,8 @@ interface VersionSprites {
|
|
|
1348
1254
|
"generation-vii": GenerationVIISprites;
|
|
1349
1255
|
/** Generation-VIII Sprites of this Pokémon. */
|
|
1350
1256
|
"generation-viii": GenerationVIIISprites;
|
|
1257
|
+
/** Generation-IX Sprites of this Pokémon. */
|
|
1258
|
+
"generation-ix": GenerationIXSprites;
|
|
1351
1259
|
}
|
|
1352
1260
|
/**
|
|
1353
1261
|
* A set of sprites used to depict this Pokémon in the game.
|
|
@@ -1397,6 +1305,8 @@ interface DreamWorld {
|
|
|
1397
1305
|
interface OfficialArtwork {
|
|
1398
1306
|
/** The default depiction of this Pokémon from the front in battle. */
|
|
1399
1307
|
front_default: string | null;
|
|
1308
|
+
/** The shiny depiction of this Pokémon from the front in battle. */
|
|
1309
|
+
front_shiny: string | null;
|
|
1400
1310
|
}
|
|
1401
1311
|
/** Home sprites. */
|
|
1402
1312
|
interface Home {
|
|
@@ -1726,6 +1636,8 @@ interface UltraSunUltraMoon {
|
|
|
1726
1636
|
interface GenerationVIIISprites {
|
|
1727
1637
|
/** Icon sprites of this Pokémon. */
|
|
1728
1638
|
icons: GenerationViiiIcons;
|
|
1639
|
+
/** Brilliant Diamond and Shining Pearl sprites of this Pokémon. */
|
|
1640
|
+
"brilliant-diamond-shining-pearl": BrilliantDiamondShiningPearl;
|
|
1729
1641
|
}
|
|
1730
1642
|
/** Generation VIII icons. */
|
|
1731
1643
|
interface GenerationViiiIcons {
|
|
@@ -1734,13 +1646,32 @@ interface GenerationViiiIcons {
|
|
|
1734
1646
|
/** The female depiction of this Pokémon from the front in battle. */
|
|
1735
1647
|
front_female: string | null;
|
|
1736
1648
|
}
|
|
1649
|
+
/** Brilliant Diamond and Shining Pearl sprites. */
|
|
1650
|
+
interface BrilliantDiamondShiningPearl {
|
|
1651
|
+
/** The default depiction of this Pokémon from the front in battle. */
|
|
1652
|
+
front_default: string | null;
|
|
1653
|
+
/** The female depiction of this Pokémon from the front in battle. */
|
|
1654
|
+
front_female: string | null;
|
|
1655
|
+
}
|
|
1656
|
+
/** Generation-IX Sprites */
|
|
1657
|
+
interface GenerationIXSprites {
|
|
1658
|
+
/** Scarlet and Violet sprites of this Pokémon. */
|
|
1659
|
+
"scarlet-violet": ScarletViolet;
|
|
1660
|
+
}
|
|
1661
|
+
/** Scarlet and Violet sprites. */
|
|
1662
|
+
interface ScarletViolet {
|
|
1663
|
+
/** The default depiction of this Pokémon from the front in battle. */
|
|
1664
|
+
front_default: string | null;
|
|
1665
|
+
/** The female depiction of this Pokémon from the front in battle. */
|
|
1666
|
+
front_female: string | null;
|
|
1667
|
+
}
|
|
1737
1668
|
/**
|
|
1738
1669
|
* ## Location Area Encounter
|
|
1739
1670
|
* Pokémon location areas where Pokémon can be found.
|
|
1740
1671
|
*/
|
|
1741
1672
|
interface LocationAreaEncounter {
|
|
1742
1673
|
/** The location area the referenced Pokémon can be encountered in. */
|
|
1743
|
-
location_area: NamedAPIResource
|
|
1674
|
+
location_area: NamedAPIResource<LocationArea>;
|
|
1744
1675
|
/** A list of versions and encounters with the referenced Pokémon that might happen. */
|
|
1745
1676
|
version_details: VersionEncounterDetail[];
|
|
1746
1677
|
}
|
|
@@ -1758,7 +1689,7 @@ interface PokemonColor {
|
|
|
1758
1689
|
/** The name of this resource listed in different languages. */
|
|
1759
1690
|
names: Name[];
|
|
1760
1691
|
/** A list of the Pokémon species that have this color. */
|
|
1761
|
-
pokemon_species: NamedAPIResource[];
|
|
1692
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
1762
1693
|
}
|
|
1763
1694
|
/**
|
|
1764
1695
|
* ## Pokémon Form
|
|
@@ -1786,11 +1717,11 @@ interface PokemonForm {
|
|
|
1786
1717
|
/** The name of this form. */
|
|
1787
1718
|
form_name: string;
|
|
1788
1719
|
/** The Pokémon that can take on this form. */
|
|
1789
|
-
pokemon: NamedAPIResource
|
|
1720
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
1790
1721
|
/** A set of sprites used to depict this Pokémon form in the game. */
|
|
1791
1722
|
sprites: PokemonFormSprites;
|
|
1792
1723
|
/** The version group this Pokémon form was introduced in. */
|
|
1793
|
-
version_group: NamedAPIResource
|
|
1724
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
1794
1725
|
/** The form specific full name of this Pokémon form, or empty if the form does not have a specific name. */
|
|
1795
1726
|
names: Name[];
|
|
1796
1727
|
/** The form specific form name of this Pokémon form, or empty if the form does not have a specific name. */
|
|
@@ -1812,7 +1743,7 @@ interface PokemonFormCondition {
|
|
|
1812
1743
|
/** What kind of resource triggers the form, e.g. `held-item` or `ability`. */
|
|
1813
1744
|
trigger: string;
|
|
1814
1745
|
/** The form the Pokémon changes from, when the condition switches between two forms. */
|
|
1815
|
-
base_form?: NamedAPIResource
|
|
1746
|
+
base_form?: NamedAPIResource<PokemonForm>;
|
|
1816
1747
|
}
|
|
1817
1748
|
/**
|
|
1818
1749
|
* Sprites used to depict this Pokémon form in the game.
|
|
@@ -1834,6 +1765,25 @@ interface PokemonFormSprites {
|
|
|
1834
1765
|
back_shiny: string | null;
|
|
1835
1766
|
/** The shiny female depiction of this Pokémon form from the back in battle. */
|
|
1836
1767
|
back_shiny_female: string | null;
|
|
1768
|
+
/** Version Sprites of this Pokémon form. */
|
|
1769
|
+
versions: PokemonFormVersionSprites;
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* Version sprites of a Pokémon form.
|
|
1773
|
+
*
|
|
1774
|
+
* Only the two generations that ship form-specific sprites appear, which is why
|
|
1775
|
+
* this is not the Pokémon-level {@link VersionSprites}.
|
|
1776
|
+
*/
|
|
1777
|
+
interface PokemonFormVersionSprites {
|
|
1778
|
+
/** Generation-VIII Sprites of this Pokémon form. */
|
|
1779
|
+
"generation-viii": PokemonFormGenerationVIIISprites;
|
|
1780
|
+
/** Generation-IX Sprites of this Pokémon form. */
|
|
1781
|
+
"generation-ix": GenerationIXSprites;
|
|
1782
|
+
}
|
|
1783
|
+
/** Generation-VIII sprites of a Pokémon form. */
|
|
1784
|
+
interface PokemonFormGenerationVIIISprites {
|
|
1785
|
+
/** Brilliant Diamond and Shining Pearl sprites of this Pokémon form. */
|
|
1786
|
+
"brilliant-diamond-shining-pearl": BrilliantDiamondShiningPearl;
|
|
1837
1787
|
}
|
|
1838
1788
|
/**
|
|
1839
1789
|
* ## Pokémon Habitat
|
|
@@ -1848,7 +1798,7 @@ interface PokemonHabitat {
|
|
|
1848
1798
|
/** The name of this resource listed in different languages. */
|
|
1849
1799
|
names: Name[];
|
|
1850
1800
|
/** A list of the Pokémon species that can be found in this habitat. */
|
|
1851
|
-
pokemon_species: NamedAPIResource[];
|
|
1801
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
1852
1802
|
}
|
|
1853
1803
|
/**
|
|
1854
1804
|
* ## Pokémon Shape
|
|
@@ -1864,7 +1814,7 @@ interface PokemonShape {
|
|
|
1864
1814
|
/** The name of this resource listed in different languages. */
|
|
1865
1815
|
names: Name[];
|
|
1866
1816
|
/** A list of the Pokémon species that have this shape. */
|
|
1867
|
-
pokemon_species: NamedAPIResource[];
|
|
1817
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
1868
1818
|
}
|
|
1869
1819
|
/**
|
|
1870
1820
|
* The "scientific" name of the Pokémon shape listed in different languages.
|
|
@@ -1873,7 +1823,7 @@ interface AwesomeName {
|
|
|
1873
1823
|
/** The localized "scientific" name for an API resource in a specific language. */
|
|
1874
1824
|
awesome_name: string;
|
|
1875
1825
|
/** The language this "scientific" name is in. */
|
|
1876
|
-
language: NamedAPIResource
|
|
1826
|
+
language: NamedAPIResource<Language>;
|
|
1877
1827
|
}
|
|
1878
1828
|
/**
|
|
1879
1829
|
* ## Pokémon Species
|
|
@@ -1907,23 +1857,23 @@ interface PokemonSpecies {
|
|
|
1907
1857
|
/** Whether or not this Pokémon has multiple forms and can switch between them. */
|
|
1908
1858
|
forms_switchable: boolean;
|
|
1909
1859
|
/** The rate at which this Pokémon species gains levels. */
|
|
1910
|
-
growth_rate: NamedAPIResource
|
|
1860
|
+
growth_rate: NamedAPIResource<GrowthRate>;
|
|
1911
1861
|
/** A list of Pokédexes and the indexes reserved within them for this Pokémon species. */
|
|
1912
1862
|
pokedex_numbers: PokemonSpeciesDexEntry[];
|
|
1913
1863
|
/** A list of egg groups this Pokémon species is a member of. */
|
|
1914
|
-
egg_groups: NamedAPIResource[];
|
|
1864
|
+
egg_groups: NamedAPIResource<EggGroup>[];
|
|
1915
1865
|
/** The color of this Pokémon for Pokédex search. */
|
|
1916
|
-
color: NamedAPIResource
|
|
1866
|
+
color: NamedAPIResource<PokemonColor>;
|
|
1917
1867
|
/** 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;
|
|
1868
|
+
shape: NamedAPIResource<PokemonShape>;
|
|
1869
|
+
/** The Pokémon species that evolves into this Pokémon species, if any. */
|
|
1870
|
+
evolves_from_species: NamedAPIResource<PokemonSpecies> | null;
|
|
1921
1871
|
/** The evolution chain this Pokémon species is a member of. */
|
|
1922
|
-
evolution_chain: APIResource
|
|
1872
|
+
evolution_chain: APIResource<EvolutionChain>;
|
|
1923
1873
|
/** The habitat this Pokémon species can be encountered in. */
|
|
1924
|
-
habitat: NamedAPIResource
|
|
1874
|
+
habitat: NamedAPIResource<PokemonHabitat>;
|
|
1925
1875
|
/** The generation this Pokémon species was introduced in. */
|
|
1926
|
-
generation: NamedAPIResource
|
|
1876
|
+
generation: NamedAPIResource<Generation>;
|
|
1927
1877
|
/** The name of this resource listed in different languages. */
|
|
1928
1878
|
names: Name[];
|
|
1929
1879
|
/** A list of encounters that can be had with this Pokémon species in pal park. */
|
|
@@ -1944,14 +1894,14 @@ interface Genus {
|
|
|
1944
1894
|
/** The localized genus for the referenced Pokémon species. */
|
|
1945
1895
|
genus: string;
|
|
1946
1896
|
/** The language this genus is in. */
|
|
1947
|
-
language: NamedAPIResource
|
|
1897
|
+
language: NamedAPIResource<Language>;
|
|
1948
1898
|
}
|
|
1949
1899
|
/** Pokédexes and the indexes reserved within them for the given Pokémon species. */
|
|
1950
1900
|
interface PokemonSpeciesDexEntry {
|
|
1951
1901
|
/** The index number within the Pokédex. */
|
|
1952
1902
|
entry_number: number;
|
|
1953
1903
|
/** The Pokédex the referenced Pokémon species can be found in. */
|
|
1954
|
-
pokedex: NamedAPIResource
|
|
1904
|
+
pokedex: NamedAPIResource<Pokedex>;
|
|
1955
1905
|
}
|
|
1956
1906
|
/**
|
|
1957
1907
|
* Encounter that can be had with the given Pokémon species in pal park.
|
|
@@ -1962,7 +1912,7 @@ interface PalParkEncounterArea {
|
|
|
1962
1912
|
/** The base rate for encountering the referenced Pokémon in this pal park area. */
|
|
1963
1913
|
rate: number;
|
|
1964
1914
|
/** The pal park area where this encounter happens. */
|
|
1965
|
-
area: NamedAPIResource
|
|
1915
|
+
area: NamedAPIResource<PalParkArea>;
|
|
1966
1916
|
}
|
|
1967
1917
|
/**
|
|
1968
1918
|
* Pokémon that exist within this Pokémon species.
|
|
@@ -1971,126 +1921,96 @@ interface PokemonSpeciesVariety {
|
|
|
1971
1921
|
/** Whether this variety is the default variety. */
|
|
1972
1922
|
is_default: boolean;
|
|
1973
1923
|
/** The Pokémon variety. */
|
|
1974
|
-
pokemon: NamedAPIResource
|
|
1924
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
1975
1925
|
}
|
|
1976
1926
|
//#endregion
|
|
1977
|
-
//#region src/models/Pokemon/
|
|
1927
|
+
//#region src/models/Pokemon/ability.d.ts
|
|
1978
1928
|
/**
|
|
1979
|
-
* ##
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1929
|
+
* ## Ability
|
|
1930
|
+
* Abilities provide passive effects for Pokémon in battle or in the overworld.
|
|
1931
|
+
* Pokémon have multiple possible abilities but can have only one ability at a time.
|
|
1932
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail.
|
|
1982
1933
|
*/
|
|
1983
|
-
interface
|
|
1934
|
+
interface Ability {
|
|
1984
1935
|
/** The identifier for this resource. */
|
|
1985
1936
|
id: number;
|
|
1986
1937
|
/** The name for this resource. */
|
|
1987
|
-
name:
|
|
1988
|
-
/**
|
|
1989
|
-
|
|
1990
|
-
/**
|
|
1991
|
-
|
|
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;
|
|
1938
|
+
name: string;
|
|
1939
|
+
/** Whether or not this ability originated in the main series of the video games. */
|
|
1940
|
+
is_main_series: boolean;
|
|
1941
|
+
/** The generation this ability originated in. */
|
|
1942
|
+
generation: NamedAPIResource<Generation>;
|
|
2000
1943
|
/** The name of this resource listed in different languages. */
|
|
2001
1944
|
names: Name[];
|
|
1945
|
+
/** The effect of this ability listed in different languages. */
|
|
1946
|
+
effect_entries: VerboseEffect[];
|
|
1947
|
+
/** The list of previous effects this ability has had across version groups. */
|
|
1948
|
+
effect_changes: AbilityEffectChange[];
|
|
1949
|
+
/** The flavor text of this ability listed in different languages. */
|
|
1950
|
+
flavor_text_entries: AbilityFlavorText[];
|
|
1951
|
+
/** A list of Pokémon that could potentially have this ability. */
|
|
1952
|
+
pokemon: AbilityPokemon[];
|
|
2002
1953
|
}
|
|
2003
1954
|
/**
|
|
2004
|
-
*
|
|
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.
|
|
2014
|
-
*/
|
|
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;
|
|
2020
|
-
}
|
|
2021
|
-
/**
|
|
2022
|
-
* A detail of moves which affect a stat positively or negatively.
|
|
2023
|
-
*/
|
|
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[];
|
|
2029
|
-
}
|
|
2030
|
-
//#endregion
|
|
2031
|
-
//#region src/models/Pokemon/type.d.ts
|
|
2032
|
-
/**
|
|
2033
|
-
* Details of Pokémon for a specific type.
|
|
1955
|
+
* Previous effects an ability has had across version groups.
|
|
2034
1956
|
*/
|
|
2035
|
-
interface
|
|
2036
|
-
/** The
|
|
2037
|
-
|
|
2038
|
-
/** The
|
|
2039
|
-
|
|
1957
|
+
interface AbilityEffectChange {
|
|
1958
|
+
/** The previous effect of this ability listed in different languages. */
|
|
1959
|
+
effect_entries: Effect[];
|
|
1960
|
+
/** The version group in which the previous effect of this ability originated. */
|
|
1961
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2040
1962
|
}
|
|
2041
1963
|
/**
|
|
2042
|
-
*
|
|
1964
|
+
* The flavor text of an ability.
|
|
2043
1965
|
*/
|
|
2044
|
-
interface
|
|
2045
|
-
/**
|
|
2046
|
-
|
|
2047
|
-
/**
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
|
|
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[];
|
|
1966
|
+
interface AbilityFlavorText {
|
|
1967
|
+
/** The localized name for an API resource in a specific language. */
|
|
1968
|
+
flavor_text: string;
|
|
1969
|
+
/** The language this text resource is in. */
|
|
1970
|
+
language: NamedAPIResource<Language>;
|
|
1971
|
+
/** The version group that uses this flavor text. */
|
|
1972
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2057
1973
|
}
|
|
2058
1974
|
/**
|
|
2059
|
-
*
|
|
1975
|
+
* Pokémon that could potentially have the given ability.
|
|
2060
1976
|
*/
|
|
2061
|
-
interface
|
|
2062
|
-
/**
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
|
|
1977
|
+
interface AbilityPokemon {
|
|
1978
|
+
/** Whether or not this is a hidden ability for the referenced Pokémon. */
|
|
1979
|
+
is_hidden: boolean;
|
|
1980
|
+
/**
|
|
1981
|
+
* Pokémon have 3 ability 'slots' which hold references to possible abilities they could have.
|
|
1982
|
+
* This is the slot of this ability for the referenced pokemon.
|
|
1983
|
+
*/
|
|
1984
|
+
slot: number;
|
|
1985
|
+
/** The Pokémon this ability could belong to. */
|
|
1986
|
+
pokemon: NamedAPIResource<Pokemon>;
|
|
2066
1987
|
}
|
|
1988
|
+
//#endregion
|
|
1989
|
+
//#region src/models/Pokemon/gender.d.ts
|
|
2067
1990
|
/**
|
|
2068
|
-
* ##
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
1991
|
+
* ## Gender
|
|
1992
|
+
* Genders were introduced in Generation II for the purposes of breeding Pokémon
|
|
1993
|
+
* but can also result in visual differences or even different evolutionary lines.
|
|
1994
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Gender) for greater detail.
|
|
2072
1995
|
*/
|
|
2073
|
-
interface
|
|
1996
|
+
interface Gender {
|
|
2074
1997
|
/** The identifier for this resource. */
|
|
2075
1998
|
id: number;
|
|
2076
1999
|
/** The name for this resource. */
|
|
2077
|
-
name:
|
|
2078
|
-
/** A
|
|
2079
|
-
|
|
2080
|
-
/** A list of
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
pokemon: TypePokemon[];
|
|
2092
|
-
/** A list of moves that have this type. */
|
|
2093
|
-
moves: NamedAPIResource[];
|
|
2000
|
+
name: "male" | "female" | "genderless";
|
|
2001
|
+
/** A list of Pokémon species that can be this gender and how likely it is that they will be. */
|
|
2002
|
+
pokemon_species_details: PokemonSpeciesGender[];
|
|
2003
|
+
/** A list of Pokémon species that required this gender in order for a Pokémon to evolve into them. */
|
|
2004
|
+
required_for_evolution: NamedAPIResource<PokemonSpecies>[];
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* Pokémon species that can be this gender and how likely it is that they will be.
|
|
2008
|
+
*/
|
|
2009
|
+
interface PokemonSpeciesGender {
|
|
2010
|
+
/** The chance of this Pokémon being female, in eighths; or -1 for genderless. */
|
|
2011
|
+
rate: number;
|
|
2012
|
+
/** A Pokémon species that can be the referenced gender. */
|
|
2013
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>;
|
|
2094
2014
|
}
|
|
2095
2015
|
//#endregion
|
|
2096
2016
|
//#region src/models/Moves/moves.d.ts
|
|
@@ -2106,7 +2026,7 @@ interface MoveTarget {
|
|
|
2106
2026
|
/** The description of this resource listed in different languages. */
|
|
2107
2027
|
descriptions: Description[];
|
|
2108
2028
|
/** A list of moves that are directed at this target. */
|
|
2109
|
-
moves: NamedAPIResource[];
|
|
2029
|
+
moves: NamedAPIResource<Move>[];
|
|
2110
2030
|
/** The name of this resource listed in different languages. */
|
|
2111
2031
|
names: Name[];
|
|
2112
2032
|
}
|
|
@@ -2124,7 +2044,7 @@ interface MoveLearnMethod {
|
|
|
2124
2044
|
/** The name of this resource listed in different languages. */
|
|
2125
2045
|
names: Name[];
|
|
2126
2046
|
/** A list of version groups where moves can be learned through this method. */
|
|
2127
|
-
version_groups: NamedAPIResource[];
|
|
2047
|
+
version_groups: NamedAPIResource<VersionGroup>[];
|
|
2128
2048
|
}
|
|
2129
2049
|
/**
|
|
2130
2050
|
* ## Move Damage Class
|
|
@@ -2138,7 +2058,7 @@ interface MoveDamageClass {
|
|
|
2138
2058
|
/** The description of this resource listed in different languages. */
|
|
2139
2059
|
descriptions: Description[];
|
|
2140
2060
|
/** A list of moves that fall into this damage class. */
|
|
2141
|
-
moves: NamedAPIResource[];
|
|
2061
|
+
moves: NamedAPIResource<Move>[];
|
|
2142
2062
|
/** The name of this resource listed in different languages. */
|
|
2143
2063
|
names: Name[];
|
|
2144
2064
|
}
|
|
@@ -2152,7 +2072,7 @@ interface MoveCategory {
|
|
|
2152
2072
|
/** The name for this resource. */
|
|
2153
2073
|
name: string;
|
|
2154
2074
|
/** A list of moves that fall into this category. */
|
|
2155
|
-
moves: NamedAPIResource[];
|
|
2075
|
+
moves: NamedAPIResource<Move>[];
|
|
2156
2076
|
/** The description of this resource listed in different languages. */
|
|
2157
2077
|
descriptions: Description[];
|
|
2158
2078
|
}
|
|
@@ -2180,7 +2100,7 @@ interface MoveAilment {
|
|
|
2180
2100
|
/** The name for this resource. */
|
|
2181
2101
|
name: string;
|
|
2182
2102
|
/** A list of moves that cause this ailment. */
|
|
2183
|
-
moves: NamedAPIResource[];
|
|
2103
|
+
moves: NamedAPIResource<Move>[];
|
|
2184
2104
|
/** The name of this resource listed in different languages. */
|
|
2185
2105
|
names: Name[];
|
|
2186
2106
|
}
|
|
@@ -2197,23 +2117,23 @@ interface PastMoveStatValues {
|
|
|
2197
2117
|
/** The effect of this move listed in different languages. */
|
|
2198
2118
|
effect_entries: VerboseEffect[];
|
|
2199
2119
|
/** The elemental type of this move. */
|
|
2200
|
-
type: NamedAPIResource | null;
|
|
2120
|
+
type: NamedAPIResource<Type> | null;
|
|
2201
2121
|
/** The version group in which these move stat values were in effect. */
|
|
2202
|
-
version_group: NamedAPIResource
|
|
2122
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2203
2123
|
}
|
|
2204
2124
|
/** A stat this move changes, and by how much. */
|
|
2205
2125
|
interface MoveStatChange {
|
|
2206
2126
|
/** The amount of change. */
|
|
2207
2127
|
change: number;
|
|
2208
2128
|
/** The stat being affected. */
|
|
2209
|
-
stat: NamedAPIResource
|
|
2129
|
+
stat: NamedAPIResource<Stat>;
|
|
2210
2130
|
}
|
|
2211
2131
|
/** Metadata about a move. */
|
|
2212
2132
|
interface MoveMetaData {
|
|
2213
2133
|
/** The status ailment this move inflicts on its target. */
|
|
2214
|
-
ailment: NamedAPIResource
|
|
2134
|
+
ailment: NamedAPIResource<MoveAilment>;
|
|
2215
2135
|
/** The category of move this move falls under, e.g. damage or ailment. */
|
|
2216
|
-
category: NamedAPIResource
|
|
2136
|
+
category: NamedAPIResource<MoveCategory>;
|
|
2217
2137
|
/** The minimum number of times this move hits. Null if it always only hits once. */
|
|
2218
2138
|
min_hits: number | null;
|
|
2219
2139
|
/** The maximum number of times this move hits. Null if it always only hits once. */
|
|
@@ -2236,94 +2156,373 @@ interface MoveMetaData {
|
|
|
2236
2156
|
stat_chance: number;
|
|
2237
2157
|
}
|
|
2238
2158
|
/**
|
|
2239
|
-
* The flavor text of this move.
|
|
2159
|
+
* The flavor text of this move.
|
|
2160
|
+
*/
|
|
2161
|
+
interface MoveFlavorText {
|
|
2162
|
+
/** The localized flavor text for an API resource in a specific language. */
|
|
2163
|
+
flavor_text: string;
|
|
2164
|
+
/** The language this name is in. */
|
|
2165
|
+
language: NamedAPIResource<Language>;
|
|
2166
|
+
/** The version group that uses this flavor text. */
|
|
2167
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2168
|
+
}
|
|
2169
|
+
/**
|
|
2170
|
+
* A detail of moves this move can be used before or after, granting additional appeal points in super contests.
|
|
2171
|
+
*/
|
|
2172
|
+
interface ContestComboDetail {
|
|
2173
|
+
/** A list of moves to use before this move. */
|
|
2174
|
+
use_before: NamedAPIResource<Move>[] | null;
|
|
2175
|
+
/** A list of moves to use after this move. */
|
|
2176
|
+
use_after: NamedAPIResource<Move>[] | null;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* A detail of normal and super contest combos that require this move.
|
|
2180
|
+
*/
|
|
2181
|
+
interface ContestComboSets {
|
|
2182
|
+
/** A detail of moves this move can be used before or after, granting additional appeal points in contests. */
|
|
2183
|
+
normal: ContestComboDetail;
|
|
2184
|
+
/** A detail of moves this move can be used before or after, granting additional appeal points in super contests. */
|
|
2185
|
+
super: ContestComboDetail;
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* ## Move
|
|
2189
|
+
* Moves are the skills of Pokémon in battle. In battle, a Pokémon uses one move each turn.
|
|
2190
|
+
* Some moves (including those learned by Hidden Machine) can be used outside of battle as well,
|
|
2191
|
+
* usually for the purpose of removing obstacles or exploring new areas.
|
|
2192
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Move) for greater detail.
|
|
2193
|
+
*/
|
|
2194
|
+
interface Move {
|
|
2195
|
+
/** The identifier for this resource. */
|
|
2196
|
+
id: number;
|
|
2197
|
+
/** The name for this resource. */
|
|
2198
|
+
name: string;
|
|
2199
|
+
/** The percent value of how likely this move is to be successful. */
|
|
2200
|
+
accuracy: number | null;
|
|
2201
|
+
/** The percent value of how likely it is this move's effect will happen. */
|
|
2202
|
+
effect_chance: number | null;
|
|
2203
|
+
/** Power points. The number of times this move can be used. */
|
|
2204
|
+
pp: number | null;
|
|
2205
|
+
/**
|
|
2206
|
+
* A value between -8 and 8. Sets the order in which moves are executed during battle.
|
|
2207
|
+
* See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Priority) for greater detail.
|
|
2208
|
+
*/
|
|
2209
|
+
priority: -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
2210
|
+
/** The base power of this move with a value of 0 if it does not have a base power. */
|
|
2211
|
+
power: number | null;
|
|
2212
|
+
/** A detail of normal and super contest combos that require this move. */
|
|
2213
|
+
contest_combos: ContestComboSets | null;
|
|
2214
|
+
/** The type of appeal this move gives a Pokémon when used in a contest. */
|
|
2215
|
+
contest_type: NamedAPIResource<ContestType> | null;
|
|
2216
|
+
/** The effect the move has when used in a contest. */
|
|
2217
|
+
contest_effect: APIResource<ContestEffect> | null;
|
|
2218
|
+
/** The type of damage the move inflicts on the target, e.g. physical. */
|
|
2219
|
+
damage_class: NamedAPIResource<MoveDamageClass> | null;
|
|
2220
|
+
/** The effect of this move listed in different languages. */
|
|
2221
|
+
effect_entries: VerboseEffect[];
|
|
2222
|
+
/** The list of previous effects this move has had across version groups of the games. */
|
|
2223
|
+
effect_changes: AbilityEffectChange[];
|
|
2224
|
+
/** The flavor text of this move listed in different languages. */
|
|
2225
|
+
flavor_text_entries: MoveFlavorText[];
|
|
2226
|
+
/** The generation in which this move was introduced. */
|
|
2227
|
+
generation: NamedAPIResource<Generation>;
|
|
2228
|
+
/** A list of the machines that teach this move. */
|
|
2229
|
+
machines: MachineVersionDetail[];
|
|
2230
|
+
/** Metadata about this move. */
|
|
2231
|
+
meta: MoveMetaData | null;
|
|
2232
|
+
/** The name of this resource listed in different languages. */
|
|
2233
|
+
names: Name[];
|
|
2234
|
+
/** A list of move resource value changes across version groups of the game. */
|
|
2235
|
+
past_values: PastMoveStatValues[];
|
|
2236
|
+
/** A list of stats this move affects and by how much. */
|
|
2237
|
+
stat_changes: MoveStatChange[];
|
|
2238
|
+
/** The effect the move has when used in a super contest. */
|
|
2239
|
+
super_contest_effect: APIResource<SuperContestEffect> | null;
|
|
2240
|
+
/** The type of target that will receive the effects of the attack. */
|
|
2241
|
+
target: NamedAPIResource<MoveTarget>;
|
|
2242
|
+
/** The elemental type of this move. */
|
|
2243
|
+
type: NamedAPIResource<Type>;
|
|
2244
|
+
/** A list of Pokémon that learned this move. */
|
|
2245
|
+
learned_by_pokemon: NamedAPIResource<Pokemon>[];
|
|
2246
|
+
}
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region src/models/Game/generation.d.ts
|
|
2249
|
+
/**
|
|
2250
|
+
* ## Generation
|
|
2251
|
+
* A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include.
|
|
2252
|
+
* In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released.
|
|
2253
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Generation) for greater detail.
|
|
2254
|
+
*/
|
|
2255
|
+
interface Generation {
|
|
2256
|
+
/** The identifier for this resource. */
|
|
2257
|
+
id: number;
|
|
2258
|
+
/** The name for this resource. */
|
|
2259
|
+
name: string;
|
|
2260
|
+
/** A list of abilities that were introduced in this generation. */
|
|
2261
|
+
abilities: NamedAPIResource<Ability>[];
|
|
2262
|
+
/** The name of this resource listed in different languages. */
|
|
2263
|
+
names: Name[];
|
|
2264
|
+
/** The main region travelled in this generation. */
|
|
2265
|
+
main_region: NamedAPIResource<Region>;
|
|
2266
|
+
/** A list of moves that were introduced in this generation. */
|
|
2267
|
+
moves: NamedAPIResource<Move>[];
|
|
2268
|
+
/** A list of Pokémon species that were introduced in this generation. */
|
|
2269
|
+
pokemon_species: NamedAPIResource<PokemonSpecies>[];
|
|
2270
|
+
/** A list of types that were introduced in this generation. */
|
|
2271
|
+
types: NamedAPIResource<Type>[];
|
|
2272
|
+
/** A list of version groups that were introduced in this generation. */
|
|
2273
|
+
version_groups: NamedAPIResource<VersionGroup>[];
|
|
2274
|
+
}
|
|
2275
|
+
//#endregion
|
|
2276
|
+
//#region src/models/Location/region.d.ts
|
|
2277
|
+
/**
|
|
2278
|
+
* ## Region
|
|
2279
|
+
* A region is an organized area of the Pokémon world.
|
|
2280
|
+
* Most often, the main difference between regions is
|
|
2281
|
+
* the species of Pokémon that can be encountered within them.
|
|
2282
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Region) for greater detail.
|
|
2283
|
+
*/
|
|
2284
|
+
type Region = {
|
|
2285
|
+
/** The identifier for this resource. */
|
|
2286
|
+
id: number;
|
|
2287
|
+
/** A list of locations that can be found in this region. */
|
|
2288
|
+
locations: NamedAPIResource<Location>[];
|
|
2289
|
+
/** The name for this resource. */
|
|
2290
|
+
name: string;
|
|
2291
|
+
/** The name of this resource listed in different languages. */
|
|
2292
|
+
names: Name[];
|
|
2293
|
+
/** The generation this region was introduced in. */
|
|
2294
|
+
main_generation: NamedAPIResource<Generation>;
|
|
2295
|
+
/** A list of Pokédexes that catalogue Pokémon in this region. */
|
|
2296
|
+
pokedexes: NamedAPIResource<Pokedex>[];
|
|
2297
|
+
/** A list of version groups where this region can be visited. */
|
|
2298
|
+
version_groups: NamedAPIResource<VersionGroup>[];
|
|
2299
|
+
};
|
|
2300
|
+
//#endregion
|
|
2301
|
+
//#region src/models/Game/version.d.ts
|
|
2302
|
+
/**
|
|
2303
|
+
* ## Version
|
|
2304
|
+
* Versions of the games, e.g. Red, Blue or Yellow.
|
|
2305
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Core_series) for greater detail.
|
|
2306
|
+
*/
|
|
2307
|
+
interface Version {
|
|
2308
|
+
/** The identifier for this resource. */
|
|
2309
|
+
id: number;
|
|
2310
|
+
/** The name for this resource. */
|
|
2311
|
+
name: string;
|
|
2312
|
+
/** The name of this resource listed in different languages. */
|
|
2313
|
+
names: Name[];
|
|
2314
|
+
/** The version group this version belongs to. */
|
|
2315
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* ## Version Group
|
|
2319
|
+
* Version groups categorize highly similar versions of the games.
|
|
2320
|
+
*/
|
|
2321
|
+
interface VersionGroup {
|
|
2322
|
+
/** The identifier for this resource. */
|
|
2323
|
+
id: number;
|
|
2324
|
+
/** The name for this resource. */
|
|
2325
|
+
name: string;
|
|
2326
|
+
/** Order for sorting. Almost by date of release, except similar versions are grouped together. */
|
|
2327
|
+
order: number;
|
|
2328
|
+
/** The generation this version was introduced in. */
|
|
2329
|
+
generation: NamedAPIResource<Generation>;
|
|
2330
|
+
/** A list of methods in which Pokémon can learn moves in this version group. */
|
|
2331
|
+
move_learn_methods: NamedAPIResource<MoveLearnMethod>[];
|
|
2332
|
+
/** A list of Pokédexes introduced in this version group. */
|
|
2333
|
+
pokedexes: NamedAPIResource<Pokedex>[];
|
|
2334
|
+
/** A list of regions that can be visited in this version group. */
|
|
2335
|
+
regions: NamedAPIResource<Region>[];
|
|
2336
|
+
/** The versions this version group owns. */
|
|
2337
|
+
versions: NamedAPIResource<Version>[];
|
|
2338
|
+
}
|
|
2339
|
+
//#endregion
|
|
2340
|
+
//#region src/models/Common/flavor-text.d.ts
|
|
2341
|
+
/**
|
|
2342
|
+
* The localized flavor text for an API resource in a specific language.
|
|
2343
|
+
*/
|
|
2344
|
+
interface FlavorText {
|
|
2345
|
+
/** The localized flavor text for an API resource in a specific language. */
|
|
2346
|
+
flavor_text: string;
|
|
2347
|
+
/** The language this name is in. */
|
|
2348
|
+
language: NamedAPIResource<Language>;
|
|
2349
|
+
/** The game version this flavor text appears in. */
|
|
2350
|
+
version: NamedAPIResource<Version>;
|
|
2351
|
+
}
|
|
2352
|
+
//#endregion
|
|
2353
|
+
//#region src/models/Common/generation.d.ts
|
|
2354
|
+
/**
|
|
2355
|
+
* The generation relevant to this game index.
|
|
2356
|
+
*/
|
|
2357
|
+
interface GenerationGameIndex {
|
|
2358
|
+
/** The internal id of an API resource within game data. */
|
|
2359
|
+
game_index: number;
|
|
2360
|
+
/** The generation relevant to this game index. */
|
|
2361
|
+
generation: NamedAPIResource<Generation>;
|
|
2362
|
+
}
|
|
2363
|
+
//#endregion
|
|
2364
|
+
//#region src/models/Machine/machine.d.ts
|
|
2365
|
+
/**
|
|
2366
|
+
* ## Machine
|
|
2367
|
+
* Machines are the representation of items that teach moves to Pokémon.
|
|
2368
|
+
* They vary from version to version, so it is not certain that one specific
|
|
2369
|
+
* [TM (Technical Machine)](https://bulbapedia.bulbagarden.net/wiki/TM) or
|
|
2370
|
+
* [HM (Hidden Machine)](https://bulbapedia.bulbagarden.net/wiki/HM) corresponds to a single Machine.
|
|
2371
|
+
*/
|
|
2372
|
+
type Machine = {
|
|
2373
|
+
/** The identifier for this resource. */
|
|
2374
|
+
id: number;
|
|
2375
|
+
/** The TM or HM item that corresponds to this machine. */
|
|
2376
|
+
item: NamedAPIResource<Item>;
|
|
2377
|
+
/** The move that is taught by this machine. */
|
|
2378
|
+
move: NamedAPIResource<Move>;
|
|
2379
|
+
/** The version group that this machine applies to. */
|
|
2380
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2381
|
+
};
|
|
2382
|
+
//#endregion
|
|
2383
|
+
//#region src/models/Common/machine.d.ts
|
|
2384
|
+
/**
|
|
2385
|
+
* The machine that teaches a move from an item.
|
|
2386
|
+
*/
|
|
2387
|
+
interface MachineVersionDetail {
|
|
2388
|
+
/** The machine that teaches a move from an item. */
|
|
2389
|
+
machine: APIResource<Machine>;
|
|
2390
|
+
/** The version group of this specific machine. */
|
|
2391
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2392
|
+
}
|
|
2393
|
+
//#endregion
|
|
2394
|
+
//#region src/models/Common/verbose.d.ts
|
|
2395
|
+
/**
|
|
2396
|
+
* The localized effect for an API resource.
|
|
2397
|
+
*/
|
|
2398
|
+
interface VerboseEffect {
|
|
2399
|
+
/** The localized effect text for an API resource in a specific language. */
|
|
2400
|
+
effect: string;
|
|
2401
|
+
/** The localized effect text in brief. */
|
|
2402
|
+
short_effect: string;
|
|
2403
|
+
/** The language this effect is in. */
|
|
2404
|
+
language: NamedAPIResource<Language>;
|
|
2405
|
+
}
|
|
2406
|
+
//#endregion
|
|
2407
|
+
//#region src/models/Common/version.d.ts
|
|
2408
|
+
/**
|
|
2409
|
+
* Encounters and their specific details.
|
|
2240
2410
|
*/
|
|
2241
|
-
interface
|
|
2242
|
-
/** The
|
|
2243
|
-
|
|
2244
|
-
/** The
|
|
2245
|
-
|
|
2246
|
-
/**
|
|
2247
|
-
|
|
2411
|
+
interface VersionEncounterDetail {
|
|
2412
|
+
/** The game version this encounter happens in. */
|
|
2413
|
+
version: NamedAPIResource<Version>;
|
|
2414
|
+
/** The total percentage of all encounter potential. */
|
|
2415
|
+
max_chance: number;
|
|
2416
|
+
/** A list of encounters and their specifics. */
|
|
2417
|
+
encounter_details: Encounter[];
|
|
2248
2418
|
}
|
|
2249
2419
|
/**
|
|
2250
|
-
*
|
|
2420
|
+
* The internal id and version of an API resource.
|
|
2251
2421
|
*/
|
|
2252
|
-
interface
|
|
2253
|
-
/**
|
|
2254
|
-
|
|
2255
|
-
/**
|
|
2256
|
-
|
|
2422
|
+
interface VersionGameIndex {
|
|
2423
|
+
/** The internal id of an API resource within game data. */
|
|
2424
|
+
game_index: number;
|
|
2425
|
+
/** The version relevant to this game index. */
|
|
2426
|
+
version: NamedAPIResource<Version>;
|
|
2257
2427
|
}
|
|
2258
2428
|
/**
|
|
2259
|
-
*
|
|
2429
|
+
* The flavor text of an API resource.
|
|
2260
2430
|
*/
|
|
2261
|
-
interface
|
|
2262
|
-
/**
|
|
2263
|
-
|
|
2264
|
-
/**
|
|
2265
|
-
|
|
2431
|
+
interface VersionGroupFlavorText {
|
|
2432
|
+
/** The localized name for an API resource in a specific language. */
|
|
2433
|
+
text: string;
|
|
2434
|
+
/** The language this name is in. */
|
|
2435
|
+
language: NamedAPIResource<Language>;
|
|
2436
|
+
/** The version group which uses this flavor text. */
|
|
2437
|
+
version_group: NamedAPIResource<VersionGroup>;
|
|
2266
2438
|
}
|
|
2439
|
+
//#endregion
|
|
2440
|
+
//#region src/models/Berry/berry.d.ts
|
|
2267
2441
|
/**
|
|
2268
|
-
* ##
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
2271
|
-
*
|
|
2272
|
-
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/
|
|
2442
|
+
* ## Berry
|
|
2443
|
+
* Berries are small fruits that can provide HP and status condition restoration,
|
|
2444
|
+
* stat enhancement, and even damage negation when eaten by Pokémon.
|
|
2445
|
+
*
|
|
2446
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.
|
|
2273
2447
|
*/
|
|
2274
|
-
|
|
2448
|
+
type Berry = {
|
|
2275
2449
|
/** The identifier for this resource. */
|
|
2276
2450
|
id: number;
|
|
2277
2451
|
/** The name for this resource. */
|
|
2278
2452
|
name: string;
|
|
2279
|
-
/**
|
|
2280
|
-
|
|
2281
|
-
/** The
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
2284
|
-
|
|
2285
|
-
/**
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
/**
|
|
2305
|
-
|
|
2306
|
-
/** The
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2453
|
+
/** 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. */
|
|
2454
|
+
growth_time: number;
|
|
2455
|
+
/** The maximum number of these berries that can grow on one tree in Generation IV. */
|
|
2456
|
+
max_harvest: number;
|
|
2457
|
+
/** The power of the move "Natural Gift" when used with this Berry. */
|
|
2458
|
+
natural_gift_power: number;
|
|
2459
|
+
/** The size of this Berry, in millimeters. */
|
|
2460
|
+
size: number;
|
|
2461
|
+
/** The smoothness of this Berry, used in making Pokéblocks or Poffins. */
|
|
2462
|
+
smoothness: number;
|
|
2463
|
+
/** The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly. */
|
|
2464
|
+
soil_dryness: number;
|
|
2465
|
+
/** The firmness of this berry, used in making Pokéblocks or Poffins. */
|
|
2466
|
+
firmness: NamedAPIResource<BerryFirmness>;
|
|
2467
|
+
/** A list of references to each flavor a berry can have and the potency of each of those flavors in regard to this berry. */
|
|
2468
|
+
flavors: BerryFlavorMap[];
|
|
2469
|
+
/** Berries are actually items. This is a reference to the item specific data for this berry. */
|
|
2470
|
+
item: NamedAPIResource<Item>;
|
|
2471
|
+
/** The type inherited by "Natural Gift" when used with this Berry. */
|
|
2472
|
+
natural_gift_type: NamedAPIResource<Type>;
|
|
2473
|
+
};
|
|
2474
|
+
/**
|
|
2475
|
+
* Reference to the flavor a berry can have and the potency of each of those flavors in regard to this berry.
|
|
2476
|
+
*/
|
|
2477
|
+
type BerryFlavorMap = {
|
|
2478
|
+
/** How powerful the referenced flavor is for this berry. */
|
|
2479
|
+
potency: number;
|
|
2480
|
+
/** The referenced berry flavor. */
|
|
2481
|
+
flavor: NamedAPIResource<BerryFlavor>;
|
|
2482
|
+
};
|
|
2483
|
+
/**
|
|
2484
|
+
* ## Berry Flavor
|
|
2485
|
+
* Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on its nature.
|
|
2486
|
+
*
|
|
2487
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.
|
|
2488
|
+
*/
|
|
2489
|
+
type BerryFlavor = {
|
|
2490
|
+
/** The identifier for this resource. */
|
|
2491
|
+
id: number;
|
|
2492
|
+
/** The name for this resource. */
|
|
2493
|
+
name: "spicy" | "dry" | "sweet" | "bitter" | "sour";
|
|
2494
|
+
/** A list of the berries with this flavor. */
|
|
2495
|
+
berries: FlavorBerryMap[];
|
|
2496
|
+
/** The contest type that correlates with this berry flavor. */
|
|
2497
|
+
contest_type: NamedAPIResource<ContestType>;
|
|
2312
2498
|
/** The name of this resource listed in different languages. */
|
|
2313
2499
|
names: Name[];
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2500
|
+
};
|
|
2501
|
+
/**
|
|
2502
|
+
* Berry with the given flavor.
|
|
2503
|
+
*/
|
|
2504
|
+
type FlavorBerryMap = {
|
|
2505
|
+
/** How powerful the referenced flavor is for this berry. */
|
|
2506
|
+
potency: number;
|
|
2507
|
+
/** The berry with the referenced flavor. */
|
|
2508
|
+
berry: NamedAPIResource<Berry>;
|
|
2509
|
+
};
|
|
2510
|
+
/**
|
|
2511
|
+
* ## Berry Firmness
|
|
2512
|
+
* Berries can be soft, very soft, hard, super hard or very hard.
|
|
2513
|
+
*
|
|
2514
|
+
* - See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.
|
|
2515
|
+
*/
|
|
2516
|
+
type BerryFirmness = {
|
|
2517
|
+
/** The identifier for this resource. */
|
|
2518
|
+
id: number;
|
|
2519
|
+
/** The name for this resource. */
|
|
2520
|
+
name: "very-soft" | "soft" | "hard" | "very-hard" | "super-hard";
|
|
2521
|
+
/** A list of the berries with this firmness. */
|
|
2522
|
+
berries: NamedAPIResource<Berry>[];
|
|
2523
|
+
/** The name of this resource listed in different languages. */
|
|
2524
|
+
names: Name[];
|
|
2525
|
+
};
|
|
2327
2526
|
//#endregion
|
|
2328
2527
|
//#region src/config/cache.d.ts
|
|
2329
2528
|
/**
|
|
@@ -2367,29 +2566,191 @@ declare class MemoryCache implements CacheStore {
|
|
|
2367
2566
|
delete(key: string): void;
|
|
2368
2567
|
clear(): void;
|
|
2369
2568
|
}
|
|
2569
|
+
/**
|
|
2570
|
+
* ## Web Storage Like
|
|
2571
|
+
* The part of the browser's `Storage` interface a {@link WebStorageCache} uses.
|
|
2572
|
+
*
|
|
2573
|
+
* Declared structurally rather than as the DOM's `Storage`: the package compiles
|
|
2574
|
+
* without `lib.dom`, and stays usable anywhere the same shape exists.
|
|
2575
|
+
*
|
|
2576
|
+
* Every method may return a promise, so a React Native `AsyncStorage` works as-is.
|
|
2577
|
+
* Key enumeration is the one place the two shapes differ: `Storage` exposes
|
|
2578
|
+
* `length` and `key(index)`, `AsyncStorage` exposes `getAllKeys`, and a property
|
|
2579
|
+
* cannot be awaited — so both are accepted, and a storage offering neither still
|
|
2580
|
+
* caches; it just never evicts or clears.
|
|
2581
|
+
*/
|
|
2582
|
+
interface WebStorageLike {
|
|
2583
|
+
getItem(key: string): string | null | Promise<string | null>;
|
|
2584
|
+
setItem(key: string, value: string): void | Promise<void>;
|
|
2585
|
+
removeItem(key: string): void | Promise<void>;
|
|
2586
|
+
/** Every key held, this store's and the application's alike. */
|
|
2587
|
+
getAllKeys?(): readonly string[] | Promise<readonly string[]>;
|
|
2588
|
+
key?(index: number): string | null;
|
|
2589
|
+
readonly length?: number;
|
|
2590
|
+
}
|
|
2591
|
+
/**
|
|
2592
|
+
* ## Web Storage Cache Options
|
|
2593
|
+
* Used to configure a store backed by `localStorage` or `sessionStorage`.
|
|
2594
|
+
*/
|
|
2595
|
+
interface WebStorageCacheOptions {
|
|
2596
|
+
/**
|
|
2597
|
+
* Where entries are kept. Pass `localStorage`, `sessionStorage`, a React Native
|
|
2598
|
+
* `AsyncStorage`, or anything else matching {@link WebStorageLike}.
|
|
2599
|
+
*/
|
|
2600
|
+
storage: WebStorageLike;
|
|
2601
|
+
/** How long a cached response stays fresh, in milliseconds. Defaults to 5 minutes. */
|
|
2602
|
+
ttl?: number;
|
|
2603
|
+
/** Namespace for the keys this store writes. Defaults to `pokenode:`. */
|
|
2604
|
+
prefix?: string;
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* ## Web Storage Cache
|
|
2608
|
+
* A {@link CacheStore} backed by `localStorage` or `sessionStorage`, so a cached
|
|
2609
|
+
* response survives a page reload.
|
|
2610
|
+
*
|
|
2611
|
+
* ```ts
|
|
2612
|
+
* const api = new PokemonClient({ cache: new WebStorageCache({ storage: localStorage }) });
|
|
2613
|
+
* ```
|
|
2614
|
+
*
|
|
2615
|
+
* Only keys under {@link WebStorageCacheOptions.prefix} are ever read, evicted or
|
|
2616
|
+
* cleared — the storage is assumed to be shared with the surrounding application.
|
|
2617
|
+
*
|
|
2618
|
+
* Values round-trip through JSON, so unlike {@link MemoryCache} every hit returns a
|
|
2619
|
+
* fresh copy. Anything a `JSON.stringify` cannot represent does not survive, which
|
|
2620
|
+
* covers every PokéAPI response.
|
|
2621
|
+
*
|
|
2622
|
+
* A storage that throws instead of answering is treated as empty: a read is a miss
|
|
2623
|
+
* and a write is dropped, because neither is worth failing the request that
|
|
2624
|
+
* triggered it over.
|
|
2625
|
+
*/
|
|
2626
|
+
declare class WebStorageCache implements CacheStore {
|
|
2627
|
+
private readonly storage;
|
|
2628
|
+
private readonly ttl;
|
|
2629
|
+
private readonly prefix;
|
|
2630
|
+
constructor(options: WebStorageCacheOptions);
|
|
2631
|
+
get(key: string): Promise<unknown>;
|
|
2632
|
+
set(key: string, value: unknown): Promise<void>;
|
|
2633
|
+
delete(key: string): Promise<void>;
|
|
2634
|
+
clear(): Promise<void>;
|
|
2635
|
+
/** Reads a namespaced key, treating unreadable content as a miss. */
|
|
2636
|
+
private read;
|
|
2637
|
+
/**
|
|
2638
|
+
* Frees space by dropping expired entries, falling back to the ones closest to
|
|
2639
|
+
* expiring when nothing has expired yet.
|
|
2640
|
+
*/
|
|
2641
|
+
private evict;
|
|
2642
|
+
/**
|
|
2643
|
+
* Collects this store's keys before any removal: `key(index)` walks a list that
|
|
2644
|
+
* shifts underneath a loop that deletes as it goes.
|
|
2645
|
+
*/
|
|
2646
|
+
private ownKeys;
|
|
2647
|
+
/**
|
|
2648
|
+
* Every key the storage holds, however it is willing to list them. A storage
|
|
2649
|
+
* offering no enumeration at all reports none, which leaves eviction and
|
|
2650
|
+
* `clear` as no-ops rather than an error on a path that only tidies up.
|
|
2651
|
+
*/
|
|
2652
|
+
private allKeys;
|
|
2653
|
+
/** Removes a key on a path that is only tidying up, where a refusal is moot. */
|
|
2654
|
+
private remove;
|
|
2655
|
+
}
|
|
2370
2656
|
//#endregion
|
|
2371
2657
|
//#region src/config/logger.d.ts
|
|
2658
|
+
/**
|
|
2659
|
+
* Fields shared by every payload.
|
|
2660
|
+
*
|
|
2661
|
+
* The text is carried twice on purpose. pino, bunyan and roarr read `msg`;
|
|
2662
|
+
* winston reads `message`. Sending both is what lets a logger from either family
|
|
2663
|
+
* be passed straight in, with no adapter to write and nothing logged as
|
|
2664
|
+
* `undefined`.
|
|
2665
|
+
*/
|
|
2666
|
+
interface LogFields {
|
|
2667
|
+
/** Which point of the request lifecycle this is, for filtering. */
|
|
2668
|
+
event: "request" | "response" | "error";
|
|
2669
|
+
msg: string;
|
|
2670
|
+
message: string;
|
|
2671
|
+
/** The request URL, with any credentials the base URL carried removed. */
|
|
2672
|
+
url: string;
|
|
2673
|
+
}
|
|
2674
|
+
/**
|
|
2675
|
+
* ## Log Request Payload
|
|
2676
|
+
* A request is about to be resolved, from cache or over the network.
|
|
2677
|
+
*/
|
|
2678
|
+
interface LogRequestPayload extends LogFields {
|
|
2679
|
+
event: "request";
|
|
2680
|
+
/** The HTTP method, uppercase, as RFC 9110 and OpenTelemetry both expect. */
|
|
2681
|
+
method: string;
|
|
2682
|
+
}
|
|
2683
|
+
/**
|
|
2684
|
+
* ## Log Response Payload
|
|
2685
|
+
* A response was produced.
|
|
2686
|
+
*/
|
|
2687
|
+
interface LogResponsePayload extends LogFields {
|
|
2688
|
+
event: "response";
|
|
2689
|
+
status: number;
|
|
2690
|
+
/**
|
|
2691
|
+
* Where the response came from.
|
|
2692
|
+
*
|
|
2693
|
+
* - `network` — a round trip was made.
|
|
2694
|
+
* - `cache` — served by the {@link CacheStore}; nothing left the process.
|
|
2695
|
+
* - `in-flight` — an identical request was already on the wire and this caller
|
|
2696
|
+
* shared it, so it made no round trip of its own.
|
|
2697
|
+
*
|
|
2698
|
+
* Counting only `network` gives the number of requests the PokéAPI actually
|
|
2699
|
+
* saw. Every caller reports, so counting all three gives the number of calls
|
|
2700
|
+
* the application made.
|
|
2701
|
+
*/
|
|
2702
|
+
source: "network" | "cache" | "in-flight";
|
|
2703
|
+
/** How long the client took to resolve the request, in milliseconds. */
|
|
2704
|
+
durationMs: number;
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* ## Log Error Payload
|
|
2708
|
+
* A request failed.
|
|
2709
|
+
*
|
|
2710
|
+
* The error is carried twice for the same reason the message is: pino runs its
|
|
2711
|
+
* error serializer on `err` and nothing else, so an `Error` under any other key
|
|
2712
|
+
* would reach the log as `{}` — no message, no stack.
|
|
2713
|
+
*/
|
|
2714
|
+
interface LogErrorPayload extends LogFields {
|
|
2715
|
+
event: "error";
|
|
2716
|
+
/** Whatever `fetch` or the API produced. */
|
|
2717
|
+
err: unknown;
|
|
2718
|
+
error: unknown;
|
|
2719
|
+
}
|
|
2372
2720
|
/**
|
|
2373
2721
|
* ## Logger
|
|
2374
|
-
*
|
|
2722
|
+
* Where a client reports what it did.
|
|
2723
|
+
*
|
|
2724
|
+
* Deliberately the shape every logging library already has, so one can be passed
|
|
2725
|
+
* without glue:
|
|
2726
|
+
*
|
|
2727
|
+
* ```ts
|
|
2728
|
+
* new PokemonClient({ logger: pino() });
|
|
2729
|
+
* new PokemonClient({ logger: console });
|
|
2730
|
+
* new PokemonClient({ logger: winston.createLogger() });
|
|
2731
|
+
* ```
|
|
2375
2732
|
*
|
|
2376
|
-
*
|
|
2377
|
-
*
|
|
2733
|
+
* Requests and responses go to `debug`; failures go to `error`. Nothing is
|
|
2734
|
+
* logged unless a logger is passed, and a client never picks a level of its own.
|
|
2378
2735
|
*/
|
|
2379
2736
|
interface Logger {
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2737
|
+
debug(payload: LogRequestPayload | LogResponsePayload): void;
|
|
2738
|
+
error(payload: LogErrorPayload): void;
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* A {@link Logger} that writes the request lifecycle to the console as one
|
|
2742
|
+
* formatted line per event.
|
|
2743
|
+
*
|
|
2744
|
+
* `console` itself is a valid {@link Logger} and logs the payload as an object;
|
|
2745
|
+
* this is for when the terminal should stay readable.
|
|
2746
|
+
*/
|
|
2388
2747
|
declare const consoleLogger: Logger;
|
|
2389
2748
|
//#endregion
|
|
2390
2749
|
//#region src/constants/base.d.ts
|
|
2391
2750
|
declare const BASE_URL: {
|
|
2392
2751
|
readonly REST: "https://pokeapi.co/api/v2";
|
|
2752
|
+
/** Root of the sprite repository the API's own sprite URLs point at. */
|
|
2753
|
+
readonly SPRITES: "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites";
|
|
2393
2754
|
};
|
|
2394
2755
|
//#endregion
|
|
2395
2756
|
//#region src/constants/berries.d.ts
|
|
@@ -3173,36 +3534,38 @@ declare class BaseClient {
|
|
|
3173
3534
|
* base's own `/api/v2` path.
|
|
3174
3535
|
*/
|
|
3175
3536
|
private request;
|
|
3537
|
+
/** Issues a request and remembers it, so a concurrent caller can share it. */
|
|
3538
|
+
private dispatch;
|
|
3176
3539
|
private fetchResource;
|
|
3540
|
+
private logResponse;
|
|
3177
3541
|
/**
|
|
3178
3542
|
* Retrieves a single resource from the PokéAPI by its endpoint and identifier.
|
|
3179
3543
|
*
|
|
3180
|
-
* @template T - The type of the resource to be returned.
|
|
3181
|
-
* @param endpoint - The endpoint of the resource.
|
|
3182
3544
|
* @param identifier - The identifier of the resource, or a path below the endpoint.
|
|
3183
3545
|
* Omit it to address the endpoint itself.
|
|
3184
|
-
* @returns A promise that resolves to the requested resource.
|
|
3185
3546
|
*/
|
|
3186
3547
|
protected getResource<T>(endpoint: Endpoint, identifier?: string | number): Promise<T>;
|
|
3187
3548
|
/**
|
|
3188
|
-
* Retrieves a resource by its URL.
|
|
3549
|
+
* Retrieves a resource by its URL, or by a link taken from another response.
|
|
3189
3550
|
*
|
|
3190
|
-
*
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
* @
|
|
3194
|
-
* @throws {TypeError} If `url` is not a valid URL, or names no endpoint under `baseURL`.
|
|
3551
|
+
* A link knows what it points at, so passing one infers `T`; a bare string
|
|
3552
|
+
* does not, and needs `T` named.
|
|
3553
|
+
*
|
|
3554
|
+
* @throws {TypeError} If the URL is not valid, or names no endpoint under `baseURL`.
|
|
3195
3555
|
*/
|
|
3196
|
-
protected getResourceByURL<T>(
|
|
3556
|
+
protected getResourceByURL<T>(resource: string | NamedAPIResource<T> | APIResource<T>, baseURL?: string): Promise<T>;
|
|
3197
3557
|
/**
|
|
3198
3558
|
* Retrieves a list of resources from the PokéAPI with pagination support.
|
|
3199
3559
|
*
|
|
3200
|
-
* @
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3560
|
+
* @template T - What the listed links resolve to.
|
|
3561
|
+
*/
|
|
3562
|
+
protected getListResource<T = unknown>(endpoint: Endpoint, offset?: number, limit?: number): Promise<NamedAPIResourceList<T>>;
|
|
3563
|
+
/**
|
|
3564
|
+
* Retrieves a list of resources that have no name to list, with pagination support.
|
|
3565
|
+
*
|
|
3566
|
+
* @template T - What the listed links resolve to.
|
|
3204
3567
|
*/
|
|
3205
|
-
protected
|
|
3568
|
+
protected getUnnamedListResource<T = unknown>(endpoint: Endpoint, offset?: number, limit?: number): Promise<APIResourceList<T>>;
|
|
3206
3569
|
}
|
|
3207
3570
|
//#endregion
|
|
3208
3571
|
//#region src/clients/berry.client.d.ts
|
|
@@ -3217,71 +3580,24 @@ declare class BaseClient {
|
|
|
3217
3580
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#berries-section)
|
|
3218
3581
|
*/
|
|
3219
3582
|
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
|
-
*/
|
|
3583
|
+
/** Get a Berry by its name. */
|
|
3225
3584
|
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
|
-
*/
|
|
3585
|
+
/** Get a Berry by its ID. */
|
|
3231
3586
|
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
|
-
*/
|
|
3587
|
+
/** Get a Berry Firmness by its ID. */
|
|
3237
3588
|
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
|
-
*/
|
|
3589
|
+
/** Get a Berry Firmness by its name. */
|
|
3243
3590
|
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
|
-
*/
|
|
3591
|
+
/** Get a Berry Flavor by its ID. */
|
|
3253
3592
|
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
|
-
*/
|
|
3593
|
+
/** Get a Berry Flavor by its name. */
|
|
3263
3594
|
getBerryFlavorByName(name: string): Promise<BerryFlavor>;
|
|
3264
|
-
/**
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
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>;
|
|
3595
|
+
/** List Berries. Page defaults to 20 entries from offset 0. */
|
|
3596
|
+
listBerries(offset?: number, limit?: number): Promise<NamedAPIResourceList<Berry>>;
|
|
3597
|
+
/** List Berry Firmnesses. Page defaults to 20 entries from offset 0. */
|
|
3598
|
+
listBerryFirmnesses(offset?: number, limit?: number): Promise<NamedAPIResourceList<BerryFirmness>>;
|
|
3599
|
+
/** List Berry Flavors. Page defaults to 20 entries from offset 0. */
|
|
3600
|
+
listBerryFlavors(offset?: number, limit?: number): Promise<NamedAPIResourceList<BerryFlavor>>;
|
|
3285
3601
|
}
|
|
3286
3602
|
//#endregion
|
|
3287
3603
|
//#region src/clients/contest.client.d.ts
|
|
@@ -3296,51 +3612,20 @@ declare class BerryClient extends BaseClient {
|
|
|
3296
3612
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#contests-section)
|
|
3297
3613
|
*/
|
|
3298
3614
|
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
|
-
*/
|
|
3615
|
+
/** Get a Contest Type by its name. */
|
|
3304
3616
|
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
|
-
*/
|
|
3617
|
+
/** Get a Contest Type by its ID. */
|
|
3310
3618
|
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
|
-
*/
|
|
3619
|
+
/** Get a Contest Effect by its ID. */
|
|
3316
3620
|
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
|
-
*/
|
|
3621
|
+
/** Get a Super Contest Effect by its ID. */
|
|
3322
3622
|
getSuperContestEffectById(id: number): Promise<SuperContestEffect>;
|
|
3323
|
-
/**
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
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>;
|
|
3623
|
+
/** List Contest Types. Page defaults to 20 entries from offset 0. */
|
|
3624
|
+
listContestTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList<ContestType>>;
|
|
3625
|
+
/** List Contest Effects. Page defaults to 20 entries from offset 0. */
|
|
3626
|
+
listContestEffects(offset?: number, limit?: number): Promise<APIResourceList<ContestEffect>>;
|
|
3627
|
+
/** List Super Contest Effects. Page defaults to 20 entries from offset 0. */
|
|
3628
|
+
listSuperContestEffects(offset?: number, limit?: number): Promise<APIResourceList<SuperContestEffect>>;
|
|
3344
3629
|
}
|
|
3345
3630
|
//#endregion
|
|
3346
3631
|
//#region src/clients/currency.client.d.ts
|
|
@@ -3353,25 +3638,12 @@ declare class ContestClient extends BaseClient {
|
|
|
3353
3638
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#currencies-section)
|
|
3354
3639
|
*/
|
|
3355
3640
|
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
|
-
*/
|
|
3641
|
+
/** Get a Currency by its name. */
|
|
3361
3642
|
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
|
-
*/
|
|
3643
|
+
/** Get a Currency by its ID. */
|
|
3367
3644
|
getCurrencyById(id: number): Promise<Currency>;
|
|
3368
|
-
/**
|
|
3369
|
-
|
|
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>;
|
|
3645
|
+
/** List Currencies. Page defaults to 20 entries from offset 0. */
|
|
3646
|
+
listCurrencies(offset?: number, limit?: number): Promise<NamedAPIResourceList<Currency>>;
|
|
3375
3647
|
}
|
|
3376
3648
|
//#endregion
|
|
3377
3649
|
//#region src/clients/encounter.client.d.ts
|
|
@@ -3386,63 +3658,24 @@ declare class CurrencyClient extends BaseClient {
|
|
|
3386
3658
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#encounters-section)
|
|
3387
3659
|
*/
|
|
3388
3660
|
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
|
-
*/
|
|
3661
|
+
/** Get an Encounter Method by its name. */
|
|
3394
3662
|
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
|
-
*/
|
|
3663
|
+
/** Get an Encounter Method by its ID. */
|
|
3400
3664
|
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
|
-
*/
|
|
3665
|
+
/** Get an Encounter Condition by its ID. */
|
|
3406
3666
|
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
|
-
*/
|
|
3667
|
+
/** Get an Encounter Condition by its name. */
|
|
3412
3668
|
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
|
-
*/
|
|
3669
|
+
/** Get an Encounter Condition Value by its name. */
|
|
3418
3670
|
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
|
-
*/
|
|
3671
|
+
/** Get an Encounter Condition Value by its ID. */
|
|
3424
3672
|
getEncounterConditionValueById(id: number): Promise<EncounterConditionValue>;
|
|
3425
|
-
/**
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
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>;
|
|
3673
|
+
/** List Encounter Methods. Page defaults to 20 entries from offset 0. */
|
|
3674
|
+
listEncounterMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterMethod>>;
|
|
3675
|
+
/** List Encounter Conditions. Page defaults to 20 entries from offset 0. */
|
|
3676
|
+
listEncounterConditions(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterCondition>>;
|
|
3677
|
+
/** List Encounter Condition Values. Page defaults to 20 entries from offset 0. */
|
|
3678
|
+
listEncounterConditionValues(offset?: number, limit?: number): Promise<NamedAPIResourceList<EncounterConditionValue>>;
|
|
3446
3679
|
}
|
|
3447
3680
|
//#endregion
|
|
3448
3681
|
//#region src/clients/evolution.client.d.ts
|
|
@@ -3456,38 +3689,16 @@ declare class EncounterClient extends BaseClient {
|
|
|
3456
3689
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#evolution-section)
|
|
3457
3690
|
*/
|
|
3458
3691
|
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
|
-
*/
|
|
3692
|
+
/** Get an Evolution Chain by its ID. */
|
|
3464
3693
|
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
|
-
*/
|
|
3694
|
+
/** Get an Evolution Trigger by its ID. */
|
|
3470
3695
|
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
|
-
*/
|
|
3696
|
+
/** Get an Evolution Trigger by its name. */
|
|
3476
3697
|
getEvolutionTriggerByName(name: string): Promise<EvolutionTrigger>;
|
|
3477
|
-
/**
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
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>;
|
|
3698
|
+
/** List Evolution Chains. Page defaults to 20 entries from offset 0. */
|
|
3699
|
+
listEvolutionChains(offset?: number, limit?: number): Promise<APIResourceList<EvolutionChain>>;
|
|
3700
|
+
/** List Evolution Triggers. Page defaults to 20 entries from offset 0. */
|
|
3701
|
+
listEvolutionTriggers(offset?: number, limit?: number): Promise<NamedAPIResourceList<EvolutionTrigger>>;
|
|
3491
3702
|
}
|
|
3492
3703
|
//#endregion
|
|
3493
3704
|
//#region src/clients/game.client.d.ts
|
|
@@ -3503,82 +3714,30 @@ declare class EvolutionClient extends BaseClient {
|
|
|
3503
3714
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#games-section)
|
|
3504
3715
|
*/
|
|
3505
3716
|
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
|
-
*/
|
|
3717
|
+
/** Get a Generation by its name. */
|
|
3511
3718
|
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
|
-
*/
|
|
3719
|
+
/** Get a Generation by its ID. */
|
|
3517
3720
|
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
|
-
*/
|
|
3721
|
+
/** Get a Pokédex by its name. */
|
|
3523
3722
|
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
|
-
*/
|
|
3723
|
+
/** Get a Pokédex by its ID. */
|
|
3529
3724
|
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
|
-
*/
|
|
3725
|
+
/** Get a Version by its name. */
|
|
3535
3726
|
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
|
-
*/
|
|
3727
|
+
/** Get a Version by its ID. */
|
|
3541
3728
|
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
|
-
*/
|
|
3729
|
+
/** Get a Version Group by its name. */
|
|
3547
3730
|
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
|
-
*/
|
|
3731
|
+
/** Get a Version Group by its ID. */
|
|
3553
3732
|
getVersionGroupById(id: number): Promise<VersionGroup>;
|
|
3554
|
-
/**
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
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>;
|
|
3733
|
+
/** List Generations. Page defaults to 20 entries from offset 0. */
|
|
3734
|
+
listGenerations(offset?: number, limit?: number): Promise<NamedAPIResourceList<Generation>>;
|
|
3735
|
+
/** List Pokédexes. Page defaults to 20 entries from offset 0. */
|
|
3736
|
+
listPokedexes(offset?: number, limit?: number): Promise<NamedAPIResourceList<Pokedex>>;
|
|
3737
|
+
/** List Versions. Page defaults to 20 entries from offset 0. */
|
|
3738
|
+
listVersions(offset?: number, limit?: number): Promise<NamedAPIResourceList<Version>>;
|
|
3739
|
+
/** List Version Groups. Page defaults to 20 entries from offset 0. */
|
|
3740
|
+
listVersionGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList<VersionGroup>>;
|
|
3582
3741
|
}
|
|
3583
3742
|
//#endregion
|
|
3584
3743
|
//#region src/clients/item.client.d.ts
|
|
@@ -3595,101 +3754,36 @@ declare class GameClient extends BaseClient {
|
|
|
3595
3754
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#items-section)
|
|
3596
3755
|
*/
|
|
3597
3756
|
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
|
-
*/
|
|
3757
|
+
/** Get an Item by its name. */
|
|
3603
3758
|
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
|
-
*/
|
|
3759
|
+
/** Get an Item by its ID. */
|
|
3609
3760
|
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
|
-
*/
|
|
3761
|
+
/** Get an Item Attribute by its name. */
|
|
3615
3762
|
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
|
-
*/
|
|
3763
|
+
/** Get an Item Attribute by its ID. */
|
|
3621
3764
|
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
|
-
*/
|
|
3765
|
+
/** Get an Item Category by its name. */
|
|
3627
3766
|
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
|
-
*/
|
|
3767
|
+
/** Get an Item Category by its ID. */
|
|
3633
3768
|
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
|
-
*/
|
|
3769
|
+
/** Get an Item Fling Effect by its name. */
|
|
3639
3770
|
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
|
-
*/
|
|
3771
|
+
/** Get an Item Fling Effect by its ID. */
|
|
3645
3772
|
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
|
-
*/
|
|
3773
|
+
/** Get an Item Pocket by its name. */
|
|
3651
3774
|
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
|
-
*/
|
|
3775
|
+
/** Get an Item Pocket by its ID. */
|
|
3657
3776
|
getItemPocketById(id: number): Promise<ItemPocket>;
|
|
3658
|
-
/**
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
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>;
|
|
3777
|
+
/** List Items. Page defaults to 20 entries from offset 0. */
|
|
3778
|
+
listItems(offset?: number, limit?: number): Promise<NamedAPIResourceList<Item>>;
|
|
3779
|
+
/** List Item Attributes. Page defaults to 20 entries from offset 0. */
|
|
3780
|
+
listItemAttributes(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemAttribute>>;
|
|
3781
|
+
/** List Item Categories. Page defaults to 20 entries from offset 0. */
|
|
3782
|
+
listItemCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemCategory>>;
|
|
3783
|
+
/** List Item Fling Effects. Page defaults to 20 entries from offset 0. */
|
|
3784
|
+
listItemFlingEffects(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemFlingEffect>>;
|
|
3785
|
+
/** List Item Pockets. Page defaults to 20 entries from offset 0. */
|
|
3786
|
+
listItemPockets(offset?: number, limit?: number): Promise<NamedAPIResourceList<ItemPocket>>;
|
|
3693
3787
|
}
|
|
3694
3788
|
//#endregion
|
|
3695
3789
|
//#region src/clients/location.client.d.ts
|
|
@@ -3705,82 +3799,30 @@ declare class ItemClient extends BaseClient {
|
|
|
3705
3799
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#locations-section)
|
|
3706
3800
|
*/
|
|
3707
3801
|
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
|
-
*/
|
|
3802
|
+
/** Get a Location by its name. */
|
|
3713
3803
|
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
|
-
*/
|
|
3804
|
+
/** Get a Location by its ID. */
|
|
3719
3805
|
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
|
-
*/
|
|
3806
|
+
/** Get a Location Area by its name. */
|
|
3725
3807
|
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
|
-
*/
|
|
3808
|
+
/** Get a Location Area by its ID. */
|
|
3731
3809
|
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
|
-
*/
|
|
3810
|
+
/** Get a Pal Park Area by its name. */
|
|
3737
3811
|
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
|
-
*/
|
|
3812
|
+
/** Get a Pal Park Area by its ID. */
|
|
3743
3813
|
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
|
-
*/
|
|
3814
|
+
/** Get a Region by its name. */
|
|
3749
3815
|
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
|
-
*/
|
|
3816
|
+
/** Get a Region by its ID. */
|
|
3755
3817
|
getRegionById(id: number): Promise<Region>;
|
|
3756
|
-
/**
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
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>;
|
|
3818
|
+
/** List Locations. Page defaults to 20 entries from offset 0. */
|
|
3819
|
+
listLocations(offset?: number, limit?: number): Promise<NamedAPIResourceList<Location>>;
|
|
3820
|
+
/** List Location Areas. Page defaults to 20 entries from offset 0. */
|
|
3821
|
+
listLocationAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList<LocationArea>>;
|
|
3822
|
+
/** List Pal Park Areas. Page defaults to 20 entries from offset 0. */
|
|
3823
|
+
listPalParkAreas(offset?: number, limit?: number): Promise<NamedAPIResourceList<PalParkArea>>;
|
|
3824
|
+
/** List Regions. Page defaults to 20 entries from offset 0. */
|
|
3825
|
+
listRegions(offset?: number, limit?: number): Promise<NamedAPIResourceList<Region>>;
|
|
3784
3826
|
}
|
|
3785
3827
|
//#endregion
|
|
3786
3828
|
//#region src/clients/machine.client.d.ts
|
|
@@ -3793,19 +3835,10 @@ declare class LocationClient extends BaseClient {
|
|
|
3793
3835
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#machines-section)
|
|
3794
3836
|
*/
|
|
3795
3837
|
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
|
-
*/
|
|
3838
|
+
/** Get a Machine by its ID. */
|
|
3801
3839
|
getMachineById(id: number): Promise<Machine>;
|
|
3802
|
-
/**
|
|
3803
|
-
|
|
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>;
|
|
3840
|
+
/** List Machines. Page defaults to 20 entries from offset 0. */
|
|
3841
|
+
listMachines(offset?: number, limit?: number): Promise<APIResourceList<Machine>>;
|
|
3809
3842
|
}
|
|
3810
3843
|
//#endregion
|
|
3811
3844
|
//#region src/clients/move.client.d.ts
|
|
@@ -3824,139 +3857,48 @@ declare class MachineClient extends BaseClient {
|
|
|
3824
3857
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#moves-section)
|
|
3825
3858
|
*/
|
|
3826
3859
|
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
|
-
*/
|
|
3860
|
+
/** Get a Move by its name. */
|
|
3832
3861
|
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
|
-
*/
|
|
3862
|
+
/** Get a Move by its ID. */
|
|
3838
3863
|
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
|
-
*/
|
|
3864
|
+
/** Get a Move Ailment by its name. */
|
|
3844
3865
|
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
|
-
*/
|
|
3866
|
+
/** Get a Move Ailment by its ID. */
|
|
3850
3867
|
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
|
-
*/
|
|
3868
|
+
/** Get a Move Battle Style by its name. */
|
|
3856
3869
|
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
|
-
*/
|
|
3870
|
+
/** Get a Move Battle Style by its ID. */
|
|
3862
3871
|
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
|
-
*/
|
|
3872
|
+
/** Get a Move Category by its name. */
|
|
3868
3873
|
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
|
-
*/
|
|
3874
|
+
/** Get a Move Category by its ID. */
|
|
3874
3875
|
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
|
-
*/
|
|
3876
|
+
/** Get a Move Damage Class by its name. */
|
|
3880
3877
|
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
|
-
*/
|
|
3878
|
+
/** Get a Move Damage Class by its ID. */
|
|
3886
3879
|
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
|
-
*/
|
|
3880
|
+
/** Get a Move Learn Method by its name. */
|
|
3892
3881
|
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
|
-
*/
|
|
3882
|
+
/** Get a Move Learn Method by its ID. */
|
|
3898
3883
|
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
|
-
*/
|
|
3884
|
+
/** Get a Move Target by its name. */
|
|
3904
3885
|
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
|
-
*/
|
|
3886
|
+
/** Get a Move Target by its ID. */
|
|
3910
3887
|
getMoveTargetById(id: number): Promise<MoveTarget>;
|
|
3911
|
-
/**
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
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>;
|
|
3888
|
+
/** List Moves. Page defaults to 20 entries from offset 0. */
|
|
3889
|
+
listMoves(offset?: number, limit?: number): Promise<NamedAPIResourceList<Move>>;
|
|
3890
|
+
/** List Move Ailments. Page defaults to 20 entries from offset 0. */
|
|
3891
|
+
listMoveAilments(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveAilment>>;
|
|
3892
|
+
/** List Move Battle Styles. Page defaults to 20 entries from offset 0. */
|
|
3893
|
+
listMoveBattleStyles(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveBattleStyle>>;
|
|
3894
|
+
/** List Move Categories. Page defaults to 20 entries from offset 0. */
|
|
3895
|
+
listMoveCategories(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveCategory>>;
|
|
3896
|
+
/** List Move Damage Classes. Page defaults to 20 entries from offset 0. */
|
|
3897
|
+
listMoveDamageClasses(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveDamageClass>>;
|
|
3898
|
+
/** List Move Learn Methods. Page defaults to 20 entries from offset 0. */
|
|
3899
|
+
listMoveLearnMethods(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveLearnMethod>>;
|
|
3900
|
+
/** List Move Targets. Page defaults to 20 entries from offset 0. */
|
|
3901
|
+
listMoveTargets(offset?: number, limit?: number): Promise<NamedAPIResourceList<MoveTarget>>;
|
|
3960
3902
|
}
|
|
3961
3903
|
//#endregion
|
|
3962
3904
|
//#region src/clients/pokemon.client.d.ts
|
|
@@ -3984,291 +3926,99 @@ declare class MoveClient extends BaseClient {
|
|
|
3984
3926
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#pokemon-section)
|
|
3985
3927
|
*/
|
|
3986
3928
|
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
|
-
*/
|
|
3929
|
+
/** Get an Ability by its name. */
|
|
3992
3930
|
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
|
-
*/
|
|
3931
|
+
/** Get an Ability by its ID. */
|
|
3998
3932
|
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
|
-
*/
|
|
3933
|
+
/** Get a Characteristic by its ID. */
|
|
4004
3934
|
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
|
-
*/
|
|
3935
|
+
/** Get an Egg Group by its name. */
|
|
4010
3936
|
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
|
-
*/
|
|
3937
|
+
/** Get an Egg Group by its ID. */
|
|
4016
3938
|
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
|
-
*/
|
|
3939
|
+
/** Get a Gender by its name. */
|
|
4022
3940
|
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
|
-
*/
|
|
3941
|
+
/** Get a Gender by its ID. */
|
|
4028
3942
|
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
|
-
*/
|
|
3943
|
+
/** Get a Growth Rate by its name. */
|
|
4034
3944
|
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
|
-
*/
|
|
3945
|
+
/** Get a Growth Rate by its ID. */
|
|
4040
3946
|
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
|
-
*/
|
|
3947
|
+
/** Get a Nature by its name. */
|
|
4046
3948
|
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
|
-
*/
|
|
3949
|
+
/** Get a Nature by its ID. */
|
|
4052
3950
|
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
|
-
*/
|
|
3951
|
+
/** Get a Pokéathlon Stat by its name. */
|
|
4058
3952
|
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
|
-
*/
|
|
3953
|
+
/** Get a Pokéathlon Stat by its ID. */
|
|
4064
3954
|
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
|
-
*/
|
|
3955
|
+
/** Get a Pokémon by its name. */
|
|
4070
3956
|
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
|
-
*/
|
|
3957
|
+
/** Get a Pokémon by its ID. */
|
|
4076
3958
|
getPokemonById(id: number): Promise<Pokemon>;
|
|
4077
3959
|
/**
|
|
4078
3960
|
* Get the areas a Pokémon can be encountered in, by its ID.
|
|
4079
|
-
* @param id The Pokémon ID.
|
|
4080
3961
|
* @returns Every location area the Pokémon appears in, with its encounter details.
|
|
4081
3962
|
*/
|
|
4082
3963
|
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
|
-
*/
|
|
3964
|
+
/** Get a Pokémon Color by its name. */
|
|
4088
3965
|
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
|
-
*/
|
|
3966
|
+
/** Get a Pokémon Color by its ID. */
|
|
4094
3967
|
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
|
-
*/
|
|
3968
|
+
/** Get a Pokémon Form by its name. */
|
|
4100
3969
|
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
|
-
*/
|
|
3970
|
+
/** Get a Pokémon Form by its ID. */
|
|
4106
3971
|
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
|
-
*/
|
|
3972
|
+
/** Get a Pokémon Habitat by its name. */
|
|
4112
3973
|
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
|
-
*/
|
|
3974
|
+
/** Get a Pokémon Habitat by its ID. */
|
|
4118
3975
|
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
|
-
*/
|
|
3976
|
+
/** Get a Pokémon Shape by its name. */
|
|
4124
3977
|
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
|
-
*/
|
|
3978
|
+
/** Get a Pokémon Shape by its ID. */
|
|
4130
3979
|
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
|
-
*/
|
|
3980
|
+
/** Get a Pokémon Species by its name. */
|
|
4136
3981
|
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
|
-
*/
|
|
3982
|
+
/** Get a Pokémon Species by its ID. */
|
|
4142
3983
|
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
|
-
*/
|
|
3984
|
+
/** Get a Stat by its name. */
|
|
4148
3985
|
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
|
-
*/
|
|
3986
|
+
/** Get a Stat by its ID. */
|
|
4154
3987
|
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
|
-
*/
|
|
3988
|
+
/** Get a Type by its name. */
|
|
4160
3989
|
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
|
-
*/
|
|
3990
|
+
/** Get a Type by its ID. */
|
|
4166
3991
|
getTypeById(id: number): Promise<Type>;
|
|
4167
|
-
/**
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
/**
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
/**
|
|
4196
|
-
|
|
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>;
|
|
3992
|
+
/** List Abilities. Page defaults to 20 entries from offset 0. */
|
|
3993
|
+
listAbilities(offset?: number, limit?: number): Promise<NamedAPIResourceList<Ability>>;
|
|
3994
|
+
/** List Characteristics. Page defaults to 20 entries from offset 0. */
|
|
3995
|
+
listCharacteristics(offset?: number, limit?: number): Promise<APIResourceList<Characteristic>>;
|
|
3996
|
+
/** List Egg Groups. Page defaults to 20 entries from offset 0. */
|
|
3997
|
+
listEggGroups(offset?: number, limit?: number): Promise<NamedAPIResourceList<EggGroup>>;
|
|
3998
|
+
/** List Genders. Page defaults to 20 entries from offset 0. */
|
|
3999
|
+
listGenders(offset?: number, limit?: number): Promise<NamedAPIResourceList<Gender>>;
|
|
4000
|
+
/** List Growth Rates. Page defaults to 20 entries from offset 0. */
|
|
4001
|
+
listGrowthRates(offset?: number, limit?: number): Promise<NamedAPIResourceList<GrowthRate>>;
|
|
4002
|
+
/** List Natures. Page defaults to 20 entries from offset 0. */
|
|
4003
|
+
listNatures(offset?: number, limit?: number): Promise<NamedAPIResourceList<Nature>>;
|
|
4004
|
+
/** List Pokéathlon Stats. Page defaults to 20 entries from offset 0. */
|
|
4005
|
+
listPokeathlonStats(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokeathlonStat>>;
|
|
4006
|
+
/** List Pokémon. Page defaults to 20 entries from offset 0. */
|
|
4007
|
+
listPokemons(offset?: number, limit?: number): Promise<NamedAPIResourceList<Pokemon>>;
|
|
4008
|
+
/** List Pokémon Colors. Page defaults to 20 entries from offset 0. */
|
|
4009
|
+
listPokemonColors(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonColor>>;
|
|
4010
|
+
/** List Pokémon Forms. Page defaults to 20 entries from offset 0. */
|
|
4011
|
+
listPokemonForms(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonForm>>;
|
|
4012
|
+
/** List Pokémon Habitats. Page defaults to 20 entries from offset 0. */
|
|
4013
|
+
listPokemonHabitats(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonHabitat>>;
|
|
4014
|
+
/** List Pokémon Shapes. Page defaults to 20 entries from offset 0. */
|
|
4015
|
+
listPokemonShapes(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonShape>>;
|
|
4016
|
+
/** List Pokémon Species. Page defaults to 20 entries from offset 0. */
|
|
4017
|
+
listPokemonSpecies(offset?: number, limit?: number): Promise<NamedAPIResourceList<PokemonSpecies>>;
|
|
4018
|
+
/** List Stats. Page defaults to 20 entries from offset 0. */
|
|
4019
|
+
listStats(offset?: number, limit?: number): Promise<NamedAPIResourceList<Stat>>;
|
|
4020
|
+
/** List Types. Page defaults to 20 entries from offset 0. */
|
|
4021
|
+
listTypes(offset?: number, limit?: number): Promise<NamedAPIResourceList<Type>>;
|
|
4272
4022
|
}
|
|
4273
4023
|
//#endregion
|
|
4274
4024
|
//#region src/clients/utility.client.d.ts
|
|
@@ -4282,32 +4032,28 @@ declare class PokemonClient extends BaseClient {
|
|
|
4282
4032
|
* See [PokéAPI Documentation](https://pokeapi.co/docs/v2#utility-section)
|
|
4283
4033
|
*/
|
|
4284
4034
|
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
|
-
*/
|
|
4035
|
+
/** Get a Language by its ID. */
|
|
4290
4036
|
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
|
-
*/
|
|
4037
|
+
/** Get a Language by its name. */
|
|
4296
4038
|
getLanguageByName(name: string): Promise<Language>;
|
|
4297
4039
|
/**
|
|
4298
|
-
* Get any resource by its URL,
|
|
4299
|
-
*
|
|
4040
|
+
* Get any resource by its URL, or by a link taken from another response.
|
|
4041
|
+
*
|
|
4042
|
+
* A link carries what it points at, so the result is typed without saying so:
|
|
4043
|
+
*
|
|
4044
|
+
* ```ts
|
|
4045
|
+
* const pokemon = await api.pokemon.getPokemonByName('luxray');
|
|
4046
|
+
* const species = await api.utility.getResourceByUrl(pokemon.species);
|
|
4047
|
+
* // ^? PokemonSpecies
|
|
4048
|
+
* ```
|
|
4049
|
+
*
|
|
4050
|
+
* @param resource The absolute URL of the resource, or a link to it.
|
|
4300
4051
|
* @returns The resource the URL points at.
|
|
4301
|
-
* @throws {TypeError} If
|
|
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.
|
|
4052
|
+
* @throws {TypeError} If the URL is not valid, or names no PokéAPI endpoint.
|
|
4309
4053
|
*/
|
|
4310
|
-
|
|
4054
|
+
getResourceByUrl<T>(resource: string | NamedAPIResource<T> | APIResource<T>): Promise<T>;
|
|
4055
|
+
/** List Languages. Page defaults to 20 entries from offset 0. */
|
|
4056
|
+
listLanguages(offset?: number, limit?: number): Promise<NamedAPIResourceList<Language>>;
|
|
4311
4057
|
}
|
|
4312
4058
|
//#endregion
|
|
4313
4059
|
//#region src/clients/main.client.d.ts
|
|
@@ -4374,5 +4120,65 @@ declare class PokenodeError extends Error {
|
|
|
4374
4120
|
static isPokenodeError(error: unknown): error is PokenodeError;
|
|
4375
4121
|
}
|
|
4376
4122
|
//#endregion
|
|
4377
|
-
|
|
4123
|
+
//#region src/utils/sprites.d.ts
|
|
4124
|
+
/**
|
|
4125
|
+
* ## Sprite Variant
|
|
4126
|
+
* The sprite sets the PokéAPI publishes for a Pokémon.
|
|
4127
|
+
*/
|
|
4128
|
+
type SpriteVariant = "default" | "official-artwork" | "home" | "dream-world" | "showdown";
|
|
4129
|
+
/**
|
|
4130
|
+
* ## Pokemon Sprite Options
|
|
4131
|
+
* Which sprite to build a URL for.
|
|
4132
|
+
*
|
|
4133
|
+
* The sets do not carry the same images, so the options are constrained per
|
|
4134
|
+
* variant: only `default` and `showdown` have back-facing sprites, and only
|
|
4135
|
+
* `official-artwork` has no gendered ones.
|
|
4136
|
+
*/
|
|
4137
|
+
type PokemonSpriteOptions = {
|
|
4138
|
+
variant?: "default";
|
|
4139
|
+
shiny?: boolean;
|
|
4140
|
+
back?: boolean;
|
|
4141
|
+
female?: boolean;
|
|
4142
|
+
} | {
|
|
4143
|
+
variant: "showdown";
|
|
4144
|
+
shiny?: boolean;
|
|
4145
|
+
back?: boolean;
|
|
4146
|
+
female?: boolean;
|
|
4147
|
+
} | {
|
|
4148
|
+
variant: "home";
|
|
4149
|
+
shiny?: boolean;
|
|
4150
|
+
female?: boolean;
|
|
4151
|
+
back?: never;
|
|
4152
|
+
} | {
|
|
4153
|
+
variant: "official-artwork";
|
|
4154
|
+
shiny?: boolean;
|
|
4155
|
+
back?: never;
|
|
4156
|
+
female?: never;
|
|
4157
|
+
} | {
|
|
4158
|
+
variant: "dream-world";
|
|
4159
|
+
female?: boolean;
|
|
4160
|
+
shiny?: never;
|
|
4161
|
+
back?: never;
|
|
4162
|
+
};
|
|
4163
|
+
/**
|
|
4164
|
+
* Builds the URL of a Pokémon sprite, without a request.
|
|
4165
|
+
*
|
|
4166
|
+
* ```ts
|
|
4167
|
+
* getPokemonSpriteUrl(25); // front, default set
|
|
4168
|
+
* getPokemonSpriteUrl(25, { variant: "official-artwork" });
|
|
4169
|
+
* getPokemonSpriteUrl(25, { variant: "showdown", back: true, shiny: true });
|
|
4170
|
+
* ```
|
|
4171
|
+
*
|
|
4172
|
+
* The sprite repository does not hold every combination for every Pokémon — a
|
|
4173
|
+
* back-facing sprite of a recent generation, or a gendered form of a species with
|
|
4174
|
+
* one appearance, simply does not exist. This builds a well-formed URL; it does
|
|
4175
|
+
* not promise the file is there.
|
|
4176
|
+
*
|
|
4177
|
+
* @param id The Pokémon ID. Names are not addressable — the sprites are keyed by ID.
|
|
4178
|
+
* @param options Which sprite set and which facing to build for.
|
|
4179
|
+
* @returns The URL of the sprite.
|
|
4180
|
+
*/
|
|
4181
|
+
declare const getPokemonSpriteUrl: (id: number, options?: PokemonSpriteOptions) => string;
|
|
4182
|
+
//#endregion
|
|
4183
|
+
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, 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, Location, LocationArea, LocationAreaEncounter, LocationClient, type LogErrorPayload, type LogRequestPayload, type LogResponsePayload, 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, PokemonFormGenerationVIIISprites, PokemonFormSprites, PokemonFormVersionSprites, PokemonHabitat, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonPastAbility, PokemonPastAbilitySlot, PokemonPastStat, PokemonPastType, PokemonShape, PokemonSpecies, PokemonSpeciesDexEntry, PokemonSpeciesGender, PokemonSpeciesVariety, PokemonSpriteOptions, PokemonSprites, PokemonStat, PokemonType, PokenodeError, REGIONS, RedBlue, Region, RubySapphire, STATS, ScarletViolet, Showdown, Silver, 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 };
|
|
4378
4184
|
//# sourceMappingURL=index.d.cts.map
|