pokenode-ts 2.2.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.cts CHANGED
@@ -664,6 +664,13 @@ interface Type {
664
664
  }
665
665
  //#endregion
666
666
  //#region src/models/evolution/evolution.d.ts
667
+ /**
668
+ * ## Evolution Time Of Day
669
+ * The times of day an evolution can be tied to, lower case as the API writes
670
+ * them. `dusk` is Lycanroc's Dusk Form and `full-moon` is Ursaluna, so this is
671
+ * wider than the day/night pair the endpoint documentation describes.
672
+ */
673
+ type EvolutionTimeOfDay = "day" | "night" | "dusk" | "full-moon";
667
674
  /**
668
675
  * ## Evolution Detail
669
676
  * All details regarding the specific details of the referenced Pokémon species evolution.
@@ -702,8 +709,8 @@ interface EvolutionDetail {
702
709
  party_type: NamedAPIResource<Type> | null;
703
710
  /** The required relation between the Pokémon's Attack and Defense stats. 1 means Attack > Defense. 0 means Attack = Defense. -1 means Attack < Defense. */
704
711
  relative_physical_stats: 1 | 0 | -1 | null;
705
- /** The required time of day. Day or night. */
706
- time_of_day: "Day" | "Night" | "";
712
+ /** The required time of day, or `""` when any time will do. */
713
+ time_of_day: EvolutionTimeOfDay | "";
707
714
  /** Pokémon species for which this one must be traded. */
708
715
  trade_species: NamedAPIResource<PokemonSpecies> | null;
709
716
  /** Whether or not the 3DS needs to be turned upside-down as this Pokémon levels up. */
@@ -776,6 +783,13 @@ interface EvolutionChain {
776
783
  */
777
784
  chain: ChainLink;
778
785
  }
786
+ /**
787
+ * ## Evolution Trigger Name
788
+ * Every trigger the PokéAPI publishes, in the order `/evolution-trigger` lists
789
+ * them — which is the order their ids run in, and the order
790
+ * {@link EVOLUTION_TRIGGERS} mirrors.
791
+ */
792
+ type EvolutionTriggerName = "level-up" | "trade" | "use-item" | "shed" | "spin" | "tower-of-darkness" | "tower-of-waters" | "three-critical-hits" | "take-damage" | "other" | "agile-style-move" | "strong-style-move" | "recoil-damage" | "use-move" | "three-defeated-bisharp" | "gimmighoul-coins";
779
793
  /**
780
794
  * ## Evolution Trigger
781
795
  * Evolution triggers are the events and conditions that cause a Pokémon to evolve.
@@ -789,7 +803,7 @@ interface EvolutionTrigger {
789
803
  /** The identifier for this resource. */
790
804
  id: number;
791
805
  /** The name for this resource. */
792
- name: "level-up" | "trade" | "use-item" | "shed" | "other";
806
+ name: EvolutionTriggerName;
793
807
  /** The name of this resource listed in different languages. */
794
808
  names: Name[];
795
809
  /** A list of Pokémon species that result from this evolution trigger. */
@@ -1403,6 +1417,8 @@ interface GenerationIISprites {
1403
1417
  }
1404
1418
  /** Crystal sprites. */
