@lgriffin/esi.ts 5.2.0 → 6.1.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 (322) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +262 -95
  3. package/dist/EsiClient.d.ts +2 -0
  4. package/dist/EsiClient.d.ts.map +1 -1
  5. package/dist/EsiClient.js +6 -0
  6. package/dist/clients/AssetsClient.d.ts +3 -0
  7. package/dist/clients/AssetsClient.d.ts.map +1 -1
  8. package/dist/clients/AssetsClient.js +6 -0
  9. package/dist/clients/BaseEsiClient.d.ts +3 -1
  10. package/dist/clients/BaseEsiClient.d.ts.map +1 -1
  11. package/dist/clients/BaseEsiClient.js +7 -0
  12. package/dist/clients/ContactsClient.d.ts +6 -4
  13. package/dist/clients/ContactsClient.d.ts.map +1 -1
  14. package/dist/clients/ContactsClient.js +9 -7
  15. package/dist/clients/ContractsClient.d.ts +4 -0
  16. package/dist/clients/ContractsClient.d.ts.map +1 -1
  17. package/dist/clients/ContractsClient.js +9 -0
  18. package/dist/clients/FleetClient.d.ts +2 -2
  19. package/dist/clients/FleetClient.d.ts.map +1 -1
  20. package/dist/clients/FleetClient.js +8 -2
  21. package/dist/clients/KillmailsClient.d.ts +3 -0
  22. package/dist/clients/KillmailsClient.d.ts.map +1 -1
  23. package/dist/clients/KillmailsClient.js +6 -0
  24. package/dist/clients/MarketClient.d.ts +7 -0
  25. package/dist/clients/MarketClient.d.ts.map +1 -1
  26. package/dist/clients/MarketClient.js +18 -0
  27. package/dist/clients/SovereigntyClient.d.ts +1 -1
  28. package/dist/clients/SovereigntyClient.d.ts.map +1 -1
  29. package/dist/clients/UiClient.d.ts +11 -9
  30. package/dist/clients/UiClient.d.ts.map +1 -1
  31. package/dist/clients/UiClient.js +15 -13
  32. package/dist/clients/WalletClient.d.ts +4 -0
  33. package/dist/clients/WalletClient.d.ts.map +1 -1
  34. package/dist/clients/WalletClient.js +9 -0
  35. package/dist/core/ApiClient.d.ts +6 -0
  36. package/dist/core/ApiClient.d.ts.map +1 -1
  37. package/dist/core/ApiClient.js +14 -0
  38. package/dist/core/ApiRequestHandler.d.ts +1 -0
  39. package/dist/core/ApiRequestHandler.d.ts.map +1 -1
  40. package/dist/core/ApiRequestHandler.js +10 -1
  41. package/dist/core/constants.d.ts +2 -2
  42. package/dist/core/constants.js +1 -1
  43. package/dist/core/endpoints/EndpointDefinition.d.ts +15 -4
  44. package/dist/core/endpoints/EndpointDefinition.d.ts.map +1 -1
  45. package/dist/core/endpoints/accessListEndpoints.d.ts +16 -0
  46. package/dist/core/endpoints/accessListEndpoints.d.ts.map +1 -1
  47. package/dist/core/endpoints/accessListEndpoints.js +2 -0
  48. package/dist/core/endpoints/allianceEndpoints.d.ts +14 -0
  49. package/dist/core/endpoints/allianceEndpoints.d.ts.map +1 -1
  50. package/dist/core/endpoints/allianceEndpoints.js +3 -0
  51. package/dist/core/endpoints/assetEndpoints.d.ts +28 -0
  52. package/dist/core/endpoints/assetEndpoints.d.ts.map +1 -1
  53. package/dist/core/endpoints/assetEndpoints.js +5 -0
  54. package/dist/core/endpoints/buildEndpointPath.d.ts +7 -0
  55. package/dist/core/endpoints/buildEndpointPath.d.ts.map +1 -0
  56. package/dist/core/endpoints/buildEndpointPath.js +44 -0
  57. package/dist/core/endpoints/calendarEndpoints.d.ts +40 -0
  58. package/dist/core/endpoints/calendarEndpoints.d.ts.map +1 -1
  59. package/dist/core/endpoints/calendarEndpoints.js +5 -0
  60. package/dist/core/endpoints/characterEndpoints.d.ts +105 -0
  61. package/dist/core/endpoints/characterEndpoints.d.ts.map +1 -1
  62. package/dist/core/endpoints/characterEndpoints.js +13 -0
  63. package/dist/core/endpoints/cloneEndpoints.d.ts +21 -0
  64. package/dist/core/endpoints/cloneEndpoints.d.ts.map +1 -1
  65. package/dist/core/endpoints/cloneEndpoints.js +2 -0
  66. package/dist/core/endpoints/contactEndpoints.d.ts +60 -3
  67. package/dist/core/endpoints/contactEndpoints.d.ts.map +1 -1
  68. package/dist/core/endpoints/contactEndpoints.js +13 -3
  69. package/dist/core/endpoints/contractEndpoints.d.ts +184 -0
  70. package/dist/core/endpoints/contractEndpoints.d.ts.map +1 -1
  71. package/dist/core/endpoints/contractEndpoints.js +11 -0
  72. package/dist/core/endpoints/corporationEndpoints.d.ts +192 -0
  73. package/dist/core/endpoints/corporationEndpoints.d.ts.map +1 -1
  74. package/dist/core/endpoints/corporationEndpoints.js +18 -0
  75. package/dist/core/endpoints/createClient.d.ts.map +1 -1
  76. package/dist/core/endpoints/createClient.js +15 -41
  77. package/dist/core/endpoints/dogmaEndpoints.d.ts +38 -0
  78. package/dist/core/endpoints/dogmaEndpoints.d.ts.map +1 -1
  79. package/dist/core/endpoints/dogmaEndpoints.js +4 -0
  80. package/dist/core/endpoints/esi-scopes.generated.d.ts +3 -0
  81. package/dist/core/endpoints/esi-scopes.generated.d.ts.map +1 -0
  82. package/dist/core/endpoints/esi-scopes.generated.js +127 -0
  83. package/dist/core/endpoints/factionEndpoints.d.ts +154 -0
  84. package/dist/core/endpoints/factionEndpoints.d.ts.map +1 -1
  85. package/dist/core/endpoints/factionEndpoints.js +10 -0
  86. package/dist/core/endpoints/fittingEndpoints.d.ts +12 -0
  87. package/dist/core/endpoints/fittingEndpoints.d.ts.map +1 -1
  88. package/dist/core/endpoints/fittingEndpoints.js +3 -0
  89. package/dist/core/endpoints/fleetEndpoints.d.ts +45 -0
  90. package/dist/core/endpoints/fleetEndpoints.d.ts.map +1 -1
  91. package/dist/core/endpoints/fleetEndpoints.js +6 -0
  92. package/dist/core/endpoints/freelanceJobsEndpoints.d.ts +122 -0
  93. package/dist/core/endpoints/freelanceJobsEndpoints.d.ts.map +1 -1
  94. package/dist/core/endpoints/freelanceJobsEndpoints.js +8 -0
  95. package/dist/core/endpoints/incursionEndpoints.d.ts +15 -0
  96. package/dist/core/endpoints/incursionEndpoints.d.ts.map +1 -1
  97. package/dist/core/endpoints/incursionEndpoints.js +3 -0
  98. package/dist/core/endpoints/industryEndpoints.d.ts +103 -0
  99. package/dist/core/endpoints/industryEndpoints.d.ts.map +1 -1
  100. package/dist/core/endpoints/industryEndpoints.js +10 -0
  101. package/dist/core/endpoints/insuranceEndpoints.d.ts +9 -0
  102. package/dist/core/endpoints/insuranceEndpoints.d.ts.map +1 -1
  103. package/dist/core/endpoints/insuranceEndpoints.js +3 -0
  104. package/dist/core/endpoints/killmailEndpoints.d.ts +41 -0
  105. package/dist/core/endpoints/killmailEndpoints.d.ts.map +1 -1
  106. package/dist/core/endpoints/killmailEndpoints.js +5 -0
  107. package/dist/core/endpoints/locationEndpoints.d.ts +16 -0
  108. package/dist/core/endpoints/locationEndpoints.d.ts.map +1 -1
  109. package/dist/core/endpoints/locationEndpoints.js +4 -0
  110. package/dist/core/endpoints/loyaltyEndpoints.d.ts +17 -0
  111. package/dist/core/endpoints/loyaltyEndpoints.d.ts.map +1 -1
  112. package/dist/core/endpoints/loyaltyEndpoints.js +4 -0
  113. package/dist/core/endpoints/mailEndpoints.d.ts +37 -0
  114. package/dist/core/endpoints/mailEndpoints.d.ts.map +1 -1
  115. package/dist/core/endpoints/mailEndpoints.js +4 -0
  116. package/dist/core/endpoints/marketEndpoints.d.ts +123 -0
  117. package/dist/core/endpoints/marketEndpoints.d.ts.map +1 -1
  118. package/dist/core/endpoints/marketEndpoints.js +9 -0
  119. package/dist/core/endpoints/mercenaryEndpoints.d.ts +24 -0
  120. package/dist/core/endpoints/mercenaryEndpoints.d.ts.map +1 -1
  121. package/dist/core/endpoints/mercenaryEndpoints.js +4 -0
  122. package/dist/core/endpoints/piEndpoints.d.ts +76 -0
  123. package/dist/core/endpoints/piEndpoints.d.ts.map +1 -1
  124. package/dist/core/endpoints/piEndpoints.js +5 -0
  125. package/dist/core/endpoints/skillEndpoints.d.ts +21 -0
  126. package/dist/core/endpoints/skillEndpoints.d.ts.map +1 -1
  127. package/dist/core/endpoints/skillEndpoints.js +5 -0
  128. package/dist/core/endpoints/skyhookEndpoints.d.ts +27 -0
  129. package/dist/core/endpoints/skyhookEndpoints.d.ts.map +1 -1
  130. package/dist/core/endpoints/skyhookEndpoints.js +5 -0
  131. package/dist/core/endpoints/sovereigntyEndpoints.d.ts +51 -0
  132. package/dist/core/endpoints/sovereigntyEndpoints.d.ts.map +1 -1
  133. package/dist/core/endpoints/sovereigntyEndpoints.js +4 -0
  134. package/dist/core/endpoints/statusEndpoints.d.ts +6 -0
  135. package/dist/core/endpoints/statusEndpoints.d.ts.map +1 -1
  136. package/dist/core/endpoints/statusEndpoints.js +2 -0
  137. package/dist/core/endpoints/uiEndpoints.d.ts +14 -4
  138. package/dist/core/endpoints/uiEndpoints.d.ts.map +1 -1
  139. package/dist/core/endpoints/uiEndpoints.js +8 -4
  140. package/dist/core/endpoints/universeEndpoints.d.ts +272 -0
  141. package/dist/core/endpoints/universeEndpoints.d.ts.map +1 -1
  142. package/dist/core/endpoints/universeEndpoints.js +25 -0
  143. package/dist/core/endpoints/walletEndpoints.d.ts +51 -0
  144. package/dist/core/endpoints/walletEndpoints.d.ts.map +1 -1
  145. package/dist/core/endpoints/walletEndpoints.js +6 -0
  146. package/dist/core/endpoints/warEndpoints.d.ts +30 -0
  147. package/dist/core/endpoints/warEndpoints.d.ts.map +1 -1
  148. package/dist/core/endpoints/warEndpoints.js +5 -0
  149. package/dist/core/pagination/AsyncPaginationIterator.js +2 -2
  150. package/dist/core/util/error.d.ts +5 -0
  151. package/dist/core/util/error.d.ts.map +1 -1
  152. package/dist/core/util/error.js +14 -1
  153. package/dist/index.d.ts +4 -1
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +32 -2
  156. package/dist/schemas/access-lists.d.ts +30 -0
  157. package/dist/schemas/access-lists.d.ts.map +1 -0
  158. package/dist/schemas/access-lists.js +14 -0
  159. package/dist/schemas/alliance.d.ts +30 -0
  160. package/dist/schemas/alliance.d.ts.map +1 -0
  161. package/dist/schemas/alliance.js +28 -0
  162. package/dist/schemas/assets.d.ts +29 -0
  163. package/dist/schemas/assets.d.ts.map +1 -0
  164. package/dist/schemas/assets.js +26 -0
  165. package/dist/schemas/calendar.d.ts +41 -0
  166. package/dist/schemas/calendar.d.ts.map +1 -0
  167. package/dist/schemas/calendar.js +43 -0
  168. package/dist/schemas/character.d.ts +122 -0
  169. package/dist/schemas/character.d.ts.map +1 -0
  170. package/dist/schemas/character.js +114 -0
  171. package/dist/schemas/clones.d.ts +23 -0
  172. package/dist/schemas/clones.d.ts.map +1 -0
  173. package/dist/schemas/clones.js +21 -0
  174. package/dist/schemas/common.d.ts +59 -0
  175. package/dist/schemas/common.d.ts.map +1 -0
  176. package/dist/schemas/common.js +34 -0
  177. package/dist/schemas/contacts.d.ts +18 -0
  178. package/dist/schemas/contacts.d.ts.map +1 -0
  179. package/dist/schemas/contacts.js +15 -0
  180. package/dist/schemas/contracts.d.ts +63 -0
  181. package/dist/schemas/contracts.d.ts.map +1 -0
  182. package/dist/schemas/contracts.js +58 -0
  183. package/dist/schemas/corporation.d.ts +193 -0
  184. package/dist/schemas/corporation.d.ts.map +1 -0
  185. package/dist/schemas/corporation.js +178 -0
  186. package/dist/schemas/dogma.d.ts +40 -0
  187. package/dist/schemas/dogma.d.ts.map +1 -0
  188. package/dist/schemas/dogma.js +42 -0
  189. package/dist/schemas/faction-warfare.d.ts +95 -0
  190. package/dist/schemas/faction-warfare.d.ts.map +1 -0
  191. package/dist/schemas/faction-warfare.js +92 -0
  192. package/dist/schemas/fittings.d.ts +13 -0
  193. package/dist/schemas/fittings.d.ts.map +1 -0
  194. package/dist/schemas/fittings.js +15 -0
  195. package/dist/schemas/fleet.d.ts +46 -0
  196. package/dist/schemas/fleet.d.ts.map +1 -0
  197. package/dist/schemas/fleet.js +48 -0
  198. package/dist/schemas/freelance-jobs.d.ts +141 -0
  199. package/dist/schemas/freelance-jobs.d.ts.map +1 -0
  200. package/dist/schemas/freelance-jobs.js +99 -0
  201. package/dist/schemas/incursions.d.ts +16 -0
  202. package/dist/schemas/incursions.d.ts.map +1 -0
  203. package/dist/schemas/incursions.js +14 -0
  204. package/dist/schemas/index.d.ts +33 -0
  205. package/dist/schemas/index.d.ts.map +1 -0
  206. package/dist/schemas/index.js +48 -0
  207. package/dist/schemas/industry.d.ts +73 -0
  208. package/dist/schemas/industry.d.ts.map +1 -0
  209. package/dist/schemas/industry.js +75 -0
  210. package/dist/schemas/insurance.d.ts +10 -0
  211. package/dist/schemas/insurance.d.ts.map +1 -0
  212. package/dist/schemas/insurance.js +12 -0
  213. package/dist/schemas/killmails.d.ts +38 -0
  214. package/dist/schemas/killmails.d.ts.map +1 -0
  215. package/dist/schemas/killmails.js +42 -0
  216. package/dist/schemas/location.d.ts +18 -0
  217. package/dist/schemas/location.d.ts.map +1 -0
  218. package/dist/schemas/location.js +20 -0
  219. package/dist/schemas/loyalty.d.ts +18 -0
  220. package/dist/schemas/loyalty.d.ts.map +1 -0
  221. package/dist/schemas/loyalty.js +20 -0
  222. package/dist/schemas/mail.d.ts +26 -0
  223. package/dist/schemas/mail.d.ts.map +1 -0
  224. package/dist/schemas/mail.js +30 -0
  225. package/dist/schemas/market.d.ts +29 -0
  226. package/dist/schemas/market.d.ts.map +1 -0
  227. package/dist/schemas/market.js +26 -0
  228. package/dist/schemas/mercenary.d.ts +25 -0
  229. package/dist/schemas/mercenary.d.ts.map +1 -0
  230. package/dist/schemas/mercenary.js +22 -0
  231. package/dist/schemas/pi.d.ts +77 -0
  232. package/dist/schemas/pi.d.ts.map +1 -0
  233. package/dist/schemas/pi.js +85 -0
  234. package/dist/schemas/skills.d.ts +18 -0
  235. package/dist/schemas/skills.d.ts.map +1 -0
  236. package/dist/schemas/skills.js +20 -0
  237. package/dist/schemas/skyhooks.d.ts +28 -0
  238. package/dist/schemas/skyhooks.d.ts.map +1 -0
  239. package/dist/schemas/skyhooks.js +30 -0
  240. package/dist/schemas/sovereignty.d.ts +59 -0
  241. package/dist/schemas/sovereignty.d.ts.map +1 -0
  242. package/dist/schemas/sovereignty.js +70 -0
  243. package/dist/schemas/status.d.ts +8 -0
  244. package/dist/schemas/status.d.ts.map +1 -0
  245. package/dist/schemas/status.js +10 -0
  246. package/dist/schemas/universe.d.ts +286 -0
  247. package/dist/schemas/universe.d.ts.map +1 -0
  248. package/dist/schemas/universe.js +245 -0
  249. package/dist/schemas/wallet.d.ts +27 -0
  250. package/dist/schemas/wallet.d.ts.map +1 -0
  251. package/dist/schemas/wallet.js +29 -0
  252. package/dist/schemas/wars.d.ts +27 -0
  253. package/dist/schemas/wars.d.ts.map +1 -0
  254. package/dist/schemas/wars.js +31 -0
  255. package/dist/testing/TestDataFactory.d.ts +44 -3
  256. package/dist/testing/TestDataFactory.d.ts.map +1 -1
  257. package/dist/testing/TestDataFactory.js +16 -10
  258. package/dist/types/access-lists.d.ts +4 -10
  259. package/dist/types/access-lists.d.ts.map +1 -1
  260. package/dist/types/alliance.d.ts +6 -24
  261. package/dist/types/alliance.d.ts.map +1 -1
  262. package/dist/types/assets.d.ts +5 -22
  263. package/dist/types/assets.d.ts.map +1 -1
  264. package/dist/types/calendar.d.ts +5 -23
  265. package/dist/types/calendar.d.ts.map +1 -1
  266. package/dist/types/character.d.ts +15 -104
  267. package/dist/types/character.d.ts.map +1 -1
  268. package/dist/types/clones.d.ts +3 -15
  269. package/dist/types/clones.d.ts.map +1 -1
  270. package/dist/types/common.d.ts +4 -21
  271. package/dist/types/common.d.ts.map +1 -1
  272. package/dist/types/contacts.d.ts +4 -11
  273. package/dist/types/contacts.d.ts.map +1 -1
  274. package/dist/types/contracts.d.ts +5 -39
  275. package/dist/types/contracts.d.ts.map +1 -1
  276. package/dist/types/corporation.d.ts +18 -166
  277. package/dist/types/corporation.d.ts.map +1 -1
  278. package/dist/types/dogma.d.ts +5 -38
  279. package/dist/types/dogma.d.ts.map +1 -1
  280. package/dist/types/faction-warfare.d.ts +8 -88
  281. package/dist/types/faction-warfare.d.ts.map +1 -1
  282. package/dist/types/fittings.d.ts +3 -11
  283. package/dist/types/fittings.d.ts.map +1 -1
  284. package/dist/types/fleet.d.ts +6 -34
  285. package/dist/types/fleet.d.ts.map +1 -1
  286. package/dist/types/freelance-jobs.d.ts +10 -91
  287. package/dist/types/freelance-jobs.d.ts.map +1 -1
  288. package/dist/types/incursions.d.ts +3 -10
  289. package/dist/types/incursions.d.ts.map +1 -1
  290. package/dist/types/industry.d.ts +9 -64
  291. package/dist/types/industry.d.ts.map +1 -1
  292. package/dist/types/insurance.d.ts +3 -8
  293. package/dist/types/insurance.d.ts.map +1 -1
  294. package/dist/types/killmails.d.ts +4 -36
  295. package/dist/types/killmails.d.ts.map +1 -1
  296. package/dist/types/location.d.ts +5 -16
  297. package/dist/types/location.d.ts.map +1 -1
  298. package/dist/types/loyalty.d.ts +4 -16
  299. package/dist/types/loyalty.d.ts.map +1 -1
  300. package/dist/types/mail.d.ts +4 -18
  301. package/dist/types/mail.d.ts.map +1 -1
  302. package/dist/types/market.d.ts +4 -22
  303. package/dist/types/market.d.ts.map +1 -1
  304. package/dist/types/mercenary.d.ts +4 -18
  305. package/dist/types/mercenary.d.ts.map +1 -1
  306. package/dist/types/pi.d.ts +5 -66
  307. package/dist/types/pi.d.ts.map +1 -1
  308. package/dist/types/skills.d.ts +4 -16
  309. package/dist/types/skills.d.ts.map +1 -1
  310. package/dist/types/skyhooks.d.ts +5 -26
  311. package/dist/types/skyhooks.d.ts.map +1 -1
  312. package/dist/types/sovereignty.d.ts +5 -32
  313. package/dist/types/sovereignty.d.ts.map +1 -1
  314. package/dist/types/status.d.ts +3 -6
  315. package/dist/types/status.d.ts.map +1 -1
  316. package/dist/types/universe.d.ts +26 -274
  317. package/dist/types/universe.d.ts.map +1 -1
  318. package/dist/types/wallet.d.ts +4 -25
  319. package/dist/types/wallet.d.ts.map +1 -1
  320. package/dist/types/wars.d.ts +3 -25
  321. package/dist/types/wars.d.ts.map +1 -1
  322. package/package.json +62 -45
