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