@lgriffin/esi.ts 6.1.0 → 7.4.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 (104) hide show
  1. package/CHANGELOG.md +84 -1
  2. package/README.md +54 -40
  3. package/dist/clients/AllianceClient.d.ts +2 -0
  4. package/dist/clients/AllianceClient.d.ts.map +1 -1
  5. package/dist/clients/AllianceClient.js +2 -0
  6. package/dist/clients/BaseEsiClient.d.ts +4 -2
  7. package/dist/clients/BaseEsiClient.d.ts.map +1 -1
  8. package/dist/clients/BaseEsiClient.js +9 -0
  9. package/dist/core/constants.d.ts +2 -2
  10. package/dist/core/constants.js +1 -1
  11. package/dist/core/endpoints/allianceEndpoints.d.ts +17 -14
  12. package/dist/core/endpoints/allianceEndpoints.d.ts.map +1 -1
  13. package/dist/core/endpoints/allianceEndpoints.js +3 -0
  14. package/dist/core/endpoints/assetEndpoints.d.ts +15 -0
  15. package/dist/core/endpoints/assetEndpoints.d.ts.map +1 -1
  16. package/dist/core/endpoints/assetEndpoints.js +1 -0
  17. package/dist/core/endpoints/characterEndpoints.d.ts +8 -0
  18. package/dist/core/endpoints/characterEndpoints.d.ts.map +1 -1
  19. package/dist/core/endpoints/characterEndpoints.js +1 -0
  20. package/dist/core/endpoints/cloneEndpoints.d.ts +17 -15
  21. package/dist/core/endpoints/cloneEndpoints.d.ts.map +1 -1
  22. package/dist/core/endpoints/cloneEndpoints.js +2 -0
  23. package/dist/core/endpoints/corporationEndpoints.d.ts +27 -0
  24. package/dist/core/endpoints/corporationEndpoints.d.ts.map +1 -1
  25. package/dist/core/endpoints/corporationEndpoints.js +7 -0
  26. package/dist/core/endpoints/createClient.d.ts +5 -1
  27. package/dist/core/endpoints/createClient.d.ts.map +1 -1
  28. package/dist/core/endpoints/createClient.js +74 -55
  29. package/dist/core/endpoints/dogmaEndpoints.d.ts +41 -38
  30. package/dist/core/endpoints/dogmaEndpoints.d.ts.map +1 -1
  31. package/dist/core/endpoints/dogmaEndpoints.js +3 -0
  32. package/dist/core/endpoints/esi-cache-ttls.generated.d.ts.map +1 -1
  33. package/dist/core/endpoints/esi-cache-ttls.generated.js +14 -7
  34. package/dist/core/endpoints/esi-scopes.generated.d.ts +1 -1
  35. package/dist/core/endpoints/esi-scopes.generated.d.ts.map +1 -1
  36. package/dist/core/endpoints/esi-scopes.generated.js +11 -3
  37. package/dist/core/endpoints/mailEndpoints.d.ts +13 -0
  38. package/dist/core/endpoints/mailEndpoints.d.ts.map +1 -1
  39. package/dist/core/endpoints/mailEndpoints.js +2 -0
  40. package/dist/core/endpoints/marketEndpoints.d.ts +20 -0
  41. package/dist/core/endpoints/marketEndpoints.d.ts.map +1 -1
  42. package/dist/core/endpoints/marketEndpoints.js +4 -0
  43. package/dist/core/endpoints/metaEndpoints.d.ts +2 -0
  44. package/dist/core/endpoints/metaEndpoints.d.ts.map +1 -1
  45. package/dist/core/endpoints/metaEndpoints.js +2 -0
  46. package/dist/core/endpoints/piEndpoints.d.ts +4 -0
  47. package/dist/core/endpoints/piEndpoints.d.ts.map +1 -1
  48. package/dist/core/endpoints/piEndpoints.js +2 -0
  49. package/dist/core/endpoints/routeEndpoints.d.ts +4 -0
  50. package/dist/core/endpoints/routeEndpoints.d.ts.map +1 -1
  51. package/dist/core/endpoints/routeEndpoints.js +2 -0
  52. package/dist/core/endpoints/searchEndpoints.d.ts +13 -0
  53. package/dist/core/endpoints/searchEndpoints.d.ts.map +1 -1
  54. package/dist/core/endpoints/searchEndpoints.js +2 -0
  55. package/dist/core/endpoints/skillEndpoints.d.ts +10 -0
  56. package/dist/core/endpoints/skillEndpoints.d.ts.map +1 -1
  57. package/dist/core/endpoints/skillEndpoints.js +1 -0
  58. package/dist/core/endpoints/universeEndpoints.d.ts +8 -0
  59. package/dist/core/endpoints/universeEndpoints.d.ts.map +1 -1
  60. package/dist/core/endpoints/universeEndpoints.js +8 -0
  61. package/dist/core/endpoints/walletEndpoints.d.ts +5 -0
  62. package/dist/core/endpoints/walletEndpoints.d.ts.map +1 -1
  63. package/dist/core/endpoints/walletEndpoints.js +3 -0
  64. package/dist/core/endpoints/warEndpoints.d.ts +1 -0
  65. package/dist/core/endpoints/warEndpoints.d.ts.map +1 -1
  66. package/dist/core/endpoints/warEndpoints.js +1 -0
  67. package/dist/core/util/testHelpers.js +2 -2
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/schemas/character.d.ts +8 -0
  71. package/dist/schemas/character.d.ts.map +1 -1
  72. package/dist/schemas/character.js +9 -1
  73. package/dist/schemas/corporation.d.ts +18 -0
  74. package/dist/schemas/corporation.d.ts.map +1 -1
  75. package/dist/schemas/corporation.js +15 -1
  76. package/dist/schemas/mail.d.ts +13 -0
  77. package/dist/schemas/mail.d.ts.map +1 -1
  78. package/dist/schemas/mail.js +9 -1
  79. package/dist/schemas/market.d.ts +13 -0
  80. package/dist/schemas/market.d.ts.map +1 -1
  81. package/dist/schemas/market.js +14 -1
  82. package/dist/schemas/skills.d.ts +10 -0
  83. package/dist/schemas/skills.d.ts.map +1 -1
  84. package/dist/schemas/skills.js +11 -1
  85. package/dist/testing/TestDataFactory.d.ts +1 -0
  86. package/dist/testing/TestDataFactory.d.ts.map +1 -1
  87. package/dist/testing/TestDataFactory.js +3 -0
  88. package/dist/types/api-responses.d.ts +1 -0
  89. package/dist/types/api-responses.d.ts.map +1 -1
  90. package/dist/types/api-responses.js +1 -0
  91. package/dist/types/branded.d.ts +23 -0
  92. package/dist/types/branded.d.ts.map +1 -0
  93. package/dist/types/branded.js +6 -0
  94. package/dist/types/common.d.ts +10 -0
  95. package/dist/types/common.d.ts.map +1 -1
  96. package/dist/types/generated/esi-spec.generated.d.ts +655 -430
  97. package/dist/types/generated/esi-spec.generated.d.ts.map +1 -1
  98. package/dist/types/generated/esi-spec.generated.js +3 -3
  99. package/dist/types/generated/spec-alignment.check.d.ts +13 -0
  100. package/dist/types/generated/spec-alignment.check.d.ts.map +1 -0
  101. package/dist/types/generated/spec-alignment.check.js +14 -0
  102. package/dist/types/market.d.ts +2 -1
  103. package/dist/types/market.d.ts.map +1 -1
  104. package/package.json +38 -12
