eve-esi-types 1.0.1 → 2.0.0-beta
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/esi-request.mjs +1 -2
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +27 -0
- package/v2/get_alliances_alliance_id_contacts_ok.d.ts +43 -0
- package/v2/get_alliances_alliance_id_corporations_ok.d.ts +14 -0
- package/v2/get_alliances_alliance_id_icons_ok.d.ts +21 -0
- package/v2/get_alliances_alliance_id_ok.d.ts +46 -0
- package/v2/get_alliances_ok.d.ts +14 -0
- package/v2/get_characters_character_id_agents_research_ok.d.ts +42 -0
- package/v2/get_characters_character_id_assets_ok.d.ts +144 -0
- package/v2/get_characters_character_id_attributes_ok.d.ts +51 -0
- package/v2/get_characters_character_id_blueprints_ok.d.ts +133 -0
- package/v2/get_characters_character_id_bookmarks_folders_ok.d.ts +27 -0
- package/v2/get_characters_character_id_bookmarks_ok.d.ts +91 -0
- package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +32 -0
- package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +66 -0
- package/v2/get_characters_character_id_calendar_ok.d.ts +42 -0
- package/v2/get_characters_character_id_clones_ok.d.ts +82 -0
- package/v2/get_characters_character_id_contacts_labels_ok.d.ts +27 -0
- package/v2/get_characters_character_id_contacts_ok.d.ts +53 -0
- package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +37 -0
- package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +48 -0
- package/v2/get_characters_character_id_contracts_ok.d.ts +137 -0
- package/v2/get_characters_character_id_corporationhistory_ok.d.ts +37 -0
- package/v2/get_characters_character_id_fatigue_ok.d.ts +26 -0
- package/v2/get_characters_character_id_fittings_ok.d.ts +108 -0
- package/v2/get_characters_character_id_fleet_ok.d.ts +35 -0
- package/v2/get_characters_character_id_fw_stats_ok.d.ts +75 -0
- package/v2/get_characters_character_id_implants_ok.d.ts +14 -0
- package/v2/get_characters_character_id_industry_jobs_ok.d.ts +133 -0
- package/v2/get_characters_character_id_killmails_recent_ok.d.ts +27 -0
- package/v2/get_characters_character_id_location_ok.d.ts +26 -0
- package/v2/get_characters_character_id_loyalty_points_ok.d.ts +27 -0
- package/v2/get_characters_character_id_mail_labels_ok.d.ts +67 -0
- package/v2/get_characters_character_id_mail_lists_ok.d.ts +27 -0
- package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +71 -0
- package/v2/get_characters_character_id_mail_ok.d.ts +77 -0
- package/v2/get_characters_character_id_medals_ok.d.ts +147 -0
- package/v2/get_characters_character_id_mining_ok.d.ts +37 -0
- package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +42 -0
- package/v2/get_characters_character_id_notifications_ok.d.ts +297 -0
- package/v2/get_characters_character_id_ok.d.ts +66 -0
- package/v2/get_characters_character_id_online_ok.d.ts +31 -0
- package/v2/get_characters_character_id_opportunities_ok.d.ts +27 -0
- package/v2/get_characters_character_id_orders_history_ok.d.ts +104 -0
- package/v2/get_characters_character_id_orders_ok.d.ts +99 -0
- package/v2/get_characters_character_id_planets_ok.d.ts +131 -0
- package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +323 -0
- package/v2/get_characters_character_id_portrait_ok.d.ts +31 -0
- package/v2/get_characters_character_id_roles_ok.d.ts +271 -0
- package/v2/get_characters_character_id_search_ok.d.ts +132 -0
- package/v2/get_characters_character_id_ship_ok.d.ts +26 -0
- package/v2/get_characters_character_id_skillqueue_ok.d.ts +57 -0
- package/v2/get_characters_character_id_skills_ok.d.ts +54 -0
- package/v2/get_characters_character_id_standings_ok.d.ts +32 -0
- package/v2/get_characters_character_id_titles_ok.d.ts +187 -0
- package/v2/get_characters_character_id_wallet_journal_ok.d.ts +240 -0
- package/v2/get_characters_character_id_wallet_ok.d.ts +8 -0
- package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +67 -0
- package/v2/get_contracts_public_bids_contract_id_ok.d.ts +32 -0
- package/v2/get_contracts_public_items_contract_id_ok.d.ts +62 -0
- package/v2/get_contracts_public_region_id_ok.d.ts +97 -0
- package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +45 -0
- package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +45 -0
- package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +33 -0
- package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +37 -0
- package/v2/get_corporations_corporation_id_assets_ok.d.ts +180 -0
- package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +174 -0
- package/v2/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +32 -0
- package/v2/get_corporations_corporation_id_bookmarks_ok.d.ts +91 -0
- package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +27 -0
- package/v2/get_corporations_corporation_id_contacts_ok.d.ts +48 -0
- package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +204 -0
- package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +38 -0
- package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +48 -0
- package/v2/get_corporations_corporation_id_contracts_ok.d.ts +137 -0
- package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +92 -0
- package/v2/get_corporations_corporation_id_divisions_ok.d.ts +133 -0
- package/v2/get_corporations_corporation_id_facilities_ok.d.ts +32 -0
- package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +70 -0
- package/v2/get_corporations_corporation_id_icons_ok.d.ts +26 -0
- package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +133 -0
- package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +27 -0
- package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +47 -0
- package/v2/get_corporations_corporation_id_medals_ok.d.ts +42 -0
- package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +8 -0
- package/v2/get_corporations_corporation_id_members_ok.d.ts +14 -0
- package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +197 -0
- package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +52 -0
- package/v2/get_corporations_corporation_id_ok.d.ts +81 -0
- package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +109 -0
- package/v2/get_corporations_corporation_id_orders_ok.d.ts +104 -0
- package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +175 -0
- package/v2/get_corporations_corporation_id_roles_ok.d.ts +545 -0
- package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +32 -0
- package/v2/get_corporations_corporation_id_standings_ok.d.ts +32 -0
- package/v2/get_corporations_corporation_id_starbases_ok.d.ts +62 -0
- package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +369 -0
- package/v2/get_corporations_corporation_id_structures_ok.d.ts +194 -0
- package/v2/get_corporations_corporation_id_titles_ok.d.ts +715 -0
- package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +241 -0
- package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +63 -0
- package/v2/get_corporations_corporation_id_wallets_ok.d.ts +65 -0
- package/v2/get_corporations_npccorps_ok.d.ts +14 -0
- package/v2/get_dogma_attributes_attribute_id_ok.d.ts +61 -0
- package/v2/get_dogma_attributes_ok.d.ts +14 -0
- package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +72 -0
- package/v2/get_dogma_effects_effect_id_ok.d.ts +154 -0
- package/v2/get_dogma_effects_ok.d.ts +14 -0
- package/v2/get_fleets_fleet_id_members_ok.d.ts +67 -0
- package/v2/get_fleets_fleet_id_ok.d.ts +31 -0
- package/v2/get_fleets_fleet_id_wings_ok.d.ts +50 -0
- package/v2/get_fw_leaderboards_characters_ok.d.ts +163 -0
- package/v2/get_fw_leaderboards_corporations_ok.d.ts +589 -0
- package/v2/get_fw_leaderboards_ok.d.ts +235 -0
- package/v2/get_fw_stats_ok.d.ts +76 -0
- package/v2/get_fw_systems_ok.d.ts +47 -0
- package/v2/get_fw_wars_ok.d.ts +27 -0
- package/v2/get_incursions_ok.d.ts +63 -0
- package/v2/get_industry_facilities_ok.d.ts +47 -0
- package/v2/get_industry_systems_ok.d.ts +122 -0
- package/v2/get_insurance_prices_ok.d.ts +70 -0
- package/v2/get_killmails_killmail_id_killmail_hash_ok.d.ts +242 -0
- package/v2/get_loyalty_stores_corporation_id_offers_ok.d.ts +70 -0
- package/v2/get_markets_groups_market_group_id_ok.d.ts +42 -0
- package/v2/get_markets_groups_ok.d.ts +14 -0
- package/v2/get_markets_prices_ok.d.ts +32 -0
- package/v2/get_markets_region_id_history_ok.d.ts +47 -0
- package/v2/get_markets_region_id_orders_ok.d.ts +89 -0
- package/v2/get_markets_region_id_types_ok.d.ts +14 -0
- package/v2/get_markets_structures_structure_id_ok.d.ts +84 -0
- package/v2/get_opportunities_groups_group_id_ok.d.ts +53 -0
- package/v2/get_opportunities_groups_ok.d.ts +14 -0
- package/v2/get_opportunities_tasks_ok.d.ts +14 -0
- package/v2/get_opportunities_tasks_task_id_ok.d.ts +31 -0
- package/v2/get_route_origin_destination_ok.d.ts +14 -0
- package/v2/get_sovereignty_campaigns_ok.d.ts +94 -0
- package/v2/get_sovereignty_map_ok.d.ts +37 -0
- package/v2/get_sovereignty_structures_ok.d.ts +58 -0
- package/v2/get_status_ok.d.ts +31 -0
- package/v2/get_universe_ancestries_ok.d.ts +47 -0
- package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +43 -0
- package/v2/get_universe_bloodlines_ok.d.ts +72 -0
- package/v2/get_universe_categories_category_id_ok.d.ts +37 -0
- package/v2/get_universe_categories_ok.d.ts +14 -0
- package/v2/get_universe_constellations_constellation_id_ok.d.ts +59 -0
- package/v2/get_universe_constellations_ok.d.ts +14 -0
- package/v2/get_universe_factions_ok.d.ts +67 -0
- package/v2/get_universe_graphics_graphic_id_ok.d.ts +51 -0
- package/v2/get_universe_graphics_ok.d.ts +14 -0
- package/v2/get_universe_groups_group_id_ok.d.ts +42 -0
- package/v2/get_universe_groups_ok.d.ts +14 -0
- package/v2/get_universe_moons_moon_id_ok.d.ts +48 -0
- package/v2/get_universe_planets_planet_id_ok.d.ts +53 -0
- package/v2/get_universe_races_ok.d.ts +57 -0
- package/v2/get_universe_regions_ok.d.ts +14 -0
- package/v2/get_universe_regions_region_id_ok.d.ts +37 -0
- package/v2/get_universe_schematics_schematic_id_ok.d.ts +21 -0
- package/v2/get_universe_stargates_stargate_id_ok.d.ts +70 -0
- package/v2/get_universe_stars_star_id_ok.d.ts +140 -0
- package/v2/get_universe_stations_station_id_ok.d.ts +121 -0
- package/v2/get_universe_structures_ok.d.ts +14 -0
- package/v2/get_universe_structures_structure_id_ok.d.ts +54 -0
- package/v2/get_universe_system_jumps_ok.d.ts +27 -0
- package/v2/get_universe_system_kills_ok.d.ts +37 -0
- package/v2/get_universe_systems_ok.d.ts +14 -0
- package/v2/get_universe_systems_system_id_ok.d.ts +125 -0
- package/v2/get_universe_types_ok.d.ts +14 -0
- package/v2/get_universe_types_type_id_ok.d.ts +127 -0
- package/v2/get_wars_ok.d.ts +14 -0
- package/v2/get_wars_war_id_killmails_ok.d.ts +27 -0
- package/v2/get_wars_war_id_ok.d.ts +123 -0
- package/v2/index.d.ts +1043 -0
- package/v2/post_characters_affiliation_ok.d.ts +37 -0
- package/v2/post_characters_character_id_assets_locations_ok.d.ts +44 -0
- package/v2/post_characters_character_id_assets_names_ok.d.ts +27 -0
- package/v2/post_characters_character_id_contacts_contact_ids.d.ts +18 -0
- package/v2/post_characters_character_id_contacts_created.d.ts +14 -0
- package/v2/post_characters_character_id_cspa_characters.d.ts +18 -0
- package/v2/post_characters_character_id_cspa_created.d.ts +8 -0
- package/v2/post_characters_character_id_fittings_created.d.ts +16 -0
- package/v2/post_characters_character_id_fittings_fitting.d.ts +101 -0
- package/v2/post_characters_character_id_mail_created.d.ts +8 -0
- package/v2/post_characters_character_id_mail_labels_created.d.ts +8 -0
- package/v2/post_characters_character_id_mail_labels_label.d.ts +39 -0
- package/v2/post_characters_character_id_mail_mail.d.ts +53 -0
- package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +44 -0
- package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +27 -0
- package/v2/post_fleets_fleet_id_members_invitation.d.ts +31 -0
- package/v2/post_fleets_fleet_id_wings_created.d.ts +16 -0
- package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +16 -0
- package/v2/post_ui_openwindow_newmail_new_mail.d.ts +46 -0
- package/v2/post_universe_ids_ok.d.ts +241 -0
- package/v2/post_universe_names_ok.d.ts +41 -0
- package/v2/put_characters_character_id_calendar_event_id_response.d.ts +16 -0
- package/v2/put_characters_character_id_contacts_contact_ids.d.ts +18 -0
- package/v2/put_characters_character_id_mail_mail_id_contents.d.ts +27 -0
- package/v2/put_fleets_fleet_id_members_member_id_movement.d.ts +30 -0
- package/v2/put_fleets_fleet_id_new_settings.d.ts +21 -0
- package/v2/put_fleets_fleet_id_squads_squad_id_naming.d.ts +16 -0
- package/v2/put_fleets_fleet_id_wings_wing_id_naming.d.ts +16 -0
- package/v2.mjs +253 -0
- package/v2.mts +316 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /universe/ids/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* id integer
|
|
7
|
+
*/
|
|
8
|
+
type PostUniverseIdsId = number;
|
|
9
|
+
/**
|
|
10
|
+
* name string
|
|
11
|
+
*/
|
|
12
|
+
type PostUniverseIdsName = string;
|
|
13
|
+
/**
|
|
14
|
+
* agents array
|
|
15
|
+
*
|
|
16
|
+
* @maxItems 500
|
|
17
|
+
*/
|
|
18
|
+
type PostUniverseIdsAgents = PostUniverseIdsAgent[];
|
|
19
|
+
/**
|
|
20
|
+
* id integer
|
|
21
|
+
*/
|
|
22
|
+
type PostUniverseIdsAllianceId = number;
|
|
23
|
+
/**
|
|
24
|
+
* name string
|
|
25
|
+
*/
|
|
26
|
+
type PostUniverseIdsAllianceName = string;
|
|
27
|
+
/**
|
|
28
|
+
* alliances array
|
|
29
|
+
*
|
|
30
|
+
* @maxItems 500
|
|
31
|
+
*/
|
|
32
|
+
type PostUniverseIdsAlliances = PostUniverseIdsAlliance[];
|
|
33
|
+
/**
|
|
34
|
+
* id integer
|
|
35
|
+
*/
|
|
36
|
+
type PostUniverseIdsCharacterId = number;
|
|
37
|
+
/**
|
|
38
|
+
* name string
|
|
39
|
+
*/
|
|
40
|
+
type PostUniverseIdsCharacterName = string;
|
|
41
|
+
/**
|
|
42
|
+
* characters array
|
|
43
|
+
*
|
|
44
|
+
* @maxItems 500
|
|
45
|
+
*/
|
|
46
|
+
type PostUniverseIdsCharacters = PostUniverseIdsCharacter[];
|
|
47
|
+
/**
|
|
48
|
+
* id integer
|
|
49
|
+
*/
|
|
50
|
+
type PostUniverseIdsConstellationId = number;
|
|
51
|
+
/**
|
|
52
|
+
* name string
|
|
53
|
+
*/
|
|
54
|
+
type PostUniverseIdsConstellationName = string;
|
|
55
|
+
/**
|
|
56
|
+
* constellations array
|
|
57
|
+
*
|
|
58
|
+
* @maxItems 500
|
|
59
|
+
*/
|
|
60
|
+
type PostUniverseIdsConstellations = PostUniverseIdsConstellation[];
|
|
61
|
+
/**
|
|
62
|
+
* id integer
|
|
63
|
+
*/
|
|
64
|
+
type PostUniverseIdsCorporationId = number;
|
|
65
|
+
/**
|
|
66
|
+
* name string
|
|
67
|
+
*/
|
|
68
|
+
type PostUniverseIdsCorporationName = string;
|
|
69
|
+
/**
|
|
70
|
+
* corporations array
|
|
71
|
+
*
|
|
72
|
+
* @maxItems 500
|
|
73
|
+
*/
|
|
74
|
+
type PostUniverseIdsCorporations = PostUniverseIdsCorporation[];
|
|
75
|
+
/**
|
|
76
|
+
* id integer
|
|
77
|
+
*/
|
|
78
|
+
type PostUniverseIdsFactionId = number;
|
|
79
|
+
/**
|
|
80
|
+
* name string
|
|
81
|
+
*/
|
|
82
|
+
type PostUniverseIdsFactionName = string;
|
|
83
|
+
/**
|
|
84
|
+
* factions array
|
|
85
|
+
*
|
|
86
|
+
* @maxItems 500
|
|
87
|
+
*/
|
|
88
|
+
type PostUniverseIdsFactions = PostUniverseIdsFaction[];
|
|
89
|
+
/**
|
|
90
|
+
* id integer
|
|
91
|
+
*/
|
|
92
|
+
type PostUniverseIdsInventoryTypeId = number;
|
|
93
|
+
/**
|
|
94
|
+
* name string
|
|
95
|
+
*/
|
|
96
|
+
type PostUniverseIdsInventoryTypeName = string;
|
|
97
|
+
/**
|
|
98
|
+
* inventory_types array
|
|
99
|
+
*
|
|
100
|
+
* @maxItems 500
|
|
101
|
+
*/
|
|
102
|
+
type PostUniverseIdsInventoryTypes = PostUniverseIdsInventoryType[];
|
|
103
|
+
/**
|
|
104
|
+
* id integer
|
|
105
|
+
*/
|
|
106
|
+
type PostUniverseIdsRegionId = number;
|
|
107
|
+
/**
|
|
108
|
+
* name string
|
|
109
|
+
*/
|
|
110
|
+
type PostUniverseIdsRegionName = string;
|
|
111
|
+
/**
|
|
112
|
+
* regions array
|
|
113
|
+
*
|
|
114
|
+
* @maxItems 500
|
|
115
|
+
*/
|
|
116
|
+
type PostUniverseIdsRegions = PostUniverseIdsRegion[];
|
|
117
|
+
/**
|
|
118
|
+
* id integer
|
|
119
|
+
*/
|
|
120
|
+
type PostUniverseIdsStationId = number;
|
|
121
|
+
/**
|
|
122
|
+
* name string
|
|
123
|
+
*/
|
|
124
|
+
type PostUniverseIdsStationName = string;
|
|
125
|
+
/**
|
|
126
|
+
* stations array
|
|
127
|
+
*
|
|
128
|
+
* @maxItems 500
|
|
129
|
+
*/
|
|
130
|
+
type PostUniverseIdsStations = PostUniverseIdsStation[];
|
|
131
|
+
/**
|
|
132
|
+
* id integer
|
|
133
|
+
*/
|
|
134
|
+
type PostUniverseIdsSystemId = number;
|
|
135
|
+
/**
|
|
136
|
+
* name string
|
|
137
|
+
*/
|
|
138
|
+
type PostUniverseIdsSystemName = string;
|
|
139
|
+
/**
|
|
140
|
+
* systems array
|
|
141
|
+
*
|
|
142
|
+
* @maxItems 500
|
|
143
|
+
*/
|
|
144
|
+
type PostUniverseIdsSystems = PostUniverseIdsSystem[];
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 200 ok object
|
|
148
|
+
*/
|
|
149
|
+
interface PostUniverseIdsOk {
|
|
150
|
+
agents?: PostUniverseIdsAgents;
|
|
151
|
+
alliances?: PostUniverseIdsAlliances;
|
|
152
|
+
characters?: PostUniverseIdsCharacters;
|
|
153
|
+
constellations?: PostUniverseIdsConstellations;
|
|
154
|
+
corporations?: PostUniverseIdsCorporations;
|
|
155
|
+
factions?: PostUniverseIdsFactions;
|
|
156
|
+
inventory_types?: PostUniverseIdsInventoryTypes;
|
|
157
|
+
regions?: PostUniverseIdsRegions;
|
|
158
|
+
stations?: PostUniverseIdsStations;
|
|
159
|
+
systems?: PostUniverseIdsSystems;
|
|
160
|
+
[k: string]: unknown | undefined;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* agent object
|
|
164
|
+
*/
|
|
165
|
+
interface PostUniverseIdsAgent {
|
|
166
|
+
id?: PostUniverseIdsId;
|
|
167
|
+
name?: PostUniverseIdsName;
|
|
168
|
+
[k: string]: unknown | undefined;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* alliance object
|
|
172
|
+
*/
|
|
173
|
+
interface PostUniverseIdsAlliance {
|
|
174
|
+
id?: PostUniverseIdsAllianceId;
|
|
175
|
+
name?: PostUniverseIdsAllianceName;
|
|
176
|
+
[k: string]: unknown | undefined;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* character object
|
|
180
|
+
*/
|
|
181
|
+
interface PostUniverseIdsCharacter {
|
|
182
|
+
id?: PostUniverseIdsCharacterId;
|
|
183
|
+
name?: PostUniverseIdsCharacterName;
|
|
184
|
+
[k: string]: unknown | undefined;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* constellation object
|
|
188
|
+
*/
|
|
189
|
+
interface PostUniverseIdsConstellation {
|
|
190
|
+
id?: PostUniverseIdsConstellationId;
|
|
191
|
+
name?: PostUniverseIdsConstellationName;
|
|
192
|
+
[k: string]: unknown | undefined;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* corporation object
|
|
196
|
+
*/
|
|
197
|
+
interface PostUniverseIdsCorporation {
|
|
198
|
+
id?: PostUniverseIdsCorporationId;
|
|
199
|
+
name?: PostUniverseIdsCorporationName;
|
|
200
|
+
[k: string]: unknown | undefined;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* faction object
|
|
204
|
+
*/
|
|
205
|
+
interface PostUniverseIdsFaction {
|
|
206
|
+
id?: PostUniverseIdsFactionId;
|
|
207
|
+
name?: PostUniverseIdsFactionName;
|
|
208
|
+
[k: string]: unknown | undefined;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* inventory_type object
|
|
212
|
+
*/
|
|
213
|
+
interface PostUniverseIdsInventoryType {
|
|
214
|
+
id?: PostUniverseIdsInventoryTypeId;
|
|
215
|
+
name?: PostUniverseIdsInventoryTypeName;
|
|
216
|
+
[k: string]: unknown | undefined;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* region object
|
|
220
|
+
*/
|
|
221
|
+
interface PostUniverseIdsRegion {
|
|
222
|
+
id?: PostUniverseIdsRegionId;
|
|
223
|
+
name?: PostUniverseIdsRegionName;
|
|
224
|
+
[k: string]: unknown | undefined;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* station object
|
|
228
|
+
*/
|
|
229
|
+
interface PostUniverseIdsStation {
|
|
230
|
+
id?: PostUniverseIdsStationId;
|
|
231
|
+
name?: PostUniverseIdsStationName;
|
|
232
|
+
[k: string]: unknown | undefined;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* system object
|
|
236
|
+
*/
|
|
237
|
+
interface PostUniverseIdsSystem {
|
|
238
|
+
id?: PostUniverseIdsSystemId;
|
|
239
|
+
name?: PostUniverseIdsSystemName;
|
|
240
|
+
[k: string]: unknown | undefined;
|
|
241
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /universe/names/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* category string
|
|
7
|
+
*/
|
|
8
|
+
type PostUniverseNamesCategory =
|
|
9
|
+
| "alliance"
|
|
10
|
+
| "character"
|
|
11
|
+
| "constellation"
|
|
12
|
+
| "corporation"
|
|
13
|
+
| "inventory_type"
|
|
14
|
+
| "region"
|
|
15
|
+
| "solar_system"
|
|
16
|
+
| "station"
|
|
17
|
+
| "faction";
|
|
18
|
+
/**
|
|
19
|
+
* id integer
|
|
20
|
+
*/
|
|
21
|
+
type PostUniverseNamesId = number;
|
|
22
|
+
/**
|
|
23
|
+
* name string
|
|
24
|
+
*/
|
|
25
|
+
type PostUniverseNamesName = string;
|
|
26
|
+
/**
|
|
27
|
+
* 200 ok array
|
|
28
|
+
*
|
|
29
|
+
* @maxItems 1000
|
|
30
|
+
*/
|
|
31
|
+
type PostUniverseNamesOk = PostUniverseNames_200Ok[];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 200 ok object
|
|
35
|
+
*/
|
|
36
|
+
interface PostUniverseNames_200Ok {
|
|
37
|
+
category: PostUniverseNamesCategory;
|
|
38
|
+
id: PostUniverseNamesId;
|
|
39
|
+
name: PostUniverseNamesName;
|
|
40
|
+
[k: string]: unknown | undefined;
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /characters/{character_id}/calendar/{event_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* response string
|
|
7
|
+
*/
|
|
8
|
+
type PutCharactersCharacterIdCalendarEventIdResponseResponse = "accepted" | "declined" | "tentative";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* response object
|
|
12
|
+
*/
|
|
13
|
+
interface PutCharactersCharacterIdCalendarEventIdResponse {
|
|
14
|
+
response: PutCharactersCharacterIdCalendarEventIdResponseResponse;
|
|
15
|
+
[k: string]: unknown | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /characters/{character_id}/contacts/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* contact_ids array
|
|
7
|
+
*
|
|
8
|
+
* @minItems 1
|
|
9
|
+
* @maxItems 100
|
|
10
|
+
*/
|
|
11
|
+
type PutCharactersCharacterIdContactsContactIds = [
|
|
12
|
+
PutCharactersCharacterIdContactsContactId,
|
|
13
|
+
...PutCharactersCharacterIdContactsContactId[]
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* ID of the contact to edit
|
|
17
|
+
*/
|
|
18
|
+
type PutCharactersCharacterIdContactsContactId = number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /characters/{character_id}/mail/{mail_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* label integer
|
|
7
|
+
*/
|
|
8
|
+
type PutCharactersCharacterIdMailMailIdLabel = number;
|
|
9
|
+
/**
|
|
10
|
+
* Labels to assign to the mail. Pre-existing labels are unassigned.
|
|
11
|
+
*
|
|
12
|
+
* @maxItems 25
|
|
13
|
+
*/
|
|
14
|
+
type PutCharactersCharacterIdMailMailIdLabels = PutCharactersCharacterIdMailMailIdLabel[];
|
|
15
|
+
/**
|
|
16
|
+
* Whether the mail is flagged as read
|
|
17
|
+
*/
|
|
18
|
+
type PutCharactersCharacterIdMailMailIdRead = boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* contents object
|
|
22
|
+
*/
|
|
23
|
+
interface PutCharactersCharacterIdMailMailIdContents {
|
|
24
|
+
labels?: PutCharactersCharacterIdMailMailIdLabels;
|
|
25
|
+
read?: PutCharactersCharacterIdMailMailIdRead;
|
|
26
|
+
[k: string]: unknown | undefined;
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /fleets/{fleet_id}/members/{member_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* If a character is moved to the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified. If a character is moved to the `wing_commander` role, only `wing_id` should be specified. If a character is moved to the `squad_commander` role, both `wing_id` and `squad_id` should be specified. If a character is moved to the `squad_member` role, both `wing_id` and `squad_id` should be specified.
|
|
7
|
+
*/
|
|
8
|
+
type PutFleetsFleetIdMembersMemberIdRole =
|
|
9
|
+
| "fleet_commander"
|
|
10
|
+
| "wing_commander"
|
|
11
|
+
| "squad_commander"
|
|
12
|
+
| "squad_member";
|
|
13
|
+
/**
|
|
14
|
+
* squad_id integer
|
|
15
|
+
*/
|
|
16
|
+
type PutFleetsFleetIdMembersMemberIdSquadId = number;
|
|
17
|
+
/**
|
|
18
|
+
* wing_id integer
|
|
19
|
+
*/
|
|
20
|
+
type PutFleetsFleetIdMembersMemberIdWingId = number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* movement object
|
|
24
|
+
*/
|
|
25
|
+
interface PutFleetsFleetIdMembersMemberIdMovement {
|
|
26
|
+
role: PutFleetsFleetIdMembersMemberIdRole;
|
|
27
|
+
squad_id?: PutFleetsFleetIdMembersMemberIdSquadId;
|
|
28
|
+
wing_id?: PutFleetsFleetIdMembersMemberIdWingId;
|
|
29
|
+
[k: string]: unknown | undefined;
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /fleets/{fleet_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Should free-move be enabled in the fleet
|
|
7
|
+
*/
|
|
8
|
+
type PutFleetsFleetIdIsFreeMove = boolean;
|
|
9
|
+
/**
|
|
10
|
+
* New fleet MOTD in CCP flavoured HTML
|
|
11
|
+
*/
|
|
12
|
+
type PutFleetsFleetIdMotd = string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* new_settings object
|
|
16
|
+
*/
|
|
17
|
+
interface PutFleetsFleetIdNewSettings {
|
|
18
|
+
is_free_move?: PutFleetsFleetIdIsFreeMove;
|
|
19
|
+
motd?: PutFleetsFleetIdMotd;
|
|
20
|
+
[k: string]: unknown | undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /fleets/{fleet_id}/squads/{squad_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* name string
|
|
7
|
+
*/
|
|
8
|
+
type PutFleetsFleetIdSquadsSquadIdName = string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* naming object
|
|
12
|
+
*/
|
|
13
|
+
interface PutFleetsFleetIdSquadsSquadIdNaming {
|
|
14
|
+
name: PutFleetsFleetIdSquadsSquadIdName;
|
|
15
|
+
[k: string]: unknown | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESI endpoint: /fleets/{fleet_id}/wings/{wing_id}/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* name string
|
|
7
|
+
*/
|
|
8
|
+
type PutFleetsFleetIdWingsWingIdName = string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* naming object
|
|
12
|
+
*/
|
|
13
|
+
interface PutFleetsFleetIdWingsWingIdNaming {
|
|
14
|
+
name: PutFleetsFleetIdWingsWingIdName;
|
|
15
|
+
[k: string]: unknown | undefined;
|
|
16
|
+
}
|
package/v2.mjs
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
// import type { TESIResponseOKMap } from "eve-esi-types";
|
|
2
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
// constants, types
|
|
4
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
5
|
+
// shorthands
|
|
6
|
+
const log = console.log;
|
|
7
|
+
const isArray = Array.isArray;
|
|
8
|
+
/**
|
|
9
|
+
* enable/disable console.log
|
|
10
|
+
*/
|
|
11
|
+
let LOG = false;
|
|
12
|
+
/**
|
|
13
|
+
* this always `https://esi.evetech.net`
|
|
14
|
+
*/
|
|
15
|
+
const BASE = "https://esi.evetech.net";
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {import("./v2").TESIResponseOKMap} TESIResponseOKMap
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @typedef ESIRequestOptions
|
|
21
|
+
* @prop {Record<string, any>} [queries] query params for ESI request.
|
|
22
|
+
* @prop {any} [body] will need it for `POST` request etc.
|
|
23
|
+
* @prop {boolean} [ignoreError] if want response data with ignore error then can be set to `true`.
|
|
24
|
+
* @prop {AbortController} [cancelable] cancel request immediately
|
|
25
|
+
* @prop {string} [token] Can be an empty object if no authentication is required.description
|
|
26
|
+
* @prop {true=} [auth] Can be an empty object if no authentication is required.description
|
|
27
|
+
*/
|
|
28
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
29
|
+
// module vars, functions
|
|
30
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
31
|
+
/**
|
|
32
|
+
* Get the number of currently executing ESI requests
|
|
33
|
+
*/
|
|
34
|
+
let ax = 0;
|
|
35
|
+
/**
|
|
36
|
+
* simple named error class.
|
|
37
|
+
*/
|
|
38
|
+
class ESIRequesError extends Error {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* throws when x-esi-error-limit-remain header value is "0". (http status: 420)
|
|
42
|
+
*/
|
|
43
|
+
class ESIErrorLimitReachedError extends Error {
|
|
44
|
+
constructor() {
|
|
45
|
+
super("Cannot continue ESI request because 'x-esi-error-limit-remain' is zero!");
|
|
46
|
+
}
|
|
47
|
+
valueOf() {
|
|
48
|
+
return 420;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* fetch the extra pages
|
|
53
|
+
*
|
|
54
|
+
* + if the `x-pages` header property ware more than 1
|
|
55
|
+
*
|
|
56
|
+
* @param {string} endpointUrl
|
|
57
|
+
* @param {RequestInit} rqopt request options
|
|
58
|
+
* @param {Record<string, any>} qs queries
|
|
59
|
+
* @param {number} pc pageCount
|
|
60
|
+
*/
|
|
61
|
+
const fetchP = async (endpointUrl, rqopt, qs, pc) => {
|
|
62
|
+
const rqs = [];
|
|
63
|
+
const rqp = new URLSearchParams(qs);
|
|
64
|
+
for (let i = 2; i <= pc;) {
|
|
65
|
+
rqp.set("page", (i++) + "");
|
|
66
|
+
ax++;
|
|
67
|
+
rqs.push(fetch(`${endpointUrl}?${rqp + ""}`, rqopt).then(res => res.json()).catch(reason => {
|
|
68
|
+
console.warn(reason);
|
|
69
|
+
return [];
|
|
70
|
+
}).finally(() => {
|
|
71
|
+
ax--;
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
return Promise.all(rqs).then(jsons => {
|
|
75
|
+
// DEVNOTE: let check the page 2, type is array?
|
|
76
|
+
if (isArray(jsons[0])) {
|
|
77
|
+
let combined = [];
|
|
78
|
+
for (let i = 0, end = jsons.length; i < end;) {
|
|
79
|
+
combined = combined.concat(jsons[i++]);
|
|
80
|
+
}
|
|
81
|
+
return combined;
|
|
82
|
+
}
|
|
83
|
+
LOG && log("> > > pages result are object < < < --", jsons);
|
|
84
|
+
return null;
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
/** ### replace (C)urly (B)races (T)oken
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* "/characters/{character_id}/skills"
|
|
91
|
+
* // ->
|
|
92
|
+
* "/characters/<char.character_id>/skills"
|
|
93
|
+
*
|
|
94
|
+
* @param {string} endpoint e.g - "/characters/{character_id}/"
|
|
95
|
+
* @param {number[]} ids
|
|
96
|
+
* @returns fragment of qualified endpoint uri or null.
|
|
97
|
+
*/
|
|
98
|
+
const replaceCbt = (endpoint, ids) => {
|
|
99
|
+
const re = /{([\w]+)}/g;
|
|
100
|
+
/** @type {RegExpExecArray?} */
|
|
101
|
+
let m;
|
|
102
|
+
let idx = 0;
|
|
103
|
+
while (m = re.exec(endpoint)) {
|
|
104
|
+
endpoint = endpoint.replace(m[0], ids[idx++] + "");
|
|
105
|
+
}
|
|
106
|
+
return endpoint;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
|
|
111
|
+
* + The version parameter can be omitted by using `<version>/<endpoint>`
|
|
112
|
+
*/
|
|
113
|
+
const curl = (endp) => {
|
|
114
|
+
endp = endp.replace(/^\/+|\/+$/g, "");
|
|
115
|
+
return `${BASE}/latest/${endp}/`;
|
|
116
|
+
};
|
|
117
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
118
|
+
// main functions
|
|
119
|
+
// - - - - - - - - - - - - - - - - - - - -
|
|
120
|
+
// It should complete correctly.
|
|
121
|
+
async function getEVEStatus() {
|
|
122
|
+
try {
|
|
123
|
+
const ok = await fire("get", "/characters/{character_id}/ship/", 994562, { auth: true, token: "<accessToken of 994562>" });
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
console.error("Failed to get character ship -", error);
|
|
127
|
+
}
|
|
128
|
+
return fire("get", "/status/");
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* fire ESI request
|
|
132
|
+
* @template {TESIEntryMethod} M
|
|
133
|
+
* @template {keyof TESIResponseOKMap[M]} EP
|
|
134
|
+
* @template {IdentifyParameters<TESIResponseOKMap[M][EP] & { result: any }, ESIRequestOptions>} Opt
|
|
135
|
+
* @template {TESIResponseOKMap[M][EP] extends { result: infer U } ? U : never} R
|
|
136
|
+
*
|
|
137
|
+
* @param {M} mthd
|
|
138
|
+
* @param {EP} endp - The endpoint to request.
|
|
139
|
+
* @param {number | number[] | Opt} [pathParams] - Optional path parameters.
|
|
140
|
+
* @param {Opt} [opt] - default is empty object {}. `body` is json string
|
|
141
|
+
* @returns {Promise<R>} - The response from the endpoint.
|
|
142
|
+
* @throws
|
|
143
|
+
* @async
|
|
144
|
+
*/
|
|
145
|
+
export async function fire(mthd, endp, pathParams, opt) {
|
|
146
|
+
if (typeof pathParams === "number") {
|
|
147
|
+
pathParams = /** @type {number[]} */ ([pathParams]);
|
|
148
|
+
}
|
|
149
|
+
if (isArray(pathParams)) {
|
|
150
|
+
// @ts-ignore actualy endp is string
|
|
151
|
+
endp = replaceCbt(endp, pathParams);
|
|
152
|
+
}
|
|
153
|
+
if (!opt) {
|
|
154
|
+
// When only options are provided
|
|
155
|
+
opt = /** @type {Opt} */ (pathParams) || opt || {};
|
|
156
|
+
}
|
|
157
|
+
/** @type {RequestInit} */
|
|
158
|
+
const rqopt = {
|
|
159
|
+
method: mthd,
|
|
160
|
+
mode: "cors",
|
|
161
|
+
cache: "no-cache",
|
|
162
|
+
signal: opt.cancelable?.signal,
|
|
163
|
+
headers: {}
|
|
164
|
+
};
|
|
165
|
+
const qss = {
|
|
166
|
+
// language: "en",
|
|
167
|
+
};
|
|
168
|
+
if (opt.queries) {
|
|
169
|
+
// Object.assign(queries, options.queries); Object.assign is too slow
|
|
170
|
+
const oqs = opt.queries;
|
|
171
|
+
for (const k of Object.keys(oqs)) {
|
|
172
|
+
qss[k] = oqs[k];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// DEVNOTE: when datasource is not empty string. (e.g - "singularity"
|
|
176
|
+
// in this case must specify datasource.
|
|
177
|
+
// disabled since `REMOVING DATASOURCE SINGULARITY`
|
|
178
|
+
// if (opt.datasource === "singularity") {
|
|
179
|
+
// opt.datasource = "tranquility";
|
|
180
|
+
// }
|
|
181
|
+
if (opt.auth) {
|
|
182
|
+
// @ts-ignore The header is indeed an object
|
|
183
|
+
rqopt.headers.authorization = `Bearer ${opt.token}`;
|
|
184
|
+
}
|
|
185
|
+
if (opt.body) { // means "POST" method etc
|
|
186
|
+
// @ts-ignore The header is indeed an object
|
|
187
|
+
rqopt.headers["content-type"] = "application/json";
|
|
188
|
+
rqopt.body = JSON.stringify(opt.body);
|
|
189
|
+
}
|
|
190
|
+
// @ts-ignore actualy endp is string
|
|
191
|
+
const endpointUrl = curl(endp);
|
|
192
|
+
ax++;
|
|
193
|
+
try {
|
|
194
|
+
// @ts-ignore A silly type error will appear, but ignore it.
|
|
195
|
+
const res = await fetch(`${endpointUrl}?${new URLSearchParams(qss) + ""}`, rqopt).finally(() => {
|
|
196
|
+
ax--;
|
|
197
|
+
});
|
|
198
|
+
const stat = res.status;
|
|
199
|
+
if (!res.ok && !opt.ignoreError) {
|
|
200
|
+
if (stat === 420) {
|
|
201
|
+
opt.cancelable && opt.cancelable.abort();
|
|
202
|
+
throw new ESIErrorLimitReachedError();
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
// console.log(res);
|
|
206
|
+
throw new ESIRequesError(`${res.statusText} (status=${stat})`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
// DEVNOTE: - 204 No Content
|
|
211
|
+
if (stat === 204) {
|
|
212
|
+
// this result is empty, decided to return status code.
|
|
213
|
+
return /** @type {R} */ ({ status: stat });
|
|
214
|
+
}
|
|
215
|
+
/** @type {R} */
|
|
216
|
+
const data = await res.json();
|
|
217
|
+
if (opt.ignoreError) {
|
|
218
|
+
// meaning `forceJson`?
|
|
219
|
+
return data;
|
|
220
|
+
}
|
|
221
|
+
// - - - - x-pages response.
|
|
222
|
+
// +undefined is NaN
|
|
223
|
+
// @ts-ignore becouse +null is 0
|
|
224
|
+
const pc = +res.headers.get("x-pages");
|
|
225
|
+
// has remaining pages? NaN > 1 === false !isNaN(pageCount)
|
|
226
|
+
if (pc > 1) {
|
|
227
|
+
LOG && log('found "x-pages" header, pages: %d', pc);
|
|
228
|
+
const remData = await fetchP(endpointUrl, rqopt, qss, pc);
|
|
229
|
+
// finally, decide product data.
|
|
230
|
+
if (isArray(data) && isArray(remData)) {
|
|
231
|
+
// DEVNOTE: 2019/7/23 15:01:48 - types
|
|
232
|
+
return /** @type {R} */ (data.concat(remData));
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
// @ts-ignore TODO: fix type
|
|
236
|
+
remData && Object.assign(data, remData);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return data;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
catch (e) {
|
|
243
|
+
// @ts-ignore actualy endp is string
|
|
244
|
+
throw new ESIRequesError(`message: ${e.message}, endpoint=${endp}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// node v2.mjs
|
|
248
|
+
getEVEStatus().then(eveStatus => console.log(eveStatus));
|
|
249
|
+
// {
|
|
250
|
+
// "players": 16503,
|
|
251
|
+
// "server_version": "2794925",
|
|
252
|
+
// "start_time": "2025-01-21T11:02:34Z"
|
|
253
|
+
// }
|