1405
1419
  interface Crystal {
1420
+ /** The animated sprites of this Pokémon. */
1421
+ animated: CrystalAnimated;
1406
1422
  /** The default depiction of this Pokémon from the back in battle. */
1407
1423
  back_default: string | null;
1408
1424
  /** The shiny depiction of this Pokémon from the back in battle. */
@@ -1420,6 +1436,13 @@ interface Crystal {
1420
1436
  /** The transparent depiction of this Pokémon from the front in battle. */
1421
1437
  front_transparent: string | null;
1422
1438
  }
1439
+ /** Animated Crystal sprites. */
1440
+ interface CrystalAnimated {
1441
+ /** The default depiction of this Pokémon from the front in battle. */
1442
+ front_default: string | null;
1443
+ /** The shiny depiction of this Pokémon from the front in battle. */
1444
+ front_shiny: string | null;
1445
+ }
1423
1446
  /** Gold sprites of this Pokémon. */
1424
1447
  interface Gold {
1425
1448
  /** The default depiction of this Pokémon from the back in battle. */
@@ -1554,6 +1577,8 @@ interface Platinum {
1554
1577
  interface GenerationVSprites {
1555
1578
  /** Black-white sprites of this Pokémon. */
1556
1579
  "black-white": BlackWhite;
1580
+ /** Menu icons of this Pokémon. */
1581
+ icons: GenerationVIcons;
1557
1582
  }
1558
1583
  /** Black/White sprites. */
1559
1584
  interface BlackWhite {
@@ -1595,6 +1620,18 @@ interface Animated {
1595
1620
  /** The shiny female depiction of this Pokémon from the back in battle. */
1596
1621
  front_shiny_female: string | null;
1597
1622
  }
1623
+ /** Generation-V menu icons. */
1624
+ interface GenerationVIcons {
1625
+ /** The animated menu icon of this Pokémon. */
1626
+ animated: GenerationVAnimatedIcons;
1627
+ /** The menu icon of this Pokémon. */
1628
+ front_default: string | null;
1629
+ }
1630
+ /** Animated Generation-V menu icons. */
1631
+ interface GenerationVAnimatedIcons {
1632
+ /** The animated menu icon of this Pokémon. */
1633
+ front_default: string | null;
1634
+ }
1598
1635
  /** Generation-VI Sprites. */
1599
1636
  interface GenerationVISprites {
1600
1637
  /** Omegaruby-Alphasapphire sprites of this Pokémon. */
@@ -1750,6 +1787,8 @@ interface PokemonForm {
1750
1787
  * having a specific ability. Empty for forms that are not triggered.
1751
1788
  */
1752
1789
  trigger_conditions: PokemonFormCondition[];
1790
+ /** The flavor text of this Pokémon form, in every language it is published in. */
1791
+ flavor_text_entries: FlavorText[];
1753
1792
  }
1754
1793
  /** A condition that causes a Pokémon to take on a particular form. */
1755
1794
  interface PokemonFormCondition {
@@ -2921,6 +2960,10 @@ declare const BERRIES: {
2921
2960
  readonly CUSTAP: 62;
2922
2961
  readonly JABOCA: 63;
2923
2962
  readonly ROWAP: 64;
2963
+ readonly KEE: 65;
2964
+ readonly MARANGA: 66;
2965
+ readonly HOPO: 67;
2966
+ readonly ROSELI: 68;
2924
2967
  };
2925
2968
  /** Enum of Berry Firmnesses (NAME - ID) */
2926
2969
  declare const BERRY_FIRMNESSES: {
@@ -2991,14 +3034,63 @@ declare const ENCOUNTER_METHODS: {
2991
3034
  readonly ROUGH_TERRAIN: 17;
2992
3035
  readonly GIFT: 18;
2993
3036
  readonly GIFT_EGG: 19;
2994
- readonly ONLY_ONE: 20;
3037
+ readonly STATIC: 20;
2995
3038
  readonly POKEFLUTE: 21;
2996
3039
  readonly HEADBUTT_LOW: 22;
2997
3040
  readonly HEADBUTT_NORMAL: 23;
2998
- readonly HEADBUT_HIGH: 24;
3041
+ readonly HEADBUTT_HIGH: 24;
2999
3042
  readonly SQUIRT_BOTTLE: 25;
3000
3043
  readonly WAILMER_PAIL: 26;
3001
3044
  readonly SEAWEED: 27;
3045
+ readonly ROAMING_GRASS: 28;
3046
+ readonly ROAMING_WATER: 29;
3047
+ readonly DEVON_SCOPE: 30;
3048
+ readonly FEEBAS_TILE_FISHING: 31;
3049
+ readonly ISLAND_SCAN: 32;
3050
+ readonly SOS: 33;
3051
+ readonly BUBBLING_SPOTS: 34;
3052
+ readonly BERRY_TREES: 35;
3053
+ readonly NPC_TRADE: 36;
3054
+ readonly SOS_FROM_BUBBLING_SPOT: 37;
3055
+ readonly OVERWORLD: 38;
3056
+ readonly OVERWORLD_WATER: 39;
3057
+ readonly OVERWORLD_FLYING: 40;
3058
+ readonly OVERWORLD_SPECIAL: 41;
3059
+ readonly OVERWORLD_FLYING_SPECIAL: 42;
3060
+ readonly OVERWORLD_WATER_SPECIAL: 43;
3061
+ readonly HORDE: 44;
3062
+ readonly COLOSSEUM_BONUS_DISC_US: 45;
3063
+ readonly COLOSSEUM_BONUS_DISC_JPN: 46;
3064
+ readonly POKEMON_CHANNEL_PAL: 47;
3065
+ readonly POKEMON_RANGER: 48;
3066
+ readonly POKEMON_BATTLE_REVOLUTION: 49;
3067
+ readonly NEW_YORK_POKECENTER_WISH_EGGS: 50;
3068
+ readonly SNAG: 51;
3069
+ readonly SNAG_REMATCH: 52;
3070
+ readonly POKESPOT: 53;
3071
+ readonly HIDDEN_GROTTO: 54;
3072
+ readonly HONEY_TREE: 55;
3073
+ readonly OVERWORLD_DIRT: 56;
3074
+ readonly WANDERER: 57;
3075
+ readonly WANDERER_WATER: 58;
3076
+ readonly CHASE_WATER: 59;
3077
+ readonly DYNAMAX_ADVENTURE: 60;
3078
+ readonly MAX_RAID: 61;
3079
+ readonly TRASH_CAN_AMBUSH: 62;
3080
+ readonly RUSTLING_BUSH_AMBUSH: 63;
3081
+ readonly CEILING_AMBUSH: 64;
3082
+ readonly GROUND_AMBUSH: 65;
3083
+ readonly SKY_AMBUSH: 66;
3084
+ /**
3085
+ * @deprecated Misspelled: the endpoint names this `headbutt-high`.
3086
+ * Use {@link ENCOUNTER_METHODS.HEADBUTT_HIGH}. Removed in 3.0.
3087
+ */
3088
+ readonly HEADBUT_HIGH: 24;
3089
+ /**
3090
+ * @deprecated The endpoint names this `static` now.
3091
+ * Use {@link ENCOUNTER_METHODS.STATIC}. Removed in 3.0.
3092
+ */
3093
+ readonly ONLY_ONE: 20;
3002
3094
  };
3003
3095
  declare const ENCOUNTER_CONDITIONS: {
3004
3096
  readonly SWARM: 1;
@@ -3011,6 +3103,26 @@ declare const ENCOUNTER_CONDITIONS: {
3011
3103
  readonly TV_OPTION: 8;
3012
3104
  readonly STORY_PROGRESS: 9;
3013
3105
  readonly OTHER: 10;
3106
+ readonly ITEM: 11;
3107
+ readonly WEEKDAY: 12;
3108
+ readonly FIRST_PARTY_POKEMON: 13;
3109
+ readonly SPECIAL_ENCOUNTER: 14;
3110
+ readonly TRADE: 15;
3111
+ readonly COINS: 16;
3112
+ readonly FRIEND_SAFARI_SLOT: 17;
3113
+ readonly GREAT_MARSH_DAILY_SLOT: 18;
3114
+ readonly HONEY_TREE_GROUP: 19;
3115
+ readonly HEADBUTT_TREE: 20;
3116
+ readonly BACKLOT: 21;
3117
+ readonly BUG_CATCHING_CONTEST: 22;
3118
+ readonly SAVE_DATA: 23;
3119
+ readonly ALOLAN_DIGLETT_FOUND: 24;
3120
+ readonly WEATHER: 25;
3121
+ readonly JOHTO_SAFARI_BLOCKS: 26;
3122
+ readonly MAX_DEN_RARITY: 27;
3123
+ readonly MAX_DEN_RATING: 28;
3124
+ readonly BERRY_TREE_TYPE: 29;
3125
+ readonly TRASH_CAN_TYPE: 30;
3014
3126
  };
3015
3127
  declare const ENCOUNTER_CONDITION_VALUES: {
3016
3128
  readonly SWARM_YES: 1;
@@ -3022,16 +3134,16 @@ declare const ENCOUNTER_CONDITION_VALUES: {
3022
3134
  readonly RADAR_OFF: 7;
3023
3135
  readonly SLOT2_NONE: 8;
3024
3136
  readonly SLOT2_RUBY: 9;
3025
- readonly SLOT2_SAPHIRE: 10;
3137
+ readonly SLOT2_SAPPHIRE: 10;
3026
3138
  readonly SLOT2_EMERALD: 11;
3027
3139
  readonly SLOT2_FIRERED: 12;
3028
3140
  readonly SLOT2_LEAFGREEN: 13;
3029
3141
  readonly RADIO_OFF: 14;
3030
- readonly RADIO_HOEN: 15;
3142
+ readonly RADIO_HOENN: 15;
3031
3143
  readonly RADIO_SINNOH: 16;
3032
3144
  readonly SEASON_SPRING: 17;
3033
3145
  readonly SEASON_SUMMER: 18;
3034
- readonly SWASON_AUTUMN: 19;
3146
+ readonly SEASON_AUTUMN: 19;
3035
3147
  readonly SEASON_WINTER: 20;
3036
3148
  readonly STARTER_BULBASAUR: 21;
3037
3149
  readonly STARTER_SQUIRTLE: 22;
@@ -3044,14 +3156,361 @@ declare const ENCOUNTER_CONDITION_VALUES: {
3044
3156
  readonly STORY_PROGRESS_AWAKENED_BEASTS: 29;
3045
3157
  readonly STORY_PROGRESS_BEAT_GALACTIC_CORONET: 30;
3046
3158
  readonly STORY_PROGRESS_OAK_ETERNA_CITY: 31;
3047
- readonly STORY_PROGRESS_OAK_VERMILION_COPYCAT: 32;
3159
+ readonly STORY_PROGRESS_VERMILION_COPYCAT: 32;
3048
3160
  readonly STORY_PROGRESS_MET_TORNADUS_THUNDURUS: 33;
3049
3161
  readonly STORY_PROGRESS_BEAT_ELITE_FOUR_ROUND_TWO: 34;
3050
3162
  readonly STORY_PROGRESS_HALL_OF_FAME: 35;
3051
3163
  readonly STORY_PROGRESS_NONE: 36;
3052
3164
  readonly STORY_PROGRESS_NATIONAL_DEX: 37;
3053
3165
  readonly OTHER_NONE: 38;
3166
+ readonly OTHER_SNORLAX_11_BEAT_LEAGUE: 39;
3167
+ readonly OTHER_VIRTUAL_CONSOLE: 40;
3168
+ readonly STORY_PROGRESS_CURE_ELDRITCH_NIGHTMARES: 41;
3169
+ readonly OTHER_TALK_TO_CYNTHIAS_GRANDMOTHER: 42;
3170
+ readonly ITEM_NONE: 43;
3171
+ readonly ITEM_ADAMANT_ORB: 44;
3172
+ readonly ITEM_LUSTROUS_ORB: 45;
3173
+ readonly ITEM_HELIX_FOSSIL: 46;
3174
+ readonly ITEM_DOME_FOSSIL: 47;
3175
+ readonly ITEM_OLD_AMBER: 48;
3176
+ readonly ITEM_ROOT_FOSSIL: 49;
3177
+ readonly ITEM_CLAW_FOSSIL: 50;
3178
+ readonly STORY_PROGRESS_DEFEAT_JUPITER: 51;
3179
+ readonly STORY_PROGRESS_BEAT_TEAM_GALACTIC_IRON_ISLAND: 52;
3180
+ readonly OTHER_CORRECT_PASSWORD: 53;
3181
+ readonly STORY_PROGRESS_ZEPHYR_BADGE: 54;
3182
+ readonly STORY_PROGRESS_BEAT_RED: 55;
3183
+ readonly OTHER_RECEIVED_KANTO_STARTER: 56;
3184
+ readonly STORY_PROGRESS_RECEIVE_TM_FROM_CLAIRE: 57;
3185
+ readonly OTHER_REGIROCK_REGICE_REGISTEEL_IN_PARTY: 58;
3186
+ readonly WEEKDAY_SUNDAY: 59;
3187
+ readonly WEEKDAY_MONDAY: 60;
3188
+ readonly WEEKDAY_TUESDAY: 61;
3189
+ readonly WEEKDAY_WEDNESDAY: 62;
3190
+ readonly WEEKDAY_THURSDAY: 63;
3191
+ readonly WEEKDAY_FRIDAY: 64;
3192
+ readonly WEEKDAY_SATURDAY: 65;
3193
+ readonly FIRST_PARTY_POKEMON_HIGH_FRIENDSHIP: 66;
3194
+ readonly STORY_PROGRESS_DEFEAT_MARS: 67;
3195
+ readonly ITEM_ODD_KEYSTONE: 68;
3196
+ readonly OTHER_TALKED_TO_32_PEOPLE_UNDERGROUND: 69;
3197
+ readonly STORY_PROGRESS_RETURNED_MACHINE_PART: 70;
3198
+ readonly OTHER_EVENT_ARCEUS_IN_PARTY: 71;
3199
+ readonly SPECIAL_ENCOUNTER_COULDNT_CAPTURE_BEFORE: 72;
3200
+ readonly ITEM_ICE_KEY: 73;
3201
+ readonly ITEM_IRON_KEY: 74;
3202
+ readonly STORY_PROGRESS_JUNIPER_CAVE_OF_BEING: 75;
3203
+ readonly ITEM_LUNAR_WING: 76;
3204
+ readonly STORY_PROGRESS_QUAKE_BADGE: 77;
3205
+ readonly ITEM_LIGHT_STONE: 78;
3206
+ readonly ITEM_DARK_STONE: 79;
3207
+ readonly OTHER_CAPTURED_RESHIRAM_OR_ZEKROM: 80;
3208
+ readonly DEFEATED_GHETSIS: 81;
3209
+ readonly OTHER_FOUND_11_TIMES_ROAMING: 82;
3210
+ readonly TIME_MINUTE_00_TO_19: 83;
3211
+ readonly TIME_MINUTE_20_TO_39: 84;
3212
+ readonly TIME_MINUTE_40_TO_59: 85;
3213
+ readonly TIME_04_00_TO_19_59: 86;
3214
+ readonly TIME_20_00_TO_21_59: 87;
3215
+ readonly TIME_21_00_TO_03_59: 88;
3216
+ readonly ITEM_TIDAL_BELL: 89;
3217
+ readonly ITEM_CLEAR_BELL: 90;
3218
+ readonly STORY_PROGRESS_DEFEATED_GROUDON_OR_KYOGRE: 91;
3219
+ readonly OTHER_UXIE_MESPRIT_AZELF_IN_PARTY: 92;
3220
+ readonly OTHER_NICKNAMED_COLD_ITEM_REGICE_REGIROCK_REGISTEEL3: 93;
3221
+ readonly OTHER_DIALGA_OR_PALKIA_IN_PARTY: 94;
3222
+ readonly OTHER_CASTFORM_IN_PARTY: 95;
3223
+ readonly OTHER_LEVEL_100_POKEMON_IN_PARTY: 96;
3224
+ readonly OTHER_TORNADUS_THUNDURUS_IN_PARTY: 97;
3225
+ readonly OTHER_RESHIRAM_ZEKROM_IN_PARTY: 98;
3226
+ readonly OTHER_CAPTURED_ALL_ULTRA_BEASTS: 99;
3227
+ readonly STORY_PROGRESS_FINISHED_LOOKER_SIDEQUEST: 100;
3228
+ readonly STORY_PROGRESS_BEAT_OLIVIAS_TRIAL: 101;
3229
+ readonly OTHER_RAIKOU_ENTEI_IN_PARTY: 102;
3230
+ readonly OTHER_GROUDON_KYOGRE_IN_PARTY: 103;
3231
+ readonly OTHER_DIALGA_PALKIA_IN_PARTY: 104;
3232
+ readonly OTHER_SCAN_QR_CODE: 105;
3233
+ readonly OTHER_CAUGHT_ARTICUNO: 106;
3234
+ readonly OTHER_CAUGHT_ZAPDOS: 107;
3235
+ readonly OTHER_CAUGHT_MOLTRES: 108;
3236
+ readonly TRADE_TOGEPI_OR_TOGETIC: 109;
3237
+ readonly TRADE_TRAPINCH: 110;
3238
+ readonly TRADE_SURSKIT: 111;
3239
+ readonly TRADE_WOOPER: 112;
3240
+ readonly STORY_PROGRESS_CATCH_ALL_SHADOW_POKEMON: 113;
3241
+ readonly OTHER_COMPLETE_MT_BATTLE: 114;
3242
+ readonly COINS_180: 115;
3243
+ readonly COINS_500: 116;
3244
+ readonly COINS_1200: 117;
3245
+ readonly COINS_2800: 118;
3246
+ readonly COINS_5500: 119;
3247
+ readonly COINS_9999: 120;
3248
+ readonly COINS_120: 121;
3249
+ readonly COINS_750: 122;
3250
+ readonly COINS_2500: 123;
3251
+ readonly COINS_4600: 124;
3252
+ readonly COINS_6500: 125;
3253
+ readonly COINS_230: 126;
3254
+ readonly COINS_1000: 127;
3255
+ readonly COINS_2680: 128;
3256
+ readonly COINS_3333: 129;
3257
+ readonly COINS_6666: 130;
3258
+ readonly COINS_200: 131;
3259
+ readonly COINS_700: 132;
3260
+ readonly COINS_2100: 133;
3261
+ readonly COINS_100: 134;
3262
+ readonly COINS_800: 135;
3263
+ readonly COINS_1500: 136;
3264
+ readonly COINS_2222: 137;
3265
+ readonly COINS_5555: 138;
3266
+ readonly COINS_8888: 139;
3267
+ readonly COINS_150: 140;
3268
+ readonly COINS_620: 141;
3269
+ readonly COINS_2880: 142;
3270
+ readonly COINS_5400: 143;
3271
+ readonly COINS_8300: 144;
3272
+ readonly TRADE_ABRA: 145;
3273
+ readonly TRADE_NIDORAN_M: 146;
3274
+ readonly TRADE_NIDORINO: 147;
3275
+ readonly TRADE_SLOWBRO: 148;
3276
+ readonly TRADE_POLIWHIRL: 149;
3277
+ readonly TRADE_SPEAROW: 150;
3278
+ readonly TRADE_RAICHU: 151;
3279
+ readonly TRADE_VENONAT: 152;
3280
+ readonly TRADE_PONYTA: 153;
3281
+ readonly TRADE_CLEFAIRY: 154;
3282
+ readonly TRADE_CUBONE: 155;
3283
+ readonly TRADE_LICKITUNG: 156;
3284
+ readonly TRADE_TANGELA: 157;
3285
+ readonly TRADE_GOLDUCK: 158;
3286
+ readonly TRADE_GROWLITHE: 159;
3287
+ readonly TRADE_KANGASKHAN: 160;
3288
+ readonly TRADE_BELLSPROUT: 161;
3289
+ readonly TRADE_DROWZEE: 162;
3290
+ readonly TRADE_KRABBY: 163;
3291
+ readonly TRADE_DRAGONAIR: 164;
3292
+ readonly TRADE_CHANSEY: 165;
3293
+ readonly TRADE_GLOOM: 166;
3294
+ readonly TRADE_HAUNTER: 167;
3295
+ readonly TRADE_DUGTRIO: 168;
3296
+ readonly TRADE_SLAKOTH: 169;
3297
+ readonly TRADE_PIKACHU: 170;
3298
+ readonly TRADE_BELLOSSOM: 171;
3299
+ readonly TRADE_RALTS: 172;
3300
+ readonly TRADE_VOLBEAT: 173;
3301
+ readonly TRADE_BAGON: 174;
3302
+ readonly TRADE_SKITTY: 175;
3303
+ readonly FRIEND_SAFARI_SLOT_1: 176;
3304
+ readonly FRIEND_SAFARI_SLOT_2: 177;
3305
+ readonly FRIEND_SAFARI_SLOT_3: 178;
3306
+ readonly ITEM_SKULL_FOSSIL: 179;
3307
+ readonly ITEM_ARMOR_FOSSIL: 180;
3308
+ readonly GREAT_MARSH_DAILY_SLOT_NONE: 181;
3309
+ readonly GREAT_MARSH_DAILY_SLOT_1_OF_32: 182;
3310
+ readonly GREAT_MARSH_DAILY_SLOT_2_OF_32: 183;
3311
+ readonly GREAT_MARSH_DAILY_SLOT_3_OF_32: 184;
3312
+ readonly GREAT_MARSH_DAILY_SLOT_5_OF_32: 185;
3313
+ readonly STORY_PROGRESS_BEFORE_NATIONAL_DEX: 186;
3314
+ readonly GREAT_MARSH_DAILY_SLOT_4_OF_32: 187;
3315
+ readonly GREAT_MARSH_DAILY_SLOT_15_OF_32: 188;
3316
+ readonly HONEY_TREE_GROUP_A: 189;
3317
+ readonly HONEY_TREE_GROUP_B: 190;
3318
+ readonly HONEY_TREE_GROUP_C: 191;
3319
+ readonly HEADBUTT_TREE_COMMON: 192;
3320
+ readonly HEADBUTT_TREE_RARE: 193;
3321
+ readonly HEADBUTT_TREE_SECRET: 194;
3322
+ readonly TRADE_COTTONEE: 195;
3323
+ readonly TRADE_PETILIL: 196;
3324
+ readonly TRADE_EMOLGA: 197;
3325
+ readonly TRADE_MANTINE: 198;
3326
+ readonly TRADE_DITTO: 199;
3327
+ readonly TRADE_EXCADRILL: 200;
3328
+ readonly TRADE_HIPPOWDON: 201;
3329
+ readonly BACKLOT_NOT_MENTIONED: 202;
3330
+ readonly BACKLOT_MENTIONED: 203;
3331
+ readonly BUG_CATCHING_CONTEST_NO: 204;
3332
+ readonly BUG_CATCHING_CONTEST_YES: 205;
3333
+ readonly SAVE_DATA_FROM_LETS_GO_PIKACHU: 206;
3334
+ readonly SAVE_DATA_FROM_LETS_GO_EEVEE: 207;
3335
+ readonly ITEM_FOSSILIZED_BIRD: 208;
3336
+ readonly ITEM_FOSSILIZED_DRAKE: 209;
3337
+ readonly ITEM_FOSSILIZED_DINO: 210;
3338
+ readonly ITEM_FOSSILIZED_FISH: 211;
3339
+ readonly STORY_PROGRESS_MASTER_DOJO_COMPLETE_FIRST_TRIAL: 212;
3340
+ readonly STORY_PROGRESS_MASTER_DOJO_COMPLETE_THIRD_TRIAL: 213;
3341
+ readonly ALOLAN_DIGLETT_FOUND_5: 214;
3342
+ readonly ALOLAN_DIGLETT_FOUND_10: 215;
3343
+ readonly ALOLAN_DIGLETT_FOUND_20: 216;
3344
+ readonly ALOLAN_DIGLETT_FOUND_30: 217;
3345
+ readonly ALOLAN_DIGLETT_FOUND_40: 218;
3346
+ readonly ALOLAN_DIGLETT_FOUND_50: 219;
3347
+ readonly ALOLAN_DIGLETT_FOUND_75: 220;
3348
+ readonly ALOLAN_DIGLETT_FOUND_100: 221;
3349
+ readonly ALOLAN_DIGLETT_FOUND_150: 222;
3350
+ readonly STARTER_GROOKEY: 223;
3351
+ readonly STARTER_SCORBUNNY: 224;
3352
+ readonly STARTER_SOBBLE: 225;
3353
+ readonly STORY_PROGRESS_SAVE_VILLAGE_FROM_GLASTRIER_SPECTRIER: 226;
3354
+ readonly STORY_PROGRESS_CATCH_FIVE_ULTRA_BEASTS: 227;
3355
+ readonly TRADE_BUNNELBY: 228;
3356
+ readonly TRADE_MEOWTH_GALAR: 229;
3357
+ readonly TRADE_MINCCINO: 230;
3358
+ readonly TRADE_TOXEL: 231;
3359
+ readonly TRADE_MARACTUS: 232;
3360
+ readonly TRADE_YAMASK_GALAR: 233;
3361
+ readonly TRADE_VANILLISH: 234;
3362
+ readonly TRADE_OBSTAGOON: 235;
3363
+ readonly TRADE_FROSMOTH: 236;
3364
+ readonly TRADE_FARFETCHD_GALAR: 237;
3365
+ readonly TRADE_CORSOLA_GALAR: 238;
3366
+ readonly TRADE_PONYTA_GALAR: 239;
3367
+ readonly TRADE_MR_MIME_GALAR: 240;
3368
+ readonly TRADE_DARUMAKA_GALAR: 241;
3369
+ readonly TRADE_ZIGZAGOON_GALAR: 242;
3370
+ readonly TRADE_STUNFISK_GALAR: 243;
3371
+ readonly TRADE_WEEZING_GALAR: 244;
3372
+ readonly TRADE_EXEGGUTOR: 245;
3373
+ readonly TRADE_MAROWAK: 246;
3374
+ readonly WEATHER_NORMAL: 247;
3375
+ readonly WEATHER_OVERCAST: 248;
3376
+ readonly WEATHER_RAINING: 249;
3377
+ readonly WEATHER_THUNDERSTORM: 250;
3378
+ readonly WEATHER_SNOWING: 251;
3379
+ readonly WEATHER_SNOWSTORM: 252;
3380
+ readonly WEATHER_SANDSTORM: 253;
3381
+ readonly WEATHER_INTENSE_SUN: 254;
3382
+ readonly WEATHER_FOG: 255;
3383
+ readonly STORY_PROGRESS_BEFORE_HALL_OF_FAME: 256;
3384
+ readonly JOHTO_SAFARI_BLOCKS_INACTIVE: 257;
3385
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_2: 258;
3386
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_3: 259;
3387
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_4: 260;
3388
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_5: 261;
3389
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_6: 262;
3390
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_10: 263;
3391
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_12: 264;
3392
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_14: 265;
3393
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_15: 266;
3394
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_24: 267;
3395
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_28: 268;
3396
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_35: 269;
3397
+ readonly JOHTO_SAFARI_BLOCKS_PLAINS_MIN_49: 270;
3398
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_3: 271;
3399
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_4: 272;
3400
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_5: 273;
3401
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_8: 274;
3402
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_10: 275;
3403
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_14: 276;
3404
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_15: 277;
3405
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_18: 278;
3406
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_20: 279;
3407
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_28: 280;
3408
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_35: 281;
3409
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_42: 282;
3410
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_49: 283;
3411
+ readonly JOHTO_SAFARI_BLOCKS_FOREST_MIN_56: 284;
3412
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_3: 285;
3413
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_4: 286;
3414
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_5: 287;
3415
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_6: 288;
3416
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_8: 289;
3417
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_10: 290;
3418
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_15: 291;
3419
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_21: 292;
3420
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_24: 293;
3421
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_28: 294;
3422
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_35: 295;
3423
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_42: 296;
3424
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_49: 297;
3425
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_56: 298;
3426
+ readonly JOHTO_SAFARI_BLOCKS_PEAK_MIN_63: 299;
3427
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_2: 300;
3428
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_3: 301;
3429
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_4: 302;
3430
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_5: 303;
3431
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_6: 304;
3432
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_7: 305;
3433
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_8: 306;
3434
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_9: 307;
3435
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_10: 308;
3436
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_12: 309;
3437
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_13: 310;
3438
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_14: 311;
3439
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_15: 312;
3440
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_16: 313;
3441
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_18: 314;
3442
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_20: 315;
3443
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_24: 316;
3444
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_28: 317;
3445
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_35: 318;
3446
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_42: 319;
3447
+ readonly JOHTO_SAFARI_BLOCKS_WATER_MIN_49: 320;
3448
+ readonly ITEM_COVER_FOSSIL: 321;
3449
+ readonly ITEM_PLUME_FOSSIL: 322;
3450
+ readonly OTHER_GIRATINA_NOT_CAUGHT_IN_DISTORTION_WORLD: 323;
3451
+ readonly OTHER_FIND_50_CAVERN_FOOTPRINTS: 324;
3452
+ readonly OTHER_FIND_50_GRASSLAND_FOOTPRINTS: 325;
3453
+ readonly OTHER_FIND_50_IRON_WILL_FOOTPRINTS: 326;
3454
+ readonly OTHER_REGIROCK_REGICE_REGISTEEL_REGIELEKI_REGIDRAGO_IN_PARTY: 327;
3455
+ readonly OTHER_CHOOSE_REGIELEKI_PATTERN: 328;
3456
+ readonly OTHER_CHOOSE_REGIDRAGO_PATTERN: 329;
3457
+ readonly OTHER_GROW_ICEROOT_CARROT: 330;
3458
+ readonly OTHER_GROW_SHADEROOT_CARROT: 331;
3459
+ readonly OTHER_TALKED_TO_32_PEOPLE: 332;
3460
+ readonly OTHER_EAT_CURRY_WITH_COBALION_TERRAKION_VIRIZION: 333;
3461
+ readonly ITEM_REINS_OF_UNITY: 334;
3462
+ readonly OTHER_WITNESS_GALARIAN_BIRD_FIGHT: 335;
3463
+ readonly MAX_DEN_RARITY_COMMON: 336;
3464
+ readonly MAX_DEN_RARITY_RARE: 337;
3465
+ readonly MAX_DEN_RATING_1_STAR: 338;
3466
+ readonly MAX_DEN_RATING_2_STAR: 339;
3467
+ readonly MAX_DEN_RATING_3_STAR: 340;
3468
+ readonly MAX_DEN_RATING_4_STAR: 341;
3469
+ readonly MAX_DEN_RATING_5_STAR: 342;
3470
+ readonly MAX_DEN_RARITY_SPECIAL: 343;
3471
+ readonly BERRY_TREE_TYPE_RED: 344;
3472
+ readonly BERRY_TREE_TYPE_BLUE: 345;
3473
+ readonly BERRY_TREE_TYPE_PURPLE: 346;
3474
+ readonly BERRY_TREE_TYPE_GREEN: 347;
3475
+ readonly BERRY_TREE_TYPE_YELLOW: 348;
3476
+ readonly BERRY_TREE_TYPE_PINK: 349;
3477
+ readonly TRASH_CAN_TYPE_DAILY: 350;
3478
+ readonly TRASH_CAN_TYPE_TUESDAY: 351;
3479
+ readonly TRASH_CAN_TYPE_THURSDAY: 352;
3480
+ readonly TRADE_NIDORAN_F: 353;
3481
+ readonly TRADE_NIDORINA: 354;
3482
+ readonly TRADE_MACHOP: 355;
3483
+ readonly TRADE_BUIZEL: 356;
3484
+ readonly TRADE_MEDICHAM: 357;
3485
+ readonly TRADE_FINNEON: 358;
3486
+ readonly TRADE_FORRETRESS: 359;
3487
+ readonly TRADE_BONSLY: 360;
3488
+ readonly TRADE_ANY_POKEMON: 361;
3489
+ /**
3490
+ * @deprecated Misspelled: the endpoint names this `other-snorlax-11-beat-league`.
3491
+ * Use {@link ENCOUNTER_CONDITION_VALUES.OTHER_SNORLAX_11_BEAT_LEAGUE}. Removed in 3.0.
3492
+ */
3054
3493
  readonly OTHER_SNORLAX_LL_BEAT_LEAGUE: 39;
3494
+ /**
3495
+ * @deprecated Misspelled: the endpoint names this `radio-hoenn`.
3496
+ * Use {@link ENCOUNTER_CONDITION_VALUES.RADIO_HOENN}. Removed in 3.0.
3497
+ */
3498
+ readonly RADIO_HOEN: 15;
3499
+ /**
3500
+ * @deprecated Misspelled: the endpoint names this `slot2-sapphire`.
3501
+ * Use {@link ENCOUNTER_CONDITION_VALUES.SLOT2_SAPPHIRE}. Removed in 3.0.
3502
+ */
3503
+ readonly SLOT2_SAPHIRE: 10;
3504
+ /**
3505
+ * @deprecated The endpoint names this `story-progress-vermilion-copycat` now.
3506
+ * Use {@link ENCOUNTER_CONDITION_VALUES.STORY_PROGRESS_VERMILION_COPYCAT}. Removed in 3.0.
3507
+ */
3508
+ readonly STORY_PROGRESS_OAK_VERMILION_COPYCAT: 32;
3509
+ /**
3510
+ * @deprecated Misspelled: the endpoint names this `season-autumn`.
3511
+ * Use {@link ENCOUNTER_CONDITION_VALUES.SEASON_AUTUMN}. Removed in 3.0.
3512
+ */
3513
+ readonly SWASON_AUTUMN: 19;
3055
3514
  };
3056
3515
  //#endregion
3057
3516
  //#region src/constants/endpoints.d.ts
@@ -3120,10 +3579,21 @@ declare const EVOLUTION_TRIGGERS: {
3120
3579
  readonly SHED: 4;
3121
3580
  readonly SPIN: 5;
3122
3581
  readonly TOWER_OF_DARKNESS: 6;
3123
- readonly TOWER_OF_WATER: 7;
3582
+ readonly TOWER_OF_WATERS: 7;
3124
3583
  readonly THREE_CRITICAL_HITS: 8;
3125
3584
  readonly TAKE_DAMAGE: 9;
3126
3585
  readonly OTHER: 10;
3586
+ readonly AGILE_STYLE_MOVE: 11;
3587
+ readonly STRONG_STYLE_MOVE: 12;
3588
+ readonly RECOIL_DAMAGE: 13;
3589
+ readonly USE_MOVE: 14;
3590
+ readonly THREE_DEFEATED_BISHARP: 15;
3591
+ readonly GIMMIGHOUL_COINS: 16;
3592
+ /**
3593
+ * @deprecated Misspelled: the endpoint names this trigger `tower-of-waters`.
3594
+ * Use {@link EVOLUTION_TRIGGERS.TOWER_OF_WATERS}. Removed in 3.0.
3595
+ */
3596
+ readonly TOWER_OF_WATER: 7;
3127
3597
  };
3128
3598
  //#endregion
3129
3599
  //#region src/constants/games.d.ts
@@ -3136,7 +3606,19 @@ declare const GENERATIONS: {
3136
3606
  readonly GENERATION_VI: 6;
3137
3607
  readonly GENERATION_VII: 7;
3138
3608
  readonly GENERATION_VIII: 8;
3609
+ readonly GENERATION_IX: 9;
3139
3610
  };
3611
+ /**
3612
+ * ## Generation Name
3613
+ * A generation as the PokéAPI names it, which is what a
3614
+ * `NamedAPIResource<Generation>` carries and what the helpers that resolve a
3615
+ * resource's past state are given.
3616
+ *
3617
+ * Written out rather than derived from {@link GENERATIONS}: turning
3618
+ * `GENERATION_VIII` into `generation-viii` in the type system takes a recursive
3619
+ * template literal, and the set is closed and nine long.
3620
+ */
3621
+ type GenerationName = "generation-i" | "generation-ii" | "generation-iii" | "generation-iv" | "generation-v" | "generation-vi" | "generation-vii" | "generation-viii" | "generation-ix";
3140
3622
  declare const POKEDEXES: {
3141
3623
  readonly NATIONAL: 1;
3142
3624
  readonly KANTO: 2;
@@ -3150,7 +3632,7 @@ declare const POKEDEXES: {
3150
3632
  readonly CONQUEST_GALLERY: 11;
3151
3633
  readonly KALOS_CENTRAL: 12;
3152
3634
  readonly KALOS_COASTAL: 13;
3153
- readonly KALOS_MONTAIN: 14;
3635
+ readonly KALOS_MOUNTAIN: 14;
3154
3636
  readonly UPDATED_HOENN: 15;
3155
3637
  readonly ORIGINAL_ALOLA: 16;
3156
3638
  readonly ORIGINAL_MELEMELE: 17;
@@ -3162,10 +3644,27 @@ declare const POKEDEXES: {
3162
3644
  readonly UPDATED_AKALA: 23;
3163
3645
  readonly UPDATED_ULAULA: 24;
3164
3646
  readonly UPDATED_PONI: 25;
3165
- readonly UPDATED_KANTO: 26;
3647
+ readonly LETSGO_KANTO: 26;
3166
3648
  readonly GALAR: 27;
3167
3649
  readonly ISLE_OF_ARMOR: 28;
3168
3650
  readonly CROWN_TUNDRA: 29;
3651
+ readonly HISUI: 30;
3652
+ readonly PALDEA: 31;
3653
+ readonly KITAKAMI: 32;
3654
+ readonly BLUEBERRY: 33;
3655
+ readonly LUMIOSE_CITY: 34;
3656
+ readonly HYPERSPACE: 35;
3657
+ readonly CHAMPIONS: 36;
3658
+ /**
3659
+ * @deprecated Misspelled: the endpoint names this `kalos-mountain`.
3660
+ * Use {@link POKEDEXES.KALOS_MOUNTAIN}. Removed in 3.0.
3661
+ */
3662
+ readonly KALOS_MONTAIN: 14;
3663
+ /**
3664
+ * @deprecated The endpoint names this `letsgo-kanto` now.
3665
+ * Use {@link POKEDEXES.LETSGO_KANTO}. Removed in 3.0.
3666
+ */
3667
+ readonly UPDATED_KANTO: 26;
3169
3668
  };
3170
3669
  declare const VERSIONS: {
3171
3670
  readonly RED: 1;
@@ -3202,11 +3701,35 @@ declare const VERSIONS: {
3202
3701
  readonly LETS_GO_EEVEE: 32;
3203
3702
  readonly SWORD: 33;
3204
3703
  readonly SHIELD: 34;
3205
- readonly THE_ISLE_OF_ARMOR: 35;
3206
- readonly THE_CROWN_TUNDRA: 36;
3704
+ readonly THE_ISLE_OF_ARMOR_SWORD: 35;
3705
+ readonly THE_CROWN_TUNDRA_SWORD: 36;
3207
3706
  readonly BRILLIANT_DIAMOND: 37;
3208
3707
  readonly SHINING_PEARL: 38;
3209
3708
  readonly LEGENDS_ARCEUS: 39;
3709
+ readonly SCARLET: 40;
3710
+ readonly VIOLET: 41;
3711
+ readonly THE_TEAL_MASK_SCARLET: 42;
3712
+ readonly THE_INDIGO_DISK_SCARLET: 43;
3713
+ readonly RED_JAPAN: 44;
3714
+ readonly GREEN_JAPAN: 45;
3715
+ readonly BLUE_JAPAN: 46;
3716
+ readonly LEGENDS_ZA: 47;
3717
+ readonly MEGA_DIMENSION: 48;
3718
+ readonly CHAMPIONS: 49;
3719
+ readonly THE_ISLE_OF_ARMOR_SHIELD: 50;
3720
+ readonly THE_CROWN_TUNDRA_SHIELD: 51;
3721
+ readonly THE_TEAL_MASK_VIOLET: 52;
3722
+ readonly THE_INDIGO_DISK_VIOLET: 53;
3723
+ /**
3724
+ * @deprecated The endpoint names this `the-crown-tundra-sword` now.
3725
+ * Use {@link VERSIONS.THE_CROWN_TUNDRA_SWORD}. Removed in 3.0.
3726
+ */
3727
+ readonly THE_CROWN_TUNDRA: 36;
3728
+ /**
3729
+ * @deprecated The endpoint names this `the-isle-of-armor-sword` now.
3730
+ * Use {@link VERSIONS.THE_ISLE_OF_ARMOR_SWORD}. Removed in 3.0.
3731
+ */
3732
+ readonly THE_ISLE_OF_ARMOR: 35;
3210
3733
  };
3211
3734
  declare const VERSION_GROUPS: {
3212
3735
  readonly RED_BLUE: 1;
@@ -3227,12 +3750,30 @@ declare const VERSION_GROUPS: {
3227
3750
  readonly OMEGA_RUBY_ALPHA_SAPPHIRE: 16;
3228
3751
  readonly SUN_MOON: 17;
3229
3752
  readonly ULTRA_SUN_ULTRA_MOON: 18;
3230
- readonly LETS_GO: 19;
3753
+ readonly LETS_GO_PIKACHU_LETS_GO_EEVEE: 19;
3231
3754
  readonly SWORD_SHIELD: 20;
3232
3755
  readonly THE_ISLE_OF_ARMOR: 21;
3233
3756
  readonly THE_CROWN_TUNDRA: 22;
3234
- readonly BRILLIANT_DIAMOND_AND_SHINING_PEARL: 23;
3757
+ readonly BRILLIANT_DIAMOND_SHINING_PEARL: 23;
3235
3758
  readonly LEGENDS_ARCEUS: 24;
3759
+ readonly SCARLET_VIOLET: 25;
3760
+ readonly THE_TEAL_MASK: 26;
3761
+ readonly THE_INDIGO_DISK: 27;
3762
+ readonly RED_GREEN_JAPAN: 28;
3763
+ readonly BLUE_JAPAN: 29;
3764
+ readonly LEGENDS_ZA: 30;
3765
+ readonly MEGA_DIMENSION: 31;
3766
+ readonly CHAMPIONS: 32;
3767
+ /**
3768
+ * @deprecated The endpoint names this `brilliant-diamond-shining-pearl` now.
3769
+ * Use {@link VERSION_GROUPS.BRILLIANT_DIAMOND_SHINING_PEARL}. Removed in 3.0.
3770
+ */
3771
+ readonly BRILLIANT_DIAMOND_AND_SHINING_PEARL: 23;
3772
+ /**
3773
+ * @deprecated The endpoint names this `lets-go-pikachu-lets-go-eevee` now.
3774
+ * Use {@link VERSION_GROUPS.LETS_GO_PIKACHU_LETS_GO_EEVEE}. Removed in 3.0.
3775
+ */
3776
+ readonly LETS_GO: 19;
3236
3777
  };
3237
3778
  //#endregion
3238
3779
  //#region src/constants/items.d.ts
@@ -3294,9 +3835,18 @@ declare const ITEM_CATEGORIES: {
3294
3835
  readonly Z_CRYSTALS: 46;
3295
3836
  readonly SPECIES_CANDIES: 47;
3296
3837
  readonly CATCHING_BONUS: 48;
3297
- readonly DYNAMAX_CRISTALS: 49;
3838
+ readonly DYNAMAX_CRYSTALS: 49;
3298
3839
  readonly NATURE_MINTS: 50;
3299
3840
  readonly CURRY_INGREDIENTS: 51;
3841
+ readonly TERA_SHARD: 52;
3842
+ readonly SANDWICH_INGREDIENTS: 53;
3843
+ readonly TM_MATERIALS: 54;
3844
+ readonly PICNIC: 55;
3845
+ /**
3846
+ * @deprecated Misspelled: the endpoint names this `dynamax-crystals`.
3847
+ * Use {@link ITEM_CATEGORIES.DYNAMAX_CRYSTALS}. Removed in 3.0.
3848
+ */
3849
+ readonly DYNAMAX_CRISTALS: 49;
3300
3850
  };
3301
3851
  declare const ITEM_FLING_EFFECTS: {
3302
3852
  readonly BADLY_POISON: 1;
@@ -3329,6 +3879,8 @@ declare const REGIONS: {
3329
3879
  readonly ALOLA: 7;
3330
3880
  readonly GALAR: 8;
3331
3881
  readonly HISUI: 9;
3882
+ readonly PALDEA: 10;
3883
+ readonly ORRE: 11;
3332
3884
  };
3333
3885
  declare const PAL_PARK_AREAS: {
3334
3886
  readonly FOREST: 1;
@@ -3362,6 +3914,7 @@ declare const MOVE_AILMENTS: {
3362
3914
  readonly INGRAIN: 21;
3363
3915
  readonly SILENCE: 24;
3364
3916
  readonly TAR_SHOT: 42;
3917
+ readonly PROTECT: 43;
3365
3918
  };
3366
3919
  declare const MOVE_BATTLE_STYLES: {
3367
3920
  readonly ATTACK: 1;
@@ -3400,6 +3953,8 @@ declare const MOVE_LEARN_METHODS: {
3400
3953
  readonly XD_SHADOW: 8;
3401
3954
  readonly XD_PURIFICATION: 9;
3402
3955
  readonly FORM_CHANGE: 10;
3956
+ readonly ZYGARDE_CUBE: 11;
3957
+ readonly TRAIN: 12;
3403
3958
  };
3404
3959
  declare const MOVE_TARGETS: {
3405
3960
  readonly SPECIFIC_MOVE: 1;
@@ -3414,9 +3969,15 @@ declare const MOVE_TARGETS: {
3414
3969
  readonly SELECTED_POKEMON: 10;
3415
3970
  readonly ALL_OPPONENTS: 11;
3416
3971
  readonly ENTIRE_FIELD: 12;
3417
- readonly USER_AND_ALIES: 13;
3972
+ readonly USER_AND_ALLIES: 13;
3418
3973
  readonly ALL_POKEMON: 14;
3419
3974
  readonly ALL_ALLIES: 15;
3975
+ readonly FAINTING_POKEMON: 16;
3976
+ /**
3977
+ * @deprecated Misspelled: the endpoint names this `user-and-allies`.
3978
+ * Use {@link MOVE_TARGETS.USER_AND_ALLIES}. Removed in 3.0.
3979
+ */
3980
+ readonly USER_AND_ALIES: 13;
3420
3981
  };
3421
3982
  //#endregion
3422
3983
  //#region src/constants/pokemon.d.ts
@@ -3500,12 +4061,17 @@ declare const POKEMON_HABITATS: {
3500
4061
  readonly CAVE: 1;
3501
4062
  readonly FOREST: 2;
3502
4063
  readonly GRASSLAND: 3;
3503
- readonly MONTAIN: 4;
4064
+ readonly MOUNTAIN: 4;
3504
4065
  readonly RARE: 5;
3505
4066
  readonly ROUGH_TERRAIN: 6;
3506
4067
  readonly SEA: 7;
3507
4068
  readonly URBAN: 8;
3508
4069
  readonly WATERS_EDGE: 9;
4070
+ /**
4071
+ * @deprecated Misspelled: the endpoint names this `mountain`.
4072
+ * Use {@link POKEMON_HABITATS.MOUNTAIN}. Removed in 3.0.
4073
+ */
4074
+ readonly MONTAIN: 4;
3509
4075
  };
3510
4076
  declare const POKEMON_SHAPES: {
3511
4077
  readonly BALL: 1;
@@ -3532,6 +4098,7 @@ declare const STATS: {
3532
4098
  readonly SPEED: 6;
3533
4099
  readonly ACCURACY: 7;
3534
4100
  readonly EVASION: 8;
4101
+ readonly SPECIAL: 9;
3535
4102
  };
3536
4103
  declare const TYPES: {
3537
4104
  readonly NORMAL: 1;
@@ -3552,9 +4119,26 @@ declare const TYPES: {
3552
4119
  readonly DRAGON: 16;
3553
4120
  readonly DARK: 17;
3554
4121
  readonly FAIRY: 18;
4122
+ readonly STELLAR: 19;
3555
4123
  readonly UNKNOWN: 10001;
3556
4124
  readonly SHADOW: 10002;
3557
4125
  };
4126
+ /**
4127
+ * ## Type Name
4128
+ * A battle type as the PokéAPI names it, which is what a
4129
+ * `NamedAPIResource<Type>` carries and what the type chart is keyed by.
4130
+ *
4131
+ * The eighteen types a Pokémon can be, and `stellar`, which is a Tera type and
4132
+ * nothing else. `unknown` and `shadow` are in {@link TYPES} but not here: they
4133
+ * are artefacts of Generation II's internals and of Colosseum/XD, they appear in
4134
+ * no damage relation, and a table keyed by them would be a table with two entries
4135
+ * nothing can ever fill.
4136
+ *
4137
+ * Written out rather than derived from {@link TYPES}, for the same reason
4138
+ * `GenerationName` is: the set is closed, and the two exclusions are a decision
4139
+ * rather than a transformation.
4140
+ */
4141
+ type TypeName = "normal" | "fighting" | "flying" | "poison" | "ground" | "rock" | "bug" | "ghost" | "steel" | "fire" | "water" | "grass" | "electric" | "psychic" | "ice" | "dragon" | "dark" | "fairy" | "stellar";
3558
4142
  //#endregion
3559
4143
  //#region src/constants/urls.d.ts
3560
4144
  declare const BASE_URL: {
@@ -3581,7 +4165,7 @@ declare const LANGUAGES: {
3581
4165
  readonly ES_419: 14;
3582
4166
  };
3583
4167
  declare namespace index_d_exports {
3584
- export { BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, CONTEST_TYPES, CURRENCIES, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Endpoint, GENDERS, GENERATIONS, GROWTH_RATES, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, LANGUAGES, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, NATURES, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, REGIONS, STATS, TYPES, VERSIONS, VERSION_GROUPS };
4168
+ export { BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, CONTEST_TYPES, CURRENCIES, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Endpoint, GENDERS, GENERATIONS, GROWTH_RATES, GenerationName, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, LANGUAGES, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, NATURES, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, REGIONS, STATS, TYPES, TypeName, VERSIONS, VERSION_GROUPS };
3585
4169
  }
3586
4170
  //#endregion
3587
4171
  //#region src/clients/base.d.ts
@@ -3669,6 +4253,35 @@ interface ClientOptions {
3669
4253
  */
3670
4254
  revalidate?: boolean | EtagStore;
3671
4255
  }
4256
+ /**
4257
+ * ## Client Stats
4258
+ * How many resolutions came from where, since the client was built.
4259
+ *
4260
+ * One count per `source` a {@link LogResponsePayload} reports, which is the only
4261
+ * thing that tells a cache hit from a revalidation from a real round trip once
4262
+ * the promise has settled. A failed request is counted by neither: it resolved
4263
+ * nothing, and it is the logger's `error` event that has it.
4264
+ */
4265
+ interface ClientStats {
4266
+ /** Responses downloaded in full. */
4267
+ network: number;
4268
+ /** Responses answered from the {@link CacheStore}, with no request made. */
4269
+ cache: number;
4270
+ /** Callers that joined a request already on the wire rather than repeating it. */
4271
+ inFlight: number;
4272
+ /** Responses the PokéAPI answered `304` for, served from the {@link EtagStore}. */
4273
+ revalidated: number;
4274
+ /**
4275
+ * Requests that left the process — what the PokéAPI actually saw.
4276
+ *
4277
+ * Not `network + revalidated`. A revalidation is a round trip that saved a
4278
+ * body rather than a request that never happened, so it is in here; and a
4279
+ * resolution the `retry` option attempted three times is one `network` and
4280
+ * three of these. The attempts are the half a caller cannot see, and they are
4281
+ * the half that shows up in someone else's rate limit.
4282
+ */
4283
+ roundTrips: number;
4284
+ }
3672
4285
  /**
3673
4286
  * ## List Page
3674
4287
  * The part of a resource list a walk needs: how much there is, and this page of
@@ -3734,6 +4347,41 @@ declare abstract class ClientFacade {
3734
4347
  constructor(options?: ClientOptions);
3735
4348
  /** The store backing this client, or `undefined` when caching is disabled. */
3736
4349
  get cache(): CacheStore | undefined;
4350
+ /**
4351
+ * How many resolutions came from where.
4352
+ *
4353
+ * ```ts
4354
+ * await api.pokemon.getPokemonByName('luxray');
4355
+ * await api.pokemon.getPokemonByName('luxray');
4356
+ *
4357
+ * api.stats; // { network: 1, cache: 1, inFlight: 0, revalidated: 0, roundTrips: 1 }
4358
+ * ```
4359
+ *
4360
+ * The counts are the transport's, so they cover every section of a
4361
+ * {@link MainClient} and every client derived with {@link ClientFacade.with} —
4362
+ * the same sharing that makes one cache serve all of them.
4363
+ *
4364
+ * A snapshot, read at the moment it is asked for. Keeping one to compare
4365
+ * against later means keeping the object, not the client.
4366
+ */
4367
+ get stats(): ClientStats;
4368
+ /**
4369
+ * What has been counted since `snapshot` was taken.
4370
+ *
4371
+ * ```ts
4372
+ * const before = api.stats;
4373
+ * await renderTeam();
4374
+ *
4375
+ * api.statsSince(before).roundTrips; // what that render cost
4376
+ * ```
4377
+ *
4378
+ * There is no way to reset the counts, and this is why: the transport behind
4379
+ * them is shared by every section of a {@link MainClient} and by every client
4380
+ * derived with {@link ClientFacade.with}, so zeroing it for one measurement
4381
+ * zeroes it for whatever else is measuring. Subtraction is the same answer
4382
+ * without the shared mutation.
4383
+ */
4384
+ statsSince(snapshot: ClientStats): ClientStats;
3737
4385
  /**
3738
4386
  * Derives a client whose requests carry a signal, a timeout, or both.
3739
4387
  *
@@ -4448,6 +5096,316 @@ declare class PokenodeError extends Error {
4448
5096
  static isPokenodeError(error: unknown): error is PokenodeError;
4449
5097
  }
4450
5098
  //#endregion
5099
+ //#region src/utils/evolution.d.ts
5100
+ /**
5101
+ * ## Evolution Step
5102
+ * One edge of an evolution chain: a species, what it evolves into, and every way
5103
+ * that happens.
5104
+ */
5105
+ interface EvolutionStep {
5106
+ /** The species that evolves. */
5107
+ from: NamedAPIResource<PokemonSpecies>;
5108
+ /** What it evolves into. */
5109
+ to: NamedAPIResource<PokemonSpecies>;
5110
+ /**
5111
+ * The ways this step happens, which are alternatives rather than a sequence —
5112
+ * the API publishes one per version group, so Leafeon carries five mossy-rock
5113
+ * locations and a Leaf Stone. Never empty.
5114
+ */
5115
+ details: EvolutionDetail[];
5116
+ /** How deep in the chain this step sits: `1` for a first evolution. */
5117
+ depth: number;
5118
+ /** Whether {@link EvolutionStep.to} is a baby Pokémon. */
5119
+ isBaby: boolean;
5120
+ }
5121
+ /**
5122
+ * ## Flatten Options
5123
+ * How {@link flattenChain} narrows the chain it walks.
5124
+ */
5125
+ interface FlattenOptions {
5126
+ /**
5127
+ * Keep only the details tagged with this version group, by the name the API
5128
+ * gives it — `sword-shield`, not `Sword/Shield` — and drop the steps left with
5129
+ * none. The tag is the game that introduced the method, not every game it
5130
+ * applies in — see {@link flattenChain}.
5131
+ */
5132
+ versionGroup?: string;
5133
+ }
5134
+ /**
5135
+ * Flattens an evolution chain into one step per evolution, depth-first in the
5136
+ * order the API lists them.
5137
+ *
5138
+ * ```ts
5139
+ * const species = await api.pokemon.getPokemonSpeciesByName('eevee');
5140
+ * const chain = await api.resolve(species.evolution_chain);
5141
+ *
5142
+ * for (const step of flattenChain(chain)) {
5143
+ * console.log(`${step.from.name} → ${step.to.name}`);
5144
+ * }
5145
+ * ```
5146
+ *
5147
+ * The root is not a step: it is what the chain starts from, and the API gives it
5148
+ * no `evolution_details` to describe.
5149
+ *
5150
+ * `versionGroup` keeps only the details tagged with that version group, which is
5151
+ * what picks the Leaf Stone out of Leafeon's six alternatives:
5152
+ *
5153
+ * ```ts
5154
+ * flattenChain(chain, { versionGroup: 'sword-shield' });
5155
+ * ```
5156
+ *
5157
+ * That tag is the game which *introduced* the method, not every game it applies
5158
+ * in: Eevee's Water Stone is tagged `red-blue` alone, so filtering to
5159
+ * `sword-shield` drops Vaporeon even though Sword/Shield evolves it the same way
5160
+ * it always did. The question this answers is what a game changed.
5161
+ *
5162
+ * A step with nothing left after that is dropped, but the chain below it is
5163
+ * still walked — every edge is filtered on its own terms, and `depth` stays the
5164
+ * position in the chain rather than in the result.
5165
+ */
5166
+ declare const flattenChain: (chain: EvolutionChain, options?: FlattenOptions) => EvolutionStep[];
5167
+ /**
5168
+ * The steps leading from the root of a chain to `species`.
5169
+ *
5170
+ * ```ts
5171
+ * pathTo(chain, 'dustox')?.map((step) => step.to.name); // ['cascoon', 'dustox']
5172
+ * ```
5173
+ *
5174
+ * Matched against the name the API gives a species, which is not the name a game
5175
+ * displays: `localize(species.names)` is `Papilord` in French and finds nothing
5176
+ * here. Pass the link itself when you have one.
5177
+ *
5178
+ * @returns The steps, `[]` when `species` is the root the chain starts from, and
5179
+ * `undefined` when the chain does not contain it. The two empty answers are
5180
+ * different questions, so they are different values.
5181
+ */
5182
+ declare const pathTo: (chain: EvolutionChain, species: string | NamedAPIResource<PokemonSpecies>) => EvolutionStep[] | undefined;
5183
+ /**
5184
+ * ## Evolution Requirement
5185
+ * One condition an evolution is subject to, as a discriminated union — what an
5186
+ * {@link EvolutionDetail}'s thirty-odd nullable fields say, without the nulls.
5187
+ *
5188
+ * `is_default` and `version_group` are not here: they describe the record, not
5189
+ * what the Pokémon has to do.
5190
+ */
5191
+ type EvolutionRequirement = {
5192
+ kind: "trigger";
5193
+ trigger: NamedAPIResource<EvolutionTrigger>;
5194
+ } | {
5195
+ kind: "item";
5196
+ item: NamedAPIResource<Item>;
5197
+ } | {
5198
+ kind: "held-item";
5199
+ item: NamedAPIResource<Item>;
5200
+ } | {
5201
+ kind: "min-level";
5202
+ level: number;
5203
+ } | {
5204
+ kind: "min-happiness";
5205
+ happiness: number;
5206
+ } | {
5207
+ kind: "min-beauty";
5208
+ beauty: number;
5209
+ } | {
5210
+ kind: "min-affection";
5211
+ affection: number;
5212
+ } | {
5213
+ kind: "known-move";
5214
+ move: NamedAPIResource<Move>;
5215
+ } | {
5216
+ kind: "known-move-type";
5217
+ type: NamedAPIResource<Type>;
5218
+ } | {
5219
+ kind: "used-move";
5220
+ move: NamedAPIResource<Move>;
5221
+ } | {
5222
+ kind: "min-move-count";
5223
+ count: number;
5224
+ } | {
5225
+ kind: "min-steps";
5226
+ steps: number;
5227
+ } | {
5228
+ kind: "min-damage-taken";
5229
+ damage: number;
5230
+ } | {
5231
+ kind: "location";
5232
+ location: NamedAPIResource<Location>;
5233
+ } | {
5234
+ kind: "region";
5235
+ region: NamedAPIResource<Region>;
5236
+ } | {
5237
+ kind: "time-of-day";
5238
+ time: EvolutionTimeOfDay;
5239
+ } | {
5240
+ kind: "gender";
5241
+ gender: number;
5242
+ } | {
5243
+ kind: "relative-physical-stats";
5244
+ comparison: 1 | 0 | -1;
5245
+ } | {
5246
+ kind: "party-species";
5247
+ species: NamedAPIResource<PokemonSpecies>;
5248
+ } | {
5249
+ kind: "party-type";
5250
+ type: NamedAPIResource<Type>;
5251
+ } | {
5252
+ kind: "trade-species";
5253
+ species: NamedAPIResource<PokemonSpecies>;
5254
+ } | {
5255
+ kind: "base-form";
5256
+ form: NamedAPIResource<PokemonForm>;
5257
+ } | {
5258
+ kind: "evolved-form";
5259
+ form: NamedAPIResource<PokemonForm>;
5260
+ } | {
5261
+ kind: "needs-overworld-rain";
5262
+ } | {
5263
+ kind: "turn-upside-down";
5264
+ } | {
5265
+ kind: "near-special-rock";
5266
+ } | {
5267
+ kind: "needs-multiplayer";
5268
+ };
5269
+ /**
5270
+ * The conditions one {@link EvolutionDetail} sets out, with everything it left
5271
+ * unset dropped.
5272
+ *
5273
+ * ```ts
5274
+ * requirementsOf(step.details[0]); // eevee → umbreon
5275
+ * // [
5276
+ * // { kind: 'trigger', trigger: { name: 'level-up', … } },
5277
+ * // { kind: 'min-happiness', happiness: 160 },
5278
+ * // { kind: 'time-of-day', time: 'night' },
5279
+ * // { kind: 'base-form', form: { name: 'eevee', … } },
5280
+ * // ]
5281
+ * ```
5282
+ *
5283
+ * The trigger leads, so rendering the result is a walk over one array.
5284
+ *
5285
+ * Every field is tested against the value the API uses for "unset" rather than
5286
+ * for truthiness: `relative_physical_stats` is `0` when Attack has to equal
5287
+ * Defense, and `time_of_day` is `''`.
5288
+ */
5289
+ declare const requirementsOf: (detail: EvolutionDetail) => EvolutionRequirement[];
5290
+ /**
5291
+ * ## Requirement Phrases
5292
+ * One renderer per {@link EvolutionRequirement} kind. Exhaustive, so a kind added
5293
+ * to that union has to be given words here too.
5294
+ */
5295
+ type RequirementPhrases = { [K in EvolutionRequirement["kind"]]: (requirement: Extract<EvolutionRequirement, {
5296
+ kind: K;
5297
+ }>) => string; };
5298
+ /**
5299
+ * ## Resource Namer
5300
+ * How a resource a requirement names is written out.
5301
+ *
5302
+ * @param resource The item, move, species, location, region, form or type the
5303
+ * requirement carries.
5304
+ * @returns What to print for it.
5305
+ */
5306
+ type ResourceNamer = (resource: NamedAPIResource<unknown>) => string;
5307
+ /**
5308
+ * Builds the English table around a way of naming resources.
5309
+ *
5310
+ * Everything except the name is fixed; `namer` is the one thing a caller who
5311
+ * keeps the English sentence still has to replace, because `spaced` prints what
5312
+ * the API calls a resource and no localized name is derivable from it.
5313
+ *
5314
+ * ```ts
5315
+ * const names = new Map([['water-stone', 'Pedra da Água']]);
5316
+ *
5317
+ * requirementPhrases((resource) => names.get(resource.name) ?? resource.name);
5318
+ * ```
5319
+ *
5320
+ * @param namer How to write a resource out. Defaults to the API's own name, with
5321
+ * the hyphens turned to spaces.
5322
+ */
5323
+ declare const requirementPhrases: (namer?: ResourceNamer) => RequirementPhrases;
5324
+ /**
5325
+ * ## Requirement Phrases
5326
+ * The English {@link formatRequirements} renders with, naming resources the way
5327
+ * the API does. Exported so a caller can replace the wording of one kind — or
5328
+ * all of them, in another language — without rebuilding the rest of the renderer
5329
+ * around it, and so an override can fall back to the default for what it does
5330
+ * not handle.
5331
+ *
5332
+ * ```ts
5333
+ * formatRequirements(requirements, {
5334
+ * phrases: { 'min-happiness': ({ happiness }) => `com ${happiness} de felicidade` },
5335
+ * });
5336
+ *
5337
+ * formatRequirements(requirements, {
5338
+ * phrases: {
5339
+ * trigger: (requirement) => MINE[requirement.trigger.name] ?? REQUIREMENT_PHRASES.trigger(requirement),
5340
+ * },
5341
+ * });
5342
+ * ```
5343
+ */
5344
+ declare const REQUIREMENT_PHRASES: RequirementPhrases;
5345
+ /**
5346
+ * ## Format Options
5347
+ * How {@link formatRequirements} words what it renders.
5348
+ */
5349
+ interface FormatOptions {
5350
+ /**
5351
+ * How to write out the resources the requirements name. Defaults to the API's
5352
+ * own name with the hyphens turned to spaces — `water stone`.
5353
+ *
5354
+ * This is the half of a translation that `phrases` cannot do: a display name
5355
+ * is `localize(item.names)`, which is a request, so it has to come from the
5356
+ * caller. Applied to the default table, and to nothing a `phrases` entry
5357
+ * overrides — that entry is handed the resource and names it however it likes.
5358
+ *
5359
+ * Hold the function rather than writing it inline: the table built around a
5360
+ * namer is kept and reused, and a new closure per call is a new table per call.
5361
+ */
5362
+ name?: ResourceNamer;
5363
+ /**
5364
+ * Wording for the kinds named, {@link REQUIREMENT_PHRASES} for the rest —
5365
+ * everything around it, including the `use-item` de-duplication, stays.
5366
+ */
5367
+ phrases?: Partial<RequirementPhrases>;
5368
+ }
5369
+ /**
5370
+ * Renders requirements as an English phrase.
5371
+ *
5372
+ * ```ts
5373
+ * formatRequirements(requirementsOf(detail)); // eevee → umbreon
5374
+ * // 'level up, with at least 160 happiness, during the night, in its eevee form'
5375
+ * ```
5376
+ *
5377
+ * The only English in the library, and a separate export for that reason: an
5378
+ * application rendering its own copy — in its own language, or as anything other
5379
+ * than a sentence — drops this and the phrase table with it. Use
5380
+ * {@link requirementsOf} for that, or `phrases` to keep the sentence and change
5381
+ * the words:
5382
+ *
5383
+ * ```ts
5384
+ * formatRequirements(requirements, { phrases: { trade: () => 'by trade' } });
5385
+ * ```
5386
+ *
5387
+ * Resources are named the way the API names them, not the way a game displays
5388
+ * them. `localize(item.names)` is the display name, it costs a request, and
5389
+ * `name` is where it goes:
5390
+ *
5391
+ * ```ts
5392
+ * const items = await api.resolveAll(links);
5393
+ * const display = new Map(items.map((item) => [item.name, localize(item.names)?.name]));
5394
+ *
5395
+ * formatRequirements(requirements, { name: (resource) => display.get(resource.name) ?? resource.name });
5396
+ * // 'use Water Stone'
5397
+ * ```
5398
+ *
5399
+ * The two options are the two halves of a translation and are independent:
5400
+ * `phrases` is the words the library supplies, `name` the words the API does.
5401
+ *
5402
+ * A `use-item` trigger and the item it uses are one phrase, since "use an item,
5403
+ * use water stone" says it twice. That holds under `phrases` too: the trigger is
5404
+ * dropped before anything is rendered, so an overridden `item` is still what says
5405
+ * the item is used.
5406
+ */
5407
+ declare const formatRequirements: (requirements: readonly EvolutionRequirement[], options?: FormatOptions) => string;
5408
+ //#endregion
4451
5409
  //#region src/utils/localize.d.ts
4452
5410
  /**
4453
5411
  * ## Localized
@@ -4457,6 +5415,20 @@ declare class PokenodeError extends Error {
4457
5415
  interface Localized {
4458
5416
  language: NamedAPIResource<Language>;
4459
5417
  }
5418
+ /**
5419
+ * ## Localize Options
5420
+ * Which language to pick, and which to settle for.
5421
+ */
5422
+ interface LocalizeOptions {
5423
+ /** The language wanted, by the name the PokéAPI gives it. Defaults to `en`. */
5424
+ language?: string;
5425
+ /**
5426
+ * The language to try when the first one is absent. Left out, nothing is tried
5427
+ * and the answer is `undefined` — a fallback is a decision about the product,
5428
+ * not a default.
5429
+ */
5430
+ fallback?: string;
5431
+ }
4460
5432
  /**
4461
5433
  * Picks the entry written in `language`, by the name the PokéAPI gives that
4462
5434
  * language: `en`, `ja`, `ja-hrkt`, `zh-hans`, `es-419`, and so on.
@@ -4466,6 +5438,7 @@ interface Localized {
4466
5438
  *
4467
5439
  * localize(species.names)?.name; // 'Eevee'
4468
5440
  * localize(species.names, 'ja')?.name; // 'イーブイ'
5441
+ * localize(species.names, { language: 'gd', fallback: 'en' })?.name; // 'Eevee'
4469
5442
  * ```
4470
5443
  *
4471
5444
  * Matched without regard to case: the PokéAPI writes these tags in lower case,
@@ -4473,13 +5446,56 @@ interface Localized {
4473
5446
  * to language tags will reach for, and it should not silently match nothing.
4474
5447
  *
4475
5448
  * A section may list several entries for one language — flavor text, one per
4476
- * version — and the first is the one returned. Filter first when you want a
4477
- * particular version.
5449
+ * version — and the first is the one returned. {@link localizeAll} is the way to
5450
+ * see the rest and pick by version.
4478
5451
  *
4479
- * @returns The entry, or `undefined` when that language is absent. Which
4480
- * language to try instead is the caller's decision, so nothing is guessed here.
5452
+ * @returns The entry, the one in `fallback` when that language is absent, or
5453
+ * `undefined` when neither is there.
4481
5454
  */
4482
- declare const localize: <T extends Localized>(entries: readonly T[], language?: string) => T | undefined;
5455
+ declare const localize: <T extends Localized>(entries: readonly T[], language?: string | LocalizeOptions) => T | undefined;
5456
+ /**
5457
+ * Every entry written in `language`, in the order the API lists them.
5458
+ *
5459
+ * ```ts
5460
+ * const species = await api.pokemon.getPokemonSpeciesByName('eevee');
5461
+ *
5462
+ * const entries = localizeAll(species.flavor_text_entries, 'en');
5463
+ * entries.find((entry) => entry.version.name === 'sword')?.flavor_text;
5464
+ * ```
5465
+ *
5466
+ * Which is what a section publishing one entry per version needs: `localize`
5467
+ * answers with the first, and the first is an arbitrary game's Pokédex entry
5468
+ * rather than the one asked for. The version is on the entry — `version` on
5469
+ * flavor text, `version_group` on the sections that change per group — so the
5470
+ * filter belongs to the caller, who knows which of the two is there.
5471
+ *
5472
+ * @returns The entries, those in `fallback` when the language is absent, or `[]`
5473
+ * when neither is there.
5474
+ */
5475
+ declare const localizeAll: <T extends Localized>(entries: readonly T[], language?: string | LocalizeOptions) => T[];
5476
+ //#endregion
5477
+ //#region src/utils/resource-id.d.ts
5478
+ /**
5479
+ * The id inside a resource URL, without a request.
5480
+ *
5481
+ * ```ts
5482
+ * const page = await api.pokemon.listPokemons(0, 20);
5483
+ *
5484
+ * page.results.map((link) => getPokemonSpriteUrl(resourceId(link)));
5485
+ * ```
5486
+ *
5487
+ * A list page gives names and URLs and no ids, while the sprite repository is
5488
+ * keyed by id alone — this is what joins the two, and it is what lets a grid of
5489
+ * every Pokémon render off one list request instead of one request per card.
5490
+ *
5491
+ * The id is read off the URL rather than fetched, so it is only as good as the
5492
+ * link: a URL the API did not write is not promised to end in one.
5493
+ *
5494
+ * @param resource The link, as a URL or as the resource object carrying one.
5495
+ * @returns The id.
5496
+ * @throws {TypeError} If the URL does not end in an id.
5497
+ */
5498
+ declare const resourceId: (resource: ResourceLink<unknown>) => number;
4483
5499
  //#endregion
4484
5500
  //#region src/utils/sprites.d.ts
4485
5501
  /**
@@ -4541,5 +5557,120 @@ type PokemonSpriteOptions = {
4541
5557
  */
4542
5558
  declare const getPokemonSpriteUrl: (id: number, options?: PokemonSpriteOptions) => string;
4543
5559
  //#endregion
4544
- export { APIResource, APIResourceList, Ability, AbilityEffectChange, AbilityFlavorText, AbilityPokemon, Animated, AwesomeName, BASE_URL, BERRIES, BERRY_FIRMNESSES, BERRY_FLAVORS, Berry, BerryClient, BerryFirmness, BerryFlavor, BerryFlavorMap, BlackWhite, BrilliantDiamondShiningPearl, index_d_exports as CONSTANTS, CONTEST_TYPES, CURRENCIES, type CacheStore, ChainLink, Characteristic, type ClientOptions, ContestClient, ContestComboDetail, ContestComboSets, ContestEffect, ContestFlavorText, ContestName, ContestType, Crystal, Currency, CurrencyClient, Description, DiamondPearl, DreamWorld, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Effect, EggGroup, Emerald, Encounter, EncounterClient, EncounterCondition, EncounterConditionValue, EncounterMethod, EncounterMethodRate, EncounterPokemonDetail, EncounterVersionDetails, Endpoint, type EtagEntry, EtagStore, type EtagStoreOptions, EvolutionChain, EvolutionClient, EvolutionDetail, EvolutionTrigger, type FetchLike, FireredLeafgreen, FlavorBerryMap, FlavorText, GENDERS, GENERATIONS, GROWTH_RATES, GameClient, Gender, Generation, GenerationGameIndex, GenerationIIISprites, GenerationIIITypeSprites, GenerationIISprites, GenerationISprites, GenerationIVSprites, GenerationIVTypeSprites, GenerationIXSprites, GenerationIXTypeSprites, GenerationVIIISprites, GenerationVIIITypeSprites, GenerationVIISprites, GenerationVIITypeSprites, GenerationVISprites, GenerationVITypeSprites, GenerationVSprites, GenerationVTypeSprites, GenerationViiIcons, GenerationViiiIcons, Genus, Gold, GrowthRate, GrowthRateExperienceLevel, HeartgoldSoulsilver, Home, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, Item, ItemAttribute, ItemCategory, ItemClient, ItemFlingEffect, ItemHolderPokemon, ItemHolderPokemonVersionDetail, ItemPocket, ItemPrice, ItemSprites, LANGUAGES, Language, type ListFn, type ListMethodName, type ListPage, type Localized, Location, LocationArea, LocationAreaEncounter, LocationClient, type LogCancelledPayload, type LogErrorPayload, type LogRequestPayload, type LogResponsePayload, type LogRetryPayload, type Logger, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, Machine, MachineClient, MachineVersionDetail, MainClient, MemoryCache, type MemoryCacheOptions, Move, MoveAilment, MoveBattleStyle, MoveBattleStylePreference, MoveCategory, MoveClient, MoveDamageClass, MoveFlavorText, MoveLearnMethod, MoveMetaData, MoveStatAffect, MoveStatAffectSets, MoveStatChange, MoveTarget, NATURES, Name, NamedAPIResource, NamedAPIResourceList, Nature, NaturePokeathlonStatAffect, NaturePokeathlonStatAffectSets, NatureStatAffectSets, NatureStatChange, OfficialArtwork, OmegarubyAlphasapphire, OtherPokemonSprites, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, type PaginateOptions, PalParkArea, PalParkEncounterArea, PalParkEncounterSpecies, PastMoveStatValues, Platinum, PokeathlonStat, Pokedex, Pokemon, PokemonAbility, PokemonClient, PokemonColor, PokemonCries, PokemonEncounter, PokemonEntry, PokemonForm, PokemonFormCondition, PokemonFormGenerationVIIISprites, PokemonFormSprites, PokemonFormVersionSprites, PokemonHabitat, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonPastAbility, PokemonPastAbilitySlot, PokemonPastStat, PokemonPastType, PokemonShape, PokemonSpecies, PokemonSpeciesDexEntry, PokemonSpeciesGender, PokemonSpeciesVariety, type PokemonSpriteOptions, PokemonSprites, PokemonStat, PokemonType, PokenodeError, REGIONS, RedBlue, Region, type RequestScope, type ResolveOptions, type ResourceLink, type RetryOptions, RubySapphire, STATS, ScarletViolet, Showdown, Silver, type SpriteVariant, Stat, SuperContestEffect, TYPES, Type, TypeGameSprites, TypePokemon, TypeRelations, TypeRelationsPast, TypeSprites, UltraSunUltraMoon, UtilityClient, VERSIONS, VERSION_GROUPS, VerboseEffect, Version, VersionEncounterDetail, VersionGameIndex, VersionGroup, VersionGroupFlavorText, VersionSprites, WebStorageCache, type WebStorageCacheOptions, type WebStorageLike, XY, Yellow, consoleLogger, getPokemonSpriteUrl, localize };
5560
+ //#region src/utils/type-chart.d.ts
5561
+ /**
5562
+ * ## Generation Scope
5563
+ * Which generation's type chart to read. Leave it out for the current one.
5564
+ */
5565
+ interface GenerationScope {
5566
+ generation?: GenerationName;
5567
+ }
5568
+ /**
5569
+ * The damage relations `type` had in `generation`, or the current ones when no
5570
+ * generation is named.
5571
+ *
5572
+ * ```ts
5573
+ * const ghost = await api.pokemon.getTypeByName('ghost');
5574
+ *
5575
+ * relationsFor(ghost).half_damage_to; // [dark]
5576
+ * relationsFor(ghost, 'generation-iii')?.half_damage_to; // [dark, steel]
5577
+ * ```
5578
+ *
5579
+ * Each entry in `past_damage_relations` records the *last* generation it applied
5580
+ * to, so the chart in force is the first entry still at or after the generation
5581
+ * asked for — Ghost's `generation-v` entry is what Ghost looked like from II
5582
+ * through V, and the current relations take over at VI.
5583
+ *
5584
+ * @returns The relations, or `undefined` when `type` did not exist yet in
5585
+ * `generation`. Nothing is guessed: Steel in generation I has no chart, and a
5586
+ * neutral one would be a confidently wrong answer rather than a missing one.
5587
+ */
5588
+ declare const relationsFor: (type: Type, generation?: GenerationName) => TypeRelations | undefined;
5589
+ /**
5590
+ * The damage multiplier `attacking` deals to a defender that has `defending`
5591
+ * types — `0`, `0.25`, `0.5`, `1`, `2` or `4`.
5592
+ *
5593
+ * ```ts
5594
+ * const fire = await api.pokemon.getTypeByName('fire');
5595
+ * const ferrothorn = await api.pokemon.getPokemonByName('ferrothorn');
5596
+ *
5597
+ * effectiveness(fire, ferrothorn.types.map((slot) => slot.type)); // 4
5598
+ * ```
5599
+ *
5600
+ * Read from the attacking type's own offensive relations, so this needs the one
5601
+ * type fetched rather than one per defending type.
5602
+ *
5603
+ * With a `generation`, the chart of that generation is used and the result is
5604
+ * `undefined` when `attacking` postdates it. Only the attacker is checked that
5605
+ * way: the defenders arrive as links, which carry no generation to check
5606
+ * against. `Pokemon.past_types` is where a historically correct defender comes
5607
+ * from.
5608
+ */
5609
+ declare function effectiveness(attacking: Type, defending: readonly NamedAPIResource<Type>[]): number;
5610
+ declare function effectiveness(attacking: Type, defending: readonly NamedAPIResource<Type>[], options: {
5611
+ generation: GenerationName;
5612
+ }): number | undefined;
5613
+ /**
5614
+ * What every one of `types` does to a defender that has `defending` types, keyed
5615
+ * by attacking type name — the "what is this Pokémon weak to" table.
5616
+ *
5617
+ * ```ts
5618
+ * const types: Type[] = [];
5619
+ * for await (const type of api.pokemon.paginate('listTypes', { resolve: true })) {
5620
+ * types.push(type);
5621
+ * }
5622
+ *
5623
+ * const profile = defensiveProfile(types, gengar.types.map((slot) => slot.type));
5624
+ * profile.psychic; // 2
5625
+ * profile.normal; // 0
5626
+ * ```
5627
+ *
5628
+ * The whole `type` section is one cached walk, and every lookup after that is
5629
+ * local. A type that did not exist in the generation asked for is left out of the
5630
+ * table rather than reported as neutral.
5631
+ *
5632
+ * `Partial` because of that, and because `types` is whatever the caller resolved:
5633
+ * an entry is there when the attacking type is, so every lookup is `number |
5634
+ * undefined`. `unknown` and `shadow` are not {@link TypeName}s and are skipped —
5635
+ * they hold no damage relations, so they have no place in a matchup table.
5636
+ *
5637
+ * Reach for {@link defensiveProfileFrom} unless you are asking about a past
5638
+ * generation: it answers the same question from the defender's own types, which
5639
+ * is one or two resources rather than the whole section. This is the form that
5640
+ * takes a `generation`, because only the attacking type carries the history.
5641
+ *
5642
+ * Keyed by the name the API gives a type, which is not the name a game displays:
5643
+ * `localize(type.names)` is what a table headed in French needs, and it is a
5644
+ * property of the resource rather than of this table.
5645
+ */
5646
+ declare const defensiveProfile: (types: readonly Type[], defending: readonly NamedAPIResource<Type>[], options?: GenerationScope) => Partial<Record<TypeName, number>>;
5647
+ /**
5648
+ * The same table, read off the defending types themselves — what every type does
5649
+ * to a Pokémon that has `defending` types.
5650
+ *
5651
+ * ```ts
5652
+ * const gengar = await api.pokemon.getPokemonByName('gengar');
5653
+ * const types = await api.resolveAll(gengar.types.map((slot) => slot.type));
5654
+ *
5655
+ * const profile = defensiveProfileFrom(types);
5656
+ * profile.psychic; // 2
5657
+ * profile.normal; // 0
5658
+ * ```
5659
+ *
5660
+ * Two requests for a dual-typed Pokémon, against the whole `type` section that
5661
+ * {@link defensiveProfile} needs — the answer is the same because the chart is
5662
+ * symmetric, which `tests/live/relations.live.spec.ts` is what keeps honest.
5663
+ *
5664
+ * Every {@link TypeName} is present: the defending types name every attacker
5665
+ * they interact with, and the rest are neutral rather than unknown. There is no
5666
+ * `generation` option for exactly the reason the entries are total — a defending
5667
+ * type's arrays are the current chart, and they have no way to say that an
5668
+ * attacking type did not exist yet. That question needs {@link defensiveProfile}.
5669
+ *
5670
+ * Keyed by the API's name for a type, as {@link defensiveProfile} is;
5671
+ * `localize(type.names)` is the displayed one.
5672
+ */
5673
+ declare const defensiveProfileFrom: (defending: readonly Type[]) => Record<TypeName, number>;
5674
+ //#endregion
5675
+ 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, type ClientStats, ContestClient, ContestComboDetail, ContestComboSets, ContestEffect, ContestFlavorText, ContestName, ContestType, Crystal, CrystalAnimated, Currency, CurrencyClient, Description, DiamondPearl, DreamWorld, EGG_GROUPS, ENCOUNTER_CONDITIONS, ENCOUNTER_CONDITION_VALUES, ENCOUNTER_METHODS, ENDPOINTS, EVOLUTION_TRIGGERS, Effect, EggGroup, Emerald, Encounter, EncounterClient, EncounterCondition, EncounterConditionValue, EncounterMethod, EncounterMethodRate, EncounterPokemonDetail, EncounterVersionDetails, Endpoint, type EtagEntry, EtagStore, type EtagStoreOptions, EvolutionChain, EvolutionClient, EvolutionDetail, type EvolutionRequirement, type EvolutionStep, EvolutionTimeOfDay, EvolutionTrigger, EvolutionTriggerName, type FetchLike, FireredLeafgreen, type FlattenOptions, FlavorBerryMap, FlavorText, type FormatOptions, GENDERS, GENERATIONS, GROWTH_RATES, GameClient, Gender, Generation, GenerationGameIndex, GenerationIIISprites, GenerationIIITypeSprites, GenerationIISprites, GenerationISprites, GenerationIVSprites, GenerationIVTypeSprites, GenerationIXSprites, GenerationIXTypeSprites, GenerationName, type GenerationScope, GenerationVAnimatedIcons, GenerationVIIISprites, GenerationVIIITypeSprites, GenerationVIISprites, GenerationVIITypeSprites, GenerationVISprites, GenerationVITypeSprites, GenerationVIcons, GenerationVSprites, GenerationVTypeSprites, GenerationViiIcons, GenerationViiiIcons, Genus, Gold, GrowthRate, GrowthRateExperienceLevel, HeartgoldSoulsilver, Home, ITEM_ATTRIBUTES, ITEM_CATEGORIES, ITEM_FLING_EFFECTS, ITEM_POCKETS, Item, ItemAttribute, ItemCategory, ItemClient, ItemFlingEffect, ItemHolderPokemon, ItemHolderPokemonVersionDetail, ItemPocket, ItemPrice, ItemSprites, LANGUAGES, Language, type ListFn, type ListMethodName, type ListPage, type LocalizeOptions, type Localized, Location, LocationArea, LocationAreaEncounter, LocationClient, type LogCancelledPayload, type LogErrorPayload, type LogRequestPayload, type LogResponsePayload, type LogRetryPayload, type Logger, MOVE_AILMENTS, MOVE_BATTLE_STYLES, MOVE_CATEGORIES, MOVE_DAMAGE_CLASSES, MOVE_LEARN_METHODS, MOVE_TARGETS, Machine, MachineClient, MachineVersionDetail, MainClient, MemoryCache, type MemoryCacheOptions, Move, MoveAilment, MoveBattleStyle, MoveBattleStylePreference, MoveCategory, MoveClient, MoveDamageClass, MoveFlavorText, MoveLearnMethod, MoveMetaData, MoveStatAffect, MoveStatAffectSets, MoveStatChange, MoveTarget, NATURES, Name, NamedAPIResource, NamedAPIResourceList, Nature, NaturePokeathlonStatAffect, NaturePokeathlonStatAffectSets, NatureStatAffectSets, NatureStatChange, OfficialArtwork, OmegarubyAlphasapphire, OtherPokemonSprites, PAL_PARK_AREAS, POKEATHLON_STATS, POKEDEXES, POKEMON_COLORS, POKEMON_HABITATS, POKEMON_SHAPES, type PaginateOptions, PalParkArea, PalParkEncounterArea, PalParkEncounterSpecies, PastMoveStatValues, Platinum, PokeathlonStat, Pokedex, Pokemon, PokemonAbility, PokemonClient, PokemonColor, PokemonCries, PokemonEncounter, PokemonEntry, PokemonForm, PokemonFormCondition, PokemonFormGenerationVIIISprites, PokemonFormSprites, PokemonFormVersionSprites, PokemonHabitat, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonPastAbility, PokemonPastAbilitySlot, PokemonPastStat, PokemonPastType, PokemonShape, PokemonSpecies, PokemonSpeciesDexEntry, PokemonSpeciesGender, PokemonSpeciesVariety, type PokemonSpriteOptions, PokemonSprites, PokemonStat, PokemonType, PokenodeError, REGIONS, REQUIREMENT_PHRASES, RedBlue, Region, type RequestScope, type RequirementPhrases, type ResolveOptions, type ResourceLink, type ResourceNamer, type RetryOptions, RubySapphire, STATS, ScarletViolet, Showdown, Silver, type SpriteVariant, Stat, SuperContestEffect, TYPES, Type, TypeGameSprites, TypeName, TypePokemon, TypeRelations, TypeRelationsPast, TypeSprites, UltraSunUltraMoon, UtilityClient, VERSIONS, VERSION_GROUPS, VerboseEffect, Version, VersionEncounterDetail, VersionGameIndex, VersionGroup, VersionGroupFlavorText, VersionSprites, WebStorageCache, type WebStorageCacheOptions, type WebStorageLike, XY, Yellow, consoleLogger, defensiveProfile, defensiveProfileFrom, effectiveness, flattenChain, formatRequirements, getPokemonSpriteUrl, localize, localizeAll, pathTo, relationsFor, requirementPhrases, requirementsOf, resourceId };
4545
5676
  //# sourceMappingURL=index.d.cts.map