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