eve-esi-types 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -2
- package/esi-types-util.md +108 -0
- package/package.json +9 -9
- package/rq-util.d.mts +84 -0
- package/rq-util.mjs +107 -0
- package/tsconfig.json +1 -0
- package/v2/extra-types.d.ts +28 -1091
- package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_contacts_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_corporations_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_icons_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_ok.d.ts +1 -1
- package/v2/get_alliances_ok.d.ts +1 -1
- package/v2/get_characters_character_id_agents_research_ok.d.ts +1 -1
- package/v2/get_characters_character_id_assets_ok.d.ts +1 -1
- package/v2/get_characters_character_id_attributes_ok.d.ts +1 -1
- package/v2/get_characters_character_id_blueprints_ok.d.ts +1 -1
- package/v2/get_characters_character_id_bookmarks_folders_ok.d.ts +1 -1
- package/v2/get_characters_character_id_bookmarks_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_ok.d.ts +1 -1
- package/v2/get_characters_character_id_clones_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contacts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_corporationhistory_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fatigue_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fittings_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fleet_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fw_stats_ok.d.ts +1 -1
- package/v2/get_characters_character_id_implants_ok.d.ts +1 -1
- package/v2/get_characters_character_id_industry_jobs_ok.d.ts +1 -1
- package/v2/get_characters_character_id_killmails_recent_ok.d.ts +1 -1
- package/v2/get_characters_character_id_location_ok.d.ts +1 -1
- package/v2/get_characters_character_id_loyalty_points_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_labels_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_lists_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_ok.d.ts +1 -1
- package/v2/get_characters_character_id_medals_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mining_ok.d.ts +1 -1
- package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_notifications_ok.d.ts +1 -1
- package/v2/get_characters_character_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_online_ok.d.ts +1 -1
- package/v2/get_characters_character_id_opportunities_ok.d.ts +1 -1
- package/v2/get_characters_character_id_orders_history_ok.d.ts +1 -1
- package/v2/get_characters_character_id_orders_ok.d.ts +1 -1
- package/v2/get_characters_character_id_planets_ok.d.ts +1 -1
- package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_portrait_ok.d.ts +1 -1
- package/v2/get_characters_character_id_roles_ok.d.ts +1 -1
- package/v2/get_characters_character_id_search_ok.d.ts +1 -1
- package/v2/get_characters_character_id_ship_ok.d.ts +1 -1
- package/v2/get_characters_character_id_skillqueue_ok.d.ts +1 -1
- package/v2/get_characters_character_id_skills_ok.d.ts +1 -1
- package/v2/get_characters_character_id_standings_ok.d.ts +1 -1
- package/v2/get_characters_character_id_titles_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_journal_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +1 -1
- package/v2/get_contracts_public_bids_contract_id_ok.d.ts +1 -1
- package/v2/get_contracts_public_items_contract_id_ok.d.ts +1 -1
- package/v2/get_contracts_public_region_id_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_assets_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_bookmarks_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contacts_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_divisions_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_facilities_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_icons_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_medals_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_orders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_roles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_standings_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_starbases_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_structures_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_titles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_ok.d.ts +1 -1
- package/v2/get_corporations_npccorps_ok.d.ts +1 -1
- package/v2/get_dogma_attributes_attribute_id_ok.d.ts +1 -1
- package/v2/get_dogma_attributes_ok.d.ts +1 -1
- package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +1 -1
- package/v2/get_dogma_effects_effect_id_ok.d.ts +1 -1
- package/v2/get_dogma_effects_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_members_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_wings_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_characters_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_corporations_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_ok.d.ts +1 -1
- package/v2/get_fw_stats_ok.d.ts +1 -1
- package/v2/get_fw_systems_ok.d.ts +1 -1
- package/v2/get_fw_wars_ok.d.ts +1 -1
- package/v2/get_incursions_ok.d.ts +1 -1
- package/v2/get_industry_facilities_ok.d.ts +1 -1
- package/v2/get_industry_systems_ok.d.ts +1 -1
- package/v2/get_insurance_prices_ok.d.ts +1 -1
- package/v2/get_killmails_killmail_id_killmail_hash_ok.d.ts +1 -1
- package/v2/get_loyalty_stores_corporation_id_offers_ok.d.ts +1 -1
- package/v2/get_markets_groups_market_group_id_ok.d.ts +1 -1
- package/v2/get_markets_groups_ok.d.ts +1 -1
- package/v2/get_markets_prices_ok.d.ts +1 -1
- package/v2/get_markets_region_id_history_ok.d.ts +1 -1
- package/v2/get_markets_region_id_orders_ok.d.ts +1 -1
- package/v2/get_markets_region_id_types_ok.d.ts +1 -1
- package/v2/get_markets_structures_structure_id_ok.d.ts +1 -1
- package/v2/get_opportunities_groups_group_id_ok.d.ts +1 -1
- package/v2/get_opportunities_groups_ok.d.ts +1 -1
- package/v2/get_opportunities_tasks_ok.d.ts +1 -1
- package/v2/get_opportunities_tasks_task_id_ok.d.ts +1 -1
- package/v2/get_route_origin_destination_ok.d.ts +1 -1
- package/v2/get_sovereignty_campaigns_ok.d.ts +1 -1
- package/v2/get_sovereignty_map_ok.d.ts +1 -1
- package/v2/get_sovereignty_structures_ok.d.ts +1 -1
- package/v2/get_status_ok.d.ts +1 -1
- package/v2/get_universe_ancestries_ok.d.ts +1 -1
- package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +1 -1
- package/v2/get_universe_bloodlines_ok.d.ts +1 -1
- package/v2/get_universe_categories_category_id_ok.d.ts +1 -1
- package/v2/get_universe_categories_ok.d.ts +1 -1
- package/v2/get_universe_constellations_constellation_id_ok.d.ts +1 -1
- package/v2/get_universe_constellations_ok.d.ts +1 -1
- package/v2/get_universe_factions_ok.d.ts +1 -1
- package/v2/get_universe_graphics_graphic_id_ok.d.ts +1 -1
- package/v2/get_universe_graphics_ok.d.ts +1 -1
- package/v2/get_universe_groups_group_id_ok.d.ts +1 -1
- package/v2/get_universe_groups_ok.d.ts +1 -1
- package/v2/get_universe_moons_moon_id_ok.d.ts +1 -1
- package/v2/get_universe_planets_planet_id_ok.d.ts +1 -1
- package/v2/get_universe_races_ok.d.ts +1 -1
- package/v2/get_universe_regions_ok.d.ts +1 -1
- package/v2/get_universe_regions_region_id_ok.d.ts +1 -1
- package/v2/get_universe_schematics_schematic_id_ok.d.ts +1 -1
- package/v2/get_universe_stargates_stargate_id_ok.d.ts +1 -1
- package/v2/get_universe_stars_star_id_ok.d.ts +1 -1
- package/v2/get_universe_stations_station_id_ok.d.ts +1 -1
- package/v2/get_universe_structures_ok.d.ts +1 -1
- package/v2/get_universe_structures_structure_id_ok.d.ts +1 -1
- package/v2/get_universe_system_jumps_ok.d.ts +1 -1
- package/v2/get_universe_system_kills_ok.d.ts +1 -1
- package/v2/get_universe_systems_ok.d.ts +1 -1
- package/v2/get_universe_systems_system_id_ok.d.ts +1 -1
- package/v2/get_universe_types_ok.d.ts +1 -1
- package/v2/get_universe_types_type_id_ok.d.ts +1 -1
- package/v2/get_wars_ok.d.ts +1 -1
- package/v2/get_wars_war_id_killmails_ok.d.ts +1 -1
- package/v2/get_wars_war_id_ok.d.ts +1 -1
- package/v2/index.d.ts +171 -40
- package/v2/post_characters_affiliation_ok.d.ts +1 -1
- package/v2/post_characters_character_id_assets_locations_ok.d.ts +1 -1
- package/v2/post_characters_character_id_assets_names_ok.d.ts +1 -1
- package/v2/post_characters_character_id_contacts_created.d.ts +1 -1
- package/v2/post_characters_character_id_cspa_created.d.ts +1 -1
- package/v2/post_characters_character_id_fittings_created.d.ts +1 -1
- package/v2/post_characters_character_id_mail_created.d.ts +1 -1
- package/v2/post_characters_character_id_mail_labels_created.d.ts +1 -1
- package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +1 -1
- package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +1 -1
- package/v2/post_fleets_fleet_id_wings_created.d.ts +1 -1
- package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +1 -1
- package/v2/post_universe_ids_ok.d.ts +1 -1
- package/v2/post_universe_names_ok.d.ts +1 -1
- package/v2.d.mts +32 -0
- package/v2.mjs +10 -93
- package/esi-request.mjs +0 -247
- package/src/get_alliances_alliance_id_contacts_labels_ok.d.ts +0 -27
- package/src/get_alliances_alliance_id_contacts_ok.d.ts +0 -43
- package/src/get_alliances_alliance_id_corporations_ok.d.ts +0 -14
- package/src/get_alliances_alliance_id_icons_ok.d.ts +0 -21
- package/src/get_alliances_alliance_id_ok.d.ts +0 -46
- package/src/get_alliances_ok.d.ts +0 -14
- package/src/get_characters_character_id_agents_research_ok.d.ts +0 -42
- package/src/get_characters_character_id_assets_ok.d.ts +0 -144
- package/src/get_characters_character_id_attributes_ok.d.ts +0 -51
- package/src/get_characters_character_id_blueprints_ok.d.ts +0 -133
- package/src/get_characters_character_id_bookmarks_folders_ok.d.ts +0 -27
- package/src/get_characters_character_id_bookmarks_ok.d.ts +0 -91
- package/src/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +0 -32
- package/src/get_characters_character_id_calendar_event_id_ok.d.ts +0 -66
- package/src/get_characters_character_id_calendar_ok.d.ts +0 -42
- package/src/get_characters_character_id_clones_ok.d.ts +0 -82
- package/src/get_characters_character_id_contacts_labels_ok.d.ts +0 -27
- package/src/get_characters_character_id_contacts_ok.d.ts +0 -53
- package/src/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +0 -37
- package/src/get_characters_character_id_contracts_contract_id_items_ok.d.ts +0 -48
- package/src/get_characters_character_id_contracts_ok.d.ts +0 -137
- package/src/get_characters_character_id_corporationhistory_ok.d.ts +0 -37
- package/src/get_characters_character_id_fatigue_ok.d.ts +0 -26
- package/src/get_characters_character_id_fittings_ok.d.ts +0 -108
- package/src/get_characters_character_id_fleet_ok.d.ts +0 -35
- package/src/get_characters_character_id_fw_stats_ok.d.ts +0 -75
- package/src/get_characters_character_id_implants_ok.d.ts +0 -14
- package/src/get_characters_character_id_industry_jobs_ok.d.ts +0 -133
- package/src/get_characters_character_id_killmails_recent_ok.d.ts +0 -27
- package/src/get_characters_character_id_location_ok.d.ts +0 -26
- package/src/get_characters_character_id_loyalty_points_ok.d.ts +0 -27
- package/src/get_characters_character_id_mail_labels_ok.d.ts +0 -67
- package/src/get_characters_character_id_mail_lists_ok.d.ts +0 -27
- package/src/get_characters_character_id_mail_mail_id_ok.d.ts +0 -71
- package/src/get_characters_character_id_mail_ok.d.ts +0 -77
- package/src/get_characters_character_id_medals_ok.d.ts +0 -147
- package/src/get_characters_character_id_mining_ok.d.ts +0 -37
- package/src/get_characters_character_id_notifications_contacts_ok.d.ts +0 -42
- package/src/get_characters_character_id_notifications_ok.d.ts +0 -297
- package/src/get_characters_character_id_ok.d.ts +0 -66
- package/src/get_characters_character_id_online_ok.d.ts +0 -31
- package/src/get_characters_character_id_opportunities_ok.d.ts +0 -27
- package/src/get_characters_character_id_orders_history_ok.d.ts +0 -104
- package/src/get_characters_character_id_orders_ok.d.ts +0 -99
- package/src/get_characters_character_id_planets_ok.d.ts +0 -131
- package/src/get_characters_character_id_planets_planet_id_ok.d.ts +0 -323
- package/src/get_characters_character_id_portrait_ok.d.ts +0 -31
- package/src/get_characters_character_id_roles_ok.d.ts +0 -271
- package/src/get_characters_character_id_search_ok.d.ts +0 -132
- package/src/get_characters_character_id_ship_ok.d.ts +0 -26
- package/src/get_characters_character_id_skillqueue_ok.d.ts +0 -57
- package/src/get_characters_character_id_skills_ok.d.ts +0 -54
- package/src/get_characters_character_id_standings_ok.d.ts +0 -32
- package/src/get_characters_character_id_titles_ok.d.ts +0 -187
- package/src/get_characters_character_id_wallet_journal_ok.d.ts +0 -240
- package/src/get_characters_character_id_wallet_ok.d.ts +0 -8
- package/src/get_characters_character_id_wallet_transactions_ok.d.ts +0 -67
- package/src/get_contracts_public_bids_contract_id_ok.d.ts +0 -32
- package/src/get_contracts_public_items_contract_id_ok.d.ts +0 -62
- package/src/get_contracts_public_region_id_ok.d.ts +0 -97
- package/src/get_corporation_corporation_id_mining_extractions_ok.d.ts +0 -45
- package/src/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +0 -45
- package/src/get_corporation_corporation_id_mining_observers_ok.d.ts +0 -33
- package/src/get_corporations_corporation_id_alliancehistory_ok.d.ts +0 -37
- package/src/get_corporations_corporation_id_assets_ok.d.ts +0 -180
- package/src/get_corporations_corporation_id_blueprints_ok.d.ts +0 -174
- package/src/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +0 -32
- package/src/get_corporations_corporation_id_bookmarks_ok.d.ts +0 -91
- package/src/get_corporations_corporation_id_contacts_labels_ok.d.ts +0 -27
- package/src/get_corporations_corporation_id_contacts_ok.d.ts +0 -48
- package/src/get_corporations_corporation_id_containers_logs_ok.d.ts +0 -204
- package/src/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +0 -38
- package/src/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +0 -48
- package/src/get_corporations_corporation_id_contracts_ok.d.ts +0 -137
- package/src/get_corporations_corporation_id_customs_offices_ok.d.ts +0 -92
- package/src/get_corporations_corporation_id_divisions_ok.d.ts +0 -133
- package/src/get_corporations_corporation_id_facilities_ok.d.ts +0 -32
- package/src/get_corporations_corporation_id_fw_stats_ok.d.ts +0 -70
- package/src/get_corporations_corporation_id_icons_ok.d.ts +0 -26
- package/src/get_corporations_corporation_id_industry_jobs_ok.d.ts +0 -133
- package/src/get_corporations_corporation_id_killmails_recent_ok.d.ts +0 -27
- package/src/get_corporations_corporation_id_medals_issued_ok.d.ts +0 -47
- package/src/get_corporations_corporation_id_medals_ok.d.ts +0 -42
- package/src/get_corporations_corporation_id_members_limit_ok.d.ts +0 -8
- package/src/get_corporations_corporation_id_members_ok.d.ts +0 -14
- package/src/get_corporations_corporation_id_members_titles_ok.d.ts +0 -197
- package/src/get_corporations_corporation_id_membertracking_ok.d.ts +0 -52
- package/src/get_corporations_corporation_id_ok.d.ts +0 -81
- package/src/get_corporations_corporation_id_orders_history_ok.d.ts +0 -109
- package/src/get_corporations_corporation_id_orders_ok.d.ts +0 -104
- package/src/get_corporations_corporation_id_roles_history_ok.d.ts +0 -175
- package/src/get_corporations_corporation_id_roles_ok.d.ts +0 -545
- package/src/get_corporations_corporation_id_shareholders_ok.d.ts +0 -32
- package/src/get_corporations_corporation_id_standings_ok.d.ts +0 -32
- package/src/get_corporations_corporation_id_starbases_ok.d.ts +0 -62
- package/src/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +0 -369
- package/src/get_corporations_corporation_id_structures_ok.d.ts +0 -194
- package/src/get_corporations_corporation_id_titles_ok.d.ts +0 -715
- package/src/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +0 -241
- package/src/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +0 -63
- package/src/get_corporations_corporation_id_wallets_ok.d.ts +0 -65
- package/src/get_corporations_npccorps_ok.d.ts +0 -14
- package/src/get_dogma_attributes_attribute_id_ok.d.ts +0 -61
- package/src/get_dogma_attributes_ok.d.ts +0 -14
- package/src/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +0 -72
- package/src/get_dogma_effects_effect_id_ok.d.ts +0 -154
- package/src/get_dogma_effects_ok.d.ts +0 -14
- package/src/get_fleets_fleet_id_members_ok.d.ts +0 -67
- package/src/get_fleets_fleet_id_ok.d.ts +0 -31
- package/src/get_fleets_fleet_id_wings_ok.d.ts +0 -50
- package/src/get_fw_leaderboards_characters_ok.d.ts +0 -163
- package/src/get_fw_leaderboards_corporations_ok.d.ts +0 -589
- package/src/get_fw_leaderboards_ok.d.ts +0 -235
- package/src/get_fw_stats_ok.d.ts +0 -76
- package/src/get_fw_systems_ok.d.ts +0 -47
- package/src/get_fw_wars_ok.d.ts +0 -27
- package/src/get_incursions_ok.d.ts +0 -63
- package/src/get_industry_facilities_ok.d.ts +0 -47
- package/src/get_industry_systems_ok.d.ts +0 -122
- package/src/get_insurance_prices_ok.d.ts +0 -70
- package/src/get_killmails_killmail_id_killmail_hash_ok.d.ts +0 -242
- package/src/get_loyalty_stores_corporation_id_offers_ok.d.ts +0 -70
- package/src/get_markets_groups_market_group_id_ok.d.ts +0 -42
- package/src/get_markets_groups_ok.d.ts +0 -14
- package/src/get_markets_prices_ok.d.ts +0 -32
- package/src/get_markets_region_id_history_ok.d.ts +0 -47
- package/src/get_markets_region_id_orders_ok.d.ts +0 -89
- package/src/get_markets_region_id_types_ok.d.ts +0 -14
- package/src/get_markets_structures_structure_id_ok.d.ts +0 -84
- package/src/get_opportunities_groups_group_id_ok.d.ts +0 -53
- package/src/get_opportunities_groups_ok.d.ts +0 -14
- package/src/get_opportunities_tasks_ok.d.ts +0 -14
- package/src/get_opportunities_tasks_task_id_ok.d.ts +0 -31
- package/src/get_route_origin_destination_ok.d.ts +0 -14
- package/src/get_sovereignty_campaigns_ok.d.ts +0 -94
- package/src/get_sovereignty_map_ok.d.ts +0 -37
- package/src/get_sovereignty_structures_ok.d.ts +0 -58
- package/src/get_status_ok.d.ts +0 -31
- package/src/get_universe_ancestries_ok.d.ts +0 -47
- package/src/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +0 -43
- package/src/get_universe_bloodlines_ok.d.ts +0 -72
- package/src/get_universe_categories_category_id_ok.d.ts +0 -37
- package/src/get_universe_categories_ok.d.ts +0 -14
- package/src/get_universe_constellations_constellation_id_ok.d.ts +0 -59
- package/src/get_universe_constellations_ok.d.ts +0 -14
- package/src/get_universe_factions_ok.d.ts +0 -67
- package/src/get_universe_graphics_graphic_id_ok.d.ts +0 -51
- package/src/get_universe_graphics_ok.d.ts +0 -14
- package/src/get_universe_groups_group_id_ok.d.ts +0 -42
- package/src/get_universe_groups_ok.d.ts +0 -14
- package/src/get_universe_moons_moon_id_ok.d.ts +0 -48
- package/src/get_universe_planets_planet_id_ok.d.ts +0 -53
- package/src/get_universe_races_ok.d.ts +0 -57
- package/src/get_universe_regions_ok.d.ts +0 -14
- package/src/get_universe_regions_region_id_ok.d.ts +0 -37
- package/src/get_universe_schematics_schematic_id_ok.d.ts +0 -21
- package/src/get_universe_stargates_stargate_id_ok.d.ts +0 -70
- package/src/get_universe_stars_star_id_ok.d.ts +0 -140
- package/src/get_universe_stations_station_id_ok.d.ts +0 -121
- package/src/get_universe_structures_ok.d.ts +0 -14
- package/src/get_universe_structures_structure_id_ok.d.ts +0 -54
- package/src/get_universe_system_jumps_ok.d.ts +0 -27
- package/src/get_universe_system_kills_ok.d.ts +0 -37
- package/src/get_universe_systems_ok.d.ts +0 -14
- package/src/get_universe_systems_system_id_ok.d.ts +0 -125
- package/src/get_universe_types_ok.d.ts +0 -14
- package/src/get_universe_types_type_id_ok.d.ts +0 -127
- package/src/get_wars_ok.d.ts +0 -14
- package/src/get_wars_war_id_killmails_ok.d.ts +0 -27
- package/src/get_wars_war_id_ok.d.ts +0 -123
- package/src/index.d.ts +0 -404
- package/src/post_characters_affiliation_ok.d.ts +0 -37
- package/src/post_characters_character_id_assets_locations_ok.d.ts +0 -44
- package/src/post_characters_character_id_assets_names_ok.d.ts +0 -27
- package/src/post_characters_character_id_contacts_contact_ids.d.ts +0 -18
- package/src/post_characters_character_id_contacts_created.d.ts +0 -14
- package/src/post_characters_character_id_cspa_characters.d.ts +0 -18
- package/src/post_characters_character_id_cspa_created.d.ts +0 -8
- package/src/post_characters_character_id_fittings_created.d.ts +0 -16
- package/src/post_characters_character_id_fittings_fitting.d.ts +0 -101
- package/src/post_characters_character_id_mail_created.d.ts +0 -8
- package/src/post_characters_character_id_mail_labels_created.d.ts +0 -8
- package/src/post_characters_character_id_mail_labels_label.d.ts +0 -39
- package/src/post_characters_character_id_mail_mail.d.ts +0 -53
- package/src/post_corporations_corporation_id_assets_locations_ok.d.ts +0 -44
- package/src/post_corporations_corporation_id_assets_names_ok.d.ts +0 -27
- package/src/post_fleets_fleet_id_members_invitation.d.ts +0 -31
- package/src/post_fleets_fleet_id_wings_created.d.ts +0 -16
- package/src/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +0 -16
- package/src/post_ui_openwindow_newmail_new_mail.d.ts +0 -46
- package/src/post_universe_ids_ok.d.ts +0 -241
- package/src/post_universe_names_ok.d.ts +0 -41
- package/src/put_characters_character_id_calendar_event_id_response.d.ts +0 -16
- package/src/put_characters_character_id_contacts_contact_ids.d.ts +0 -18
- package/src/put_characters_character_id_mail_mail_id_contents.d.ts +0 -27
- package/src/put_fleets_fleet_id_members_member_id_movement.d.ts +0 -30
- package/src/put_fleets_fleet_id_new_settings.d.ts +0 -21
- package/src/put_fleets_fleet_id_squads_squad_id_naming.d.ts +0 -16
- package/src/put_fleets_fleet_id_wings_wing_id_naming.d.ts +0 -16
- package/v2/post_fleets_fleet_id_members_invitation.d.ts +0 -27
- package/v2/post_ui_openwindow_newmail_new_mail.d.ts +0 -40
- package/v2/put_characters_character_id_calendar_event_id_response.d.ts +0 -15
- package/v2/put_characters_character_id_contacts_contact_ids.d.ts +0 -16
- package/v2/put_characters_character_id_mail_mail_id_contents.d.ts +0 -20
- package/v2/put_fleets_fleet_id_members_member_id_movement.d.ts +0 -27
- package/v2/put_fleets_fleet_id_new_settings.d.ts +0 -18
- package/v2/put_fleets_fleet_id_squads_squad_id_naming.d.ts +0 -14
- package/v2/put_fleets_fleet_id_wings_wing_id_naming.d.ts +0 -14
package/README.md
CHANGED
|
@@ -3,10 +3,36 @@ Extracted the main type of ESI. Used for ESI request response types.
|
|
|
3
3
|
|
|
4
4
|
## Usage
|
|
5
5
|
|
|
6
|
-
>
|
|
6
|
+
> This package is configured to use version 2 only.
|
|
7
7
|
|
|
8
|
+
+ If you need to use version 1, please refer to the following link:
|
|
9
|
+
[eve-esi-types v1](https://github.com/jeffy-g/eve-esi-types/tree/version-1.x)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
> Sample code is provided -> [`v2.mjs`](./v2.mjs)
|
|
8
13
|
|
|
9
14
|
```shell
|
|
10
|
-
$ node
|
|
15
|
+
$ node v2.mjs
|
|
11
16
|
```
|
|
17
|
+
## API
|
|
18
|
+
|
|
19
|
+
> The following function signature allows you to benefit from `eve-esi-types`.
|
|
20
|
+
> By specifying the method (`get`, `post`, `put`, `delete`) for each `endpoint`,
|
|
21
|
+
> you can determine the result type of the ESI request, what query parameters are required,
|
|
22
|
+
> and whether OAuth authentication is necessary (`auth: true`).
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// function signature
|
|
26
|
+
export declare function fire<
|
|
27
|
+
M extends TESIEntryMethod,
|
|
28
|
+
EP extends keyof TESIResponseOKMap[M],
|
|
29
|
+
Opt extends IdentifyParameters<TESIResponseOKMap[M][EP], ESIRequestOptions>,
|
|
30
|
+
P2 extends IsParameterizedPath<EP, number | number[], Opt>,
|
|
31
|
+
R extends InferESIResponseResult<M, EP>
|
|
32
|
+
>(mthd: M, endp: EP, pathParams?: P2, opt?: Opt): Promise<R>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## References
|
|
12
37
|
|
|
38
|
+
- [`ESI Types Utility Definitions`](./esi-types-util.md)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<!--!
|
|
2
|
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
+
Released under the MIT license
|
|
5
|
+
https://opensource.org/licenses/mit-license.php
|
|
6
|
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
## ESI Types Utility Definitions
|
|
10
|
+
|
|
11
|
+
### IsParameterizedPath
|
|
12
|
+
|
|
13
|
+
`IsParameterizedPath<EP, A, B>` is a type to determine if a path is parameterized. If it is, it returns `A`, otherwise it returns `B`.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
type IsParameterizedPath<EP, A, B> = EP extends `${string}/{${string}}/${string | ""}` ? A : B;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### IdentifyParameters
|
|
20
|
+
|
|
21
|
+
`IdentifyParameters<Entry, Opt>` is a type to identify the required parameters for a given entry type.
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
type IdentifyParameters<Entry, Opt> = Opt & Pick<Entry, Exclude<keyof Entry, "result">>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### InferESIResponseResult
|
|
28
|
+
|
|
29
|
+
`InferESIResponseResult<M extends TESIEntryMethod, EP extends keyof TESIResponseOKMap[M]>` is a type to infer the result type of an ESI response based on the method and endpoint.
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
type InferESIResponseResult<
|
|
33
|
+
M extends TESIEntryMethod,
|
|
34
|
+
EP extends keyof TESIResponseOKMap[M]
|
|
35
|
+
> = TESIResponseOKMap[M][EP] extends { result: infer U } ? U : never;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### TESIEntryMethod
|
|
39
|
+
|
|
40
|
+
`TESIEntryMethod` represents the HTTP methods supported by ESI.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
type TESIEntryMethod = keyof TESIResponseOKMap;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### TEndPointGet
|
|
47
|
+
|
|
48
|
+
`TEndPointGet` represents the endpoints for the "get" method.
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
type TEndPointGet = keyof TESIResponseOKMap["get"];
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### TEndPointPost
|
|
55
|
+
|
|
56
|
+
`TEndPointPost` represents the endpoints for the "post" method.
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
type TEndPointPost = keyof TESIResponseOKMap["post"];
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### TEndPointPut
|
|
63
|
+
|
|
64
|
+
`TEndPointPut` represents the endpoints for the "put" method.
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
type TEndPointPut = keyof TESIResponseOKMap["put"];
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### TEndPointDelete
|
|
71
|
+
|
|
72
|
+
`TEndPointDelete` represents the endpoints for the "delete" method.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
type TEndPointDelete = keyof TESIResponseOKMap["delete"];
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### TESIResponseGetEntry
|
|
79
|
+
|
|
80
|
+
`TESIResponseGetEntry<K extends TEndPointGet>` represents the entry details for the "get" method.
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
type TESIResponseGetEntry<K extends TEndPointGet> = TESIResponseOKMap["get"][K];
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### TESIResponsePutEntry
|
|
87
|
+
|
|
88
|
+
`TESIResponsePutEntry<K extends TEndPointPut>` represents the entry details for the "put" method.
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
type TESIResponsePutEntry<K extends TEndPointPut> = TESIResponseOKMap["put"][K];
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### TESIResponsePostEntry
|
|
95
|
+
|
|
96
|
+
`TESIResponsePostEntry<K extends TEndPointPost>` represents the entry details for the "post" method.
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
type TESIResponsePostEntry<K extends TEndPointPost> = TESIResponseOKMap["post"][K];
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### TESIResponseDeleteEntry
|
|
103
|
+
|
|
104
|
+
`TESIResponseDeleteEntry<K extends TEndPointDelete>` represents the entry details for the "delete" method.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
type TESIResponseDeleteEntry<K extends TEndPointDelete> = TESIResponseOKMap["delete"][K];
|
|
108
|
+
```
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-esi-types",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Extracted the main type of ESI. use for ESI request response types",
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "Extracted the main type of ESI. use for ESI request response types (version 2 only)",
|
|
5
|
+
"main": "v2/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "node
|
|
8
|
-
"test:v2": "node v2.mjs"
|
|
7
|
+
"test": "node v2.mjs"
|
|
9
8
|
},
|
|
10
9
|
"repository": {
|
|
11
10
|
"type": "git",
|
|
@@ -13,13 +12,14 @@
|
|
|
13
12
|
},
|
|
14
13
|
"files": [
|
|
15
14
|
"v2",
|
|
16
|
-
"src",
|
|
17
15
|
"v2.mjs",
|
|
16
|
+
"v2.d.mts",
|
|
17
|
+
"rq-util.mjs",
|
|
18
|
+
"rq-util.d.mts",
|
|
18
19
|
"LICENSE",
|
|
19
|
-
"
|
|
20
|
+
"*.md",
|
|
20
21
|
"package.json",
|
|
21
|
-
"tsconfig.json"
|
|
22
|
-
"esi-request.mjs"
|
|
22
|
+
"tsconfig.json"
|
|
23
23
|
],
|
|
24
24
|
"keywords": [
|
|
25
25
|
"eve",
|
package/rq-util.d.mts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
// Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
+
// Released under the MIT license
|
|
5
|
+
// https://opensource.org/licenses/mit-license.php
|
|
6
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @file rq-util.d.mts
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* this always `https://esi.evetech.net`
|
|
13
|
+
*/
|
|
14
|
+
export declare const BASE = "https://esi.evetech.net";
|
|
15
|
+
export type Truthy = string | number | boolean;
|
|
16
|
+
/**
|
|
17
|
+
* __{Header}.{Payload}.{Signature}__
|
|
18
|
+
*/
|
|
19
|
+
export type TAcccessToken = `${string}.${string}.${string}`;
|
|
20
|
+
export type ESIRequestOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* query params for ESI request.
|
|
23
|
+
*/
|
|
24
|
+
query?: Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* will need it for `POST` request etc.
|
|
27
|
+
*/
|
|
28
|
+
body?: any;
|
|
29
|
+
/**
|
|
30
|
+
* if want response data with ignore error then can be set to `true`.
|
|
31
|
+
*/
|
|
32
|
+
ignoreError?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* cancel request immediately
|
|
35
|
+
*/
|
|
36
|
+
cancelable?: AbortController;
|
|
37
|
+
/**
|
|
38
|
+
* Can be an empty object if no authentication is required.description
|
|
39
|
+
*/
|
|
40
|
+
token?: TAcccessToken;
|
|
41
|
+
auth?: true;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* simple named error class.
|
|
45
|
+
*/
|
|
46
|
+
export declare class ESIRequesError extends Error {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* throws when x-esi-error-limit-remain header value is "0". (http status: 420)
|
|
50
|
+
*/
|
|
51
|
+
export declare class ESIErrorLimitReachedError extends ESIRequesError {
|
|
52
|
+
constructor();
|
|
53
|
+
valueOf(): number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* fetch the extra pages
|
|
57
|
+
*
|
|
58
|
+
* + if the `x-pages` header property ware more than 1
|
|
59
|
+
*
|
|
60
|
+
* @param {string} endpointUrl
|
|
61
|
+
* @param {RequestInit} rqopt request options
|
|
62
|
+
* @param {Record<string, any>} qs queries
|
|
63
|
+
* @param {number} pc pageCount
|
|
64
|
+
* @param {(minus?: number) => void=} increment
|
|
65
|
+
*/
|
|
66
|
+
export declare const fetchP: <T extends unknown>(endpointUrl: string, rqopt: RequestInit, qs: Record<string, any>, pc: number, increment?: (minus?: Truthy) => void) => Promise<T | null>;
|
|
67
|
+
/** ### replace (C)urly (B)races (T)oken
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* "/characters/{character_id}/skills"
|
|
71
|
+
* // ->
|
|
72
|
+
* "/characters/<char.character_id>/skills"
|
|
73
|
+
*
|
|
74
|
+
* @param {string} endpoint e.g - "/characters/{character_id}/"
|
|
75
|
+
* @param {number[]} ids
|
|
76
|
+
* @returns fragment of qualified endpoint uri or null.
|
|
77
|
+
*/
|
|
78
|
+
export declare const replaceCbt: (endpoint: string, ids: number[]) => string;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
|
|
82
|
+
* + The version parameter can be omitted by using `<version>/<endpoint>`
|
|
83
|
+
*/
|
|
84
|
+
export declare const curl: (endp: string) => string;
|
package/rq-util.mjs
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
// Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
+
// Released under the MIT license
|
|
5
|
+
// https://opensource.org/licenses/mit-license.php
|
|
6
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @file rq-util.d.mts
|
|
10
|
+
*/
|
|
11
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
12
|
+
// constants, types
|
|
13
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
14
|
+
// shorthands
|
|
15
|
+
const log = console.log;
|
|
16
|
+
const isArray = Array.isArray;
|
|
17
|
+
/**
|
|
18
|
+
* enable/disable console.log
|
|
19
|
+
*/
|
|
20
|
+
let LOG = false;
|
|
21
|
+
/**
|
|
22
|
+
* this always `https://esi.evetech.net`
|
|
23
|
+
*/
|
|
24
|
+
export const BASE = "https://esi.evetech.net";
|
|
25
|
+
/**
|
|
26
|
+
* simple named error class.
|
|
27
|
+
*/
|
|
28
|
+
export class ESIRequesError extends Error {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* throws when x-esi-error-limit-remain header value is "0". (http status: 420)
|
|
32
|
+
*/
|
|
33
|
+
export class ESIErrorLimitReachedError extends ESIRequesError {
|
|
34
|
+
constructor() {
|
|
35
|
+
super("Cannot continue ESI request because 'x-esi-error-limit-remain' is zero!");
|
|
36
|
+
}
|
|
37
|
+
valueOf() {
|
|
38
|
+
return 420;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* fetch the extra pages
|
|
43
|
+
*
|
|
44
|
+
* + if the `x-pages` header property ware more than 1
|
|
45
|
+
*
|
|
46
|
+
* @param {string} endpointUrl
|
|
47
|
+
* @param {RequestInit} rqopt request options
|
|
48
|
+
* @param {Record<string, any>} qs queries
|
|
49
|
+
* @param {number} pc pageCount
|
|
50
|
+
* @param {(minus?: number) => void=} increment
|
|
51
|
+
*/
|
|
52
|
+
export const fetchP = async (endpointUrl, rqopt, qs, pc, increment = () => { }) => {
|
|
53
|
+
const rqs = [];
|
|
54
|
+
const rqp = new URLSearchParams(qs);
|
|
55
|
+
for (let i = 2; i <= pc;) {
|
|
56
|
+
rqp.set("page", (i++) + "");
|
|
57
|
+
increment();
|
|
58
|
+
rqs.push(fetch(`${endpointUrl}?${rqp + ""}`, rqopt).then(res => res.json()).catch(reason => {
|
|
59
|
+
console.warn(reason);
|
|
60
|
+
return [];
|
|
61
|
+
}).finally(() => {
|
|
62
|
+
increment(1);
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
return Promise.all(rqs).then(jsons => {
|
|
66
|
+
// DEVNOTE: let check the page 2, type is array?
|
|
67
|
+
if (isArray(jsons[0])) {
|
|
68
|
+
let combined = [];
|
|
69
|
+
for (let i = 0, end = jsons.length; i < end;) {
|
|
70
|
+
combined = combined.concat(jsons[i++]);
|
|
71
|
+
}
|
|
72
|
+
return combined;
|
|
73
|
+
}
|
|
74
|
+
LOG && log("> > > pages result are object < < < --", jsons);
|
|
75
|
+
return null;
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
/** ### replace (C)urly (B)races (T)oken
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* "/characters/{character_id}/skills"
|
|
82
|
+
* // ->
|
|
83
|
+
* "/characters/<char.character_id>/skills"
|
|
84
|
+
*
|
|
85
|
+
* @param {string} endpoint e.g - "/characters/{character_id}/"
|
|
86
|
+
* @param {number[]} ids
|
|
87
|
+
* @returns fragment of qualified endpoint uri or null.
|
|
88
|
+
*/
|
|
89
|
+
export const replaceCbt = (endpoint, ids) => {
|
|
90
|
+
const re = /{([\w]+)}/g;
|
|
91
|
+
/** @type {RegExpExecArray?} */
|
|
92
|
+
let m;
|
|
93
|
+
let idx = 0;
|
|
94
|
+
while (m = re.exec(endpoint)) {
|
|
95
|
+
endpoint = endpoint.replace(m[0], ids[idx++] + "");
|
|
96
|
+
}
|
|
97
|
+
return endpoint;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
|
|
102
|
+
* + The version parameter can be omitted by using `<version>/<endpoint>`
|
|
103
|
+
*/
|
|
104
|
+
export const curl = (endp) => {
|
|
105
|
+
endp = endp.replace(/^\/+|\/+$/g, "");
|
|
106
|
+
return `${BASE}/latest/${endp}/`;
|
|
107
|
+
};
|