package/CHANGELOG.md CHANGED
@@ -5,7 +5,90 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [7.4.0] - 2026-07-17
9
+
10
+ ### Added
11
+
12
+ - **`withSafeMode()` on all domain clients** — mirrors existing `withMetadata()`, surfaces the `EsiResult<T>` discriminated union (`{ ok: true, data, meta } | { ok: false, error }`) without needing to call `createClient()` directly
13
+ - **`responseSchema` on `routeEndpoints`** — was the only endpoint file without runtime response validation; now validated with `z.looseObject({ route: z.array(z.number()) })`
14
+
15
+ ### Changed
16
+
17
+ - **ESLint 8 → 10 flat config migration** — replaced `.eslintrc.cjs` with `eslint.config.mjs`, switched to unified `typescript-eslint` package, dropped `eslint-plugin-prettier` (redundant with lint-staged)
18
+ - **jest-fetch-mock 3 → 4** — updated null-body status mocks (204/304) to use `new Response(null, ...)` per Fetch spec
19
+ - Updated 11 minor/patch dependencies: @commitlint/cli, @microsoft/api-extractor, @redocly/cli, @types/node, @typescript-eslint/*, eslint-plugin-sonarjs, fast-check, knip, prettier, typedoc
20
+
21
+ ### Fixed
22
+
23
+ - CI: aligned `codeql.yml` branch targets to `[master, main, develop]`
24
+ - CI: pinned `jest-coverage-comment@main` → `@v1.0.34` (supply-chain risk)
25
+ - CI: added schema drift and generated types freshness checks to release pipeline
26
+
27
+ ### Deprecated
28
+
29
+ - `AllianceClient.getContacts()` — use `ContactsClient.getAllianceContacts()` instead
30
+ - `AllianceClient.getContactLabels()` — use `ContactsClient.getAllianceContactLabels()` instead
31
+
32
+ ## [7.3.0] - 2026-07-14
33
+
34
+ ### Added
35
+
36
+ - **`EsiResult<T>` discriminated union** and `safeMode` option for error-safe API calls
37
+ - **Branded ID types** (16 types) for type-safe ESI entity references
38
+ - **Expanded type-level tests** with tsd for error guards, endpoints, and domain types
39
+ - **Compile-time spec-to-Zod type alignment checks**
40
+ - **Schema drift detection** as a blocking CI check
41
+ - **Comprehensive testing gap closure** (+1233 tests)
42
+
43
+ ### Fixed
44
+
45
+ - Resolved three CI jobs failing with continue-on-error
46
+ - Normalized CRLF in API surface check
47
+ - Fixed schemathesis report permissions and `--url` flag
48
+ - Fixed API surface ordering issues
49
+ - Added missing `system_id` to `MarketOrderSchema` test data
50
+
51
+ ## [7.2.0] - 2026-07-08
52
+
53
+ ### Added
54
+
55
+ - **Contract testing infrastructure** — deep validation of all endpoint definitions against the live ESI OpenAPI spec (`npm run contract:live`). Checks path parameter alignment, required query params, request body consistency, auth requirements, response schema coverage, HTTP methods, pagination metadata, and deprecation sync. 8 contract validation categories with known-exception tracking.
56
+ - **Property-based fuzz testing** with [fast-check](https://github.com/dubzzz/fast-check) — 601 tests fuzzing `validatePathParam()`, `validateQueryParam()`, `buildEndpointPath()`, and all Zod schemas with random/adversarial inputs (`npm run fuzz`)
57
+ - **OpenAPI spec snapshot & diff** — `npm run contract:snapshot` saves a baseline; `npm run contract:diff` detects breaking changes via [oasdiff](https://github.com/Tufin/oasdiff) (Docker)
58
+ - **Consumer type tests** with [tsd](https://github.com/tsdjs/tsd) — verifies public API type correctness (`npm run test:types`)
59
+ - **Prism mock server** — `npm run mock:esi` starts a spec-conformant ESI mock on port 4010 via [@stoplight/prism-cli](https://stoplight.io/open-source/prism)
60
+ - **Schemathesis fuzz runner** — `npm run fuzz:api` runs Schemathesis against the Prism mock (Docker, weekly CI)
61
+ - Contract and fuzz test CI jobs added to `ci.yml` quality gate
62
+ - Weekly spec drift detection job added to `maintenance.yml`
63
+ - `jest.contract.config.cjs` and `jest.fuzz.config.cjs` test configurations
64
+
65
+ ### Dependencies
66
+
67
+ - Added `fast-check` (dev) — property-based testing framework
68
+ - Added `@stoplight/prism-cli` (dev) — OpenAPI mock server
69
+ - Added `tsd` (dev) — TypeScript type testing
70
+
71
+ ## [7.1.0] - 2026-07-08
72
+
73
+ ### Added
74
+
75
+ - **Redocly CLI integration** — lints the live ESI OpenAPI spec for structural validity and best-practice compliance (`npm run validate:spec`). Catches spec breakage from CCP before it breaks generated types, cache TTLs, or scopes. Baseline: 0 errors, 328 warnings (all known CCP spec issues).
76
+ - `redocly.yaml` config with tuned rulesets for ESI — structural rules as errors, CCP spec quirks as warnings
77
+ - `validate:spec` npm script added to `check:all` pipeline
78
+
79
+ ## [7.0.0] - 2026-07-08
80
+
81
+ ### Breaking Changes
82
+
83
+ - **Swagger 2.0 → OpenAPI 3.1 migration** — all generated types, cache TTLs, scopes, and rate limit groups are now sourced from the ESI OpenAPI 3.1 spec (`/meta/openapi.json`) instead of the deprecated Swagger 2.0 spec (`/latest/swagger.json`). See [esi-issues#1490](https://github.com/esi/esi-issues/issues/1490).
84
+ - **Generated interface names changed** — `EsiSpec` namespace types now use OpenAPI schema names (e.g., `AllianceDetail` instead of `GetAlliancesAllianceIdOk`). These are generated types; hand-written consumer types are unchanged.
85
+ - **Cache TTL metadata key** — internally changed from `x-cached-seconds` to `x-cache-age`. No consumer-facing impact (cache behavior is identical).
86
+
87
+ ### Changed
88
+
89
+ - Single OpenAPI spec fetch instead of dual Swagger + OpenAPI fetches
90
+ - Updated all scripts, tests, and documentation to reference OpenAPI spec
91
+ - Generated types now include 161 interfaces (up from 147), 126 cache TTLs, 70 scopes
9
92
 
10
93
  ## [6.1.0] - 2026-07-07
11
94
 
package/README.md CHANGED
@@ -8,37 +8,39 @@
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 production-grade TypeScript client for the [EVE Online ESI API](https://esi.evetech.net/), with runtime validation, intelligent caching, and full endpoint coverage.
11
+ A production-grade TypeScript client for the [EVE Online ESI API](https://esi.evetech.net/), built on the **OpenAPI 3.1 spec**, with runtime validation, intelligent caching, and full endpoint coverage.
12
12
 
13
- **All 210 ESI endpoints are defined, tested, and validated against live Tranquility.**
13
+ **v7.0.0** — Fully migrated from the deprecated Swagger 2.0 spec to OpenAPI 3.1 (`/meta/openapi.json`). All generated types, cache TTLs, scopes, and rate limit groups are now sourced from a single OpenAPI fetch. See [esi-issues#1490](https://github.com/esi/esi-issues/issues/1490) for the deprecation notice.
14
+
15
+ **208 endpoint definitions — 194 from the public ESI OpenAPI spec, plus 14 for newer EVE features (Equinox sovereignty, orbital skyhooks, mercenary dens, access lists, freelance jobs). All 206 exercisable endpoints validated against live Tranquility on 2026-07-08.**
14
16
 
15
17
  ## Why ESI.ts vs. OpenAPI-Generated Clients?
16
18
 
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.
19
+ Tools like `openapi-typescript` or `openapi-generator` can produce a typed client from the ESI OpenAPI 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
20
 
19
21
  ### What generators give you
20
22
 
21
- - TypeScript interfaces from the swagger spec
23
+ - TypeScript interfaces from the OpenAPI spec
22
24
  - Basic request/response typing
23
25
  - A thin HTTP wrapper
24
26
 
25
27
  ### What ESI.ts gives you on top of that
26
28
 
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. |
29
+ | Capability | openapi-typescript | ESI.ts |
30
+ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
+ | **Runtime response validation** | None — types are erased at compile time. If CCP changes a field, you get silent data corruption. | Every GET response is validated at runtime via [Zod](https://zod.dev/) schemas — all 173 GET endpoints have schemas. Schema mismatches throw `EsiValidationError` immediately. |
32
+ | **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. |
33
+ | **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. |
34
+ | **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. |
35
+ | **Retry & resilience** | None. | Exponential backoff with jitter, circuit breaker (closed/open/half-open), automatic 401 token refresh with concurrent coalescing. |
36
+ | **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. |
37
+ | **Batch operations** | None. | `batch()` with bounded concurrency for GET fan-out, `batchPost()` with auto-chunking for large POST payloads. |
38
+ | **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). |
39
+ | **Testing** | Whatever you write. | 121+ test suites, 3,800+ tests across 9 tiers including property-based fuzzing (fast-check), deep contract tests against live OpenAPI spec, and consumer type tests (tsd). 43 runnable example scripts. |
38
40
 
39
41
  ### The real problem with generated clients
40
42
 
41
- The ESI swagger spec is not a perfect source of truth. During live endpoint validation, we discovered:
43
+ The ESI OpenAPI spec is not a perfect source of truth. During live endpoint validation against the OpenAPI 3.1 spec, we discovered:
42
44
 
43
45
  - `addContacts`, `editContacts`, and 4 UI endpoints document parameters as request body when ESI actually expects query parameters
44
46
  - `deleteCharacterContacts` expects comma-separated contact IDs as a query param, not a JSON body
@@ -274,7 +276,7 @@ All clients are accessed as properties on the `EsiClient` instance. Authenticate
274
276
 
275
277
  ## Runtime Response Validation
276
278
 
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.
279
+ ESI.ts validates API responses at runtime using [Zod](https://zod.dev/) schemas. All GET endpoints have schemas — these are the endpoints that return data your application consumes, where a silent shape change from CCP would cause bugs. POST/PUT/DELETE mutations typically return `204 No Content` (no body to validate) or simple confirmation values, so schemas are omitted where there is nothing meaningful to validate.
278
280
 
279
281
  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
282
 
@@ -329,7 +331,7 @@ const uncachedClient = new EsiClient({ enableETagCache: false });
329
331
 
330
332
  ### Spec-Aware Cache TTLs
331
333
 
332
- The library reads `x-cached-seconds` from the ESI swagger spec (119 of 195 endpoints). Within the TTL window, repeated GET requests return cached data with **zero HTTP calls** — not even a conditional GET.
334
+ The library reads `x-cache-age` from the ESI OpenAPI spec (126 of 195 endpoints). Within the TTL window, repeated GET requests return cached data with **zero HTTP calls** — not even a conditional GET.
333
335
 
334
336
  This layers on top of ETag caching in three tiers:
335
337
 
@@ -479,13 +481,13 @@ Key points:
479
481
 
480
482
  ## Generated Types
481
483
 
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:
484
+ The library includes TypeScript interfaces generated directly from the ESI OpenAPI 3.1 spec, available as the `EsiSpec` namespace. These are guaranteed to match the live spec and complement the hand-written types:
483
485
 
484
486
  ```typescript
485
487
  import { EsiSpec } from '@lgriffin/esi.ts';
486
488
 
487
- // Generated type — exact spec field names and optionality
488
- const order: EsiSpec.GetMarketsRegionIdOrders200Ok = {
489
+ // Generated type — uses OpenAPI schema names (v7.0.0+)
490
+ const order: EsiSpec.MarketsRegionIdOrdersGet = {
489
491
  order_id: 123,
490
492
  type_id: 34,
491
493
  price: 5.5,
@@ -499,13 +501,13 @@ const order: EsiSpec.GetMarketsRegionIdOrders200Ok = {
499
501
  To regenerate types from the latest ESI spec:
500
502
 
501
503
  ```bash
502
- npm run generate:types # fetches spec, generates 147 interfaces + cache TTL map + rate limit groups + scope map
504
+ npm run generate:types # fetches OpenAPI spec, generates 161 interfaces + cache TTL map + rate limit groups + scope map
503
505
  npm run validate:esi # reports type drift between hand-written and generated types
504
506
  ```
505
507
 
506
508
  ## ESI Scopes
507
509
 
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:
510
+ The library includes a generated scope-to-endpoint mapping extracted from the ESI OpenAPI spec. Use it to check which OAuth scopes an endpoint requires before making a request:
509
511
 
510
512
  ```typescript
511
513
  import { esiEndpointScopes, EsiScope } from '@lgriffin/esi.ts';
@@ -657,7 +659,7 @@ const prices = await marketClient.getMarketPrices();
657
659
 
658
660
  ## Endpoint Coverage
659
661
 
660
- All 210 ESI endpoint definitions have been validated against live Tranquility. This table summarizes the validation approach:
662
+ All 208 endpoint definitions have been validated against live Tranquility using the **OpenAPI 3.1 spec** — 194 from the public ESI spec plus 14 for newer EVE features. 206 endpoints are exercisable (2 mercenary den endpoints await CCP deployment). Full output is captured in [`openapi.output.md`](openapi.output.md).
661
663
 
662
664
  | Category | Endpoints | Method |
663
665
  | --------------------------- | --------- | -------------------------------------------------- |
@@ -668,10 +670,10 @@ All 210 ESI endpoint definitions have been validated against live Tranquility. T
668
670
  | Mail (POST/PUT/DELETE) | 5 | Live send/label/metadata/delete lifecycle |
669
671
  | UI (POST) | 5 | Live testing with EVE client running |
670
672
  | Calendar (PUT) | 1 | Live RSVP to event |
671
- | Fleet (GET/POST/PUT/DELETE) | 14 | Live fleet with two characters |
673
+ | Fleet (GET/POST/PUT/DELETE) | 14 | Live fleet with fleet commander + squad members |
672
674
  | Assets POST | 3 | Live asset location/name queries |
673
675
  | CSPA (POST) | 1 | Live charge cost calculation |
674
- | Dogma dynamic (GET) | 1 | Live mutaplasmid item query |
676
+ | Dogma dynamic (GET) | 1 | Live mutaplasmid (Abyssal) item query |
675
677
  | Universe POST helpers | 3 | Live name resolution and affiliation |
676
678
  | Freelance Jobs (GET) | 4 | Live queries (graceful 404 for no active jobs) |
677
679
 
@@ -778,19 +780,25 @@ try {
778
780
 
779
781
  ESI.ts has a comprehensive multi-tier testing strategy:
780
782
 
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 |
783
+ | Tier | Tests | Purpose |
784
+ | -------------------------- | ---------------- | ------------------------------------------------------------------ |
785
+ | **TDD unit tests** | 81 files | Every client method, endpoint path, query param, and body format |
786
+ | **BDD scenario tests** | 40 feature files | Behavioral specifications in Gherkin (Given/When/Then) |
787
+ | **Mocked integration** | Full suite | Cross-layer request flow with jest-fetch-mock |
788
+ | **Live smoke tests** | 43 examples | Every endpoint against live Tranquility |
789
+ | **ESI spec contract** | 15 tests | Endpoint definitions validated against live OpenAPI spec |
790
+ | **Deep contract tests** | 8 categories | Path params, query params, body, auth, schemas, pagination vs spec |
791
+ | **Property-based fuzzing** | 601 tests | fast-check fuzzing of validation, URL construction, Zod schemas |
792
+ | **Type-level tests** | tsd | Consumer API type correctness via tsd |
793
+ | **Gated auth tests** | 33 tests | Authenticated endpoints with real tokens |
789
794
 
790
795
  ```bash
791
796
  npm test # Unit + BDD tests (121 suites, 3,224 tests)
792
797
  npm run coverage # Tests with coverage report (thresholds enforced)
793
798
  npm run bdd # BDD scenario tests only
799
+ npm run contract # Contract tests (skipped without ESI_LIVE_TESTS=true)
800
+ npm run fuzz # Property-based fuzz tests (601 tests)
801
+ npm run test:types # tsd consumer type tests
794
802
  ```
795
803
 
796
804
  Coverage thresholds are enforced in CI: branches 50%, functions 50%, lines 65%, statements 65%.
@@ -817,6 +825,7 @@ The project uses a comprehensive suite of static analysis and code quality tools
817
825
  | [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs) | Cognitive complexity and code smell detection | Integrated into `npm run lint` |
818
826
  | [husky](https://typicode.github.io/husky/) | Git pre-commit hooks | Automatic on commit |
819
827
  | [lint-staged](https://github.com/lint-staged/lint-staged) | Run linters on staged files only | Automatic on commit |
828
+ | [Redocly CLI](https://redocly.com/docs/cli/) | OpenAPI spec validation and linting | `npm run validate:spec` |
820
829
 
821
830
  ### Available Scripts
822
831
 
@@ -830,15 +839,20 @@ npm run format:check # Check formatting without modifying
830
839
 
831
840
  # Testing
832
841
  npm test # Unit tests (121 suites, 3,224 tests)
833
- npm run test:all # Unit + improved + BDD tests
842
+ npm run test:all # Unit + BDD + integration + fuzz + type tests
834
843
  npm run coverage # Tests with coverage report (thresholds enforced)
835
844
  npm run bdd # BDD scenario tests
845
+ npm run contract:live # Deep contract tests against live ESI spec
846
+ npm run fuzz # Property-based fuzz tests (fast-check)
847
+ npm run test:types # Consumer type tests (tsd)
848
+ npm run mock:esi # Start Prism mock ESI server on port 4010
836
849
 
837
850
  # Static Analysis
838
851
  npm run knip # Detect dead code and unused exports
839
- npm run validate:esi # Validate endpoints against live ESI swagger spec
852
+ npm run validate:esi # Validate endpoints against live ESI OpenAPI spec
853
+ npm run validate:spec # Lint ESI OpenAPI spec with Redocly (structural + best practices)
840
854
  npm run validate # Run all checks: lint, format, build, coverage, knip
841
- npm run generate:types # Regenerate TypeScript interfaces from ESI swagger spec
855
+ npm run generate:types # Regenerate TypeScript interfaces from ESI OpenAPI spec
842
856
 
843
857
  # Documentation
844
858
  npm run docs # Generate TypeDoc API documentation
@@ -847,13 +861,13 @@ npm run docs:serve # Serve docs locally on port 8080
847
861
 
848
862
  ### ESI Endpoint Validation
849
863
 
850
- To verify that the codebase endpoint definitions match the live ESI swagger spec:
864
+ To verify that the codebase endpoint definitions match the live ESI OpenAPI spec:
851
865
 
852
866
  ```bash
853
867
  npm run validate:esi
854
868
  ```
855
869
 
856
- This fetches `https://esi.evetech.net/latest/swagger.json` and reports:
870
+ This fetches the ESI OpenAPI spec and reports:
857
871
 
858
872
  - Endpoints in the codebase that are no longer in the ESI spec
859
873
  - Endpoints in the ESI spec that the codebase doesn't cover
@@ -870,7 +884,7 @@ Every pull request runs the full validation suite:
870
884
  - ESLint (with security and sonarjs plugins)
871
885
  - Prettier formatting check
872
886
  - TypeScript compilation
873
- - Generated types staleness check (regenerates from live ESI spec and verifies no diff)
887
+ - Generated types staleness check (regenerates from live ESI OpenAPI spec and verifies no diff)
874
888
  - Unit tests across Node.js 18, 20, and 22
875
889
  - BDD scenario tests
876
890
  - Coverage threshold enforcement (branches: 50%, functions: 50%, lines: 65%, statements: 65%)
@@ -15,6 +15,7 @@ export declare class AllianceClient extends BaseEsiClient<typeof allianceEndpoin
15
15
  /**
16
16
  * Retrieve contacts for an alliance.
17
17
  *
18
+ * @deprecated Use ContactsClient.getAllianceContacts() instead
18
19
  * @param allianceId - The ID of the alliance whose contacts to retrieve
19
20
  * @returns A list of alliance contacts with standings and contact types
20
21
  * @requires Authentication
@@ -23,6 +24,7 @@ export declare class AllianceClient extends BaseEsiClient<typeof allianceEndpoin
23
24
  /**
24
25
  * Retrieve custom contact labels for an alliance.
25
26
  *
27
+ * @deprecated Use ContactsClient.getAllianceContactLabels() instead
26
28
  * @param allianceId - The ID of the alliance whose contact labels to retrieve
27
29
  * @returns A list of custom labels used to categorize alliance contacts
28
30
  * @requires Authentication
@@ -1 +1 @@
1
- {"version":3,"file":"AllianceClient.d.ts","sourceRoot":"","sources":["../../src/clients/AllianceClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,cAAe,SAAQ,aAAa,CAAC,OAAO,iBAAiB,CAAC;IACzE,OAAO,CAAC,UAAU,CAA2D;gBAEjE,MAAM,EAAE,SAAS;IAK7B;;;;;OAKG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI1D;;;;;;OAMG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAM3D;;;;;;OAMG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAMrE;;;;;OAKG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAItD;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAInD;;;;OAIG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGlC"}
1
+ {"version":3,"file":"AllianceClient.d.ts","sourceRoot":"","sources":["../../src/clients/AllianceClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,cAAe,SAAQ,aAAa,CAAC,OAAO,iBAAiB,CAAC;IACzE,OAAO,CAAC,UAAU,CAA2D;gBAEjE,MAAM,EAAE,SAAS;IAK7B;;;;;OAKG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI1D;;;;;;;OAOG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAM3D;;;;;;;OAOG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAMrE;;;;;OAKG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAItD;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAInD;;;;OAIG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGlC"}
@@ -23,6 +23,7 @@ class AllianceClient extends BaseEsiClient_1.BaseEsiClient {
23
23
  /**
24
24
  * Retrieve contacts for an alliance.
25
25
  *
26
+ * @deprecated Use ContactsClient.getAllianceContacts() instead
26
27
  * @param allianceId - The ID of the alliance whose contacts to retrieve
27
28
  * @returns A list of alliance contacts with standings and contact types
28
29
  * @requires Authentication
@@ -33,6 +34,7 @@ class AllianceClient extends BaseEsiClient_1.BaseEsiClient {
33
34
  /**
34
35
  * Retrieve custom contact labels for an alliance.
35
36
  *
37
+ * @deprecated Use ContactsClient.getAllianceContactLabels() instead
36
38
  * @param allianceId - The ID of the alliance whose contact labels to retrieve
37
39
  * @returns A list of custom labels used to categorize alliance contacts
38
40
  * @requires Authentication
@@ -1,5 +1,5 @@
1
1
  import { ApiClient } from '../core/ApiClient';
2
- import { createClient, WithMetadata } from '../core/endpoints/createClient';
2
+ import { createClient, WithMetadata, WithSafeMode } from '../core/endpoints/createClient';
3
3
  import { EndpointMap } from '../core/endpoints/EndpointDefinition';
4
4
  import { PageResult } from '../core/pagination/AsyncPaginationIterator';
5
5
  type ClientMethods<T extends EndpointMap> = ReturnType<typeof createClient<T>>;
@@ -8,9 +8,11 @@ export declare abstract class BaseEsiClient<T extends EndpointMap> {
8
8
  protected _client: ApiClient;
9
9
  protected _endpoints: T;
10
10
  private _metaApi?;
11
+ private _safeApi?;
11
12
  constructor(client: ApiClient, endpoints: T);
12
13
  protected streamEndpoint<R>(endpointName: string & keyof T, ...args: unknown[]): AsyncGenerator<PageResult<R>, void, undefined>;
13
- withMetadata(): WithMetadata<Omit<this, 'withMetadata'>>;
14
+ withMetadata(): WithMetadata<Omit<this, 'withMetadata' | 'withSafeMode'>>;
15
+ withSafeMode(): WithSafeMode<Omit<this, 'withMetadata' | 'withSafeMode'>>;
14
16
  }
15
17
  export {};
16
18
  //# sourceMappingURL=BaseEsiClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseEsiClient.d.ts","sourceRoot":"","sources":["../../src/clients/BaseEsiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,YAAY,EAEZ,YAAY,EACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAEL,UAAU,EACX,MAAM,4CAA4C,CAAC;AAEpD,KAAK,aAAa,CAAC,CAAC,SAAS,WAAW,IAAI,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,8BAAsB,aAAa,CAAC,CAAC,SAAS,WAAW;IACvD,SAAS,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAChC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;IAC7B,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,QAAQ,CAAC,CAAmB;gBAExB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAM3C,SAAS,CAAC,cAAc,CAAC,CAAC,EACxB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,EAC9B,GAAG,IAAI,EAAE,OAAO,EAAE,GACjB,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC;IAgBjD,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;CAQzD"}
1
+ {"version":3,"file":"BaseEsiClient.d.ts","sourceRoot":"","sources":["../../src/clients/BaseEsiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,YAAY,EAEZ,YAAY,EACZ,YAAY,EACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAEL,UAAU,EACX,MAAM,4CAA4C,CAAC;AAEpD,KAAK,aAAa,CAAC,CAAC,SAAS,WAAW,IAAI,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,8BAAsB,aAAa,CAAC,CAAC,SAAS,WAAW;IACvD,SAAS,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAChC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;IAC7B,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,QAAQ,CAAC,CAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,CAAmB;gBAExB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAM3C,SAAS,CAAC,cAAc,CAAC,CAAC,EACxB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,EAC9B,GAAG,IAAI,EAAE,OAAO,EAAE,GACjB,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC;IAgBjD,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC;IAWzE,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC;CAU1E"}
@@ -9,6 +9,7 @@ class BaseEsiClient {
9
9
  _client;
10
10
  _endpoints;
11
11
  _metaApi;
12
+ _safeApi;
12
13
  constructor(client, endpoints) {
13
14
  this._client = client;
14
15
  this._endpoints = endpoints;
@@ -27,5 +28,13 @@ class BaseEsiClient {
27
28
  }
28
29
  return this._metaApi;
29
30
  }
31
+ withSafeMode() {
32
+ if (!this._safeApi) {
33
+ this._safeApi = (0, createClient_1.createClient)(this._client, this._endpoints, {
34
+ safeMode: true,
35
+ });
36
+ }
37
+ return this._safeApi;
38
+ }
30
39
  }
31
40
  exports.BaseEsiClient = BaseEsiClient;
@@ -1,5 +1,5 @@
1
1
  export declare const PACKAGE_NAME = "esi.ts";
2
- export declare const PACKAGE_VERSION = "5.3.0";
3
- export declare const USER_AGENT = "esi.ts/5.3.0";
2
+ export declare const PACKAGE_VERSION = "7.4.0";
3
+ export declare const USER_AGENT = "esi.ts/7.4.0";
4
4
  export declare const COMPATIBILITY_DATE = "2026-05-19";
5
5
  //# sourceMappingURL=constants.d.ts.map
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.COMPATIBILITY_DATE = exports.USER_AGENT = exports.PACKAGE_VERSION = exports.PACKAGE_NAME = void 0;
4
4
  exports.PACKAGE_NAME = 'esi.ts';
5
- exports.PACKAGE_VERSION = '5.3.0';
5
+ exports.PACKAGE_VERSION = '7.4.0';
6
6
  exports.USER_AGENT = `${exports.PACKAGE_NAME}/${exports.PACKAGE_VERSION}`;
7
7
  exports.COMPATIBILITY_DATE = '2026-05-19';
@@ -1,40 +1,43 @@
1
+ import { z } from 'zod';
1
2
  export declare const allianceEndpoints: {
2
3
  readonly getAllianceById: {
3
4
  readonly path: "alliances/{allianceId}/";
4
5
  readonly method: "GET";
5
6
  readonly requiresAuth: false;
6
7
  readonly pathParams: readonly ["allianceId"];
7
- readonly responseSchema: import("zod").ZodObject<{
8
- alliance_id: import("zod").ZodOptional<import("zod").ZodNumber>;
9
- name: import("zod").ZodString;
10
- ticker: import("zod").ZodString;
11
- creator_id: import("zod").ZodNumber;
12
- creator_corporation_id: import("zod").ZodNumber;
13
- executor_corporation_id: import("zod").ZodOptional<import("zod").ZodNumber>;
14
- date_founded: import("zod").ZodString;
15
- faction_id: import("zod").ZodOptional<import("zod").ZodNumber>;
16
- }, import("zod/v4/core").$loose>;
8
+ readonly responseSchema: z.ZodObject<{
9
+ alliance_id: z.ZodOptional<z.ZodNumber>;
10
+ name: z.ZodString;
11
+ ticker: z.ZodString;
12
+ creator_id: z.ZodNumber;
13
+ creator_corporation_id: z.ZodNumber;
14
+ executor_corporation_id: z.ZodOptional<z.ZodNumber>;
15
+ date_founded: z.ZodString;
16
+ faction_id: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$loose>;
17
18
  };
18
19
  readonly getCorporations: {
19
20
  readonly path: "alliances/{allianceId}/corporations/";
20
21
  readonly method: "GET";
21
22
  readonly requiresAuth: false;
22
23
  readonly pathParams: readonly ["allianceId"];
24
+ readonly responseSchema: z.ZodArray<z.ZodNumber>;
23
25
  };
24
26
  readonly getIcons: {
25
27
  readonly path: "alliances/{allianceId}/icons/";
26
28
  readonly method: "GET";
27
29
  readonly requiresAuth: false;
28
30
  readonly pathParams: readonly ["allianceId"];
29
- readonly responseSchema: import("zod").ZodObject<{
30
- px64x64: import("zod").ZodOptional<import("zod").ZodString>;
31
- px128x128: import("zod").ZodOptional<import("zod").ZodString>;
32
- }, import("zod/v4/core").$loose>;
31
+ readonly responseSchema: z.ZodObject<{
32
+ px64x64: z.ZodOptional<z.ZodString>;
33
+ px128x128: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$loose>;
33
35
  };
34
36
  readonly getAlliances: {
35
37
  readonly path: "alliances";
36
38
  readonly method: "GET";
37
39
  readonly requiresAuth: false;
40
+ readonly responseSchema: z.ZodArray<z.ZodNumber>;
38
41
  };
39
42
  };
40
43
  //# sourceMappingURL=allianceEndpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"allianceEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/allianceEndpoints.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BE,CAAC"}
1
+ {"version":3,"file":"allianceEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/allianceEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.allianceEndpoints = void 0;
4
+ const zod_1 = require("zod");
4
5
  const alliance_1 = require("../../schemas/alliance");
5
6
  exports.allianceEndpoints = {
6
7
  getAllianceById: {
@@ -15,6 +16,7 @@ exports.allianceEndpoints = {
15
16
  method: 'GET',
16
17
  requiresAuth: false,
17
18
  pathParams: ['allianceId'],
19
+ responseSchema: zod_1.z.array(zod_1.z.number()),
18
20
  },
19
21
  getIcons: {
20
22
  path: 'alliances/{allianceId}/icons/',
@@ -27,5 +29,6 @@ exports.allianceEndpoints = {
27
29
  path: 'alliances',
28
30
  method: 'GET',
29
31
  requiresAuth: false,
32
+ responseSchema: zod_1.z.array(zod_1.z.number()),
30
33
  },
31
34
  };
@@ -26,6 +26,21 @@ export declare const assetEndpoints: {
26
26
  readonly method: "GET";
27
27
  readonly requiresAuth: true;
28
28
  readonly pathParams: readonly ["corporationId"];
29
+ readonly responseSchema: z.ZodArray<z.ZodObject<{
30
+ item_id: z.ZodNumber;
31
+ type_id: z.ZodNumber;
32
+ quantity: z.ZodNumber;
33
+ location_id: z.ZodNumber;
34
+ location_type: z.ZodEnum<{
35
+ other: "other";
36
+ solar_system: "solar_system";
37
+ station: "station";
38
+ item: "item";
39
+ }>;
40
+ location_flag: z.ZodString;
41
+ is_singleton: z.ZodBoolean;
42
+ is_blueprint_copy: z.ZodOptional<z.ZodBoolean>;
43
+ }, z.core.$loose>>;
29
44
  };
30
45
  readonly postCharacterAssetLocations: {
31
46
  readonly path: "characters/{characterId}/assets/locations/";
@@ -1 +1 @@
1
- {"version":3,"file":"assetEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/assetEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmBA,MAAM,EAAE;;;;;;;;;;;;;;;wCAQR,MAAM,EAAE;;;;;;;;;;;wCAQR,MAAM,EAAE;;;;;;;wCAOR,MAAM,EAAE;;CAEH,CAAC"}
1
+ {"version":3,"file":"assetEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/assetEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoBA,MAAM,EAAE;;;;;;;;;;;;;;;wCAQR,MAAM,EAAE;;;;;;;;;;;wCAQR,MAAM,EAAE;;;;;;;wCAOR,MAAM,EAAE;;CAEH,CAAC"}
@@ -16,6 +16,7 @@ exports.assetEndpoints = {
16
16
  method: 'GET',
17
17
  requiresAuth: true,
18
18
  pathParams: ['corporationId'],
19
+ responseSchema: zod_1.z.array(assets_1.CharacterAssetSchema),
19
20
  },
20
21
  postCharacterAssetLocations: {
21
22
  path: 'characters/{characterId}/assets/locations/',
@@ -11,6 +11,7 @@ export declare const characterEndpoints: {
11
11
  description: z.ZodOptional<z.ZodString>;
12
12
  corporation_id: z.ZodNumber;
13
13
  alliance_id: z.ZodOptional<z.ZodNumber>;
14
+ faction_id: z.ZodOptional<z.ZodNumber>;
14
15
  ancestry_id: z.ZodOptional<z.ZodNumber>;
15
16
  bloodline_id: z.ZodNumber;
16
17
  race_id: z.ZodNumber;
@@ -94,6 +95,13 @@ export declare const characterEndpoints: {
94
95
  readonly method: "GET";
95
96
  readonly requiresAuth: true;
96
97
  readonly pathParams: readonly ["characterId"];
98
+ readonly responseSchema: z.ZodArray<z.ZodObject<{
99
+ notification_id: z.ZodNumber;
100
+ sender_character_id: z.ZodNumber;
101
+ message: z.ZodString;
102
+ send_date: z.ZodString;
103
+ standing_level: z.ZodNumber;
104
+ }, z.core.$loose>>;
97
105
  };
98
106
  readonly getCorporationHistory: {
99
107
  readonly path: "characters/{characterId}/corporationhistory/";
@@ -1 +1 @@
1
- {"version":3,"file":"characterEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/characterEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGC,CAAC"}
1
+ {"version":3,"file":"characterEndpoints.d.ts","sourceRoot":"","sources":["../../../src/core/endpoints/characterEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGC,CAAC"}
@@ -51,6 +51,7 @@ exports.characterEndpoints = {
51
51
  method: 'GET',
52
52
  requiresAuth: true,
53
53
  pathParams: ['characterId'],
54
+ responseSchema: zod_1.z.array(character_1.ContactNotificationSchema),
54
55
  },
55
56
  getCorporationHistory: {
56
57
  path: 'characters/{characterId}/corporationhistory/',