@lgriffin/esi.ts 9.6.0 → 9.7.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 (83) hide show
  1. package/CHANGELOG.md +417 -388
  2. package/LICENSE +26 -26
  3. package/README.md +1037 -1030
  4. package/dist/clients/AllianceClient.d.ts +2 -0
  5. package/dist/clients/AllianceClient.d.ts.map +1 -1
  6. package/dist/clients/AssetsClient.d.ts +2 -0
  7. package/dist/clients/AssetsClient.d.ts.map +1 -1
  8. package/dist/clients/BaseEsiClient.d.ts +1 -0
  9. package/dist/clients/BaseEsiClient.d.ts.map +1 -1
  10. package/dist/clients/CalendarClient.d.ts +2 -0
  11. package/dist/clients/CalendarClient.d.ts.map +1 -1
  12. package/dist/clients/CharacterClient.d.ts +8 -0
  13. package/dist/clients/CharacterClient.d.ts.map +1 -1
  14. package/dist/clients/ClonesClient.d.ts +1 -0
  15. package/dist/clients/ClonesClient.d.ts.map +1 -1
  16. package/dist/clients/ContactsClient.d.ts +6 -0
  17. package/dist/clients/ContactsClient.d.ts.map +1 -1
  18. package/dist/clients/ContractsClient.d.ts +3 -0
  19. package/dist/clients/ContractsClient.d.ts.map +1 -1
  20. package/dist/clients/CorporationsClient.d.ts +17 -0
  21. package/dist/clients/CorporationsClient.d.ts.map +1 -1
  22. package/dist/clients/FittingsClient.d.ts +1 -0
  23. package/dist/clients/FittingsClient.d.ts.map +1 -1
  24. package/dist/clients/FleetClient.d.ts +2 -0
  25. package/dist/clients/FleetClient.d.ts.map +1 -1
  26. package/dist/clients/IndustryClient.d.ts +8 -0
  27. package/dist/clients/IndustryClient.d.ts.map +1 -1
  28. package/dist/clients/KillmailsClient.d.ts +2 -0
  29. package/dist/clients/KillmailsClient.d.ts.map +1 -1
  30. package/dist/clients/LoyaltyClient.d.ts +2 -0
  31. package/dist/clients/LoyaltyClient.d.ts.map +1 -1
  32. package/dist/clients/MailClient.d.ts +5 -0
  33. package/dist/clients/MailClient.d.ts.map +1 -1
  34. package/dist/clients/MarketClient.d.ts +6 -0
  35. package/dist/clients/MarketClient.d.ts.map +1 -1
  36. package/dist/clients/PiClient.d.ts +2 -0
  37. package/dist/clients/PiClient.d.ts.map +1 -1
  38. package/dist/clients/SkillsClient.d.ts +1 -0
  39. package/dist/clients/SkillsClient.d.ts.map +1 -1
  40. package/dist/clients/WalletClient.d.ts +4 -0
  41. package/dist/clients/WalletClient.d.ts.map +1 -1
  42. package/dist/clients/WarsClient.d.ts +2 -0
  43. package/dist/clients/WarsClient.d.ts.map +1 -1
  44. package/dist/core/ApiClient.d.ts +4 -0
  45. package/dist/core/ApiClient.d.ts.map +1 -1
  46. package/dist/core/ApiClientBuilder.d.ts +3 -1
  47. package/dist/core/ApiClientBuilder.d.ts.map +1 -1
  48. package/dist/core/constants.d.ts +2 -2
  49. package/dist/core/endpoints/EndpointDefinition.d.ts +2 -2
  50. package/dist/core/endpoints/EndpointDefinition.d.ts.map +1 -1
  51. package/dist/core/endpoints/createClient.d.ts +2 -2
  52. package/dist/core/endpoints/createClient.d.ts.map +1 -1
  53. package/dist/core/logger/NoopLogger.d.ts +3 -0
  54. package/dist/core/logger/NoopLogger.d.ts.map +1 -0
  55. package/dist/core/pagination/AsyncPaginationIterator.d.ts +1 -0
  56. package/dist/core/pagination/AsyncPaginationIterator.d.ts.map +1 -1
  57. package/dist/core/rateLimiter/RateLimiter.d.ts +6 -0
  58. package/dist/core/rateLimiter/RateLimiter.d.ts.map +1 -1
  59. package/dist/core/requestPipeline/headers.d.ts.map +1 -1
  60. package/dist/core/requestPipeline/statusHandling.d.ts.map +1 -1
  61. package/dist/errors.js.map +1 -1
  62. package/dist/errors.mjs.map +1 -1
  63. package/dist/index.d.ts +4 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +644 -27
  66. package/dist/index.js.map +1 -1
  67. package/dist/index.mjs +642 -27
  68. package/dist/index.mjs.map +1 -1
  69. package/dist/schemas/common.d.ts +11 -1
  70. package/dist/schemas/common.d.ts.map +1 -1
  71. package/dist/schemas/index.js +6 -1
  72. package/dist/schemas/index.js.map +1 -1
  73. package/dist/schemas/index.mjs +6 -1
  74. package/dist/schemas/index.mjs.map +1 -1
  75. package/dist/sde/index.js.map +1 -1
  76. package/dist/sde/index.mjs.map +1 -1
  77. package/dist/sde/memory.js.map +1 -1
  78. package/dist/sde/memory.mjs.map +1 -1
  79. package/dist/testing/index.js.map +1 -1
  80. package/dist/testing/index.mjs.map +1 -1
  81. package/dist/types/generated/esi-spec.generated.d.ts +12 -12
  82. package/dist/types/generated/esi-spec.generated.d.ts.map +1 -1
  83. package/package.json +303 -289
