eve-esi-types 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -1
  3. package/rq-util.d.mts +84 -0
  4. package/rq-util.mjs +107 -0
  5. package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +1 -1
  6. package/v2/get_alliances_alliance_id_contacts_ok.d.ts +1 -1
  7. package/v2/get_alliances_alliance_id_corporations_ok.d.ts +1 -1
  8. package/v2/get_alliances_alliance_id_icons_ok.d.ts +1 -1
  9. package/v2/get_alliances_alliance_id_ok.d.ts +1 -1
  10. package/v2/get_alliances_ok.d.ts +1 -1
  11. package/v2/get_characters_character_id_agents_research_ok.d.ts +1 -1
  12. package/v2/get_characters_character_id_assets_ok.d.ts +1 -1
  13. package/v2/get_characters_character_id_attributes_ok.d.ts +1 -1
  14. package/v2/get_characters_character_id_blueprints_ok.d.ts +1 -1
  15. package/v2/get_characters_character_id_bookmarks_folders_ok.d.ts +1 -1
  16. package/v2/get_characters_character_id_bookmarks_ok.d.ts +1 -1
  17. package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +1 -1
  18. package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +1 -1
  19. package/v2/get_characters_character_id_calendar_ok.d.ts +1 -1
  20. package/v2/get_characters_character_id_clones_ok.d.ts +1 -1
  21. package/v2/get_characters_character_id_contacts_labels_ok.d.ts +1 -1
  22. package/v2/get_characters_character_id_contacts_ok.d.ts +1 -1
  23. package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +1 -1
  24. package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +1 -1
  25. package/v2/get_characters_character_id_contracts_ok.d.ts +1 -1
  26. package/v2/get_characters_character_id_corporationhistory_ok.d.ts +1 -1
  27. package/v2/get_characters_character_id_fatigue_ok.d.ts +1 -1
  28. package/v2/get_characters_character_id_fittings_ok.d.ts +1 -1
  29. package/v2/get_characters_character_id_fleet_ok.d.ts +1 -1
  30. package/v2/get_characters_character_id_fw_stats_ok.d.ts +1 -1
  31. package/v2/get_characters_character_id_implants_ok.d.ts +1 -1
  32. package/v2/get_characters_character_id_industry_jobs_ok.d.ts +1 -1
  33. package/v2/get_characters_character_id_killmails_recent_ok.d.ts +1 -1
  34. package/v2/get_characters_character_id_location_ok.d.ts +1 -1
  35. package/v2/get_characters_character_id_loyalty_points_ok.d.ts +1 -1
  36. package/v2/get_characters_character_id_mail_labels_ok.d.ts +1 -1
  37. package/v2/get_characters_character_id_mail_lists_ok.d.ts +1 -1
  38. package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +1 -1
  39. package/v2/get_characters_character_id_mail_ok.d.ts +1 -1
  40. package/v2/get_characters_character_id_medals_ok.d.ts +1 -1
  41. package/v2/get_characters_character_id_mining_ok.d.ts +1 -1
  42. package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +1 -1
  43. package/v2/get_characters_character_id_notifications_ok.d.ts +1 -1
  44. package/v2/get_characters_character_id_ok.d.ts +1 -1
  45. package/v2/get_characters_character_id_online_ok.d.ts +1 -1
  46. package/v2/get_characters_character_id_opportunities_ok.d.ts +1 -1
  47. package/v2/get_characters_character_id_orders_history_ok.d.ts +1 -1
  48. package/v2/get_characters_character_id_orders_ok.d.ts +1 -1
  49. package/v2/get_characters_character_id_planets_ok.d.ts +1 -1
  50. package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +1 -1
  51. package/v2/get_characters_character_id_portrait_ok.d.ts +1 -1
  52. package/v2/get_characters_character_id_roles_ok.d.ts +1 -1
  53. package/v2/get_characters_character_id_search_ok.d.ts +1 -1
  54. package/v2/get_characters_character_id_ship_ok.d.ts +1 -1
  55. package/v2/get_characters_character_id_skillqueue_ok.d.ts +1 -1
  56. package/v2/get_characters_character_id_skills_ok.d.ts +1 -1
  57. package/v2/get_characters_character_id_standings_ok.d.ts +1 -1
  58. package/v2/get_characters_character_id_titles_ok.d.ts +1 -1
  59. package/v2/get_characters_character_id_wallet_journal_ok.d.ts +1 -1
  60. package/v2/get_characters_character_id_wallet_ok.d.ts +1 -1
  61. package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +1 -1
  62. package/v2/get_contracts_public_bids_contract_id_ok.d.ts +1 -1
  63. package/v2/get_contracts_public_items_contract_id_ok.d.ts +1 -1
  64. package/v2/get_contracts_public_region_id_ok.d.ts +1 -1
  65. package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +1 -1
  66. package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +1 -1
  67. package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +1 -1
  68. package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +1 -1
  69. package/v2/get_corporations_corporation_id_assets_ok.d.ts +1 -1
  70. package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +1 -1
  71. package/v2/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +1 -1
  72. package/v2/get_corporations_corporation_id_bookmarks_ok.d.ts +1 -1
  73. package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +1 -1
  74. package/v2/get_corporations_corporation_id_contacts_ok.d.ts +1 -1
  75. package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +1 -1
  76. package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +1 -1
  77. package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +1 -1
  78. package/v2/get_corporations_corporation_id_contracts_ok.d.ts +1 -1
  79. package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +1 -1
  80. package/v2/get_corporations_corporation_id_divisions_ok.d.ts +1 -1
  81. package/v2/get_corporations_corporation_id_facilities_ok.d.ts +1 -1
  82. package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +1 -1
  83. package/v2/get_corporations_corporation_id_icons_ok.d.ts +1 -1
  84. package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +1 -1
  85. package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +1 -1
  86. package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +1 -1
  87. package/v2/get_corporations_corporation_id_medals_ok.d.ts +1 -1
  88. package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +1 -1
  89. package/v2/get_corporations_corporation_id_members_ok.d.ts +1 -1
  90. package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +1 -1
  91. package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +1 -1
  92. package/v2/get_corporations_corporation_id_ok.d.ts +1 -1
  93. package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +1 -1
  94. package/v2/get_corporations_corporation_id_orders_ok.d.ts +1 -1
  95. package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +1 -1
  96. package/v2/get_corporations_corporation_id_roles_ok.d.ts +1 -1
  97. package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +1 -1
  98. package/v2/get_corporations_corporation_id_standings_ok.d.ts +1 -1
  99. package/v2/get_corporations_corporation_id_starbases_ok.d.ts +1 -1
  100. package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +1 -1
  101. package/v2/get_corporations_corporation_id_structures_ok.d.ts +1 -1
  102. package/v2/get_corporations_corporation_id_titles_ok.d.ts +1 -1
  103. package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +1 -1
  104. package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +1 -1
  105. package/v2/get_corporations_corporation_id_wallets_ok.d.ts +1 -1
  106. package/v2/get_corporations_npccorps_ok.d.ts +1 -1
  107. package/v2/get_dogma_attributes_attribute_id_ok.d.ts +1 -1
  108. package/v2/get_dogma_attributes_ok.d.ts +1 -1
  109. package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +1 -1
  110. package/v2/get_dogma_effects_effect_id_ok.d.ts +1 -1
  111. package/v2/get_dogma_effects_ok.d.ts +1 -1
  112. package/v2/get_fleets_fleet_id_members_ok.d.ts +1 -1
  113. package/v2/get_fleets_fleet_id_ok.d.ts +1 -1
  114. package/v2/get_fleets_fleet_id_wings_ok.d.ts +1 -1
  115. package/v2/get_fw_leaderboards_characters_ok.d.ts +1 -1
  116. package/v2/get_fw_leaderboards_corporations_ok.d.ts +1 -1
  117. package/v2/get_fw_leaderboards_ok.d.ts +1 -1
  118. package/v2/get_fw_stats_ok.d.ts +1 -1
  119. package/v2/get_fw_systems_ok.d.ts +1 -1
  120. package/v2/get_fw_wars_ok.d.ts +1 -1
  121. package/v2/get_incursions_ok.d.ts +1 -1
  122. package/v2/get_industry_facilities_ok.d.ts +1 -1
  123. package/v2/get_industry_systems_ok.d.ts +1 -1
  124. package/v2/get_insurance_prices_ok.d.ts +1 -1
  125. package/v2/get_killmails_killmail_id_killmail_hash_ok.d.ts +1 -1
  126. package/v2/get_loyalty_stores_corporation_id_offers_ok.d.ts +1 -1
  127. package/v2/get_markets_groups_market_group_id_ok.d.ts +1 -1
  128. package/v2/get_markets_groups_ok.d.ts +1 -1
  129. package/v2/get_markets_prices_ok.d.ts +1 -1
  130. package/v2/get_markets_region_id_history_ok.d.ts +1 -1
  131. package/v2/get_markets_region_id_orders_ok.d.ts +1 -1
  132. package/v2/get_markets_region_id_types_ok.d.ts +1 -1
  133. package/v2/get_markets_structures_structure_id_ok.d.ts +1 -1
  134. package/v2/get_opportunities_groups_group_id_ok.d.ts +1 -1
  135. package/v2/get_opportunities_groups_ok.d.ts +1 -1
  136. package/v2/get_opportunities_tasks_ok.d.ts +1 -1
  137. package/v2/get_opportunities_tasks_task_id_ok.d.ts +1 -1
  138. package/v2/get_route_origin_destination_ok.d.ts +1 -1
  139. package/v2/get_sovereignty_campaigns_ok.d.ts +1 -1
  140. package/v2/get_sovereignty_map_ok.d.ts +1 -1
  141. package/v2/get_sovereignty_structures_ok.d.ts +1 -1
  142. package/v2/get_status_ok.d.ts +1 -1
  143. package/v2/get_universe_ancestries_ok.d.ts +1 -1
  144. package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +1 -1
  145. package/v2/get_universe_bloodlines_ok.d.ts +1 -1
  146. package/v2/get_universe_categories_category_id_ok.d.ts +1 -1
  147. package/v2/get_universe_categories_ok.d.ts +1 -1
  148. package/v2/get_universe_constellations_constellation_id_ok.d.ts +1 -1
  149. package/v2/get_universe_constellations_ok.d.ts +1 -1
  150. package/v2/get_universe_factions_ok.d.ts +1 -1
  151. package/v2/get_universe_graphics_graphic_id_ok.d.ts +1 -1
  152. package/v2/get_universe_graphics_ok.d.ts +1 -1
  153. package/v2/get_universe_groups_group_id_ok.d.ts +1 -1
  154. package/v2/get_universe_groups_ok.d.ts +1 -1
  155. package/v2/get_universe_moons_moon_id_ok.d.ts +1 -1
  156. package/v2/get_universe_planets_planet_id_ok.d.ts +1 -1
  157. package/v2/get_universe_races_ok.d.ts +1 -1
  158. package/v2/get_universe_regions_ok.d.ts +1 -1
  159. package/v2/get_universe_regions_region_id_ok.d.ts +1 -1
  160. package/v2/get_universe_schematics_schematic_id_ok.d.ts +1 -1
  161. package/v2/get_universe_stargates_stargate_id_ok.d.ts +1 -1
  162. package/v2/get_universe_stars_star_id_ok.d.ts +1 -1
  163. package/v2/get_universe_stations_station_id_ok.d.ts +1 -1
  164. package/v2/get_universe_structures_ok.d.ts +1 -1
  165. package/v2/get_universe_structures_structure_id_ok.d.ts +1 -1
  166. package/v2/get_universe_system_jumps_ok.d.ts +1 -1
  167. package/v2/get_universe_system_kills_ok.d.ts +1 -1
  168. package/v2/get_universe_systems_ok.d.ts +1 -1
  169. package/v2/get_universe_systems_system_id_ok.d.ts +1 -1
  170. package/v2/get_universe_types_ok.d.ts +1 -1
  171. package/v2/get_universe_types_type_id_ok.d.ts +1 -1
  172. package/v2/get_wars_ok.d.ts +1 -1
  173. package/v2/get_wars_war_id_killmails_ok.d.ts +1 -1
  174. package/v2/get_wars_war_id_ok.d.ts +1 -1
  175. package/v2/index.d.ts +166 -36
  176. package/v2/post_characters_affiliation_ok.d.ts +1 -1
  177. package/v2/post_characters_character_id_assets_locations_ok.d.ts +1 -1
  178. package/v2/post_characters_character_id_assets_names_ok.d.ts +1 -1
  179. package/v2/post_characters_character_id_contacts_created.d.ts +1 -1
  180. package/v2/post_characters_character_id_cspa_created.d.ts +1 -1
  181. package/v2/post_characters_character_id_fittings_created.d.ts +1 -1
  182. package/v2/post_characters_character_id_mail_created.d.ts +1 -1
  183. package/v2/post_characters_character_id_mail_labels_created.d.ts +1 -1
  184. package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +1 -1
  185. package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +1 -1
  186. package/v2/post_fleets_fleet_id_wings_created.d.ts +1 -1
  187. package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +1 -1
  188. package/v2/post_universe_ids_ok.d.ts +1 -1
  189. package/v2/post_universe_names_ok.d.ts +1 -1
  190. package/v2.d.mts +1 -27
  191. package/v2.mjs +4 -88
  192. package/v2/post_fleets_fleet_id_members_invitation.d.ts +0 -27
  193. package/v2/post_ui_openwindow_newmail_new_mail.d.ts +0 -40
  194. package/v2/put_characters_character_id_calendar_event_id_response.d.ts +0 -15
  195. package/v2/put_characters_character_id_contacts_contact_ids.d.ts +0 -16
  196. package/v2/put_characters_character_id_mail_mail_id_contents.d.ts +0 -20
  197. package/v2/put_fleets_fleet_id_members_member_id_movement.d.ts +0 -27
  198. package/v2/put_fleets_fleet_id_new_settings.d.ts +0 -18
  199. package/v2/put_fleets_fleet_id_squads_squad_id_naming.d.ts +0 -14
  200. package/v2/put_fleets_fleet_id_wings_wing_id_naming.d.ts +0 -14