package/CHANGELOG.md CHANGED
@@ -7,6 +7,71 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.1.0] - 2026-07-07
11
+
12
+ ### Added
13
+
14
+ - **Fleet wing/squad name validation** — `renameFleetWing()` and `renameFleetSquad()` now reject names exceeding ESI's 10-character limit before sending the request, with a clear error message
15
+ - **43 runnable example scripts** covering all 210 ESI endpoints against live Tranquility (10 new example files: character-details, corporation-details, calendar-search, loyalty-pi, faction-details, industry-mining, market-orders, universe-encyclopedia, corp-contracts-wallet, dogma-meta-sov)
16
+ - **3 write-operation example scripts** — `write-operations.ts` (contacts, fittings, mail, UI lifecycle), `universe-post-helpers.ts` (name resolution, affiliation), `freelance-jobs.ts` (cursor-paginated queries)
17
+ - Live output captured for all example scripts in `examples/output/`
18
+ - 3 new TDD test files and 1 new BDD feature file (81 TDD files, 40 BDD features total)
19
+ - 2 new fleet validation unit tests
20
+
21
+ ### Fixed
22
+
23
+ - **Fleet test babel parse errors** — replaced TypeScript cast syntax `(result as any[]).forEach(...)` with direct index access in fleet tests (pre-existing bug unmasked by stricter transpilation)
24
+ - **Fleet rename test names** — test mock names shortened to respect ESI's 10-character limit (`'New Squad Name'` → `'New Squad'`)
25
+
26
+ ### Changed
27
+
28
+ - README rewritten with "Why ESI.ts vs. OpenAPI-generated clients" comparison, full endpoint coverage table, and updated architecture/testing references
29
+ - `guides/ARCHITECTURE.md`, `guides/TESTING.md`, and `TESTING.md` updated to current test counts (121 suites, 3,224 tests)
30
+ - Autopilot example waypoint changed from Jita to Rens
31
+
32
+ ### Schemas
33
+
34
+ - Multiple Zod schema fixes discovered during live endpoint validation: added missing enum values, corrected optional fields, and adjusted types to match actual ESI responses
35
+
36
+ ## [6.0.0] - 2026-07-03
37
+
38
+ ### Added
39
+
40
+ - **Runtime response validation** via [Zod](https://zod.dev/) schemas — every ESI endpoint response is validated at runtime, catching shape mismatches before they propagate to consumer code
41
+ - Zod schemas for all 31 domain modules (133 interfaces) in `src/schemas/`, exported under the `schemas` namespace
42
+ - `EsiValidationError` class (extends `EsiError`) thrown when response data doesn't match the expected schema
43
+ - `isValidationError()` type guard for catching validation errors
44
+ - `validateResponse` option on `EsiClientConfig` — on by default, can be disabled globally
45
+ - `responseSchema` field on `EndpointDefinition` — wires schemas into the request pipeline via `createClient()`
46
+ - New developer guide: `guides/RUNTIME-VALIDATION.md`
47
+ - Response Validation Pipeline diagram in `guides/ARCHITECTURE.md`
48
+ - Comprehensive TDD tests for schema parsing, validation integration, and common schemas (94 new tests)
49
+ - BDD feature and step definitions for 9 runtime validation scenarios
50
+
51
+ ### Changed
52
+
53
+ - All TypeScript types in `src/types/` are now derived from Zod schemas via `z.infer<>` — schemas are the single source of truth
54
+ - Schemas use `.passthrough()` mode so extra fields from ESI are preserved, not rejected
55
+ - Test mock data across 25 test files updated to be spec-accurate (required by runtime validation)
56
+ - Path-parameter IDs (e.g., `character_id`, `alliance_id`) are now optional in schemas, matching ESI which omits them from response bodies
57
+
58
+ ### Dependencies
59
+
60
+ - Added `zod` as a production dependency
61
+
62
+ ## [5.3.0] - 2026-06-30
63
+
64
+ ### Added
65
+
66
+ - **Accept-Language configuration** — `language` option on `EsiClientConfig` injects the `Accept-Language` header for localized ESI responses (en, de, fr, ja, ru, zh, ko, es); changeable at runtime via `ApiClient.setLanguage()`
67
+ - **ESI scope metadata** — generated `esi-scopes.generated.ts` with `EsiScope` union type (63 scopes) and `esiEndpointScopes` record mapping 119 authenticated endpoints to their required OAuth scopes
68
+ - Exported `EsiScope` type and `esiEndpointScopes` map from package root
69
+ - **Streaming pagination** — `stream*` methods on domain clients yield `PageResult<T>` one page at a time via `AsyncGenerator`, enabling backpressure and early termination for large paginated datasets
70
+ - Streaming methods added to `MarketClient` (6), `ContractsClient` (3), `WalletClient` (3), `AssetsClient` (2), `KillmailsClient` (2)
71
+ - `buildEndpointPath()` utility extracted from `createClient.ts` and exported from package root
72
+ - `streamEndpoint()` protected method on `BaseEsiClient` for building custom streaming domain clients
73
+ - Streaming pagination example (`npm run example:streaming`)
74
+
10
75
  ## [5.2.0] - 2026-06-29
11
76
 
12
77
  ### Added
package/README.md CHANGED
@@ -8,17 +8,44 @@
8
8
  [![Coverage](https://img.shields.io/badge/coverage-65%25%2B-brightgreen)](https://github.com/lgriffin/ESI.ts)
9
9
  [![npm downloads](https://img.shields.io/npm/dm/%40lgriffin/esi.ts)](https://www.npmjs.com/package/@lgriffin/esi.ts)
10
10
 
11
- A type-safe TypeScript client for the [EVE Online ESI API](https://esi.evetech.net/).
12
-
13
- - Typed responses for all endpoints
14
- - Spec-driven type generation from ESI swagger spec (147 interfaces)
15
- - ETag caching with Cache-Control TTL, stale-on-error, and write invalidation
16
- - Spec-aware cache TTLs — zero-request cache hits within ESI-specified windows
17
- - Batch requests with bounded concurrency and auto-chunking
18
- - Automatic offset-based pagination and cursor-based pagination support
19
- - Rate limiting with header-driven backoff
20
- - Automatic token refresh with 401 retry and concurrent coalescing
21
- - 35 domain clients covering the full ESI surface
11
+ A production-grade TypeScript client for the [EVE Online ESI API](https://esi.evetech.net/), with runtime validation, intelligent caching, and full endpoint coverage.
12
+
13
+ **All 210 ESI endpoints are defined, tested, and validated against live Tranquility.**
14
+
15
+ ## Why ESI.ts vs. OpenAPI-Generated Clients?
16
+
17
+ Tools like `openapi-typescript` or `openapi-generator` can produce a typed client from the ESI swagger spec in minutes. They're a reasonable starting point — but they stop at type generation. ESI.ts is a purpose-built SDK that handles the problems you hit _after_ the types compile.
18
+
19
+ ### What generators give you
20
+
21
+ - TypeScript interfaces from the swagger spec
22
+ - Basic request/response typing
23
+ - A thin HTTP wrapper
24
+
25
+ ### What ESI.ts gives you on top of that
26
+
27
+ | Capability | openapi-typescript | ESI.ts |
28
+ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | **Runtime response validation** | None — types are erased at compile time. If CCP changes a field, you get silent data corruption. | Every response is validated at runtime via [Zod](https://zod.dev/) schemas (146 of 210 endpoints). Schema mismatches throw `EsiValidationError` immediately. |
30
+ | **Intelligent caching** | None — you build your own. | Three-tier: spec-aware TTL (zero HTTP calls within ESI's `x-cached-seconds` window), ETag conditional GETs, stale-on-error fallback on 5xx. Write operations auto-invalidate related GET caches. |
31
+ | **Rate limiting** | None — you build your own. | 36 per-group token buckets extracted from the ESI spec at build time. Market requests can't starve wallet requests. Optional per-user bucketing for multi-character apps. |
32
+ | **Pagination** | Manual — you write the page loop. | Automatic offset pagination, cursor-based pagination (Equinox-era endpoints), and streaming `AsyncGenerator` pagination for memory-efficient processing of large datasets. |
33
+ | **Retry & resilience** | None. | Exponential backoff with jitter, circuit breaker (closed/open/half-open), automatic 401 token refresh with concurrent coalescing. |
34
+ | **Wire format correctness** | Generates from spec, but ESI's spec has inconsistencies (query params documented as body, missing required fields). | Every endpoint tested against live ESI. Wire format bugs (query params vs. body, field naming) are caught and fixed — see the contacts and UI endpoint fixes in v6.1.0. |
35
+ | **Batch operations** | None. | `batch()` with bounded concurrency for GET fan-out, `batchPost()` with auto-chunking for large POST payloads. |
36
+ | **Domain knowledge** | None — generic HTTP client. | 35 domain clients with typed methods, JSDoc documentation, and input validation (e.g., fleet wing/squad names are capped at 10 characters before hitting the API). |
37
+ | **Testing** | Whatever you write. | 121 test suites, 3,224 tests across 7 tiers (TDD unit, BDD behavioral, mocked integration, live smoke, client integration, ESI spec contract, gated auth). 43 runnable example scripts with live output. |
38
+
39
+ ### The real problem with generated clients
40
+
41
+ The ESI swagger spec is not a perfect source of truth. During live endpoint validation, we discovered:
42
+
43
+ - `addContacts`, `editContacts`, and 4 UI endpoints document parameters as request body when ESI actually expects query parameters
44
+ - `deleteCharacterContacts` expects comma-separated contact IDs as a query param, not a JSON body
45
+ - Fleet wing/squad names have a 10-character limit not documented in the spec
46
+ - The `updateMailMetadata` endpoint uses the field name `read`, not `is_read`
47
+
48
+ A generated client faithfully reproduces these spec bugs. ESI.ts fixes them.
22
49
 
23
50
  ## Installation
24
51
 
@@ -44,7 +71,7 @@ Verify everything works:
44
71
 
45
72
  ```bash
46
73
  npm run example:status # quick smoke test — checks ESI is reachable
47
- npm test # run the full test suite
74
+ npm test # run the full test suite (121 suites, 3,224 tests)
48
75
  ```
49
76
 
50
77
  ## Quick Start
@@ -77,6 +104,7 @@ const client = new EsiClient({
77
104
  accessToken: 'your-token', // EVE SSO token for authenticated endpoints
78
105
  baseUrl: 'https://esi.evetech.net', // ESI base URL (default)
79
106
  onTokenRefresh: async () => newToken, // Auto-refresh on 401 (optional)
107
+ language: 'en', // Accept-Language header: en, de, fr, ja, ru, zh, ko, es (default: none)
80
108
  timeout: 30000, // Request timeout in ms (default: 30000)
81
109
  retryConfig: {
82
110
  maxRetries: 3, // Max retry attempts for transient errors (default: 0)
@@ -90,6 +118,7 @@ const client = new EsiClient({
90
118
  defaultTtl: 300000, // Fallback TTL in ms (default: 5 min)
91
119
  cleanupInterval: 60000, // Expired entry cleanup interval (default: 1 min)
92
120
  },
121
+ validateResponse: true, // Runtime Zod validation of ESI responses (default: true)
93
122
  });
94
123
  ```
95
124
 
@@ -205,43 +234,74 @@ Key behaviors:
205
234
 
206
235
  All clients are accessed as properties on the `EsiClient` instance. Authenticated endpoints require an access token.
207
236
 
208
- | Client | Property | Auth | Examples |
209
- | -------------- | ---------------------- | ---- | -------------------------------------------------------- |
210
- | Alliance | `client.alliance` | Some | `getAlliances()`, `getAllianceById(id)` |
211
- | Assets | `client.assets` | Yes | `getCharacterAssets(id)` |
212
- | Calendar | `client.calendar` | Yes | `getCharacterCalendar(id)` |
213
- | Characters | `client.characters` | Some | `getCharacterPublicInfo(id)`, `getCharacterPortrait(id)` |
214
- | Clones | `client.clones` | Yes | `getCharacterClones(id)` |
215
- | Contacts | `client.contacts` | Yes | `getCharacterContacts(id)` |
216
- | Contracts | `client.contracts` | Yes | `getCharacterContracts(id)` |
217
- | Corporations | `client.corporations` | Some | `getCorporationInfo(id)`, `getCorporationMembers(id)` |
218
- | Dogma | `client.dogma` | No | `getDogmaAttributes()`, `getDogmaEffects()` |
219
- | Factions | `client.factions` | Some | `getFactionWarStats()` |
220
- | Fittings | `client.fittings` | Yes | `getFittings(id)`, `createFitting(id, body)` |
221
- | Fleets | `client.fleets` | Yes | `getFleet(id)`, `getFleetMembers(id)` |
222
- | Incursions | `client.incursions` | No | `getIncursions()` |
223
- | Industry | `client.industry` | Some | `getCharacterIndustryJobs(id)` |
224
- | Insurance | `client.insurance` | No | `getInsurancePrices()` |
225
- | Killmails | `client.killmails` | Some | `getKillmail(id, hash)` |
226
- | Location | `client.location` | Yes | `getCharacterLocation(id)` |
227
- | Loyalty | `client.loyalty` | Yes | `getCharacterLoyaltyPoints(id)` |
228
- | Mail | `client.mail` | Yes | `getCharacterMail(id)` |
229
- | Market | `client.market` | Some | `getMarketPrices()`, `getMarketOrders(regionId)` |
230
- | PI | `client.pi` | Yes | `getCharacterPlanets(id)` |
231
- | Route | `client.route` | No | `getRoute(origin, destination)` |
232
- | Search | `client.search` | Some | `search(characterId, query)` |
233
- | Skills | `client.skills` | Yes | `getCharacterSkills(id)` |
234
- | Sovereignty | `client.sovereignty` | No | `getSovereigntySystems()`, `getSovereigntyMap()` |
235
- | Skyhooks | `client.skyhooks` | No | `getSovereigntyHubs()`, `getRaidableSkyhooks()` |
236
- | Mercenary | `client.mercenary` | No | `getMercenaryDens()`, `getMercenaryTacticalOperations()` |
237
- | Access Lists | `client.accessLists` | Yes | `getAccessList(id)` |
238
- | Status | `client.status` | No | `getStatus()` |
239
- | UI | `client.ui` | Yes | `setWaypoint(id)` |
240
- | Universe | `client.universe` | Some | `getSystemById(id)`, `getTypeById(id)` |
241
- | Wallet | `client.wallet` | Yes | `getCharacterWallet(id)` |
242
- | Wars | `client.wars` | No | `getWars()`, `getWarById(id)` |
243
- | Freelance Jobs | `client.freelanceJobs` | Some | `getFreelanceJobs()`, `getFreelanceJobById(id)` |
244
- | Meta | `client.meta` | No | `getOpenApiJson()`, `getOpenApiYaml()` |
237
+ | Client | Property | Auth | Examples |
238
+ | -------------- | ---------------------- | ---- | -------------------------------------------------------------------------------- |
239
+ | Alliance | `client.alliance` | Some | `getAlliances()`, `getAllianceById(id)` |
240
+ | Assets | `client.assets` | Yes | `getCharacterAssets(id)` |
241
+ | Calendar | `client.calendar` | Yes | `getCalendarEvents(id)` |
242
+ | Characters | `client.characters` | Some | `getCharacterPublicInfo(id)`, `getCharacterPortrait(id)` |
243
+ | Clones | `client.clones` | Yes | `getCharacterClones(id)` |
244
+ | Contacts | `client.contacts` | Yes | `getCharacterContacts(id)`, `postCharacterContacts(id, standing, contactIds)` |
245
+ | Contracts | `client.contracts` | Yes | `getCharacterContracts(id)` |
246
+ | Corporations | `client.corporations` | Some | `getCorporationInfo(id)`, `getCorporationMembers(id)` |
247
+ | Dogma | `client.dogma` | No | `getDogmaAttributes()`, `getDynamicItemInfo(typeId, itemId)` |
248
+ | Factions | `client.factions` | Some | `getFactionWarStats()` |
249
+ | Fittings | `client.fittings` | Yes | `getFittings(id)`, `createFitting(id, body)` |
250
+ | Fleets | `client.fleets` | Yes | `getFleetInformation(id)`, `getFleetMembers(id)` |
251
+ | Incursions | `client.incursions` | No | `getIncursions()` |
252
+ | Industry | `client.industry` | Some | `getCharacterIndustryJobs(id)` |
253
+ | Insurance | `client.insurance` | No | `getInsurancePrices()` |
254
+ | Killmails | `client.killmails` | Some | `getKillmail(id, hash)` |
255
+ | Location | `client.location` | Yes | `getCharacterLocation(id)` |
256
+ | Loyalty | `client.loyalty` | Yes | `getCharacterLoyaltyPoints(id)` |
257
+ | Mail | `client.mail` | Yes | `getCharacterMail(id)`, `sendMail(id, body)` |
258
+ | Market | `client.market` | Some | `getMarketPrices()`, `getMarketOrders(regionId)` |
259
+ | PI | `client.pi` | Yes | `getCharacterPlanets(id)` |
260
+ | Route | `client.route` | No | `getRoute(origin, destination)` |
261
+ | Search | `client.search` | Some | `search(characterId, query)` |
262
+ | Skills | `client.skills` | Yes | `getCharacterSkills(id)` |
263
+ | Sovereignty | `client.sovereignty` | No | `getSovereigntySystems()`, `getSovereigntyMap()` |
264
+ | Skyhooks | `client.skyhooks` | No | `getSovereigntyHubs()`, `getRaidableSkyhooks()` |
265
+ | Mercenary | `client.mercenary` | No | `getMercenaryDens()`, `getMercenaryTacticalOperations()` |
266
+ | Access Lists | `client.accessLists` | Yes | `getAccessList(id)` |
267
+ | Status | `client.status` | No | `getStatus()` |
268
+ | UI | `client.ui` | Yes | `setAutopilotWaypoint(destId, addToBeginning, clear)`, `openNewMailWindow(body)` |
269
+ | Universe | `client.universe` | Some | `getSystemById(id)`, `getTypeById(id)` |
270
+ | Wallet | `client.wallet` | Yes | `getCharacterWallet(id)` |
271
+ | Wars | `client.wars` | No | `getWars()`, `getWarById(id)` |
272
+ | Freelance Jobs | `client.freelanceJobs` | Some | `getFreelanceJobs()`, `getFreelanceJobById(id)` |
273
+ | Meta | `client.meta` | No | `getOpenApiJson()`, `getOpenApiYaml()` |
274
+
275
+ ## Runtime Response Validation
276
+
277
+ ESI.ts validates every API response at runtime using [Zod](https://zod.dev/) schemas. 146 of 210 endpoints have schemas attached. If CCP changes the ESI API and the response no longer matches the expected shape, you get an immediate `EsiValidationError` instead of silent data corruption.
278
+
279
+ Validation is **on by default**. Extra fields from ESI are preserved via `z.looseObject()` passthrough mode, so new fields added by CCP won't break your application — they flow through to your code untouched.
280
+
281
+ ```typescript
282
+ import {
283
+ EsiClient,
284
+ EsiValidationError,
285
+ isValidationError,
286
+ schemas,
287
+ } from '@lgriffin/esi.ts';
288
+
289
+ const client = new EsiClient();
290
+
291
+ // Validation happens automatically on every request
292
+ const character = await client.characters.getCharacterPublicInfo(12345);
293
+
294
+ // Disable validation globally if needed
295
+ const rawClient = new EsiClient({ validateResponse: false });
296
+
297
+ // Use schemas directly for your own validation
298
+ const result = schemas.CharacterInfoSchema.safeParse(someData);
299
+ if (result.success) {
300
+ console.log(result.data.name);
301
+ }
302
+ ```
303
+
304
+ See [guides/RUNTIME-VALIDATION.md](guides/RUNTIME-VALIDATION.md) for the full guide on schemas, error handling, and extending schemas.
245
305
 
246
306
  ## Caching
247
307
 
@@ -321,32 +381,43 @@ const allNames = await client.batchPost(
321
381
  );
322
382
  ```
323
383
 
324
- ## Generated Types
384
+ ## Streaming Pagination
325
385
 
326
- The library includes TypeScript interfaces generated directly from the ESI swagger spec, available as the `EsiSpec` namespace. These are guaranteed to match the live spec and complement the hand-written types:
386
+ For large paginated endpoints (market orders, contracts, assets), streaming yields one page at a time via `AsyncGenerator` instead of eagerly fetching all pages into memory:
327
387
 
328
388
  ```typescript
329
- import { EsiSpec } from '@lgriffin/esi.ts';
389
+ import { EsiClient } from '@lgriffin/esi.ts';
330
390
 
331
- // Generated type — exact spec field names and optionality
332
- const order: EsiSpec.GetMarketsRegionIdOrders200Ok = {
333
- order_id: 123,
334
- type_id: 34,
335
- price: 5.5,
336
- volume_remain: 1000,
337
- volume_total: 5000,
338
- is_buy_order: false,
339
- // ...
340
- };
341
- ```
391
+ const client = new EsiClient();
342
392
 
343
- To regenerate types from the latest ESI spec:
393
+ // Stream all market orders in The Forge, page by page
394
+ for await (const page of client.market.streamMarketOrders(10000002)) {
395
+ console.log(
396
+ `Page ${page.page}/${page.totalPages}: ${page.data.length} orders`,
397
+ );
398
+
399
+ // Process each order as it arrives
400
+ for (const order of page.data) {
401
+ if (order.is_buy_order && order.price > 1_000_000) {
402
+ console.log(`High-value buy: ${order.type_id} @ ${order.price} ISK`);
403
+ }
404
+ }
344
405
 
345
- ```bash
346
- npm run generate:types # fetches spec, generates 147 interfaces + cache TTL map + rate limit groups
347
- npm run validate:esi # reports type drift between hand-written and generated types
406
+ // Early termination — stops fetching remaining pages
407
+ if (page.page >= 3) break;
408
+ }
348
409
  ```
349
410
 
411
+ Available streaming methods:
412
+
413
+ - **MarketClient** — `streamMarketOrders`, `streamMarketTypes`, `streamCharacterOrderHistory`, `streamCorporationOrders`, `streamCorporationOrderHistory`, `streamMarketOrdersInStructure`
414
+ - **ContractsClient** — `streamPublicContracts`, `streamCharacterContracts`, `streamCorporationContracts`
415
+ - **WalletClient** — `streamCharacterWalletJournal`, `streamCorporationWalletJournal`, `streamCharacterWalletTransactions`
416
+ - **AssetsClient** — `streamCharacterAssets`, `streamCorporationAssets`
417
+ - **KillmailsClient** — `streamCharacterRecentKillmails`, `streamCorporationRecentKillmails`
418
+
419
+ Try it: `npm run example:streaming`
420
+
350
421
  ## Cursor-based Pagination
351
422
 
352
423
  Newer ESI routes (Freelance Jobs, and future routes) use cursor-based pagination with opaque `before`/`after` tokens in the response body. See the [ESI blog post](https://developers.eveonline.com/blog/changing-pagination-turning-a-new-page) for background.
@@ -406,6 +477,51 @@ Key points:
406
477
  - **Duplicates across pages** are expected when records are modified between requests
407
478
  - Existing offset-based routes (`getMarketOrders`, etc.) are unchanged
408
479
 
480
+ ## Generated Types
481
+
482
+ The library includes TypeScript interfaces generated directly from the ESI swagger spec, available as the `EsiSpec` namespace. These are guaranteed to match the live spec and complement the hand-written types:
483
+
484
+ ```typescript
485
+ import { EsiSpec } from '@lgriffin/esi.ts';
486
+
487
+ // Generated type — exact spec field names and optionality
488
+ const order: EsiSpec.GetMarketsRegionIdOrders200Ok = {
489
+ order_id: 123,
490
+ type_id: 34,
491
+ price: 5.5,
492
+ volume_remain: 1000,
493
+ volume_total: 5000,
494
+ is_buy_order: false,
495
+ // ...
496
+ };
497
+ ```
498
+
499
+ To regenerate types from the latest ESI spec:
500
+
501
+ ```bash
502
+ npm run generate:types # fetches spec, generates 147 interfaces + cache TTL map + rate limit groups + scope map
503
+ npm run validate:esi # reports type drift between hand-written and generated types
504
+ ```
505
+
506
+ ## ESI Scopes
507
+
508
+ The library includes a generated scope-to-endpoint mapping extracted from the ESI swagger spec. Use it to check which OAuth scopes an endpoint requires before making a request:
509
+
510
+ ```typescript
511
+ import { esiEndpointScopes, EsiScope } from '@lgriffin/esi.ts';
512
+
513
+ // Look up scopes for a specific endpoint
514
+ const walletScopes = esiEndpointScopes['GET:characters/{character_id}/wallet'];
515
+ // → ['esi-wallet.read_character_wallet.v1']
516
+
517
+ // Check if an endpoint requires auth
518
+ const isPublic = !esiEndpointScopes['GET:universe/types/{type_id}'];
519
+ // → true (public endpoint, no scopes needed)
520
+
521
+ // Type-safe scope values
522
+ const scope: EsiScope = 'esi-assets.read_assets.v1';
523
+ ```
524
+
409
525
  ## Error Handling
410
526
 
411
527
  API errors throw `EsiError` with `statusCode`, `message`, and `url` properties:
@@ -414,15 +530,19 @@ API errors throw `EsiError` with `statusCode`, `message`, and `url` properties:
414
530
  import {
415
531
  EsiError,
416
532
  TimeoutError,
533
+ EsiValidationError,
417
534
  isTimeout,
418
535
  isRetryable,
536
+ isValidationError,
419
537
  } from '@lgriffin/esi.ts';
420
538
 
421
539
  try {
422
540
  const alliance = await client.alliance.getAllianceById(99999999);
423
541
  console.log('Alliance:', alliance.name);
424
542
  } catch (err) {
425
- if (isTimeout(err)) {
543
+ if (isValidationError(err)) {
544
+ console.log('Response validation failed:', err.validationError);
545
+ } else if (isTimeout(err)) {
426
546
  console.log(`Request timed out after ${err.timeoutMs}ms`);
427
547
  } else if (err instanceof EsiError) {
428
548
  console.log(`ESI error ${err.statusCode}: ${err.message}`);
@@ -437,6 +557,7 @@ try {
437
557
  - **5xx with cache** — returns stale cached data instead of throwing
438
558
  - **Timeout** — throws `TimeoutError` (extends `EsiError` with `statusCode: 0` and `timeoutMs`)
439
559
  - **Retryable errors** — `EsiError.retryable` returns `true` for 502, 503, 504, 420, 429, and timeouts
560
+ - **Validation errors** — throws `EsiValidationError` (extends `EsiError`) when response data doesn't match the expected Zod schema
440
561
 
441
562
  ## Response Metadata
442
563
 
@@ -534,9 +655,29 @@ const marketClient = EsiApiFactory.createMarketClient({
534
655
  const prices = await marketClient.getMarketPrices();
535
656
  ```
536
657
 
658
+ ## Endpoint Coverage
659
+
660
+ All 210 ESI endpoint definitions have been validated against live Tranquility. This table summarizes the validation approach:
661
+
662
+ | Category | Endpoints | Method |
663
+ | --------------------------- | --------- | -------------------------------------------------- |
664
+ | Public GETs | 78 | 43 runnable example scripts with captured output |
665
+ | Authenticated GETs | 72 | Example scripts + live testing with EVE SSO tokens |
666
+ | Contacts (POST/PUT/DELETE) | 3 | Live create/edit/delete lifecycle |
667
+ | Fittings (POST/DELETE) | 2 | Live create/delete lifecycle |
668
+ | Mail (POST/PUT/DELETE) | 5 | Live send/label/metadata/delete lifecycle |
669
+ | UI (POST) | 5 | Live testing with EVE client running |
670
+ | Calendar (PUT) | 1 | Live RSVP to event |
671
+ | Fleet (GET/POST/PUT/DELETE) | 14 | Live fleet with two characters |
672
+ | Assets POST | 3 | Live asset location/name queries |
673
+ | CSPA (POST) | 1 | Live charge cost calculation |
674
+ | Dogma dynamic (GET) | 1 | Live mutaplasmid item query |
675
+ | Universe POST helpers | 3 | Live name resolution and affiliation |
676
+ | Freelance Jobs (GET) | 4 | Live queries (graceful 404 for no active jobs) |
677
+
537
678
  ## Examples
538
679
 
539
- Runnable examples are in the `examples/` directory.
680
+ 43 runnable examples are in the `examples/` directory.
540
681
 
541
682
  ### Public Endpoints (no auth needed)
542
683
 
@@ -555,24 +696,41 @@ npm run example:dogma # Item type details + dogma attributes
555
696
  npm run example:contracts # Public region contracts + auction bids/items
556
697
  npm run example:rate-limiting # Rate limiter & pagination demonstration
557
698
  npm run example:cursor-pagination # Freelance Jobs with cursor pagination
699
+ npm run example:streaming # Streaming pagination for large datasets
558
700
  npm run example:token-refresh # Automatic token refresh on 401
701
+ npm run example:universe-encyclopedia # Ancestries, bloodlines, races, celestials
702
+ npm run example:dogma-meta-sov # Dogma effects, sovereignty, meta endpoint
703
+ npm run example:faction-details # Faction warfare leaderboards and stats
559
704
  ```
560
705
 
561
706
  ### Authenticated Endpoints (require ESI_ACCESS_TOKEN)
562
707
 
563
- These examples require an EVE SSO token with the listed scopes. Set `ESI_ACCESS_TOKEN` in your environment or `.env` file.
564
-
565
708
  ```bash
566
709
  npm run example # Full character profile assembly
567
- npm run example:wallet # Wallet balance, journal, transactions (esi-wallet.read_character_wallet.v1)
568
- npm run example:skills # Trained skills, queue, attributes (esi-skills.read_skills.v1, esi-skills.read_skillqueue.v1)
569
- npm run example:assets # Asset inventory with bulk name lookup (esi-assets.read_assets.v1)
570
- npm run example:killmails # Recent killmails + full details (esi-killmails.read_killmails.v1)
571
- npm run example:fleet # Fleet info, members, wing/squad structure (esi-fleets.read_fleet.v1)
572
- npm run example:mail # Inbox headers, labels, mailing lists (esi-mail.read_mail.v1)
573
- npm run example:location # Current system, online status, ship (esi-location.read_location.v1)
574
- npm run example:fittings # Saved fittings + clone state + implants (esi-fittings.read_fittings.v1, esi-clones.read_clones.v1)
575
- npm run example:contacts # Contact list with standings + labels (esi-characters.read_contacts.v1)
710
+ npm run example:wallet # Wallet balance, journal, transactions
711
+ npm run example:skills # Trained skills, queue, attributes
712
+ npm run example:assets # Asset inventory with bulk name lookup
713
+ npm run example:killmails # Recent killmails + full details
714
+ npm run example:fleet # Fleet info, members, wing/squad structure
715
+ npm run example:mail # Inbox headers, labels, mailing lists
716
+ npm run example:location # Current system, online status, ship
717
+ npm run example:fittings # Saved fittings + clone state + implants
718
+ npm run example:contacts # Contact list with standings + labels
719
+ npm run example:character-details # Blueprints, roles, standings, medals
720
+ npm run example:corporation-details # Corp members, divisions, structures
721
+ npm run example:calendar-search # Calendar events + character search
722
+ npm run example:loyalty-pi # Loyalty points + planetary interaction
723
+ npm run example:industry-mining # Industry jobs + mining ledger
724
+ npm run example:market-orders # Character/corp market orders
725
+ npm run example:corp-contracts-wallet # Corp contracts, contacts, wallets
726
+ ```
727
+
728
+ ### Write Operations (require specific scopes + caution)
729
+
730
+ ```bash
731
+ npm run example:write-ops # Contacts, fittings, mail, UI lifecycle tests
732
+ npm run example:universe-posts # Name resolution + character affiliation (public)
733
+ npm run example:freelance-jobs # Freelance job queries
576
734
  ```
577
735
 
578
736
  ### Parallel Requests
@@ -616,6 +774,29 @@ try {
616
774
  }
617
775
  ```
618
776
 
777
+ ## Testing
778
+
779
+ ESI.ts has a comprehensive multi-tier testing strategy:
780
+
781
+ | Tier | Tests | Purpose |
782
+ | ---------------------- | ---------------- | ---------------------------------------------------------------- |
783
+ | **TDD unit tests** | 81 files | Every client method, endpoint path, query param, and body format |
784
+ | **BDD scenario tests** | 40 feature files | Behavioral specifications in Gherkin (Given/When/Then) |
785
+ | **Mocked integration** | Full suite | Cross-layer request flow with jest-fetch-mock |
786
+ | **Live smoke tests** | 43 examples | Every endpoint against live Tranquility |
787
+ | **ESI spec contract** | 10 tests | Endpoint definitions validated against live swagger spec |
788
+ | **Gated auth tests** | 33 tests | Authenticated endpoints with real tokens |
789
+
790
+ ```bash
791
+ npm test # Unit + BDD tests (121 suites, 3,224 tests)
792
+ npm run coverage # Tests with coverage report (thresholds enforced)
793
+ npm run bdd # BDD scenario tests only
794
+ ```
795
+
796
+ Coverage thresholds are enforced in CI: branches 50%, functions 50%, lines 65%, statements 65%.
797
+
798
+ See [guides/TESTING.md](guides/TESTING.md) for the full testing guide, and [guides/ARCHITECTURE.md](guides/ARCHITECTURE.md) for architecture diagrams.
799
+
619
800
  ## Development
620
801
 
621
802
  ### Prerequisites
@@ -648,7 +829,7 @@ npm run format # Format code with Prettier
648
829
  npm run format:check # Check formatting without modifying
649
830
 
650
831
  # Testing
651
- npm test # Unit tests
832
+ npm test # Unit tests (121 suites, 3,224 tests)
652
833
  npm run test:all # Unit + improved + BDD tests
653
834
  npm run coverage # Tests with coverage report (thresholds enforced)
654
835
  npm run bdd # BDD scenario tests
@@ -698,20 +879,6 @@ Every pull request runs the full validation suite:
698
879
 
699
880
  See [.github/workflows/README.md](.github/workflows/README.md) for full workflow details.
700
881
 
701
- ## Testing
702
-
703
- ```bash
704
- npm test # Unit + BDD tests (108 suites, 2836 tests)
705
- npm run coverage # Tests with coverage report (thresholds enforced)
706
- npm run bdd # BDD scenario tests only
707
- ```
708
-
709
- To verify against the live ESI API:
710
-
711
- ```bash
712
- npm run example:status # Confirms ESI connectivity and server status
713
- ```
714
-
715
882
  ## Contributing
716
883
 
717
884
  1. Fork the repository
@@ -57,9 +57,11 @@ export interface EsiClientConfig {
57
57
  circuitBreakerConfig?: CircuitBreakerConfig;
58
58
  unsafeAllowCustomHost?: boolean;
59
59
  enableRequestDeduplication?: boolean;
60
+ language?: string;
60
61
  rateLimiterConfig?: RateLimiterConfig;
61
62
  requestInterceptors?: RequestInterceptor[];
62
63
  responseInterceptors?: ResponseInterceptor[];
64
+ validateResponse?: boolean;
63
65
  }
64
66
  export declare class EsiClient {
65
67
  private apiClient;
@@ -1 +1 @@
1
- {"version":3,"file":"EsiClient.d.ts","sourceRoot":"","sources":["../src/EsiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,O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,OAAO,CAAC,CAAC,CAAC,EAC/B,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAIvB,SAAS,CAAC,CAAC,EACf,GAAG,EAAE,MAAM,EAAE,EACb,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EACzC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,CAAC,EAAE,CAAC;IAIf,QAAQ,IAAI,IAAI;CAejB;AAGD,wBAAgB,gBAAgB,IAAI,SAAS,CAK5C"}
package/dist/EsiClient.js CHANGED
@@ -30,6 +30,9 @@ class EsiClient {
30
30
  if (datasource) {
31
31
  this.apiClient.setDatasource(datasource);
32
32
  }
33
+ if (config?.language) {
34
+ this.apiClient.setLanguage(config.language);
35
+ }
33
36
  if (config?.timeout !== undefined) {
34
37
  this.apiClient.setTimeout(config.timeout);
35
38
  }
@@ -64,6 +67,9 @@ class EsiClient {
64
67
  this.apiClient.addResponseInterceptor(interceptor);
65
68
  }
66
69
  }
70
+ if (config?.validateResponse !== undefined) {
71
+ this.apiClient.setValidateResponse(config.validateResponse);
72
+ }
67
73
  logger_1.default.info('EsiClient initialized successfully');
68
74
  }
69
75
  getClient(name) {
@@ -2,6 +2,7 @@ import { ApiClient } from '../core/ApiClient';
2
2
  import { BaseEsiClient } from './BaseEsiClient';
3
3
  import { assetEndpoints } from '../core/endpoints/assetEndpoints';
4
4
  import { CharacterAsset, AssetLocation, AssetName } from '../types/api-responses';
5
+ import { PageResult } from '../core/pagination/AsyncPaginationIterator';
5
6
  export declare class AssetsClient extends BaseEsiClient<typeof assetEndpoints> {
6
7
  constructor(client: ApiClient);
7
8
  /**
@@ -56,5 +57,7 @@ export declare class AssetsClient extends BaseEsiClient<typeof assetEndpoints> {
56
57
  * @requires Authentication
57
58
  */
58
59
  postCorporationAssetNames(corporationId: number, itemIds: number[]): Promise<AssetName[]>;
60
+ streamCharacterAssets(characterId: number): AsyncGenerator<PageResult<CharacterAsset>, void, undefined>;
61
+ streamCorporationAssets(corporationId: number): AsyncGenerator<PageResult<CharacterAsset>, void, undefined>;
59
62
  }
60
63
  //# sourceMappingURL=AssetsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetsClient.d.ts","sourceRoot":"","sources":["../../src/clients/AssetsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EACL,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,YAAa,SAAQ,aAAa,CAAC,OAAO,cAAc,CAAC;gBACxD,MAAM,EAAE,SAAS;IAI7B;;;;;;OAMG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAMlE;;;;;;;OAOG;IACH,2BAA2B,CACzB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,aAAa,EAAE,CAAC;IAO3B;;;;;;;OAOG;IACH,uBAAuB,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,SAAS,EAAE,CAAC;IAMvB;;;;;;OAMG;IACH,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAMtE;;;;;;;OAOG;IACH,6BAA6B,CAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,aAAa,EAAE,CAAC;IAO3B;;;;;;;OAOG;IACH,yBAAyB,CACvB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,C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