eve-esi-types 1.0.0 → 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.
Files changed (206) hide show
  1. package/README.md +11 -1
  2. package/esi-request.mjs +247 -0
  3. package/esi-request.mts +309 -0
  4. package/package.json +1 -1
  5. package/tsconfig.json +22 -0
  6. package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +27 -0
  7. package/v2/get_alliances_alliance_id_contacts_ok.d.ts +43 -0
  8. package/v2/get_alliances_alliance_id_corporations_ok.d.ts +14 -0
  9. package/v2/get_alliances_alliance_id_icons_ok.d.ts +21 -0
  10. package/v2/get_alliances_alliance_id_ok.d.ts +46 -0
  11. package/v2/get_alliances_ok.d.ts +14 -0
  12. package/v2/get_characters_character_id_agents_research_ok.d.ts +42 -0
  13. package/v2/get_characters_character_id_assets_ok.d.ts +144 -0
  14. package/v2/get_characters_character_id_attributes_ok.d.ts +51 -0
  15. package/v2/get_characters_character_id_blueprints_ok.d.ts +133 -0
  16. package/v2/get_characters_character_id_bookmarks_folders_ok.d.ts +27 -0
  17. package/v2/get_characters_character_id_bookmarks_ok.d.ts +91 -0
  18. package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +32 -0
  19. package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +66 -0
  20. package/v2/get_characters_character_id_calendar_ok.d.ts +42 -0
  21. package/v2/get_characters_character_id_clones_ok.d.ts +82 -0
  22. package/v2/get_characters_character_id_contacts_labels_ok.d.ts +27 -0
  23. package/v2/get_characters_character_id_contacts_ok.d.ts +53 -0
  24. package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +37 -0
  25. package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +48 -0
  26. package/v2/get_characters_character_id_contracts_ok.d.ts +137 -0
  27. package/v2/get_characters_character_id_corporationhistory_ok.d.ts +37 -0
  28. package/v2/get_characters_character_id_fatigue_ok.d.ts +26 -0
  29. package/v2/get_characters_character_id_fittings_ok.d.ts +108 -0
  30. package/v2/get_characters_character_id_fleet_ok.d.ts +35 -0
  31. package/v2/get_characters_character_id_fw_stats_ok.d.ts +75 -0
  32. package/v2/get_characters_character_id_implants_ok.d.ts +14 -0
  33. package/v2/get_characters_character_id_industry_jobs_ok.d.ts +133 -0
  34. package/v2/get_characters_character_id_killmails_recent_ok.d.ts +27 -0
  35. package/v2/get_characters_character_id_location_ok.d.ts +26 -0
  36. package/v2/get_characters_character_id_loyalty_points_ok.d.ts +27 -0
  37. package/v2/get_characters_character_id_mail_labels_ok.d.ts +67 -0
  38. package/v2/get_characters_character_id_mail_lists_ok.d.ts +27 -0
  39. package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +71 -0
  40. package/v2/get_characters_character_id_mail_ok.d.ts +77 -0
  41. package/v2/get_characters_character_id_medals_ok.d.ts +147 -0
  42. package/v2/get_characters_character_id_mining_ok.d.ts +37 -0
  43. package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +42 -0
  44. package/v2/get_characters_character_id_notifications_ok.d.ts +297 -0
  45. package/v2/get_characters_character_id_ok.d.ts +66 -0
  46. package/v2/get_characters_character_id_online_ok.d.ts +31 -0
  47. package/v2/get_characters_character_id_opportunities_ok.d.ts +27 -0
  48. package/v2/get_characters_character_id_orders_history_ok.d.ts +104 -0
  49. package/v2/get_characters_character_id_orders_ok.d.ts +99 -0
  50. package/v2/get_characters_character_id_planets_ok.d.ts +131 -0
  51. package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +323 -0
  52. package/v2/get_characters_character_id_portrait_ok.d.ts +31 -0
  53. package/v2/get_characters_character_id_roles_ok.d.ts +271 -0
  54. package/v2/get_characters_character_id_search_ok.d.ts +132 -0
  55. package/v2/get_characters_character_id_ship_ok.d.ts +26 -0
  56. package/v2/get_characters_character_id_skillqueue_ok.d.ts +57 -0
  57. package/v2/get_characters_character_id_skills_ok.d.ts +54 -0
  58. package/v2/get_characters_character_id_standings_ok.d.ts +32 -0
  59. package/v2/get_characters_character_id_titles_ok.d.ts +187 -0
  60. package/v2/get_characters_character_id_wallet_journal_ok.d.ts +240 -0
  61. package/v2/get_characters_character_id_wallet_ok.d.ts +8 -0
  62. package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +67 -0
  63. package/v2/get_contracts_public_bids_contract_id_ok.d.ts +32 -0
  64. package/v2/get_contracts_public_items_contract_id_ok.d.ts +62 -0
  65. package/v2/get_contracts_public_region_id_ok.d.ts +97 -0
  66. package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +45 -0
  67. package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +45 -0
  68. package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +33 -0
  69. package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +37 -0
  70. package/v2/get_corporations_corporation_id_assets_ok.d.ts +180 -0
  71. package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +174 -0
  72. package/v2/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +32 -0
  73. package/v2/get_corporations_corporation_id_bookmarks_ok.d.ts +91 -0
  74. package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +27 -0
  75. package/v2/get_corporations_corporation_id_contacts_ok.d.ts +48 -0
  76. package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +204 -0
  77. package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +38 -0
  78. package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +48 -0
  79. package/v2/get_corporations_corporation_id_contracts_ok.d.ts +137 -0
  80. package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +92 -0
  81. package/v2/get_corporations_corporation_id_divisions_ok.d.ts +133 -0
  82. package/v2/get_corporations_corporation_id_facilities_ok.d.ts +32 -0
  83. package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +70 -0
  84. package/v2/get_corporations_corporation_id_icons_ok.d.ts +26 -0
  85. package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +133 -0
  86. package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +27 -0
  87. package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +47 -0
  88. package/v2/get_corporations_corporation_id_medals_ok.d.ts +42 -0
  89. package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +8 -0
  90. package/v2/get_corporations_corporation_id_members_ok.d.ts +14 -0
  91. package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +197 -0
  92. package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +52 -0
  93. package/v2/get_corporations_corporation_id_ok.d.ts +81 -0
  94. package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +109 -0
  95. package/v2/get_corporations_corporation_id_orders_ok.d.ts +104 -0
  96. package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +175 -0
  97. package/v2/get_corporations_corporation_id_roles_ok.d.ts +545 -0
  98. package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +32 -0
  99. package/v2/get_corporations_corporation_id_standings_ok.d.ts +32 -0
  100. package/v2/get_corporations_corporation_id_starbases_ok.d.ts +62 -0
  101. package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +369 -0
  102. package/v2/get_corporations_corporation_id_structures_ok.d.ts +194 -0
  103. package/v2/get_corporations_corporation_id_titles_ok.d.ts +715 -0
  104. package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +241 -0
  105. package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +63 -0
  106. package/v2/get_corporations_corporation_id_wallets_ok.d.ts +65 -0
  107. package/v2/get_corporations_npccorps_ok.d.ts +14 -0
  108. package/v2/get_dogma_attributes_attribute_id_ok.d.ts +61 -0
  109. package/v2/get_dogma_attributes_ok.d.ts +14 -0
  110. package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +72 -0
  111. package/v2/get_dogma_effects_effect_id_ok.d.ts +154 -0
  112. package/v2/get_dogma_effects_ok.d.ts +14 -0
  113. package/v2/get_fleets_fleet_id_members_ok.d.ts +67 -0
  114. package/v2/get_fleets_fleet_id_ok.d.ts +31 -0
  115. package/v2/get_fleets_fleet_id_wings_ok.d.ts +50 -0
  116. package/v2/get_fw_leaderboards_characters_ok.d.ts +163 -0
  117. package/v2/get_fw_leaderboards_corporations_ok.d.ts +589 -0
  118. package/v2/get_fw_leaderboards_ok.d.ts +235 -0
  119. package/v2/get_fw_stats_ok.d.ts +76 -0
  120. package/v2/get_fw_systems_ok.d.ts +47 -0
  121. package/v2/get_fw_wars_ok.d.ts +27 -0
  122. package/v2/get_incursions_ok.d.ts +63 -0
  123. package/v2/get_industry_facilities_ok.d.ts +47 -0
  124. package/v2/get_industry_systems_ok.d.ts +122 -0
  125. package/v2/get_insurance_prices_ok.d.ts +70 -0
  126. package/v2/get_killmails_killmail_id_killmail_hash_ok.d.ts +242 -0
  127. package/v2/get_loyalty_stores_corporation_id_offers_ok.d.ts +70 -0
  128. package/v2/get_markets_groups_market_group_id_ok.d.ts +42 -0
  129. package/v2/get_markets_groups_ok.d.ts +14 -0
  130. package/v2/get_markets_prices_ok.d.ts +32 -0
  131. package/v2/get_markets_region_id_history_ok.d.ts +47 -0
  132. package/v2/get_markets_region_id_orders_ok.d.ts +89 -0
  133. package/v2/get_markets_region_id_types_ok.d.ts +14 -0
  134. package/v2/get_markets_structures_structure_id_ok.d.ts +84 -0
  135. package/v2/get_opportunities_groups_group_id_ok.d.ts +53 -0
  136. package/v2/get_opportunities_groups_ok.d.ts +14 -0
  137. package/v2/get_opportunities_tasks_ok.d.ts +14 -0
  138. package/v2/get_opportunities_tasks_task_id_ok.d.ts +31 -0
  139. package/v2/get_route_origin_destination_ok.d.ts +14 -0
  140. package/v2/get_sovereignty_campaigns_ok.d.ts +94 -0
  141. package/v2/get_sovereignty_map_ok.d.ts +37 -0
  142. package/v2/get_sovereignty_structures_ok.d.ts +58 -0
  143. package/v2/get_status_ok.d.ts +31 -0
  144. package/v2/get_universe_ancestries_ok.d.ts +47 -0
  145. package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +43 -0
  146. package/v2/get_universe_bloodlines_ok.d.ts +72 -0
  147. package/v2/get_universe_categories_category_id_ok.d.ts +37 -0
  148. package/v2/get_universe_categories_ok.d.ts +14 -0
  149. package/v2/get_universe_constellations_constellation_id_ok.d.ts +59 -0
  150. package/v2/get_universe_constellations_ok.d.ts +14 -0
  151. package/v2/get_universe_factions_ok.d.ts +67 -0
  152. package/v2/get_universe_graphics_graphic_id_ok.d.ts +51 -0
  153. package/v2/get_universe_graphics_ok.d.ts +14 -0
  154. package/v2/get_universe_groups_group_id_ok.d.ts +42 -0
  155. package/v2/get_universe_groups_ok.d.ts +14 -0
  156. package/v2/get_universe_moons_moon_id_ok.d.ts +48 -0
  157. package/v2/get_universe_planets_planet_id_ok.d.ts +53 -0
  158. package/v2/get_universe_races_ok.d.ts +57 -0
  159. package/v2/get_universe_regions_ok.d.ts +14 -0
  160. package/v2/get_universe_regions_region_id_ok.d.ts +37 -0
  161. package/v2/get_universe_schematics_schematic_id_ok.d.ts +21 -0
  162. package/v2/get_universe_stargates_stargate_id_ok.d.ts +70 -0
  163. package/v2/get_universe_stars_star_id_ok.d.ts +140 -0
  164. package/v2/get_universe_stations_station_id_ok.d.ts +121 -0
  165. package/v2/get_universe_structures_ok.d.ts +14 -0
  166. package/v2/get_universe_structures_structure_id_ok.d.ts +54 -0
  167. package/v2/get_universe_system_jumps_ok.d.ts +27 -0
  168. package/v2/get_universe_system_kills_ok.d.ts +37 -0
  169. package/v2/get_universe_systems_ok.d.ts +14 -0
  170. package/v2/get_universe_systems_system_id_ok.d.ts +125 -0
  171. package/v2/get_universe_types_ok.d.ts +14 -0
  172. package/v2/get_universe_types_type_id_ok.d.ts +127 -0
  173. package/v2/get_wars_ok.d.ts +14 -0
  174. package/v2/get_wars_war_id_killmails_ok.d.ts +27 -0
  175. package/v2/get_wars_war_id_ok.d.ts +123 -0
  176. package/v2/index.d.ts +1043 -0
  177. package/v2/post_characters_affiliation_ok.d.ts +37 -0
  178. package/v2/post_characters_character_id_assets_locations_ok.d.ts +44 -0
  179. package/v2/post_characters_character_id_assets_names_ok.d.ts +27 -0
  180. package/v2/post_characters_character_id_contacts_contact_ids.d.ts +18 -0
  181. package/v2/post_characters_character_id_contacts_created.d.ts +14 -0
  182. package/v2/post_characters_character_id_cspa_characters.d.ts +18 -0
  183. package/v2/post_characters_character_id_cspa_created.d.ts +8 -0
  184. package/v2/post_characters_character_id_fittings_created.d.ts +16 -0
  185. package/v2/post_characters_character_id_fittings_fitting.d.ts +101 -0
  186. package/v2/post_characters_character_id_mail_created.d.ts +8 -0
  187. package/v2/post_characters_character_id_mail_labels_created.d.ts +8 -0
  188. package/v2/post_characters_character_id_mail_labels_label.d.ts +39 -0
  189. package/v2/post_characters_character_id_mail_mail.d.ts +53 -0
  190. package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +44 -0
  191. package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +27 -0
  192. package/v2/post_fleets_fleet_id_members_invitation.d.ts +31 -0
  193. package/v2/post_fleets_fleet_id_wings_created.d.ts +16 -0
  194. package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +16 -0
  195. package/v2/post_ui_openwindow_newmail_new_mail.d.ts +46 -0
  196. package/v2/post_universe_ids_ok.d.ts +241 -0
  197. package/v2/post_universe_names_ok.d.ts +41 -0
  198. package/v2/put_characters_character_id_calendar_event_id_response.d.ts +16 -0
  199. package/v2/put_characters_character_id_contacts_contact_ids.d.ts +18 -0
  200. package/v2/put_characters_character_id_mail_mail_id_contents.d.ts +27 -0
  201. package/v2/put_fleets_fleet_id_members_member_id_movement.d.ts +30 -0
  202. package/v2/put_fleets_fleet_id_new_settings.d.ts +21 -0
  203. package/v2/put_fleets_fleet_id_squads_squad_id_naming.d.ts +16 -0
  204. package/v2/put_fleets_fleet_id_wings_wing_id_naming.d.ts +16 -0
  205. package/v2.mjs +253 -0
  206. 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
+ // }