package/README.md CHANGED
@@ -6,7 +6,7 @@ Extracted the main type of ESI. Used for ESI request response types.
6
6
  > This package is configured to use version 2 only.
7
7
 
8
8
  + If you need to use version 1, please refer to the following link:
9
- [eve-esi-types v1](https://github.com/jeffy-g/eve-esi-types/tree/v1.1.0)
9
+ [eve-esi-types v1](https://github.com/jeffy-g/eve-esi-types/tree/version-1.x)
10
10
 
11
11
 
12
12
  > Sample code is provided -> [`v2.mjs`](./v2.mjs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-esi-types",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "Extracted the main type of ESI. use for ESI request response types (version 2 only)",
5
5
  "main": "v2/index.d.ts",
6
6
  "scripts": {
@@ -14,6 +14,8 @@
14
14
  "v2",
15
15
  "v2.mjs",
16
16
  "v2.d.mts",
17
+ "rq-util.mjs",
18
+ "rq-util.d.mts",
17
19
  "LICENSE",
18
20
  "*.md",
19
21
  "package.json",
package/rq-util.d.mts ADDED
@@ -0,0 +1,84 @@
1
+ /*!
2
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3
+ // Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
4
+ // Released under the MIT license
5
+ // https://opensource.org/licenses/mit-license.php
6
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7
+ */
8
+ /**
9
+ * @file rq-util.d.mts
10
+ */
11
+ /**
12
+ * this always `https://esi.evetech.net`
13
+ */
14
+ export declare const BASE = "https://esi.evetech.net";
15
+ export type Truthy = string | number | boolean;
16
+ /**
17
+ * __{Header}.{Payload}.{Signature}__
18
+ */
19
+ export type TAcccessToken = `${string}.${string}.${string}`;
20
+ export type ESIRequestOptions = {
21
+ /**
22
+ * query params for ESI request.
23
+ */
24
+ query?: Record<string, any>;
25
+ /**
26
+ * will need it for `POST` request etc.
27
+ */
28
+ body?: any;
29
+ /**
30
+ * if want response data with ignore error then can be set to `true`.
31
+ */
32
+ ignoreError?: boolean;
33
+ /**
34
+ * cancel request immediately
35
+ */
36
+ cancelable?: AbortController;
37
+ /**
38
+ * Can be an empty object if no authentication is required.description
39
+ */
40
+ token?: TAcccessToken;
41
+ auth?: true;
42
+ };
43
+ /**
44
+ * simple named error class.
45
+ */
46
+ export declare class ESIRequesError extends Error {
47
+ }
48
+ /**
49
+ * throws when x-esi-error-limit-remain header value is "0". (http status: 420)
50
+ */
51
+ export declare class ESIErrorLimitReachedError extends ESIRequesError {
52
+ constructor();
53
+ valueOf(): number;
54
+ }
55
+ /**
56
+ * fetch the extra pages
57
+ *
58
+ * + if the `x-pages` header property ware more than 1
59
+ *
60
+ * @param {string} endpointUrl
61
+ * @param {RequestInit} rqopt request options
62
+ * @param {Record<string, any>} qs queries
63
+ * @param {number} pc pageCount
64
+ * @param {(minus?: number) => void=} increment
65
+ */
66
+ export declare const fetchP: <T extends unknown>(endpointUrl: string, rqopt: RequestInit, qs: Record<string, any>, pc: number, increment?: (minus?: Truthy) => void) => Promise<T | null>;
67
+ /** ### replace (C)urly (B)races (T)oken
68
+ *
69
+ * @example
70
+ * "/characters/{character_id}/skills"
71
+ * // ->
72
+ * "/characters/<char.character_id>/skills"
73
+ *
74
+ * @param {string} endpoint e.g - "/characters/{character_id}/"
75
+ * @param {number[]} ids
76
+ * @returns fragment of qualified endpoint uri or null.
77
+ */
78
+ export declare const replaceCbt: (endpoint: string, ids: number[]) => string;
79
+ /**
80
+ *
81
+ * @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
82
+ * + The version parameter can be omitted by using `<version>/<endpoint>`
83
+ */
84
+ export declare const curl: (endp: string) => string;
package/rq-util.mjs ADDED
@@ -0,0 +1,107 @@
1
+ /*!
2
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3
+ // Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
4
+ // Released under the MIT license
5
+ // https://opensource.org/licenses/mit-license.php
6
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7
+ */
8
+ /**
9
+ * @file rq-util.d.mts
10
+ */
11
+ // - - - - - - - - - - - - - - - - - - - -
12
+ // constants, types
13
+ // - - - - - - - - - - - - - - - - - - - -
14
+ // shorthands
15
+ const log = console.log;
16
+ const isArray = Array.isArray;
17
+ /**
18
+ * enable/disable console.log
19
+ */
20
+ let LOG = false;
21
+ /**
22
+ * this always `https://esi.evetech.net`
23
+ */
24
+ export const BASE = "https://esi.evetech.net";
25
+ /**
26
+ * simple named error class.
27
+ */
28
+ export class ESIRequesError extends Error {
29
+ }
30
+ /**
31
+ * throws when x-esi-error-limit-remain header value is "0". (http status: 420)
32
+ */
33
+ export class ESIErrorLimitReachedError extends ESIRequesError {
34
+ constructor() {
35
+ super("Cannot continue ESI request because 'x-esi-error-limit-remain' is zero!");
36
+ }
37
+ valueOf() {
38
+ return 420;
39
+ }
40
+ }
41
+ /**
42
+ * fetch the extra pages
43
+ *
44
+ * + if the `x-pages` header property ware more than 1
45
+ *
46
+ * @param {string} endpointUrl
47
+ * @param {RequestInit} rqopt request options
48
+ * @param {Record<string, any>} qs queries
49
+ * @param {number} pc pageCount
50
+ * @param {(minus?: number) => void=} increment
51
+ */
52
+ export const fetchP = async (endpointUrl, rqopt, qs, pc, increment = () => { }) => {
53
+ const rqs = [];
54
+ const rqp = new URLSearchParams(qs);
55
+ for (let i = 2; i <= pc;) {
56
+ rqp.set("page", (i++) + "");
57
+ increment();
58
+ rqs.push(fetch(`${endpointUrl}?${rqp + ""}`, rqopt).then(res => res.json()).catch(reason => {
59
+ console.warn(reason);
60
+ return [];
61
+ }).finally(() => {
62
+ increment(1);
63
+ }));
64
+ }
65
+ return Promise.all(rqs).then(jsons => {
66
+ // DEVNOTE: let check the page 2, type is array?
67
+ if (isArray(jsons[0])) {
68
+ let combined = [];
69
+ for (let i = 0, end = jsons.length; i < end;) {
70
+ combined = combined.concat(jsons[i++]);
71
+ }
72
+ return combined;
73
+ }
74
+ LOG && log("> > > pages result are object < < < --", jsons);
75
+ return null;
76
+ });
77
+ };
78
+ /** ### replace (C)urly (B)races (T)oken
79
+ *
80
+ * @example
81
+ * "/characters/{character_id}/skills"
82
+ * // ->
83
+ * "/characters/<char.character_id>/skills"
84
+ *
85
+ * @param {string} endpoint e.g - "/characters/{character_id}/"
86
+ * @param {number[]} ids
87
+ * @returns fragment of qualified endpoint uri or null.
88
+ */
89
+ export const replaceCbt = (endpoint, ids) => {
90
+ const re = /{([\w]+)}/g;
91
+ /** @type {RegExpExecArray?} */
92
+ let m;
93
+ let idx = 0;
94
+ while (m = re.exec(endpoint)) {
95
+ endpoint = endpoint.replace(m[0], ids[idx++] + "");
96
+ }
97
+ return endpoint;
98
+ };
99
+ /**
100
+ *
101
+ * @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
102
+ * + The version parameter can be omitted by using `<version>/<endpoint>`
103
+ */
104
+ export const curl = (endp) => {
105
+ endp = endp.replace(/^\/+|\/+$/g, "");
106
+ return `${BASE}/latest/${endp}/`;
107
+ };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/{alliance_id}/contacts/labels/
2
+ * ESI endpoint: get:/alliances/{alliance_id}/contacts/labels/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/{alliance_id}/contacts/
2
+ * ESI endpoint: get:/alliances/{alliance_id}/contacts/
3
3
  */
4
4
  /**
5
5
  * contact_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/{alliance_id}/corporations/
2
+ * ESI endpoint: get:/alliances/{alliance_id}/corporations/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/{alliance_id}/icons/
2
+ * ESI endpoint: get:/alliances/{alliance_id}/icons/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/{alliance_id}/
2
+ * ESI endpoint: get:/alliances/{alliance_id}/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /alliances/
2
+ * ESI endpoint: get:/alliances/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/agents_research/
2
+ * ESI endpoint: get:/characters/{character_id}/agents_research/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/assets/
2
+ * ESI endpoint: get:/characters/{character_id}/assets/
3
3
  */
4
4
  /**
5
5
  * location_flag string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/attributes/
2
+ * ESI endpoint: get:/characters/{character_id}/attributes/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/blueprints/
2
+ * ESI endpoint: get:/characters/{character_id}/blueprints/
3
3
  */
4
4
  /**
5
5
  * Type of the location_id
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/bookmarks/folders/
2
+ * ESI endpoint: get:/characters/{character_id}/bookmarks/folders/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/bookmarks/
2
+ * ESI endpoint: get:/characters/{character_id}/bookmarks/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/calendar/{event_id}/attendees/
2
+ * ESI endpoint: get:/characters/{character_id}/calendar/{event_id}/attendees/
3
3
  */
4
4
  /**
5
5
  * event_response string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/calendar/{event_id}/
2
+ * ESI endpoint: get:/characters/{character_id}/calendar/{event_id}/
3
3
  */
4
4
  /**
5
5
  * owner_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/calendar/
2
+ * ESI endpoint: get:/characters/{character_id}/calendar/
3
3
  */
4
4
  /**
5
5
  * event_response string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/clones/
2
+ * ESI endpoint: get:/characters/{character_id}/clones/
3
3
  */
4
4
  /**
5
5
  * location_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/contacts/labels/
2
+ * ESI endpoint: get:/characters/{character_id}/contacts/labels/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/contacts/
2
+ * ESI endpoint: get:/characters/{character_id}/contacts/
3
3
  */
4
4
  /**
5
5
  * contact_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/contracts/{contract_id}/bids/
2
+ * ESI endpoint: get:/characters/{character_id}/contracts/{contract_id}/bids/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/contracts/{contract_id}/items/
2
+ * ESI endpoint: get:/characters/{character_id}/contracts/{contract_id}/items/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/contracts/
2
+ * ESI endpoint: get:/characters/{character_id}/contracts/
3
3
  */
4
4
  /**
5
5
  * To whom the contract is available
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/corporationhistory/
2
+ * ESI endpoint: get:/characters/{character_id}/corporationhistory/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/fatigue/
2
+ * ESI endpoint: get:/characters/{character_id}/fatigue/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/fittings/
2
+ * ESI endpoint: get:/characters/{character_id}/fittings/
3
3
  */
4
4
  /**
5
5
  * flag string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/fleet/
2
+ * ESI endpoint: get:/characters/{character_id}/fleet/
3
3
  */
4
4
  /**
5
5
  * Member’s role in fleet
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/fw/stats/
2
+ * ESI endpoint: get:/characters/{character_id}/fw/stats/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/implants/
2
+ * ESI endpoint: get:/characters/{character_id}/implants/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/industry/jobs/
2
+ * ESI endpoint: get:/characters/{character_id}/industry/jobs/
3
3
  */
4
4
  /**
5
5
  * status string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/killmails/recent/
2
+ * ESI endpoint: get:/characters/{character_id}/killmails/recent/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/location/
2
+ * ESI endpoint: get:/characters/{character_id}/location/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/loyalty/points/
2
+ * ESI endpoint: get:/characters/{character_id}/loyalty/points/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/mail/labels/
2
+ * ESI endpoint: get:/characters/{character_id}/mail/labels/
3
3
  */
4
4
  /**
5
5
  * color string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/mail/lists/
2
+ * ESI endpoint: get:/characters/{character_id}/mail/lists/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/mail/{mail_id}/
2
+ * ESI endpoint: get:/characters/{character_id}/mail/{mail_id}/
3
3
  */
4
4
  /**
5
5
  * recipient_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/mail/
2
+ * ESI endpoint: get:/characters/{character_id}/mail/
3
3
  */
4
4
  /**
5
5
  * recipient_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/medals/
2
+ * ESI endpoint: get:/characters/{character_id}/medals/
3
3
  */
4
4
  /**
5
5
  * graphics array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/mining/
2
+ * ESI endpoint: get:/characters/{character_id}/mining/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/notifications/contacts/
2
+ * ESI endpoint: get:/characters/{character_id}/notifications/contacts/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/notifications/
2
+ * ESI endpoint: get:/characters/{character_id}/notifications/
3
3
  */
4
4
  /**
5
5
  * sender_type string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/
2
+ * ESI endpoint: get:/characters/{character_id}/
3
3
  */
4
4
  /**
5
5
  * gender string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/online/
2
+ * ESI endpoint: get:/characters/{character_id}/online/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/opportunities/
2
+ * ESI endpoint: get:/characters/{character_id}/opportunities/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/orders/history/
2
+ * ESI endpoint: get:/characters/{character_id}/orders/history/
3
3
  */
4
4
  /**
5
5
  * Valid order range, numbers are ranges in jumps
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/orders/
2
+ * ESI endpoint: get:/characters/{character_id}/orders/
3
3
  */
4
4
  /**
5
5
  * Valid order range, numbers are ranges in jumps
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/planets/
2
+ * ESI endpoint: get:/characters/{character_id}/planets/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/planets/{planet_id}/
2
+ * ESI endpoint: get:/characters/{character_id}/planets/{planet_id}/
3
3
  */
4
4
  /**
5
5
  * links array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/portrait/
2
+ * ESI endpoint: get:/characters/{character_id}/portrait/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/roles/
2
+ * ESI endpoint: get:/characters/{character_id}/roles/
3
3
  */
4
4
  /**
5
5
  * role string
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/search/
2
+ * ESI endpoint: get:/characters/{character_id}/search/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/ship/
2
+ * ESI endpoint: get:/characters/{character_id}/ship/
3
3
  */
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/skillqueue/
2
+ * ESI endpoint: get:/characters/{character_id}/skillqueue/
3
3
  */
4
4
  /**
5
5
  * 200 ok array
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ESI endpoint: /characters/{character_id}/skills/
2
+ * ESI endpoint: get:/characters/{character_id}/skills/
3
3
  */
4
4
  /**
5
5
  * skills array