eve-esi-types 3.1.7 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/CHANGELOG.md +182 -0
  2. package/jsconfig.json +28 -0
  3. package/lib/rq-util.mjs +1 -1
  4. package/lib/tagged-request-api.mjs +5 -6
  5. package/package.json +14 -7
  6. package/v2/esi-tagged-types.d.ts +9 -5
  7. package/v2/{get_alliances_alliance_id_ok.d.ts → globals/alliance.d.ts} +44 -0
  8. package/v2/globals/assets.d.ts +443 -0
  9. package/v2/globals/calendar.d.ts +130 -0
  10. package/v2/globals/character.d.ts +918 -0
  11. package/v2/{get_characters_character_id_clones_ok.d.ts → globals/clones.d.ts} +15 -0
  12. package/v2/globals/contacts.d.ts +212 -0
  13. package/v2/globals/contracts.d.ts +546 -0
  14. package/v2/globals/corporation.d.ts +1577 -0
  15. package/v2/globals/dogma.d.ts +262 -0
  16. package/v2/globals/factionwarfare.d.ts +596 -0
  17. package/v2/{get_characters_character_id_fittings_ok.d.ts → globals/fittings.d.ts} +23 -0
  18. package/v2/globals/fleets.d.ts +201 -0
  19. package/v2/{get_incursions_ok.d.ts → globals/incursions.d.ts} +5 -0
  20. package/v2/globals/industry.d.ts +445 -0
  21. package/v2/globals/insurance.d.ts +47 -0
  22. package/v2/{get_killmails_killmail_id_killmail_hash_ok.d.ts → globals/killmails.d.ts} +55 -0
  23. package/v2/globals/location.d.ts +74 -0
  24. package/v2/{get_loyalty_stores_corporation_id_offers_ok.d.ts → globals/loyalty.d.ts} +30 -0
  25. package/v2/globals/mail.d.ts +237 -0
  26. package/v2/globals/market.d.ts +615 -0
  27. package/v2/globals/planetaryinteraction.d.ts +344 -0
  28. package/v2/globals/routes.d.ts +14 -0
  29. package/v2/{get_characters_character_id_search_ok.d.ts → globals/search.d.ts} +5 -0
  30. package/v2/globals/skills.d.ts +144 -0
  31. package/v2/globals/sovereignty.d.ts +168 -0
  32. package/v2/{get_status_ok.d.ts → globals/status.d.ts} +5 -0
  33. package/v2/globals/universe.d.ts +1297 -0
  34. package/v2/globals/wallet.d.ts +601 -0
  35. package/v2/{get_wars_war_id_ok.d.ts → globals/wars.d.ts} +40 -0
  36. package/v2/index.d.ts +25 -152
  37. package/v2/response-map.d.ts +1 -24
  38. package/v2/types-index.d.ts +31 -182
  39. package/v2/types-util.d.ts +316 -0
  40. package/v2/util.d.ts +4 -2
  41. package/web/index.html +1 -1
  42. package/tsconfig.json +0 -28
  43. package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +0 -24
  44. package/v2/get_alliances_alliance_id_contacts_ok.d.ts +0 -35
  45. package/v2/get_alliances_alliance_id_corporations_ok.d.ts +0 -9
  46. package/v2/get_alliances_alliance_id_icons_ok.d.ts +0 -18
  47. package/v2/get_alliances_ok.d.ts +0 -9
  48. package/v2/get_characters_character_id_agents_research_ok.d.ts +0 -33
  49. package/v2/get_characters_character_id_assets_ok.d.ts +0 -134
  50. package/v2/get_characters_character_id_attributes_ok.d.ts +0 -42
  51. package/v2/get_characters_character_id_blueprints_ok.d.ts +0 -122
  52. package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +0 -30
  53. package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +0 -56
  54. package/v2/get_characters_character_id_calendar_ok.d.ts +0 -37
  55. package/v2/get_characters_character_id_contacts_labels_ok.d.ts +0 -24
  56. package/v2/get_characters_character_id_contacts_ok.d.ts +0 -43
  57. package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +0 -32
  58. package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +0 -38
  59. package/v2/get_characters_character_id_contracts_ok.d.ts +0 -117
  60. package/v2/get_characters_character_id_corporationhistory_ok.d.ts +0 -32
  61. package/v2/get_characters_character_id_fatigue_ok.d.ts +0 -22
  62. package/v2/get_characters_character_id_fleet_ok.d.ts +0 -31
  63. package/v2/get_characters_character_id_fw_stats_ok.d.ts +0 -64
  64. package/v2/get_characters_character_id_implants_ok.d.ts +0 -9
  65. package/v2/get_characters_character_id_industry_jobs_ok.d.ts +0 -105
  66. package/v2/get_characters_character_id_killmails_recent_ok.d.ts +0 -24
  67. package/v2/get_characters_character_id_location_ok.d.ts +0 -22
  68. package/v2/get_characters_character_id_loyalty_points_ok.d.ts +0 -24
  69. package/v2/get_characters_character_id_mail_labels_ok.d.ts +0 -62
  70. package/v2/get_characters_character_id_mail_lists_ok.d.ts +0 -24
  71. package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +0 -59
  72. package/v2/get_characters_character_id_mail_ok.d.ts +0 -65
  73. package/v2/get_characters_character_id_medals_ok.d.ts +0 -135
  74. package/v2/get_characters_character_id_mining_ok.d.ts +0 -29
  75. package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +0 -36
  76. package/v2/get_characters_character_id_notifications_ok.d.ts +0 -291
  77. package/v2/get_characters_character_id_ok.d.ts +0 -55
  78. package/v2/get_characters_character_id_online_ok.d.ts +0 -26
  79. package/v2/get_characters_character_id_opportunities_ok.d.ts +0 -24
  80. package/v2/get_characters_character_id_orders_history_ok.d.ts +0 -87
  81. package/v2/get_characters_character_id_orders_ok.d.ts +0 -82
  82. package/v2/get_characters_character_id_planets_ok.d.ts +0 -124
  83. package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +0 -283
  84. package/v2/get_characters_character_id_portrait_ok.d.ts +0 -26
  85. package/v2/get_characters_character_id_roles_ok.d.ts +0 -270
  86. package/v2/get_characters_character_id_ship_ok.d.ts +0 -19
  87. package/v2/get_characters_character_id_skillqueue_ok.d.ts +0 -48
  88. package/v2/get_characters_character_id_skills_ok.d.ts +0 -47
  89. package/v2/get_characters_character_id_standings_ok.d.ts +0 -29
  90. package/v2/get_characters_character_id_titles_ok.d.ts +0 -184
  91. package/v2/get_characters_character_id_wallet_journal_ok.d.ts +0 -228
  92. package/v2/get_characters_character_id_wallet_ok.d.ts +0 -7
  93. package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +0 -53
  94. package/v2/get_contracts_public_bids_contract_id_ok.d.ts +0 -28
  95. package/v2/get_contracts_public_items_contract_id_ok.d.ts +0 -49
  96. package/v2/get_contracts_public_region_id_ok.d.ts +0 -81
  97. package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +0 -39
  98. package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +0 -36
  99. package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +0 -30
  100. package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +0 -32
  101. package/v2/get_corporations_corporation_id_assets_ok.d.ts +0 -170
  102. package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +0 -163
  103. package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +0 -24
  104. package/v2/get_corporations_corporation_id_contacts_ok.d.ts +0 -39
  105. package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +0 -188
  106. package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +0 -33
  107. package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +0 -38
  108. package/v2/get_corporations_corporation_id_contracts_ok.d.ts +0 -117
  109. package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +0 -78
  110. package/v2/get_corporations_corporation_id_divisions_ok.d.ts +0 -128
  111. package/v2/get_corporations_corporation_id_facilities_ok.d.ts +0 -25
  112. package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +0 -60
  113. package/v2/get_corporations_corporation_id_icons_ok.d.ts +0 -22
  114. package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +0 -105
  115. package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +0 -24
  116. package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +0 -41
  117. package/v2/get_corporations_corporation_id_medals_ok.d.ts +0 -36
  118. package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +0 -7
  119. package/v2/get_corporations_corporation_id_members_ok.d.ts +0 -9
  120. package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +0 -194
  121. package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +0 -41
  122. package/v2/get_corporations_corporation_id_ok.d.ts +0 -66
  123. package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +0 -91
  124. package/v2/get_corporations_corporation_id_orders_ok.d.ts +0 -86
  125. package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +0 -171
  126. package/v2/get_corporations_corporation_id_roles_ok.d.ts +0 -543
  127. package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +0 -29
  128. package/v2/get_corporations_corporation_id_standings_ok.d.ts +0 -29
  129. package/v2/get_corporations_corporation_id_starbases_ok.d.ts +0 -51
  130. package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +0 -110
  131. package/v2/get_corporations_corporation_id_structures_ok.d.ts +0 -176
  132. package/v2/get_corporations_corporation_id_titles_ok.d.ts +0 -548
  133. package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +0 -229
  134. package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +0 -50
  135. package/v2/get_corporations_corporation_id_wallets_ok.d.ts +0 -62
  136. package/v2/get_corporations_npccorps_ok.d.ts +0 -9
  137. package/v2/get_dogma_attributes_attribute_id_ok.d.ts +0 -50
  138. package/v2/get_dogma_attributes_ok.d.ts +0 -9
  139. package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +0 -58
  140. package/v2/get_dogma_effects_effect_id_ok.d.ts +0 -127
  141. package/v2/get_dogma_effects_ok.d.ts +0 -9
  142. package/v2/get_fleets_fleet_id_members_ok.d.ts +0 -54
  143. package/v2/get_fleets_fleet_id_ok.d.ts +0 -26
  144. package/v2/get_fleets_fleet_id_wings_ok.d.ts +0 -45
  145. package/v2/get_fw_leaderboards_characters_ok.d.ts +0 -110
  146. package/v2/get_fw_leaderboards_corporations_ok.d.ts +0 -109
  147. package/v2/get_fw_leaderboards_ok.d.ts +0 -182
  148. package/v2/get_fw_stats_ok.d.ts +0 -66
  149. package/v2/get_fw_systems_ok.d.ts +0 -41
  150. package/v2/get_fw_wars_ok.d.ts +0 -24
  151. package/v2/get_industry_facilities_ok.d.ts +0 -37
  152. package/v2/get_industry_systems_ok.d.ts +0 -119
  153. package/v2/get_insurance_prices_ok.d.ts +0 -62
  154. package/v2/get_markets_groups_market_group_id_ok.d.ts +0 -27
  155. package/v2/get_markets_groups_ok.d.ts +0 -9
  156. package/v2/get_markets_prices_ok.d.ts +0 -25
  157. package/v2/get_markets_region_id_history_ok.d.ts +0 -40
  158. package/v2/get_markets_region_id_orders_ok.d.ts +0 -74
  159. package/v2/get_markets_region_id_types_ok.d.ts +0 -9
  160. package/v2/get_markets_structures_structure_id_ok.d.ts +0 -70
  161. package/v2/get_opportunities_groups_group_id_ok.d.ts +0 -38
  162. package/v2/get_opportunities_groups_ok.d.ts +0 -9
  163. package/v2/get_opportunities_tasks_ok.d.ts +0 -9
  164. package/v2/get_opportunities_tasks_task_id_ok.d.ts +0 -26
  165. package/v2/get_route_origin_destination_ok.d.ts +0 -9
  166. package/v2/get_sovereignty_campaigns_ok.d.ts +0 -83
  167. package/v2/get_sovereignty_map_ok.d.ts +0 -32
  168. package/v2/get_sovereignty_structures_ok.d.ts +0 -46
  169. package/v2/get_universe_ancestries_ok.d.ts +0 -40
  170. package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +0 -37
  171. package/v2/get_universe_bloodlines_ok.d.ts +0 -57
  172. package/v2/get_universe_categories_category_id_ok.d.ts +0 -28
  173. package/v2/get_universe_categories_ok.d.ts +0 -9
  174. package/v2/get_universe_constellations_constellation_id_ok.d.ts +0 -47
  175. package/v2/get_universe_constellations_ok.d.ts +0 -9
  176. package/v2/get_universe_factions_ok.d.ts +0 -56
  177. package/v2/get_universe_graphics_graphic_id_ok.d.ts +0 -42
  178. package/v2/get_universe_graphics_ok.d.ts +0 -9
  179. package/v2/get_universe_groups_group_id_ok.d.ts +0 -27
  180. package/v2/get_universe_groups_ok.d.ts +0 -9
  181. package/v2/get_universe_moons_moon_id_ok.d.ts +0 -41
  182. package/v2/get_universe_planets_planet_id_ok.d.ts +0 -42
  183. package/v2/get_universe_races_ok.d.ts +0 -52
  184. package/v2/get_universe_regions_ok.d.ts +0 -9
  185. package/v2/get_universe_regions_region_id_ok.d.ts +0 -28
  186. package/v2/get_universe_schematics_schematic_id_ok.d.ts +0 -18
  187. package/v2/get_universe_stargates_stargate_id_ok.d.ts +0 -57
  188. package/v2/get_universe_stars_star_id_ok.d.ts +0 -129
  189. package/v2/get_universe_stations_station_id_ok.d.ts +0 -104
  190. package/v2/get_universe_structures_ok.d.ts +0 -9
  191. package/v2/get_universe_structures_structure_id_ok.d.ts +0 -43
  192. package/v2/get_universe_system_jumps_ok.d.ts +0 -24
  193. package/v2/get_universe_system_kills_ok.d.ts +0 -32
  194. package/v2/get_universe_systems_ok.d.ts +0 -9
  195. package/v2/get_universe_systems_system_id_ok.d.ts +0 -94
  196. package/v2/get_universe_types_ok.d.ts +0 -9
  197. package/v2/get_universe_types_type_id_ok.d.ts +0 -105
  198. package/v2/get_wars_ok.d.ts +0 -9
  199. package/v2/get_wars_war_id_killmails_ok.d.ts +0 -24
  200. package/v2/post_characters_affiliation_ok.d.ts +0 -32
  201. package/v2/post_characters_character_id_assets_locations_ok.d.ts +0 -39
  202. package/v2/post_characters_character_id_assets_names_ok.d.ts +0 -24
  203. package/v2/post_characters_character_id_contacts_created.d.ts +0 -9
  204. package/v2/post_characters_character_id_cspa_created.d.ts +0 -7
  205. package/v2/post_characters_character_id_fittings_created.d.ts +0 -14
  206. package/v2/post_characters_character_id_mail_created.d.ts +0 -7
  207. package/v2/post_characters_character_id_mail_labels_created.d.ts +0 -7
  208. package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +0 -39
  209. package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +0 -24
  210. package/v2/post_fleets_fleet_id_wings_created.d.ts +0 -14
  211. package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +0 -14
  212. package/v2/post_universe_ids_ok.d.ts +0 -86
  213. package/v2/post_universe_names_ok.d.ts +0 -38
  214. /package/v2/{extra-types.d.ts → globals/extra-types.d.ts} +0 -0