package/dist/index.js CHANGED
@@ -92,8 +92,10 @@ __export(index_exports, {
92
92
  brand: () => brand,
93
93
  buildEndpointPath: () => buildEndpointPath,
94
94
  configureApiClient: () => configureApiClient,
95
+ createNoopLogger: () => createNoopLogger,
95
96
  esiEndpointScopes: () => esiEndpointScopes,
96
97
  fetchAllCursorPages: () => fetchAllCursorPages,
98
+ fetchAllPages: () => fetchAllPages,
97
99
  fetchPages: () => fetchPages,
98
100
  getDefaultClient: () => getDefaultClient,
99
101
  isCircuitOpen: () => isCircuitOpen,
@@ -181,6 +183,7 @@ var ApiClient = class {
181
183
  validateRequest = false;
182
184
  language;
183
185
  compatibilityDate;
186
+ fetchFn = null;
184
187
  getTimeout() {
185
188
  return this.timeout;
186
189
  }
@@ -235,6 +238,12 @@ var ApiClient = class {
235
238
  setValidateRequest(validate) {
236
239
  this.validateRequest = validate;
237
240
  }
241
+ getFetch() {
242
+ return this.fetchFn ?? globalThis.fetch;
243
+ }
244
+ setFetch(fn) {
245
+ this.fetchFn = fn;
246
+ }
238
247
  getMiddleware() {
239
248
  return this.middleware;
240
249
  }
@@ -657,7 +666,7 @@ function buildCacheKey(url, client, requiresAuth = false) {
657
666
 
658
667
  // src/core/constants.ts
659
668
  var PACKAGE_NAME = "esi.ts";
660
- var PACKAGE_VERSION = "9.2.0";
669
+ var PACKAGE_VERSION = "9.7.0";
661
670
  var USER_AGENT = `${PACKAGE_NAME}/${PACKAGE_VERSION}`;
662
671
  var COMPATIBILITY_DATE = "2026-05-19";
663
672
 
@@ -683,7 +692,10 @@ function buildRequestHeaders(client, url, method, requiresAuth, useETag, body, r
683
692
  const authHeader = client.getAuthorizationHeader();
684
693
  if (!authHeader) {
685
694
  throw buildError(
686
- "Authorization header is required but not provided",
695
+ [
696
+ "Authorization header is required for this endpoint but no access token is configured",
697
+ "Fix: set ESI_ACCESS_TOKEN in your environment (see .env.example), or call client.setAccessToken(token), or pass accessToken to the EsiClient constructor"
698
+ ].join(" \u2014 "),
687
699
  "NO_AUTH_TOKEN"
688
700
  );
689
701
  }
@@ -969,9 +981,15 @@ function handleErrorResponse(client, response, url, parsed, useETag, resolveCach
969
981
  if (response.status === 420 || response.status === 429) {
970
982
  logWarn(`Rate limited (${response.status}) on ${url}`);
971
983
  }
984
+ let message = errorMessage;
985
+ if (response.status === 401) {
986
+ message = `${errorMessage} \u2014 the access token was missing, expired, or lacks the required ESI scope. Fix: verify ESI_ACCESS_TOKEN, or configure onTokenRefresh for automatic refresh on 401`;
987
+ } else if (response.status === 403) {
988
+ message = `${errorMessage} \u2014 your access token does not have the OAuth scopes required for this endpoint. Check the scopes on your EVE SSO application`;
989
+ }
972
990
  throw new EsiError(
973
991
  response.status,
974
- errorMessage,
992
+ message,
975
993
  url,
976
994
  parsed.requestId ?? void 0
977
995
  );
@@ -1336,7 +1354,7 @@ async function executeSingleFetch(client, endpoint, method, body, requiresAuth,
1336
1354
  options.signal = controller.signal;
1337
1355
  let response;
1338
1356
  try {
1339
- response = await fetch(url, options);
1357
+ response = await client.getFetch()(url, options);
1340
1358
  } catch (err) {
1341
1359
  clearTimeout(timer);
1342
1360
  if (cb) {
@@ -1721,6 +1739,20 @@ function buildMeta(response) {
1721
1739
  group: response.headers["x-ratelimit-group"] ?? null
1722
1740
  };
1723
1741
  }
1742
+ if (response.headers["etag"]) meta.etag = response.headers["etag"];
1743
+ if (response.headers["x-pages"])
1744
+ meta.pages = parseInt(response.headers["x-pages"], 10);
1745
+ if (response.headers["expires"]) meta.expires = response.headers["expires"];
1746
+ if (response.headers["x-esi-error-limit-remain"])
1747
+ meta.errorLimitRemain = parseInt(
1748
+ response.headers["x-esi-error-limit-remain"],
1749
+ 10
1750
+ );
1751
+ if (response.headers["x-esi-error-limit-reset"])
1752
+ meta.errorLimitReset = parseInt(
1753
+ response.headers["x-esi-error-limit-reset"],
1754
+ 10
1755
+ );
1724
1756
  return meta;
1725
1757
  }
1726
1758
  function createClient(apiClient, endpoints, options) {
@@ -1885,6 +1917,55 @@ function validatePageBody(body, schema, url, validate) {
1885
1917
  }
1886
1918
  return result.data;
1887
1919
  }
1920
+ async function fetchAllPages(client, endpoint, method, requiresAuth = false, body, templatePath, responseSchema, concurrency = 8) {
1921
+ const validate = client.getValidateResponse();
1922
+ const firstResponse = await handleSinglePageRequest(
1923
+ client,
1924
+ endpoint,
1925
+ method,
1926
+ body,
1927
+ requiresAuth,
1928
+ templatePath
1929
+ );
1930
+ const firstBody = validatePageBody(
1931
+ firstResponse.body,
1932
+ responseSchema,
1933
+ `${client.getLink()}/${endpoint}`,
1934
+ validate
1935
+ );
1936
+ const totalPages = parseInt(firstResponse.headers["x-pages"] || "1", 10);
1937
+ const result = extractArray(firstBody);
1938
+ if (totalPages <= 1) return result;
1939
+ const remaining = Array.from({ length: totalPages - 1 }, (_, i) => i + 2);
1940
+ for (let i = 0; i < remaining.length; i += concurrency) {
1941
+ const batch = remaining.slice(i, i + concurrency);
1942
+ const pages = await Promise.all(
1943
+ batch.map(async (page) => {
1944
+ const sep = endpoint.includes("?") ? "&" : "?";
1945
+ const pagedEndpoint = `${endpoint}${sep}page=${page}`;
1946
+ logInfo(`Fetching page ${page}/${totalPages}: ${pagedEndpoint}`);
1947
+ const response = await handleSinglePageRequest(
1948
+ client,
1949
+ pagedEndpoint,
1950
+ method,
1951
+ body,
1952
+ requiresAuth,
1953
+ templatePath
1954
+ );
1955
+ return validatePageBody(
1956
+ response.body,
1957
+ responseSchema,
1958
+ `${client.getLink()}/${pagedEndpoint}`,
1959
+ validate
1960
+ );
1961
+ })
1962
+ );
1963
+ for (const pageBody of pages) {
1964
+ result.push(...extractArray(pageBody));
1965
+ }
1966
+ }
1967
+ return result;
1968
+ }
1888
1969
  async function* fetchPages(client, endpoint, method, requiresAuth = false, body, templatePath, responseSchema) {
1889
1970
  const validate = client.getValidateResponse();
1890
1971
  const firstResponse = await handleSinglePageRequest(
@@ -1956,6 +2037,24 @@ var BaseEsiClient = class {
1956
2037
  def.responseSchema
1957
2038
  );
1958
2039
  }
2040
+ fetchAllEndpoint(endpointName, args, concurrency) {
2041
+ const def = this._endpoints[endpointName];
2042
+ const { path, body } = buildEndpointPath(
2043
+ def,
2044
+ args,
2045
+ this._client.getDatasource()
2046
+ );
2047
+ return fetchAllPages(
2048
+ this._client,
2049
+ path,
2050
+ def.method,
2051
+ def.requiresAuth,
2052
+ body,
2053
+ def.path,
2054
+ def.responseSchema,
2055
+ concurrency
2056
+ );
2057
+ }
1959
2058
  withMetadata() {
1960
2059
  if (!this._metaApi) {
1961
2060
  this._metaApi = createClient(this._client, this._endpoints, {
@@ -2162,9 +2261,7 @@ var AllianceClient = class extends BaseEsiClient {
2162
2261
  logWarn(
2163
2262
  "AllianceClient.getContacts() is deprecated. Use ContactsClient.getAllianceContacts() instead. Planned removal in next major version."
2164
2263
  );
2165
- return this.contactApi.getAllianceContacts(
2166
- allianceId
2167
- );
2264
+ return this.contactApi.getAllianceContacts(allianceId);
2168
2265
  }
2169
2266
  /**
2170
2267
  * Retrieve custom contact labels for an alliance.
@@ -2206,6 +2303,16 @@ var AllianceClient = class extends BaseEsiClient {
2206
2303
  getAlliances() {
2207
2304
  return this.api.getAlliances();
2208
2305
  }
2306
+ fetchAllAlliances(concurrency) {
2307
+ return this.fetchAllEndpoint("getAlliances", [], concurrency);
2308
+ }
2309
+ fetchAllCorporations(allianceId, concurrency) {
2310
+ return this.fetchAllEndpoint(
2311
+ "getCorporations",
2312
+ [allianceId],
2313
+ concurrency
2314
+ );
2315
+ }
2209
2316
  streamAlliances() {
2210
2317
  return this.streamEndpoint("getAlliances");
2211
2318
  }
@@ -2314,10 +2421,7 @@ var AssetsClient = class extends BaseEsiClient {
2314
2421
  * @requires Authentication
2315
2422
  */
2316
2423
  postCharacterAssetLocations(characterId, itemIds) {
2317
- return this.api.postCharacterAssetLocations(
2318
- characterId,
2319
- itemIds
2320
- );
2424
+ return this.api.postCharacterAssetLocations(characterId, itemIds);
2321
2425
  }
2322
2426
  /**
2323
2427
  * Look up the names of specific assets owned by a character via a bulk POST request.
@@ -2368,6 +2472,20 @@ var AssetsClient = class extends BaseEsiClient {
2368
2472
  itemIds
2369
2473
  );
2370
2474
  }
2475
+ fetchAllCharacterAssets(characterId, concurrency) {
2476
+ return this.fetchAllEndpoint(
2477
+ "getCharacterAssets",
2478
+ [characterId],
2479
+ concurrency
2480
+ );
2481
+ }
2482
+ fetchAllCorporationAssets(corporationId, concurrency) {
2483
+ return this.fetchAllEndpoint(
2484
+ "getCorporationAssets",
2485
+ [corporationId],
2486
+ concurrency
2487
+ );
2488
+ }
2371
2489
  streamCharacterAssets(characterId) {
2372
2490
  return this.streamEndpoint(
2373
2491
  "getCharacterAssets",
@@ -2511,6 +2629,20 @@ var CalendarClient = class extends BaseEsiClient {
2511
2629
  getEventAttendees(characterId, eventId) {
2512
2630
  return this.api.getEventAttendees(characterId, eventId);
2513
2631
  }
2632
+ fetchAllCalendarEvents(characterId, concurrency) {
2633
+ return this.fetchAllEndpoint(
2634
+ "getCalendarEvents",
2635
+ [characterId],
2636
+ concurrency
2637
+ );
2638
+ }
2639
+ fetchAllEventAttendees(characterId, eventId, concurrency) {
2640
+ return this.fetchAllEndpoint(
2641
+ "getEventAttendees",
2642
+ [characterId, eventId],
2643
+ concurrency
2644
+ );
2645
+ }
2514
2646
  streamCalendarEvents(characterId) {
2515
2647
  return this.streamEndpoint("getCalendarEvents", characterId);
2516
2648
  }
@@ -2670,7 +2802,12 @@ var EsiResponseMetaSchema = import_zod11.z.looseObject({
2670
2802
  date: import_zod11.z.string().optional(),
2671
2803
  contentLanguage: import_zod11.z.string().optional(),
2672
2804
  rateLimit: RateLimitMetaSchema.optional(),
2673
- responseTimeMs: import_zod11.z.number().optional()
2805
+ responseTimeMs: import_zod11.z.number().optional(),
2806
+ etag: import_zod11.z.string().optional(),
2807
+ pages: import_zod11.z.number().optional(),
2808
+ expires: import_zod11.z.string().optional(),
2809
+ errorLimitRemain: import_zod11.z.number().optional(),
2810
+ errorLimitReset: import_zod11.z.number().optional()
2674
2811
  });
2675
2812
  function esiResponse(dataSchema) {
2676
2813
  return import_zod11.z.object({
@@ -2925,6 +3062,62 @@ var CharacterClient = class extends BaseEsiClient {
2925
3062
  postCharacterAffiliation(characters) {
2926
3063
  return this.api.postCharacterAffiliation(characters);
2927
3064
  }
3065
+ fetchAllCharacterAgentsResearch(characterId, concurrency) {
3066
+ return this.fetchAllEndpoint(
3067
+ "getAgentsResearch",
3068
+ [characterId],
3069
+ concurrency
3070
+ );
3071
+ }
3072
+ fetchAllCharacterBlueprints(characterId, concurrency) {
3073
+ return this.fetchAllEndpoint(
3074
+ "getBlueprints",
3075
+ [characterId],
3076
+ concurrency
3077
+ );
3078
+ }
3079
+ fetchAllCharacterCorporationHistory(characterId, concurrency) {
3080
+ return this.fetchAllEndpoint(
3081
+ "getCorporationHistory",
3082
+ [characterId],
3083
+ concurrency
3084
+ );
3085
+ }
3086
+ fetchAllCharacterMedals(characterId, concurrency) {
3087
+ return this.fetchAllEndpoint(
3088
+ "getMedals",
3089
+ [characterId],
3090
+ concurrency
3091
+ );
3092
+ }
3093
+ fetchAllCharacterNotifications(characterId, concurrency) {
3094
+ return this.fetchAllEndpoint(
3095
+ "getNotifications",
3096
+ [characterId],
3097
+ concurrency
3098
+ );
3099
+ }
3100
+ fetchAllCharacterNotificationsContacts(characterId, concurrency) {
3101
+ return this.fetchAllEndpoint(
3102
+ "getContactNotifications",
3103
+ [characterId],
3104
+ concurrency
3105
+ );
3106
+ }
3107
+ fetchAllCharacterStandings(characterId, concurrency) {
3108
+ return this.fetchAllEndpoint(
3109
+ "getStandings",
3110
+ [characterId],
3111
+ concurrency
3112
+ );
3113
+ }
3114
+ fetchAllCharacterTitles(characterId, concurrency) {
3115
+ return this.fetchAllEndpoint(
3116
+ "getTitles",
3117
+ [characterId],
3118
+ concurrency
3119
+ );
3120
+ }
2928
3121
  streamCharacterAgentsResearch(characterId) {
2929
3122
  return this.streamEndpoint("getAgentsResearch", characterId);
2930
3123
  }
@@ -3023,6 +3216,13 @@ var ClonesClient = class extends BaseEsiClient {
3023
3216
  getImplants(characterId) {
3024
3217
  return this.api.getImplants(characterId);
3025
3218
  }
3219
+ fetchAllImplants(characterId, concurrency) {
3220
+ return this.fetchAllEndpoint(
3221
+ "getImplants",
3222
+ [characterId],
3223
+ concurrency
3224
+ );
3225
+ }
3026
3226
  streamImplants(characterId) {
3027
3227
  return this.streamEndpoint("getImplants", characterId);
3028
3228
  }
@@ -3133,6 +3333,48 @@ var ContactsClient = class extends BaseEsiClient {
3133
3333
  getCorporationContactLabels(corporationId) {
3134
3334
  return this.api.getCorporationContactLabels(corporationId);
3135
3335
  }
3336
+ fetchAllAllianceContacts(allianceId, concurrency) {
3337
+ return this.fetchAllEndpoint(
3338
+ "getAllianceContacts",
3339
+ [allianceId],
3340
+ concurrency
3341
+ );
3342
+ }
3343
+ fetchAllAllianceContactLabels(allianceId, concurrency) {
3344
+ return this.fetchAllEndpoint(
3345
+ "getAllianceContactLabels",
3346
+ [allianceId],
3347
+ concurrency
3348
+ );
3349
+ }
3350
+ fetchAllCharacterContacts(characterId, concurrency) {
3351
+ return this.fetchAllEndpoint(
3352
+ "getCharacterContacts",
3353
+ [characterId],
3354
+ concurrency
3355
+ );
3356
+ }
3357
+ fetchAllCharacterContactLabels(characterId, concurrency) {
3358
+ return this.fetchAllEndpoint(
3359
+ "getCharacterContactLabels",
3360
+ [characterId],
3361
+ concurrency
3362
+ );
3363
+ }
3364
+ fetchAllCorporationContacts(corporationId, concurrency) {
3365
+ return this.fetchAllEndpoint(
3366
+ "getCorporationContacts",
3367
+ [corporationId],
3368
+ concurrency
3369
+ );
3370
+ }
3371
+ fetchAllCorporationContactLabels(corporationId, concurrency) {
3372
+ return this.fetchAllEndpoint(
3373
+ "getCorporationContactLabels",
3374
+ [corporationId],
3375
+ concurrency
3376
+ );
3377
+ }
3136
3378
  streamAllianceContacts(allianceId) {
3137
3379
  return this.streamEndpoint("getAllianceContacts", allianceId);
3138
3380
  }
@@ -3317,10 +3559,7 @@ var ContractsClient = class extends BaseEsiClient {
3317
3559
  * @requires Authentication
3318
3560
  */
3319
3561
  getCharacterContractBids(characterId, contractId) {
3320
- return this.api.getCharacterContractBids(
3321
- characterId,
3322
- contractId
3323
- );
3562
+ return this.api.getCharacterContractBids(characterId, contractId);
3324
3563
  }
3325
3564
  /**
3326
3565
  * Retrieve the items included in a contract owned by a character.
@@ -3331,10 +3570,7 @@ var ContractsClient = class extends BaseEsiClient {
3331
3570
  * @requires Authentication
3332
3571
  */
3333
3572
  getCharacterContractItems(characterId, contractId) {
3334
- return this.api.getCharacterContractItems(
3335
- characterId,
3336
- contractId
3337
- );
3573
+ return this.api.getCharacterContractItems(characterId, contractId);
3338
3574
  }
3339
3575
  /**
3340
3576
  * Retrieve publicly available contracts in a specific region.
@@ -3382,10 +3618,7 @@ var ContractsClient = class extends BaseEsiClient {
3382
3618
  * @requires Authentication
3383
3619
  */
3384
3620
  getCorporationContractBids(corporationId, contractId) {
3385
- return this.api.getCorporationContractBids(
3386
- corporationId,
3387
- contractId
3388
- );
3621
+ return this.api.getCorporationContractBids(corporationId, contractId);
3389
3622
  }
3390
3623
  /**
3391
3624
  * Retrieve the items included in a contract owned by a corporation.
@@ -3396,9 +3629,27 @@ var ContractsClient = class extends BaseEsiClient {
3396
3629
  * @requires Authentication
3397
3630
  */
3398
3631
  getCorporationContractItems(corporationId, contractId) {
3399
- return this.api.getCorporationContractItems(
3400
- corporationId,
3401
- contractId
3632
+ return this.api.getCorporationContractItems(corporationId, contractId);
3633
+ }
3634
+ fetchAllPublicContracts(regionId, concurrency) {
3635
+ return this.fetchAllEndpoint(
3636
+ "getPublicContracts",
3637
+ [regionId],
3638
+ concurrency
3639
+ );
3640
+ }
3641
+ fetchAllCharacterContracts(characterId, concurrency) {
3642
+ return this.fetchAllEndpoint(
3643
+ "getCharacterContracts",
3644
+ [characterId],
3645
+ concurrency
3646
+ );
3647
+ }
3648
+ fetchAllCorporationContracts(corporationId, concurrency) {
3649
+ return this.fetchAllEndpoint(
3650
+ "getCorporationContracts",
3651
+ [corporationId],
3652
+ concurrency
3402
3653
  );
3403
3654
  }
3404
3655
  streamPublicContracts(regionId) {
@@ -3997,6 +4248,121 @@ var CorporationsClient = class extends BaseEsiClient {
3997
4248
  getNpcCorporations() {
3998
4249
  return this.api.getNpcCorporations();
3999
4250
  }
4251
+ fetchAllCorporationAllianceHistory(corporationId, concurrency) {
4252
+ return this.fetchAllEndpoint(
4253
+ "getCorporationAllianceHistory",
4254
+ [corporationId],
4255
+ concurrency
4256
+ );
4257
+ }
4258
+ fetchAllCorporationBlueprints(corporationId, concurrency) {
4259
+ return this.fetchAllEndpoint(
4260
+ "getCorporationBlueprints",
4261
+ [corporationId],
4262
+ concurrency
4263
+ );
4264
+ }
4265
+ fetchAllCorporationAlscLogs(corporationId, concurrency) {
4266
+ return this.fetchAllEndpoint(
4267
+ "getCorporationAlscLogs",
4268
+ [corporationId],
4269
+ concurrency
4270
+ );
4271
+ }
4272
+ fetchAllCorporationFacilities(corporationId, concurrency) {
4273
+ return this.fetchAllEndpoint(
4274
+ "getCorporationFacilities",
4275
+ [corporationId],
4276
+ concurrency
4277
+ );
4278
+ }
4279
+ fetchAllCorporationMedals(corporationId, concurrency) {
4280
+ return this.fetchAllEndpoint(
4281
+ "getCorporationMedals",
4282
+ [corporationId],
4283
+ concurrency
4284
+ );
4285
+ }
4286
+ fetchAllCorporationIssuedMedals(corporationId, concurrency) {
4287
+ return this.fetchAllEndpoint(
4288
+ "getCorporationIssuedMedals",
4289
+ [corporationId],
4290
+ concurrency
4291
+ );
4292
+ }
4293
+ fetchAllCorporationMembers(corporationId, concurrency) {
4294
+ return this.fetchAllEndpoint(
4295
+ "getCorporationMembers",
4296
+ [corporationId],
4297
+ concurrency
4298
+ );
4299
+ }
4300
+ fetchAllCorporationMemberTitles(corporationId, concurrency) {
4301
+ return this.fetchAllEndpoint(
4302
+ "getCorporationMembersTitles",
4303
+ [corporationId],
4304
+ concurrency
4305
+ );
4306
+ }
4307
+ fetchAllCorporationMemberTracking(corporationId, concurrency) {
4308
+ return this.fetchAllEndpoint(
4309
+ "getCorporationMemberTracking",
4310
+ [corporationId],
4311
+ concurrency
4312
+ );
4313
+ }
4314
+ fetchAllCorporationRoles(corporationId, concurrency) {
4315
+ return this.fetchAllEndpoint(
4316
+ "getCorporationMemberRoles",
4317
+ [corporationId],
4318
+ concurrency
4319
+ );
4320
+ }
4321
+ fetchAllCorporationRolesHistory(corporationId, concurrency) {
4322
+ return this.fetchAllEndpoint(
4323
+ "getCorporationMemberRolesHistory",
4324
+ [corporationId],
4325
+ concurrency
4326
+ );
4327
+ }
4328
+ fetchAllCorporationShareholders(corporationId, concurrency) {
4329
+ return this.fetchAllEndpoint(
4330
+ "getCorporationShareholders",
4331
+ [corporationId],
4332
+ concurrency
4333
+ );
4334
+ }
4335
+ fetchAllCorporationStandings(corporationId, concurrency) {
4336
+ return this.fetchAllEndpoint(
4337
+ "getCorporationStandings",
4338
+ [corporationId],
4339
+ concurrency
4340
+ );
4341
+ }
4342
+ fetchAllCorporationStarbases(corporationId, concurrency) {
4343
+ return this.fetchAllEndpoint(
4344
+ "getCorporationStarbases",
4345
+ [corporationId],
4346
+ concurrency
4347
+ );
4348
+ }
4349
+ fetchAllCorporationStructures(corporationId, concurrency) {
4350
+ return this.fetchAllEndpoint(
4351
+ "getCorporationStructures",
4352
+ [corporationId],
4353
+ concurrency
4354
+ );
4355
+ }
4356
+ fetchAllCorporationTitles(corporationId, concurrency) {
4357
+ return this.fetchAllEndpoint(
4358
+ "getCorporationTitles",
4359
+ [corporationId],
4360
+ concurrency
4361
+ );
4362
+ }
4363
+ fetchAllNpcCorporations(concurrency) {
4364
+ return this.fetchAllEndpoint("getNpcCorporations", [], concurrency);
4365
+ }
4000
4366
  streamCorporationAllianceHistory(corporationId) {
4001
4367
  return this.streamEndpoint(
4002
4368
  "getCorporationAllianceHistory",
@@ -4679,6 +5045,13 @@ var FittingsClient = class extends BaseEsiClient {
4679
5045
  deleteFitting(characterId, fittingId) {
4680
5046
  return this.api.deleteFitting(characterId, fittingId);
4681
5047
  }
5048
+ fetchAllFittings(characterId, concurrency) {
5049
+ return this.fetchAllEndpoint(
5050
+ "getFittings",
5051
+ [characterId],
5052
+ concurrency
5053
+ );
5054
+ }
4682
5055
  streamFittings(characterId) {
4683
5056
  return this.streamEndpoint("getFittings", characterId);
4684
5057
  }
@@ -5003,6 +5376,20 @@ var FleetClient = class extends BaseEsiClient {
5003
5376
  createFleetSquad(fleetId, wingId) {
5004
5377
  return this.api.createFleetSquad(fleetId, wingId);
5005
5378
  }
5379
+ fetchAllFleetMembers(fleetId, concurrency) {
5380
+ return this.fetchAllEndpoint(
5381
+ "getFleetMembers",
5382
+ [fleetId],
5383
+ concurrency
5384
+ );
5385
+ }
5386
+ fetchAllFleetWings(fleetId, concurrency) {
5387
+ return this.fetchAllEndpoint(
5388
+ "getFleetWings",
5389
+ [fleetId],
5390
+ concurrency
5391
+ );
5392
+ }
5006
5393
  streamFleetMembers(fleetId) {
5007
5394
  return this.streamEndpoint("getFleetMembers", fleetId);
5008
5395
  }
@@ -5271,6 +5658,62 @@ var IndustryClient = class extends BaseEsiClient {
5271
5658
  getIndustrySystems() {
5272
5659
  return this.api.getIndustrySystems();
5273
5660
  }
5661
+ fetchAllCharacterIndustryJobs(characterId, concurrency) {
5662
+ return this.fetchAllEndpoint(
5663
+ "getCharacterIndustryJobs",
5664
+ [characterId],
5665
+ concurrency
5666
+ );
5667
+ }
5668
+ fetchAllCharacterMiningLedger(characterId, concurrency) {
5669
+ return this.fetchAllEndpoint(
5670
+ "getCharacterMiningLedger",
5671
+ [characterId],
5672
+ concurrency
5673
+ );
5674
+ }
5675
+ fetchAllCorporationIndustryJobs(corporationId, concurrency) {
5676
+ return this.fetchAllEndpoint(
5677
+ "getCorporationIndustryJobs",
5678
+ [corporationId],
5679
+ concurrency
5680
+ );
5681
+ }
5682
+ fetchAllMoonExtractionTimers(corporationId, concurrency) {
5683
+ return this.fetchAllEndpoint(
5684
+ "getMoonExtractionTimers",
5685
+ [corporationId],
5686
+ concurrency
5687
+ );
5688
+ }
5689
+ fetchAllCorporationMiningObservers(corporationId, concurrency) {
5690
+ return this.fetchAllEndpoint(
5691
+ "getCorporationMiningObservers",
5692
+ [corporationId],
5693
+ concurrency
5694
+ );
5695
+ }
5696
+ fetchAllCorporationMiningObserver(corporationId, observerId, concurrency) {
5697
+ return this.fetchAllEndpoint(
5698
+ "getCorporationMiningObserver",
5699
+ [corporationId, observerId],
5700
+ concurrency
5701
+ );
5702
+ }
5703
+ fetchAllIndustryFacilities(concurrency) {
5704
+ return this.fetchAllEndpoint(
5705
+ "getIndustryFacilities",
5706
+ [],
5707
+ concurrency
5708
+ );
5709
+ }
5710
+ fetchAllIndustrySystems(concurrency) {
5711
+ return this.fetchAllEndpoint(
5712
+ "getIndustrySystems",
5713
+ [],
5714
+ concurrency
5715
+ );
5716
+ }
5274
5717
  streamCharacterIndustryJobs(characterId) {
5275
5718
  return this.streamEndpoint(
5276
5719
  "getCharacterIndustryJobs",
@@ -5461,6 +5904,20 @@ var KillmailsClient = class extends BaseEsiClient {
5461
5904
  getKillmail(killmailId, killmailHash) {
5462
5905
  return this.api.getKillmail(killmailId, killmailHash);
5463
5906
  }
5907
+ fetchAllCharacterRecentKillmails(characterId, concurrency) {
5908
+ return this.fetchAllEndpoint(
5909
+ "getCharacterRecentKillmails",
5910
+ [characterId],
5911
+ concurrency
5912
+ );
5913
+ }
5914
+ fetchAllCorporationRecentKillmails(corporationId, concurrency) {
5915
+ return this.fetchAllEndpoint(
5916
+ "getCorporationRecentKillmails",
5917
+ [corporationId],
5918
+ concurrency
5919
+ );
5920
+ }
5464
5921
  streamCharacterRecentKillmails(characterId) {
5465
5922
  return this.streamEndpoint(
5466
5923
  "getCharacterRecentKillmails",
@@ -5624,6 +6081,20 @@ var LoyaltyClient = class extends BaseEsiClient {
5624
6081
  getLoyaltyStoreOffers(corporationId) {
5625
6082
  return this.api.getLoyaltyStoreOffers(corporationId);
5626
6083
  }
6084
+ fetchAllLoyaltyPoints(characterId, concurrency) {
6085
+ return this.fetchAllEndpoint(
6086
+ "getLoyaltyPoints",
6087
+ [characterId],
6088
+ concurrency
6089
+ );
6090
+ }
6091
+ fetchAllLoyaltyStoreOffers(corporationId, concurrency) {
6092
+ return this.fetchAllEndpoint(
6093
+ "getLoyaltyStoreOffers",
6094
+ [corporationId],
6095
+ concurrency
6096
+ );
6097
+ }
5627
6098
  streamLoyaltyPoints(characterId) {
5628
6099
  return this.streamEndpoint("getLoyaltyPoints", characterId);
5629
6100
  }
@@ -5861,6 +6332,20 @@ var MailClient = class extends BaseEsiClient {
5861
6332
  getMailingLists(characterId) {
5862
6333
  return this.api.getMailingLists(characterId);
5863
6334
  }
6335
+ fetchAllMailHeaders(characterId, concurrency) {
6336
+ return this.fetchAllEndpoint(
6337
+ "getCharacterMailHeaders",
6338
+ [characterId],
6339
+ concurrency
6340
+ );
6341
+ }
6342
+ fetchAllMailingLists(characterId, concurrency) {
6343
+ return this.fetchAllEndpoint(
6344
+ "getMailingLists",
6345
+ [characterId],
6346
+ concurrency
6347
+ );
6348
+ }
5864
6349
  streamMailHeaders(characterId) {
5865
6350
  return this.streamEndpoint(
5866
6351
  "getCharacterMailHeaders",
@@ -6185,6 +6670,48 @@ var MarketClient = class extends BaseEsiClient {
6185
6670
  getMarketOrdersInStructure(structureId) {
6186
6671
  return this.api.getMarketOrdersInStructure(structureId);
6187
6672
  }
6673
+ fetchAllMarketOrders(regionId, concurrency) {
6674
+ return this.fetchAllEndpoint(
6675
+ "getMarketOrders",
6676
+ [regionId, "all"],
6677
+ concurrency
6678
+ );
6679
+ }
6680
+ fetchAllMarketTypes(regionId, concurrency) {
6681
+ return this.fetchAllEndpoint(
6682
+ "getMarketTypes",
6683
+ [regionId],
6684
+ concurrency
6685
+ );
6686
+ }
6687
+ fetchAllCharacterOrderHistory(characterId, concurrency) {
6688
+ return this.fetchAllEndpoint(
6689
+ "getCharacterOrderHistory",
6690
+ [characterId],
6691
+ concurrency
6692
+ );
6693
+ }
6694
+ fetchAllCorporationOrders(corporationId, concurrency) {
6695
+ return this.fetchAllEndpoint(
6696
+ "getCorporationOrders",
6697
+ [corporationId],
6698
+ concurrency
6699
+ );
6700
+ }
6701
+ fetchAllCorporationOrderHistory(corporationId, concurrency) {
6702
+ return this.fetchAllEndpoint(
6703
+ "getCorporationOrderHistory",
6704
+ [corporationId],
6705
+ concurrency
6706
+ );
6707
+ }
6708
+ fetchAllMarketOrdersInStructure(structureId, concurrency) {
6709
+ return this.fetchAllEndpoint(
6710
+ "getMarketOrdersInStructure",
6711
+ [structureId],
6712
+ concurrency
6713
+ );
6714
+ }
6188
6715
  streamMarketOrders(regionId) {
6189
6716
  return this.streamEndpoint("getMarketOrders", regionId, "all");
6190
6717
  }
@@ -6637,6 +7164,20 @@ var PiClient = class extends BaseEsiClient {
6637
7164
  getSchematicInformation(schematicId) {
6638
7165
  return this.api.getSchematicInformation(schematicId);
6639
7166
  }
7167
+ fetchAllColonies(characterId, concurrency) {
7168
+ return this.fetchAllEndpoint(
7169
+ "getColonies",
7170
+ [characterId],
7171
+ concurrency
7172
+ );
7173
+ }
7174
+ fetchAllCorporationCustomsOffices(corporationId, concurrency) {
7175
+ return this.fetchAllEndpoint(
7176
+ "getCorporationCustomsOffices",
7177
+ [corporationId],
7178
+ concurrency
7179
+ );
7180
+ }
6640
7181
  streamColonies(characterId) {
6641
7182
  return this.streamEndpoint("getColonies", characterId);
6642
7183
  }
@@ -6809,6 +7350,13 @@ var CharacterSkillsClient = class extends BaseEsiClient {
6809
7350
  getCharacterSkills(characterId) {
6810
7351
  return this.api.getCharacterSkills(characterId);
6811
7352
  }
7353
+ fetchAllCharacterSkillQueue(characterId, concurrency) {
7354
+ return this.fetchAllEndpoint(
7355
+ "getCharacterSkillQueue",
7356
+ [characterId],
7357
+ concurrency
7358
+ );
7359
+ }
6812
7360
  streamCharacterSkillQueue(characterId) {
6813
7361
  return this.streamEndpoint(
6814
7362
  "getCharacterSkillQueue",
@@ -7693,6 +8241,34 @@ var WalletClient = class extends BaseEsiClient {
7693
8241
  getCorporationWalletTransactions(corporationId, division) {
7694
8242
  return this.api.getCorporationWalletTransactions(corporationId, division);
7695
8243
  }
8244
+ fetchAllCharacterWalletJournal(characterId, concurrency) {
8245
+ return this.fetchAllEndpoint(
8246
+ "getCharacterWalletJournal",
8247
+ [characterId],
8248
+ concurrency
8249
+ );
8250
+ }
8251
+ fetchAllCorporationWalletJournal(corporationId, division, concurrency) {
8252
+ return this.fetchAllEndpoint(
8253
+ "getCorporationWalletJournal",
8254
+ [corporationId, division],
8255
+ concurrency
8256
+ );
8257
+ }
8258
+ fetchAllCharacterWalletTransactions(characterId, concurrency) {
8259
+ return this.fetchAllEndpoint(
8260
+ "getCharacterWalletTransactions",
8261
+ [characterId],
8262
+ concurrency
8263
+ );
8264
+ }
8265
+ fetchAllCorporationWalletTransactions(corporationId, division, concurrency) {
8266
+ return this.fetchAllEndpoint(
8267
+ "getCorporationWalletTransactions",
8268
+ [corporationId, division],
8269
+ concurrency
8270
+ );
8271
+ }
7696
8272
  streamCharacterWalletJournal(characterId) {
7697
8273
  return this.streamEndpoint(
7698
8274
  "getCharacterWalletJournal",
@@ -7809,6 +8385,16 @@ var WarsClient = class extends BaseEsiClient {
7809
8385
  getWarKillmails(warId) {
7810
8386
  return this.api.getWarKillmails(warId);
7811
8387
  }
8388
+ fetchAllWars(concurrency) {
8389
+ return this.fetchAllEndpoint("getWars", [], concurrency);
8390
+ }
8391
+ fetchAllWarKillmails(warId, concurrency) {
8392
+ return this.fetchAllEndpoint(
8393
+ "getWarKillmails",
8394
+ [warId],
8395
+ concurrency
8396
+ );
8397
+ }
7812
8398
  streamWars() {
7813
8399
  return this.streamEndpoint("getWars");
7814
8400
  }
@@ -9440,6 +10026,7 @@ var RateLimiter = class _RateLimiter {
9440
10026
  minDelayMs;
9441
10027
  decelerationThreshold;
9442
10028
  userKeyExtractor;
10029
+ endpointOverrides;
9443
10030
  lastRequestTime = 0;
9444
10031
  minDelayChain = Promise.resolve();
9445
10032
  isTestMode = false;
@@ -9453,6 +10040,7 @@ var RateLimiter = class _RateLimiter {
9453
10040
  this.minDelayMs = config?.minDelayMs ?? 50;
9454
10041
  this.decelerationThreshold = config?.decelerationThreshold ?? 0.2;
9455
10042
  this.userKeyExtractor = config?.userKeyExtractor;
10043
+ this.endpointOverrides = config?.endpointOverrides ?? {};
9456
10044
  if (this.userKeyExtractor) {
9457
10045
  this.userBuckets = /* @__PURE__ */ new Map();
9458
10046
  }
@@ -9495,6 +10083,14 @@ var RateLimiter = class _RateLimiter {
9495
10083
  if (!templatePath || !method) return void 0;
9496
10084
  const normalized = templatePath.replace(/\/$/, "").replace(/\{(\w+)\}/g, (_, name) => `{${camelToSnake(name)}}`);
9497
10085
  const key = `${method}:${normalized}`;
10086
+ const override = this.endpointOverrides[key];
10087
+ if (override) {
10088
+ return {
10089
+ group: `endpoint:${key}`,
10090
+ maxTokens: override.maxTokens,
10091
+ windowSizeMs: override.windowSizeMs
10092
+ };
10093
+ }
9498
10094
  return esiRateLimitGroups[key];
9499
10095
  }
9500
10096
  resolveUserSet(requestHeaders) {
@@ -10359,6 +10955,7 @@ var ApiClientBuilder = class {
10359
10955
  cache;
10360
10956
  circuitBreaker;
10361
10957
  _timeout;
10958
+ _fetch;
10362
10959
  setClientId(clientId) {
10363
10960
  this.clientId = clientId;
10364
10961
  return this;
@@ -10387,12 +10984,17 @@ var ApiClientBuilder = class {
10387
10984
  this._timeout = timeout;
10388
10985
  return this;
10389
10986
  }
10987
+ setFetch(fn) {
10988
+ this._fetch = fn;
10989
+ return this;
10990
+ }
10390
10991
  build() {
10391
10992
  const client = new ApiClient(this.clientId, this.link, this.accessToken);
10392
10993
  client.setRateLimiter(this.rateLimiter ?? new RateLimiter());
10393
10994
  if (this.cache) client.setCache(this.cache);
10394
10995
  if (this.circuitBreaker) client.setCircuitBreaker(this.circuitBreaker);
10395
10996
  if (this._timeout !== void 0) client.setTimeout(this._timeout);
10997
+ if (this._fetch) client.setFetch(this._fetch);
10396
10998
  return client;
10397
10999
  }
10398
11000
  };
@@ -10528,6 +11130,19 @@ var esiEndpointScopes = {
10528
11130
  "GET:universe/structures/{structure_id}": ["esi-universe.read_structures.v1"]
10529
11131
  };
10530
11132
 
11133
+ // src/core/logger/NoopLogger.ts
11134
+ var noop = () => {
11135
+ };
11136
+ var noopLogger = {
11137
+ info: noop,
11138
+ warn: noop,
11139
+ error: noop,
11140
+ debug: noop
11141
+ };
11142
+ function createNoopLogger() {
11143
+ return noopLogger;
11144
+ }
11145
+
10531
11146
  // src/types/branded.ts
10532
11147
  function brand(value) {
10533
11148
  return value;
@@ -10797,8 +11412,10 @@ __export(schemas_exports, {
10797
11412
  brand,
10798
11413
  buildEndpointPath,
10799
11414
  configureApiClient,
11415
+ createNoopLogger,
10800
11416
  esiEndpointScopes,
10801
11417
  fetchAllCursorPages,
11418
+ fetchAllPages,
10802
11419
  fetchPages,
10803
11420
  getDefaultClient,
10804
11421
  isCircuitOpen,