@@ -0,0 +1,316 @@
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
+ * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
+ *
11
+ * @file eve-esi-types/v2/types-util.d.ts
12
+ * @summary This file is auto-generated and defines version 3.2.1 of the EVE Online ESI response types.
13
+ */
14
+ import type { TESIResponseOKMap } from "./response-map.d.ts";
15
+ import type { PickPathParameters, UnionToTuple } from "./index.d.ts";
16
+
17
+
18
+ /**
19
+ * @experimental
20
+ *
21
+ * Resolves the next applicable ESI endpoint based on the current endpoint and its response type.
22
+ *
23
+ * This utility type determines which endpoints can be chained after the current endpoint (`EP`),
24
+ * based on the response type (`BaseResut`) and the URL pattern of potential next endpoints.
25
+ *
26
+ * @template M - The HTTP method type (e.g., "get", "post", etc.), which must extend `TESIEntryMethod`.
27
+ * @template EP - The current ESI endpoint under inspection; it extends `ESIEndpointOf<M>`.
28
+ * @template BaseResut - Defaults to `InferESIResponseResult<M, EP>`; it is the inferred response result of the endpoint.
29
+ * @template Endpoints - Defaults to `ESIEndpointOf<M>`; represents the union of all endpoints for method `M` to be considered as potential next endpoints.
30
+ *
31
+ * @remarks
32
+ * This type uses advanced TypeScript features such as conditional types, template literal types, and type inference
33
+ * to perform endpoint validation and chaining.
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * type NextEndpoint = ResolveNextEndpoint<"get", "/characters/{character_id}/">;
38
+ * // Result: Union of endpoints like "/characters/{character_id}/assets" if they match the template and response type constraint.
39
+ * ```
40
+ */
41
+ export type ResolveNextEndpoint<
42
+ M extends TESIEntryMethod,
43
+ EP extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
44
+ BaseResut extends InferESIResponseResult<M, EP> = InferESIResponseResult<M, EP>,
45
+ // Endpoints extends ESIEndpointAll = ESIEndpointAll,
46
+ Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
47
+ > = {
48
+ [NextEP in Endpoints]: NextEP extends `${EP}${string}{${string}}/${string}`
49
+ ? ValidateNextEndpoint<BaseResut, NextEP> extends 1
50
+ ? NextEP : never
51
+ // ? [EP, NextEP, BaseResut] : never
52
+ : never;
53
+ }[Endpoints];
54
+
55
+ /**
56
+ * Validates whether a given endpoint can be the next endpoint in a chain based on the response type of the current endpoint.
57
+ *
58
+ * This utility type checks if the response type (`Entry`) of the current endpoint satisfies the requirements
59
+ * for the next endpoint (`NextEP`), such as having the necessary path parameters.
60
+ *
61
+ * @template Entry - The response type of the current endpoint (e.g., `number[]` or an array of objects).
62
+ * @template NextEP - The next endpoint to validate.
63
+ * @template Debug - Optional debug flag; if set to `1`, additional debug information is returned.
64
+ * @template PathParams - Defaults to `UnionToTuple<PickPathParameters<NextEP>>`; represents the path parameters of the next endpoint.
65
+ *
66
+ * @remarks
67
+ * This type assumes that if the response type is `number[]`, the next endpoint is always valid. For object arrays,
68
+ * it checks if the required path parameters can be inferred from the response type.
69
+ *
70
+ * ```typescript
71
+ * type IsValid = ValidateNextEndpoint<GetCharactersCharacterIdMail_200Ok[], "/characters/{character_id}/mail/{mail_id}/">;
72
+ * // Result: 1 if valid, 0 otherwise.
73
+ * ```
74
+ */
75
+ export type ValidateNextEndpoint<
76
+ Entry extends unknown, // number[] or SomeType[]
77
+ NextEP extends string,
78
+ Debug = 0,
79
+ PathParams = UnionToTuple<PickPathParameters<NextEP>>,
80
+ > =
81
+ //* ctt
82
+ // development
83
+ // If it is simply a number[], it is unconditionally assumed that there is a next endpoint.
84
+ Entry extends number[]
85
+ ? 1
86
+ : Entry extends (infer O)[]
87
+ ? NonNullable<O[PathParams[1]]> extends number
88
+ ? Debug extends 1
89
+ ? [NextEP, O, PathParams]
90
+ : 1
91
+ : 0
92
+ : 0;
93
+ /*/
94
+ // production
95
+ Entry extends number[] // If it is simply a number[], it is unconditionally assumed that there is a next endpoint.
96
+ ? 1 : Entry extends (infer O)[]
97
+ ? NonNullable<O[PathParams[1]]> extends number
98
+ ? 1: 0
99
+ : 0;
100
+ //*/
101
+
102
+ /**
103
+ * `ResolveNextEndpointLoos` is a utility type that infers the next endpoint based on the current endpoint and method.
104
+ *
105
+ * DONE: 2025/4/11 15:45:01
106
+ * ``` jsonc
107
+ * // Infer the next parameterized endpoint to request from the EP
108
+ * // Does not validate the EP result, just infers the next endpoint to request
109
+ * ```
110
+ *
111
+ * @template M - The HTTP method to use for the request.
112
+ * @template EP - The endpoint from which the next parameterized endpoint to request is inferred.
113
+ * @template Endpoints - The possible endpoints for the given method.
114
+ *
115
+ * ```ts
116
+ * type NextEndpoint = ResolveNextEndpointLoos<"get", "/markets/groups/">;
117
+ * // Result: "/markets/groups/{market_group_id}/"
118
+ * ```
119
+ * @remarks
120
+ * This type is useful for chaining requests or determining the next endpoint to call based on the current endpoint.
121
+ * It does not validate the response type of the endpoint, only the URL pattern.
122
+ */
123
+ export type ResolveNextEndpointLoos<
124
+ M extends TESIEntryMethod,
125
+ //* ctt
126
+ // DEVNOTE: As it turns out, the behavior of this utility type is broken unless you use the "skipLibCheck=true".
127
+ EP extends ESIEndpointOf<M> = ESIEndpointOf<M>,
128
+ Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
129
+ /*/
130
+ // This fix is required for skipLibCheck=false
131
+ EP extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
132
+ Endpoints extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
133
+ //*/
134
+ > = {
135
+ [NextEP in Endpoints]: NextEP extends `${EP}{${string}}${string}` ? NextEP : never
136
+ }[Endpoints];
137
+
138
+ /**
139
+ * @see For the meaning of this type of comment trick, see {@link ResolveNextEndpointLoos} line comment.
140
+ */
141
+ type ESIEndpointUnions = {
142
+ [M in TESIEntryMethod]: `${M}:${
143
+ //* ctt
144
+ ESIEndpointOf<M>
145
+ /*/
146
+ Exclude<ESIEndpointOf<M>, symbol>
147
+ //*/
148
+ }`;
149
+ }[TESIEntryMethod];
150
+ export type InferESIResponseResultEX<
151
+ EP extends unknown
152
+ // EP extends ESIEndpointUnions
153
+ > = EP extends `${infer M}:${infer EPRest}`
154
+ ? M extends TESIEntryMethod
155
+ ? EPRest extends ESIEndpointOf<M>
156
+ ? _ESIResponseType<M, EPRest> extends { result: infer U }
157
+ ? U : never
158
+ : never
159
+ : never
160
+ : never;
161
+
162
+ /**
163
+ * Represents a function that can make ESI requests with various HTTP methods.
164
+ *
165
+ * @template ActualOpt - The actual type of the options.
166
+ *
167
+ * ```ts
168
+ * // @ ts-expect-error
169
+ * export const request: IESIRequestFunction2<ESIRequestOptions> = (method, endpoint, opt) => {
170
+ * // Implementation for "get" | "post" | "put" | "delete" request
171
+ * };
172
+ * // You can easily implement "get" | "post" | "put" | "delete" requests
173
+ * // with code like the following:
174
+ * (["get", "post", "put", "delete"] as (keyof typeof request)[]).forEach((method) => {
175
+ * request[method] = function (this: typeof request, endpoint, opt) {
176
+ * return this(method, endpoint, opt);
177
+ * } as TESIRequestFunctionEachMethod2<typeof method>;
178
+ * });
179
+ * ```
180
+ */
181
+ export interface IESIRequestFunction2<ActualOpt extends Record<string, unknown>>
182
+ extends TESIRequestFunctionSignature2<ActualOpt>, TESIRequestFunctionMethods2<ActualOpt> {
183
+ }
184
+
185
+ /**
186
+ * Represents the methods available for making ESI requests.
187
+ *
188
+ * + This interface is used when you already have implementation code such as
189
+ * TESIRequestFunctionSignature2 and you want to implement additional shorthand methods.
190
+ *
191
+ * @template ActualOpt - The actual type of the options.
192
+ *
193
+ * @example
194
+ * ```ts
195
+ * export const request: TESIRequestFunctionSignature2<ESIRequestOptions> = (method, endpoint, opt) => {
196
+ * // Implementation for "get" | "post" | "put" | "delete" request
197
+ * };
198
+ * // You can easily implement "get" | "post" | "put" | "delete" requests
199
+ * // with code like the following:
200
+ * const esiMethods = {} as TESIRequestFunctionMethods2<ESIRequestOptions>;
201
+ * (["get", "post", "put", "delete"] as (keyof TESIRequestFunctionMethods2)[]).forEach((method) => {
202
+ * esiMethods[method] = function (endpoint, opt) {
203
+ * return request(method, endpoint, opt);
204
+ * } as TESIRequestFunctionEachMethod2<typeof method>;
205
+ * });
206
+ * ```
207
+ */
208
+ export type TESIRequestFunctionMethods2<ActualOpt extends Record<string, unknown>> = {
209
+ [method in TESIEntryMethod]: TESIRequestFunctionEachMethod2<method, ActualOpt>;
210
+ }
211
+
212
+ /**
213
+ * List of "x-cached-seconds"
214
+ *
215
+ * ```ts
216
+ * // const cacheSecGet: 3600 | 300 | 604800 | 120 | 5 | 600 | 86400 | 60 | 30 | 1200 | 1800 | 30758400
217
+ * const cacheSecGet: TESICachedSeconds<"get">;
218
+ * // const cache5sec: 5
219
+ * const cache5s: TESICachedSeconds<"put">;
220
+ * // const cache3600s: 3600
221
+ * const cache3600s: TESICachedSeconds<"post">;
222
+ * // "/characters/affiliation/"
223
+ * const cache3600sEndpoint: TESICachedSeconds<"post", 1>;
224
+ * ```
225
+ */
226
+ export declare type TESICachedSeconds<
227
+ Method extends TESIEntryMethod, AsEndpoint = 0
228
+ > = {
229
+ [M in TESIEntryMethod]: {
230
+ [EP in ESIEndpointOf<M>]: TESIResponseOKMap[M][EP] extends { cachedSeconds: number }
231
+ ? AsEndpoint extends 0
232
+ ? TESIResponseOKMap[M][EP]["cachedSeconds"]: EP
233
+ : never
234
+ }[ESIEndpointOf<M>];
235
+ }[Method];
236
+
237
+ /**
238
+ * Indicates that no path parameters are allowed.
239
+ *
240
+ * This type serves as a compile-time signal for endpoints that do not support dynamic URL segments.
241
+ * By using this type, it is clear that no path parameters should be provided.
242
+ */
243
+ export declare type TPathParamsNever = { /* pathParams?: never */ };
244
+
245
+ // local types
246
+ /**
247
+ * Infers the response type of an ESI request based on the HTTP method and endpoint.
248
+ *
249
+ * This type extracts the response type from the `TESIResponseOKMap` based on the provided
250
+ * HTTP method and endpoint.
251
+ *
252
+ * @template M - The HTTP method to use for the request.
253
+ * @template EPx - The endpoint path.
254
+ *
255
+ * @example
256
+ * ```ts
257
+ * type ResponseType = _ESIResponseType<"get", "/characters/{character_id}/">;
258
+ * // Result: The inferred response type for the given method and endpoint.
259
+ * ```
260
+ * @internal
261
+ * @see {@link ESIEndpointOf}
262
+ */
263
+ export type _ESIResponseType<
264
+ M extends TESIEntryMethod,
265
+ EPx extends ESIEndpointOf<M> | string,
266
+ > = TESIResponseOKMap[M][Extract<EPx, ESIEndpointOf<M>>];
267
+ // type XOK = _ESIResponseType<"get", "/status/"> extends global._ESIResponseType<"get", "/status/"> ? 1 : 0;
268
+ /**
269
+ * Determines if the endpoint requires path parameters.
270
+ *
271
+ * @template EP - The string representing the endpoint path.
272
+ * @returns {TPathParamsNever | { pathParams: IfParameterizedPath<EP> }}
273
+ * Returns an object with `pathParams` if the endpoint requires parameters, otherwise returns `TPathParamsNever`.
274
+ * @example
275
+ * ```ts
276
+ * type Example = IfNeedPathParams<"/characters/{character_id}/fittings/{fitting_id}/">;
277
+ * // Result: { pathParams: [number, number] }
278
+ * ```
279
+ * @internal
280
+ * @see {@link IfParameterizedPath}
281
+ * @see {@link ReplacePathParams}
282
+ */
283
+ export type _IfNeedPathParams<
284
+ EP extends unknown,
285
+ // will be `never` when cached
286
+ // Parameterized extends IfParameterizedPath<EP> = IfParameterizedPath<EP>
287
+ > = IfParameterizedPath<EP> extends never
288
+ ? TPathParamsNever :
289
+ EP extends ReplacePathParams<EP>
290
+ ? TPathParamsNever : { pathParams: IfParameterizedPath<EP> };
291
+
292
+ /**
293
+ * Infer the result type of an ESI response based on the method and endpoint.
294
+ *
295
+ * @template M - The HTTP method (e.g., "get", "post").
296
+ * @template EP - The endpoint path.
297
+ * @deprecated 2025/3/17
298
+ */
299
+ export type __InferESIResponseResult<
300
+ M extends TESIEntryMethod,
301
+ EP extends ESIEndpointOf<M>
302
+ > = TESIResponseOKMap[M][EP] extends { result: infer U } ? U : never;
303
+ /**
304
+ * Identifies the required parameters for a given entry type.
305
+ *
306
+ * @template Entry - The entry type to identify parameters for.
307
+ * @template Opt - The type of the parameters.
308
+ * @type {Opt & Pick<Entry, Exclude<keyof Entry, "result">>}
309
+ * @deprecated 2025/3/17
310
+ */
311
+ export type __IdentifyParameters<
312
+ Entry, Opt,
313
+ Keys = Exclude<keyof Entry, "result" | "tag" | "cachedSeconds">
314
+ // @ts-expect-error
315
+ > = RequireThese<Opt, Keys> & Pick<Entry, Keys>;
316
+
package/v2/util.d.ts CHANGED
@@ -27,7 +27,7 @@ export type PickPathParameters<Path extends string> =
27
27
  * @template U The union type to convert.
28
28
  * @returns {I} The intersection type.
29
29
  */
30
- type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
30
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
31
31
 
32
32
  /**
33
33
  * Convert a union type to a tuple.
@@ -35,13 +35,15 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
35
35
  * @template T The union type to convert.
36
36
  * @returns {Array} The tuple representation of the union type.
37
37
  */
38
- type UnionToTuple<T> = UnionToIntersection<
38
+ export type UnionToTuple<T> = UnionToIntersection<
39
39
  T extends any ? () => T : never
40
40
  > extends () => infer R ? [...UnionToTuple<Exclude<T, R>>, R] : [];
41
41
 
42
42
  /**
43
43
  * #### Build an array of elements from a flattened tuple of type "1" | "2" | "3" ...
44
44
  *
45
+ * NOTE: This utility cannot calculate lengths greater than 48 (?).
46
+ *
45
47
  * + Returns the final length of the array.
46
48
  *
47
49
  * @template T The union type to be converted to a tuple and measured.
package/web/index.html CHANGED
@@ -44,7 +44,7 @@
44
44
  if (key === "Enter") {
45
45
  const cmd = inputBuffer;
46
46
  inputBuffer = "";
47
- eval(`(${cmd})`);
47
+ eval(`${cmd}`);
48
48
  } else if (key.length === 1) {
49
49
  inputBuffer += key;
50
50
  }
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "skipDefaultLibCheck": true,
5
- "skipLibCheck": true,
6
- "declaration": true,
7
- // "declarationDir": "./dts",
8
- "outDir": ".",
9
- "target": "esnext",
10
- "module": "esnext",
11
- "diagnostics": true,
12
- "newLine": "LF",
13
- "strict": true,
14
- "moduleResolution": "node",
15
- "rootDirs": [
16
- "./scripts"
17
- ]
18
- },
19
- "include": [
20
- "./scripts/**/*.mts",
21
- "./scripts/**/*.d.ts",
22
- "./v2/*.d.ts"
23
- ],
24
- "exclude": [
25
- "./scripts/auth-*",
26
- "./scripts/esi-*",
27
- ]
28
- }
@@ -1,24 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/alliances/{alliance_id}/contacts/labels/
3
- */
4
- /**
5
- * 200 ok array
6
- *
7
- * @maxItems 64
8
- */
9
- type GetAlliancesAllianceIdContactsLabelsOk = GetAlliancesAllianceIdContactsLabels_200Ok[];
10
-
11
- /**
12
- * 200 ok object
13
- */
14
- interface GetAlliancesAllianceIdContactsLabels_200Ok {
15
- /**
16
- * label_id integer
17
- */
18
- label_id: number;
19
- /**
20
- * label_name string
21
- */
22
- label_name: string;
23
- [k: string]: unknown | undefined;
24
- }
@@ -1,35 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/alliances/{alliance_id}/contacts/
3
- */
4
- /**
5
- * contact_type string
6
- */
7
- type GetAlliancesAllianceIdContactsContactType = "character" | "corporation" | "alliance" | "faction";
8
- /**
9
- * 200 ok array
10
- *
11
- * @maxItems 1000
12
- */
13
- type GetAlliancesAllianceIdContactsOk = GetAlliancesAllianceIdContacts_200Ok[];
14
-
15
- /**
16
- * 200 ok object
17
- */
18
- interface GetAlliancesAllianceIdContacts_200Ok {
19
- /**
20
- * contact_id integer
21
- */
22
- contact_id: number;
23
- contact_type: GetAlliancesAllianceIdContactsContactType;
24
- /**
25
- * label_ids array
26
- *
27
- * @maxItems 63
28
- */
29
- label_ids?: number[];
30
- /**
31
- * Standing of the contact
32
- */
33
- standing: number;
34
- [k: string]: unknown | undefined;
35
- }
@@ -1,9 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/alliances/{alliance_id}/corporations/
3
- */
4
- /**
5
- * 200 ok array
6
- *
7
- * @maxItems 1000
8
- */
9
- type GetAlliancesAllianceIdCorporationsOk = number[];
@@ -1,18 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/alliances/{alliance_id}/icons/
3
- */
4
-
5
- /**
6
- * 200 ok object
7
- */
8
- interface GetAlliancesAllianceIdIconsOk {
9
- /**
10
- * px128x128 string
11
- */
12
- px128x128?: string;
13
- /**
14
- * px64x64 string
15
- */
16
- px64x64?: string;
17
- [k: string]: unknown | undefined;
18
- }
@@ -1,9 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/alliances/
3
- */
4
- /**
5
- * 200 ok array
6
- *
7
- * @maxItems 5000
8
- */
9
- type GetAlliancesOk = number[];
@@ -1,33 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/characters/{character_id}/agents_research/
3
- */
4
- /**
5
- * 200 ok array
6
- *
7
- * @maxItems 1000
8
- */
9
- type GetCharactersCharacterIdAgentsResearchOk = GetCharactersCharacterIdAgentsResearch_200Ok[];
10
-
11
- /**
12
- * 200 ok object
13
- */
14
- interface GetCharactersCharacterIdAgentsResearch_200Ok {
15
- /**
16
- * agent_id integer
17
- */
18
- agent_id: number;
19
- /**
20
- * points_per_day number
21
- */
22
- points_per_day: number;
23
- /**
24
- * remainder_points number
25
- */
26
- remainder_points: number;
27
- skill_type_id: number;
28
- /**
29
- * started_at string
30
- */
31
- started_at: string;
32
- [k: string]: unknown | undefined;
33
- }
@@ -1,134 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/characters/{character_id}/assets/
3
- */
4
- /**
5
- * location_flag string
6
- */
7
- type GetCharactersCharacterIdAssetsLocationFlag =
8
- | "AssetSafety"
9
- | "AutoFit"
10
- | "BoosterBay"
11
- | "Cargo"
12
- | "CorporationGoalDeliveries"
13
- | "CorpseBay"
14
- | "Deliveries"
15
- | "DroneBay"
16
- | "FighterBay"
17
- | "FighterTube0"
18
- | "FighterTube1"
19
- | "FighterTube2"
20
- | "FighterTube3"
21
- | "FighterTube4"
22
- | "FleetHangar"
23
- | "FrigateEscapeBay"
24
- | "Hangar"
25
- | "HangarAll"
26
- | "HiSlot0"
27
- | "HiSlot1"
28
- | "HiSlot2"
29
- | "HiSlot3"
30
- | "HiSlot4"
31
- | "HiSlot5"
32
- | "HiSlot6"
33
- | "HiSlot7"
34
- | "HiddenModifiers"
35
- | "Implant"
36
- | "InfrastructureHangar"
37
- | "LoSlot0"
38
- | "LoSlot1"
39
- | "LoSlot2"
40
- | "LoSlot3"
41
- | "LoSlot4"
42
- | "LoSlot5"
43
- | "LoSlot6"
44
- | "LoSlot7"
45
- | "Locked"
46
- | "MedSlot0"
47
- | "MedSlot1"
48
- | "MedSlot2"
49
- | "MedSlot3"
50
- | "MedSlot4"
51
- | "MedSlot5"
52
- | "MedSlot6"
53
- | "MedSlot7"
54
- | "MobileDepotHold"
55
- | "MoonMaterialBay"
56
- | "QuafeBay"
57
- | "RigSlot0"
58
- | "RigSlot1"
59
- | "RigSlot2"
60
- | "RigSlot3"
61
- | "RigSlot4"
62
- | "RigSlot5"
63
- | "RigSlot6"
64
- | "RigSlot7"
65
- | "ShipHangar"
66
- | "Skill"
67
- | "SpecializedAmmoHold"
68
- | "SpecializedAsteroidHold"
69
- | "SpecializedCommandCenterHold"
70
- | "SpecializedFuelBay"
71
- | "SpecializedGasHold"
72
- | "SpecializedIceHold"
73
- | "SpecializedIndustrialShipHold"
74
- | "SpecializedLargeShipHold"
75
- | "SpecializedMaterialBay"
76
- | "SpecializedMediumShipHold"
77
- | "SpecializedMineralHold"
78
- | "SpecializedOreHold"
79
- | "SpecializedPlanetaryCommoditiesHold"
80
- | "SpecializedSalvageHold"
81
- | "SpecializedShipHold"
82
- | "SpecializedSmallShipHold"
83
- | "StructureDeedBay"
84
- | "SubSystemBay"
85
- | "SubSystemSlot0"
86
- | "SubSystemSlot1"
87
- | "SubSystemSlot2"
88
- | "SubSystemSlot3"
89
- | "SubSystemSlot4"
90
- | "SubSystemSlot5"
91
- | "SubSystemSlot6"
92
- | "SubSystemSlot7"
93
- | "Unlocked"
94
- | "Wardrobe";
95
- /**
96
- * location_type string
97
- */
98
- type GetCharactersCharacterIdAssetsLocationType = "station" | "solar_system" | "item" | "other";
99
- /**
100
- * 200 ok array
101
- *
102
- * @maxItems 1000
103
- */
104
- type GetCharactersCharacterIdAssetsOk = GetCharactersCharacterIdAssets_200Ok[];
105
-
106
- /**
107
- * 200 ok object
108
- */
109
- interface GetCharactersCharacterIdAssets_200Ok {
110
- /**
111
- * is_blueprint_copy boolean
112
- */
113
- is_blueprint_copy?: boolean;
114
- /**
115
- * is_singleton boolean
116
- */
117
- is_singleton: boolean;
118
- /**
119
- * item_id integer
120
- */
121
- item_id: number;
122
- location_flag: GetCharactersCharacterIdAssetsLocationFlag;
123
- /**
124
- * location_id integer
125
- */
126
- location_id: number;
127
- location_type: GetCharactersCharacterIdAssetsLocationType;
128
- /**
129
- * quantity integer
130
- */
131
- quantity: number;
132
- type_id: number;
133
- [k: string]: unknown | undefined;
134
- }
@@ -1,42 +0,0 @@
1
- /*!
2
- * ESI endpoint: get:/characters/{character_id}/attributes/
3
- */
4
-
5
- /**
6
- * 200 ok object
7
- */
8
- interface GetCharactersCharacterIdAttributesOk {
9
- /**
10
- * Neural remapping cooldown after a character uses remap accrued over time
11
- */
12
- accrued_remap_cooldown_date?: string;
13
- /**
14
- * Number of available bonus character neural remaps
15
- */
16
- bonus_remaps?: number;
17
- /**
18
- * charisma integer
19
- */
20
- charisma: number;
21
- /**
22
- * intelligence integer
23
- */
24
- intelligence: number;
25
- /**
26
- * Datetime of last neural remap, including usage of bonus remaps
27
- */
28
- last_remap_date?: string;
29
- /**
30
- * memory integer
31
- */
32
- memory: number;
33
- /**
34
- * perception integer
35
- */
36
- perception: number;
37
- /**
38
- * willpower integer
39
- */
40
- willpower: number;
41
- [k: string]: unknown | undefined;
42
- }