@lgriffin/esi.ts 9.4.0 → 9.6.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 (77) hide show
  1. package/CHANGELOG.md +388 -388
  2. package/LICENSE +26 -26
  3. package/README.md +1030 -1018
  4. package/dist/EsiClient.d.ts +4 -0
  5. package/dist/EsiClient.d.ts.map +1 -1
  6. package/dist/clients/CosmeticsClient.d.ts +11 -0
  7. package/dist/clients/CosmeticsClient.d.ts.map +1 -0
  8. package/dist/clients/MercenaryClient.d.ts +19 -1
  9. package/dist/clients/MercenaryClient.d.ts.map +1 -1
  10. package/dist/clients/ParagonHubClient.d.ts +13 -0
  11. package/dist/clients/ParagonHubClient.d.ts.map +1 -0
  12. package/dist/clients/SkyhooksClient.d.ts +19 -1
  13. package/dist/clients/SkyhooksClient.d.ts.map +1 -1
  14. package/dist/core/ApiClient.d.ts.map +1 -1
  15. package/dist/core/ApiRequestHandler.d.ts.map +1 -1
  16. package/dist/core/ClientRegistry.d.ts +5 -3
  17. package/dist/core/ClientRegistry.d.ts.map +1 -1
  18. package/dist/core/cache/cacheKey.d.ts +3 -0
  19. package/dist/core/cache/cacheKey.d.ts.map +1 -0
  20. package/dist/core/endpoints/cosmeticsEndpoints.d.ts +52 -0
  21. package/dist/core/endpoints/cosmeticsEndpoints.d.ts.map +1 -0
  22. package/dist/core/endpoints/mercenaryEndpoints.d.ts +45 -0
  23. package/dist/core/endpoints/mercenaryEndpoints.d.ts.map +1 -1
  24. package/dist/core/endpoints/paragonHubEndpoints.d.ts +163 -0
  25. package/dist/core/endpoints/paragonHubEndpoints.d.ts.map +1 -0
  26. package/dist/core/endpoints/skyhookEndpoints.d.ts +64 -0
  27. package/dist/core/endpoints/skyhookEndpoints.d.ts.map +1 -1
  28. package/dist/core/requestPipeline/cachePolicy.d.ts +3 -3
  29. package/dist/core/requestPipeline/cachePolicy.d.ts.map +1 -1
  30. package/dist/core/requestPipeline/headers.d.ts.map +1 -1
  31. package/dist/core/requestPipeline/statusHandling.d.ts +2 -2
  32. package/dist/core/requestPipeline/statusHandling.d.ts.map +1 -1
  33. package/dist/errors.js.map +1 -1
  34. package/dist/errors.mjs.map +1 -1
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +497 -49
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.mjs +495 -49
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/schemas/cosmetics.d.ts +58 -0
  42. package/dist/schemas/cosmetics.d.ts.map +1 -0
  43. package/dist/schemas/index.d.ts +2 -0
  44. package/dist/schemas/index.d.ts.map +1 -1
  45. package/dist/schemas/index.js +1461 -1191
  46. package/dist/schemas/index.js.map +1 -1
  47. package/dist/schemas/index.mjs +1427 -1191
  48. package/dist/schemas/index.mjs.map +1 -1
  49. package/dist/schemas/mercenary.d.ts +54 -0
  50. package/dist/schemas/mercenary.d.ts.map +1 -1
  51. package/dist/schemas/paragon-hub.d.ts +96 -0
  52. package/dist/schemas/paragon-hub.d.ts.map +1 -0
  53. package/dist/schemas/skyhooks.d.ts +101 -0
  54. package/dist/schemas/skyhooks.d.ts.map +1 -1
  55. package/dist/sde/index.js +7 -5100
  56. package/dist/sde/index.js.map +1 -1
  57. package/dist/sde/index.mjs +12 -5134
  58. package/dist/sde/index.mjs.map +1 -1
  59. package/dist/sde/memory.d.ts +8 -0
  60. package/dist/sde/memory.d.ts.map +1 -0
  61. package/dist/sde/memory.js +1100 -0
  62. package/dist/sde/memory.js.map +1 -0
  63. package/dist/sde/memory.mjs +1064 -0
  64. package/dist/sde/memory.mjs.map +1 -0
  65. package/dist/testing/index.js.map +1 -1
  66. package/dist/testing/index.mjs.map +1 -1
  67. package/dist/types/api-responses.d.ts +2 -0
  68. package/dist/types/api-responses.d.ts.map +1 -1
  69. package/dist/types/cosmetics.d.ts +8 -0
  70. package/dist/types/cosmetics.d.ts.map +1 -0
  71. package/dist/types/mercenary.d.ts +3 -1
  72. package/dist/types/mercenary.d.ts.map +1 -1
  73. package/dist/types/paragon-hub.d.ts +8 -0
  74. package/dist/types/paragon-hub.d.ts.map +1 -0
  75. package/dist/types/skyhooks.d.ts +3 -1
  76. package/dist/types/skyhooks.d.ts.map +1 -1
  77. package/package.json +289 -282
package/dist/index.mjs CHANGED
@@ -161,9 +161,6 @@ var ApiClient = class {
161
161
  this.compatibilityDate = date;
162
162
  }
163
163
  setAccessToken(token) {
164
- if (this.accessToken !== token) {
165
- this.cache?.clear();
166
- }
167
164
  this.accessToken = token;
168
165
  }
169
166
  setTokenProvider(provider) {
@@ -197,9 +194,6 @@ var ApiClient = class {
197
194
  }
198
195
  this.refreshInFlight = this.tokenProvider().then(
199
196
  (token) => {
200
- if (this.accessToken !== token) {
201
- this.cache?.clear();
202
- }
203
197
  this.accessToken = token;
204
198
  this.refreshInFlight = void 0;
205
199
  return token;
@@ -543,6 +537,16 @@ function isValidationError(error) {
543
537
  return error instanceof EsiValidationError;
544
538
  }
545
539
 
540
+ // src/core/cache/cacheKey.ts
541
+ import { createHash } from "crypto";
542
+ function buildCacheKey(url, client, requiresAuth = false) {
543
+ if (!requiresAuth) return url;
544
+ const authHeader = client.getAuthorizationHeader();
545
+ if (!authHeader) return url;
546
+ const hash = createHash("sha256").update(authHeader).digest("hex").slice(0, 16);
547
+ return `${hash}:${url}`;
548
+ }
549
+
546
550
  // src/core/constants.ts
547
551
  var PACKAGE_NAME = "esi.ts";
548
552
  var PACKAGE_VERSION = "9.2.0";
@@ -579,7 +583,8 @@ function buildRequestHeaders(client, url, method, requiresAuth, useETag, body, r
579
583
  }
580
584
  const cache = resolveCache2(client);
581
585
  if (useETag && method === "GET" && cache) {
582
- const cachedETag = cache.getETag(url);
586
+ const key = buildCacheKey(url, client, requiresAuth);
587
+ const cachedETag = cache.getETag(key);
583
588
  if (cachedETag) {
584
589
  headers["If-None-Match"] = cachedETag;
585
590
  logDebug(`Adding If-None-Match header: ${cachedETag}`);
@@ -733,13 +738,14 @@ function lookupSpecTtl(method, templatePath) {
733
738
  const seconds = esiCacheTtls[key];
734
739
  return typeof seconds === "number" ? seconds * 1e3 : void 0;
735
740
  }
736
- function trySpecAwareCacheHit(client, url, method, templatePath, resolveCache2) {
741
+ function trySpecAwareCacheHit(client, url, method, templatePath, resolveCache2, requiresAuth = false) {
737
742
  if (method !== "GET" || !templatePath) return null;
738
743
  const specTtlMs = lookupSpecTtl(method, templatePath);
739
744
  if (!specTtlMs) return null;
740
745
  const cache = resolveCache2(client);
741
746
  if (!cache) return null;
742
- const entry = cache.get(url);
747
+ const key = buildCacheKey(url, client, requiresAuth);
748
+ const entry = cache.get(key);
743
749
  if (!entry) return null;
744
750
  const age = Date.now() - entry.timestamp;
745
751
  if (age < specTtlMs) {
@@ -756,10 +762,11 @@ function trySpecAwareCacheHit(client, url, method, templatePath, resolveCache2)
756
762
  }
757
763
  return null;
758
764
  }
759
- function tryStaleCacheResponse(client, url, parsed, resolveCache2) {
765
+ function tryStaleCacheResponse(client, url, parsed, resolveCache2, requiresAuth = false) {
760
766
  const cache = resolveCache2(client);
761
767
  if (!cache) return null;
762
- const cachedEntry = cache.get(url);
768
+ const key = buildCacheKey(url, client, requiresAuth);
769
+ const cachedEntry = cache.get(key);
763
770
  if (!cachedEntry) return null;
764
771
  return {
765
772
  headers: { ...cachedEntry.headers, ...parsed.raw },
@@ -770,13 +777,14 @@ function tryStaleCacheResponse(client, url, parsed, resolveCache2) {
770
777
  cacheHitType: "stale-on-error"
771
778
  };
772
779
  }
773
- function cacheResponse(client, url, method, endpoint, parsed, data, useETag, resolveCache2, templatePath) {
780
+ function cacheResponse(client, url, method, endpoint, parsed, data, useETag, resolveCache2, templatePath, requiresAuth = false) {
774
781
  const cache = resolveCache2(client);
775
782
  if (useETag && method === "GET" && cache && parsed.etag) {
783
+ const key = buildCacheKey(url, client, requiresAuth);
776
784
  const headerTtl = parseCacheControlTtl(parsed.raw);
777
785
  const specTtlMs = templatePath ? lookupSpecTtl(method, templatePath) : void 0;
778
786
  const ttl = specTtlMs ?? headerTtl;
779
- cache.set(url, parsed.etag, data, parsed.raw, ttl);
787
+ cache.set(key, parsed.etag, data, parsed.raw, ttl);
780
788
  const ttlInfo = ttl ? ` (ttl=${ttl}ms)` : "";
781
789
  logDebug(`Cached response for ${url} with ETag ${parsed.etag}${ttlInfo}`);
782
790
  }
@@ -802,7 +810,7 @@ var STATUS_MESSAGES = {
802
810
  504: "Gateway Timeout",
803
811
  520: "Internal server error, did the request terminate too soon?"
804
812
  };
805
- function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2) {
813
+ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2, requiresAuth = false) {
806
814
  if (status === 201) {
807
815
  return { headers: parsed.raw, body: void 0, status: 201 };
808
816
  }
@@ -813,7 +821,8 @@ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2)
813
821
  if (status === 304) {
814
822
  const cache = resolveCache2(client);
815
823
  if (useETag && cache) {
816
- const cachedEntry = cache.get(url);
824
+ const key = buildCacheKey(url, client, requiresAuth);
825
+ const cachedEntry = cache.get(key);
817
826
  if (cachedEntry) {
818
827
  logInfo(`Cache hit (304) for endpoint: ${url}`);
819
828
  return {
@@ -834,14 +843,15 @@ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2)
834
843
  }
835
844
  return null;
836
845
  }
837
- function handleErrorResponse(client, response, url, parsed, useETag, resolveCache2) {
846
+ function handleErrorResponse(client, response, url, parsed, useETag, resolveCache2, requiresAuth = false) {
838
847
  const errorMessage = STATUS_MESSAGES[response.status] || response.statusText;
839
848
  if (response.status >= 500 && useETag) {
840
849
  const staleResult = tryStaleCacheResponse(
841
850
  client,
842
851
  url,
843
852
  parsed,
844
- resolveCache2
853
+ resolveCache2,
854
+ requiresAuth
845
855
  );
846
856
  if (staleResult) {
847
857
  logWarn(`${errorMessage} for ${url} \u2014 serving stale cache`);
@@ -1338,7 +1348,8 @@ var executeRequest = async (client, endpoint, method, body, requiresAuth = false
1338
1348
  url,
1339
1349
  parsed,
1340
1350
  useETag,
1341
- resolveCache
1351
+ resolveCache,
1352
+ requiresAuth
1342
1353
  );
1343
1354
  if (earlyResult) return finish(earlyResult);
1344
1355
  if (!response.ok) {
@@ -1348,7 +1359,8 @@ var executeRequest = async (client, endpoint, method, body, requiresAuth = false
1348
1359
  url,
1349
1360
  parsed,
1350
1361
  useETag,
1351
- resolveCache
1362
+ resolveCache,
1363
+ requiresAuth
1352
1364
  );
1353
1365
  return finish(staleOrThrow);
1354
1366
  }
@@ -1362,7 +1374,8 @@ var executeRequest = async (client, endpoint, method, body, requiresAuth = false
1362
1374
  data,
1363
1375
  useETag,
1364
1376
  resolveCache,
1365
- templatePath
1377
+ templatePath,
1378
+ requiresAuth
1366
1379
  );
1367
1380
  const cursorResult = handleCursorPagination(parsed, data);
1368
1381
  if (cursorResult) return finish(cursorResult);
@@ -1435,7 +1448,8 @@ var handleRequest = async (client, endpoint, method, body, requiresAuth = false,
1435
1448
  rawUrl,
1436
1449
  method,
1437
1450
  templatePath,
1438
- resolveCache
1451
+ resolveCache,
1452
+ requiresAuth
1439
1453
  );
1440
1454
  if (specHit) {
1441
1455
  return applyResponseInterceptors(
@@ -8102,6 +8116,72 @@ var RaidableSkyhookSchema = z62.looseObject({
8102
8116
  raidable_at: z62.string().optional(),
8103
8117
  is_raidable: z62.boolean()
8104
8118
  });
8119
+ var SkyhookDetailReagentSchema = z62.looseObject({
8120
+ type_id: z62.number(),
8121
+ secured_stock: z62.number(),
8122
+ unsecured_stock: z62.number(),
8123
+ last_cycle: z62.string()
8124
+ });
8125
+ var SkyhookDetailReinforcementTimerSchema = z62.looseObject({
8126
+ end: z62.string()
8127
+ });
8128
+ var SkyhookDetailTheftVulnerabilitySchema = z62.looseObject({
8129
+ start: z62.string(),
8130
+ end: z62.string()
8131
+ });
8132
+ var SkyhookDetailSchema = z62.looseObject({
8133
+ id: z62.number(),
8134
+ planet_id: z62.number(),
8135
+ state: esiEnum([
8136
+ "Unspecified",
8137
+ "ShieldVulnerable",
8138
+ "ArmorReinforced",
8139
+ "ArmorVulnerable",
8140
+ "HullReinforced",
8141
+ "HullVulnerable"
8142
+ ]),
8143
+ is_active: z62.boolean(),
8144
+ effective_workforce: z62.number().optional(),
8145
+ reagents: z62.array(SkyhookDetailReagentSchema).optional(),
8146
+ reinforcement_timer: SkyhookDetailReinforcementTimerSchema.optional(),
8147
+ theft_vulnerability: SkyhookDetailTheftVulnerabilitySchema.optional()
8148
+ });
8149
+ var SovereigntyHubDetailReagentSchema = z62.looseObject({
8150
+ type_id: z62.number(),
8151
+ amount: z62.number(),
8152
+ burning_per_hour: z62.number().optional()
8153
+ });
8154
+ var SovereigntyHubDetailReagentBaySchema = z62.looseObject({
8155
+ last_updated: z62.string(),
8156
+ reagents: z62.array(SovereigntyHubDetailReagentSchema)
8157
+ });
8158
+ var SovereigntyHubDetailResourceSchema = z62.looseObject({
8159
+ available: z62.number().optional(),
8160
+ used: z62.number().optional()
8161
+ });
8162
+ var SovereigntyHubDetailResourcesSchema = z62.looseObject({
8163
+ power: SovereigntyHubDetailResourceSchema,
8164
+ workforce: SovereigntyHubDetailResourceSchema
8165
+ });
8166
+ var SovereigntyHubDetailUpgradeSchema = z62.looseObject({
8167
+ type_id: z62.number(),
8168
+ power_state: esiEnum(["Unspecified", "Online", "Offline", "Low", "Pending"])
8169
+ });
8170
+ var SovereigntyHubDetailVulnerabilityWindowSchema = z62.looseObject({
8171
+ start: z62.string(),
8172
+ end: z62.string()
8173
+ });
8174
+ var SovereigntyHubDetailTransportSchema = z62.looseObject({});
8175
+ var SovereigntyHubDetailSchema = z62.looseObject({
8176
+ id: z62.number(),
8177
+ solar_system_id: z62.number(),
8178
+ upgrades: z62.array(SovereigntyHubDetailUpgradeSchema),
8179
+ reagent_bay: SovereigntyHubDetailReagentBaySchema,
8180
+ resources: SovereigntyHubDetailResourcesSchema,
8181
+ workforce_transport: SovereigntyHubDetailTransportSchema,
8182
+ fuel_access_list_id: z62.number().optional(),
8183
+ vulnerability_window: SovereigntyHubDetailVulnerabilityWindowSchema.optional()
8184
+ });
8105
8185
 
8106
8186
  // src/core/endpoints/skyhookEndpoints.ts
8107
8187
  var skyhookEndpoints = {
@@ -8124,6 +8204,20 @@ var skyhookEndpoints = {
8124
8204
  method: "GET",
8125
8205
  requiresAuth: false,
8126
8206
  responseSchema: z63.array(RaidableSkyhookSchema)
8207
+ },
8208
+ getSkyhookDetail: {
8209
+ path: "corporations/{corporationId}/structures/skyhooks/{skyhookId}",
8210
+ method: "GET",
8211
+ requiresAuth: true,
8212
+ pathParams: ["corporationId", "skyhookId"],
8213
+ responseSchema: SkyhookDetailSchema
8214
+ },
8215
+ getSovereigntyHubDetail: {
8216
+ path: "corporations/{corporationId}/structures/sovereignty-hubs/{sovereigntyHubId}",
8217
+ method: "GET",
8218
+ requiresAuth: true,
8219
+ pathParams: ["corporationId", "sovereigntyHubId"],
8220
+ responseSchema: SovereigntyHubDetailSchema
8127
8221
  }
8128
8222
  };
8129
8223
 
@@ -8160,6 +8254,28 @@ var SkyhooksClient = class extends BaseEsiClient {
8160
8254
  getRaidableSkyhooks() {
8161
8255
  return this.api.getRaidableSkyhooks();
8162
8256
  }
8257
+ /**
8258
+ * Retrieves detail for a specific skyhook including reagents, reinforcement timer, and theft vulnerability.
8259
+ *
8260
+ * @param corporationId - The ID of the corporation
8261
+ * @param skyhookId - The ID of the skyhook
8262
+ * @returns Skyhook detail
8263
+ * @requires Authentication
8264
+ */
8265
+ getSkyhookDetail(corporationId, skyhookId) {
8266
+ return this.api.getSkyhookDetail(corporationId, skyhookId);
8267
+ }
8268
+ /**
8269
+ * Retrieves detail for a specific sovereignty hub including reagent bay, resources, upgrades, and vulnerability window.
8270
+ *
8271
+ * @param corporationId - The ID of the corporation
8272
+ * @param sovereigntyHubId - The ID of the sovereignty hub
8273
+ * @returns Sovereignty hub detail
8274
+ * @requires Authentication
8275
+ */
8276
+ getSovereigntyHubDetail(corporationId, sovereigntyHubId) {
8277
+ return this.api.getSovereigntyHubDetail(corporationId, sovereigntyHubId);
8278
+ }
8163
8279
  };
8164
8280
 
8165
8281
  // src/core/endpoints/mercenaryEndpoints.ts
@@ -8185,6 +8301,48 @@ var MercenaryTacticalOperationSchema = z64.looseObject({
8185
8301
  started_at: z64.string().optional(),
8186
8302
  expires_at: z64.string().optional()
8187
8303
  });
8304
+ var MercenaryDenDetailEvolutionLevelSchema = z64.looseObject({
8305
+ level: z64.number().optional(),
8306
+ progress: z64.number().optional()
8307
+ });
8308
+ var MercenaryDenDetailEvolutionSchema = z64.looseObject({
8309
+ development: MercenaryDenDetailEvolutionLevelSchema,
8310
+ anarchy: MercenaryDenDetailEvolutionLevelSchema
8311
+ });
8312
+ var MercenaryDenDetailInfomorphsSchema = z64.looseObject({
8313
+ amount: z64.number()
8314
+ });
8315
+ var MercenaryDenDetailReinforcementTimerSchema = z64.looseObject({
8316
+ end: z64.string()
8317
+ });
8318
+ var MercenaryDenDetailSkyhookSchema = z64.looseObject({
8319
+ id: z64.number(),
8320
+ planet_id: z64.number(),
8321
+ corporation_id: z64.number()
8322
+ });
8323
+ var MercenaryDenDetailSchema = z64.looseObject({
8324
+ id: z64.number(),
8325
+ type_id: z64.number(),
8326
+ state: esiEnum(["Unspecified", "Running", "Paused", "Disabled"]),
8327
+ skyhook: MercenaryDenDetailSkyhookSchema,
8328
+ infomorphs: MercenaryDenDetailInfomorphsSchema,
8329
+ evolution: MercenaryDenDetailEvolutionSchema,
8330
+ reinforcement_timer: MercenaryDenDetailReinforcementTimerSchema.optional()
8331
+ });
8332
+ var MercenaryTacticalOperationDetailSchema = z64.looseObject({
8333
+ id: z64.string(),
8334
+ mercenary_den_id: z64.number(),
8335
+ state: esiEnum([
8336
+ "Unspecified",
8337
+ "Available",
8338
+ "Started",
8339
+ "Completed",
8340
+ "Expired",
8341
+ "Removed"
8342
+ ]),
8343
+ dungeon_type_id: z64.number(),
8344
+ expires: z64.string()
8345
+ });
8188
8346
 
8189
8347
  // src/core/endpoints/mercenaryEndpoints.ts
8190
8348
  var mercenaryEndpoints = {
@@ -8201,6 +8359,20 @@ var mercenaryEndpoints = {
8201
8359
  requiresAuth: true,
8202
8360
  pathParams: ["characterId"],
8203
8361
  responseSchema: z65.array(MercenaryTacticalOperationSchema)
8362
+ },
8363
+ getMercenaryDenDetail: {
8364
+ path: "characters/{characterId}/structures/mercenary-dens/{mercenaryDenId}",
8365
+ method: "GET",
8366
+ requiresAuth: true,
8367
+ pathParams: ["characterId", "mercenaryDenId"],
8368
+ responseSchema: MercenaryDenDetailSchema
8369
+ },
8370
+ getMercenaryTacticalOperationDetail: {
8371
+ path: "characters/{characterId}/mercenary-tactical-operations/{operationId}",
8372
+ method: "GET",
8373
+ requiresAuth: true,
8374
+ pathParams: ["characterId", "operationId"],
8375
+ responseSchema: MercenaryTacticalOperationDetailSchema
8204
8376
  }
8205
8377
  };
8206
8378
 
@@ -8229,6 +8401,31 @@ var MercenaryClient = class extends BaseEsiClient {
8229
8401
  getMercenaryTacticalOperations(characterId) {
8230
8402
  return this.api.getMercenaryTacticalOperations(characterId);
8231
8403
  }
8404
+ /**
8405
+ * Retrieves detail for a specific mercenary den including evolution, infomorphs, and skyhook attachment.
8406
+ *
8407
+ * @param characterId - The ID of the character
8408
+ * @param mercenaryDenId - The ID of the mercenary den
8409
+ * @returns Mercenary den detail
8410
+ * @requires Authentication
8411
+ */
8412
+ getMercenaryDenDetail(characterId, mercenaryDenId) {
8413
+ return this.api.getMercenaryDenDetail(characterId, mercenaryDenId);
8414
+ }
8415
+ /**
8416
+ * Retrieves detail for a specific mercenary tactical operation.
8417
+ *
8418
+ * @param characterId - The ID of the character
8419
+ * @param operationId - The UUID of the tactical operation
8420
+ * @returns Mercenary tactical operation detail
8421
+ * @requires Authentication
8422
+ */
8423
+ getMercenaryTacticalOperationDetail(characterId, operationId) {
8424
+ return this.api.getMercenaryTacticalOperationDetail(
8425
+ characterId,
8426
+ operationId
8427
+ );
8428
+ }
8232
8429
  };
8233
8430
 
8234
8431
  // src/core/endpoints/accessListEndpoints.ts
@@ -8293,34 +8490,239 @@ var AccessListsClient = class extends BaseEsiClient {
8293
8490
  }
8294
8491
  };
8295
8492
 
8296
- // src/core/endpoints/militaryCampaignEndpoints.ts
8493
+ // src/schemas/cosmetics.ts
8494
+ import { z as z68 } from "zod";
8495
+ var SkinrLicenseSchema = z68.looseObject({
8496
+ skinr_id: z68.string(),
8497
+ activated: z68.boolean(),
8498
+ unactivated: z68.number()
8499
+ });
8500
+ var CharacterSkinrSchema = z68.looseObject({
8501
+ licenses: z68.array(SkinrLicenseSchema)
8502
+ });
8503
+ var SkinrComponentRunsSchema = z68.looseObject({
8504
+ remaining: z68.number().optional(),
8505
+ unlimited: z68.boolean().optional()
8506
+ });
8507
+ var SkinrComponentLicenseSchema = z68.looseObject({
8508
+ component_id: z68.number(),
8509
+ type: esiEnum(["nanocoating", "pattern"]),
8510
+ runs: SkinrComponentRunsSchema
8511
+ });
8512
+ var CharacterSkinrComponentsSchema = z68.looseObject({
8513
+ licenses: z68.array(SkinrComponentLicenseSchema)
8514
+ });
8515
+ var SkinrTierSchema = z68.looseObject({
8516
+ level: z68.number()
8517
+ });
8518
+ var SkinrLayoutSlotSchema = z68.looseObject({});
8519
+ var SkinrLayoutSchema = z68.looseObject({
8520
+ slots: z68.array(SkinrLayoutSlotSchema),
8521
+ pattern_blend_mode: esiEnum([
8522
+ "normal",
8523
+ "subtract",
8524
+ "exclusion",
8525
+ "nested",
8526
+ "nested_inverted"
8527
+ ])
8528
+ });
8529
+ var SkinrSchema = z68.looseObject({
8530
+ id: z68.string(),
8531
+ name: z68.string(),
8532
+ creator_id: z68.number(),
8533
+ ship_type_id: z68.number(),
8534
+ line: z68.string().optional(),
8535
+ tier: SkinrTierSchema,
8536
+ layout: SkinrLayoutSchema
8537
+ });
8538
+
8539
+ // src/core/endpoints/cosmeticsEndpoints.ts
8540
+ var cosmeticsEndpoints = {
8541
+ getCharacterSkinr: {
8542
+ path: "characters/{characterId}/cosmetics/skinr",
8543
+ method: "GET",
8544
+ requiresAuth: true,
8545
+ pathParams: ["characterId"],
8546
+ responseSchema: CharacterSkinrSchema
8547
+ },
8548
+ getCharacterSkinrComponents: {
8549
+ path: "characters/{characterId}/cosmetics/skinr/components",
8550
+ method: "GET",
8551
+ requiresAuth: true,
8552
+ pathParams: ["characterId"],
8553
+ responseSchema: CharacterSkinrComponentsSchema
8554
+ },
8555
+ getSkinr: {
8556
+ path: "cosmetics/skinr/{skinrId}",
8557
+ method: "GET",
8558
+ requiresAuth: false,
8559
+ pathParams: ["skinrId"],
8560
+ responseSchema: SkinrSchema
8561
+ }
8562
+ };
8563
+
8564
+ // src/clients/CosmeticsClient.ts
8565
+ var CosmeticsClient = class extends BaseEsiClient {
8566
+ constructor(client) {
8567
+ super(client, cosmeticsEndpoints);
8568
+ }
8569
+ getCharacterSkinr(characterId) {
8570
+ return this.api.getCharacterSkinr(characterId);
8571
+ }
8572
+ getCharacterSkinrComponents(characterId) {
8573
+ return this.api.getCharacterSkinrComponents(characterId);
8574
+ }
8575
+ getSkinr(skinrId) {
8576
+ return this.api.getSkinr(skinrId);
8577
+ }
8578
+ };
8579
+
8580
+ // src/schemas/paragon-hub.ts
8297
8581
  import { z as z69 } from "zod";
8582
+ var ParagonHubCursorSchema = z69.looseObject({
8583
+ after: z69.string().optional(),
8584
+ before: z69.string().optional()
8585
+ });
8586
+ var ParagonHubSkinrPriceSchema = z69.looseObject({
8587
+ isk: z69.number().optional(),
8588
+ plex: z69.number().optional()
8589
+ });
8590
+ var ParagonHubSkinrListingSchema = z69.looseObject({
8591
+ id: z69.string(),
8592
+ state: esiEnum(["listed", "sold_out", "expired", "removed"]),
8593
+ last_modified: z69.string(),
8594
+ seller_id: z69.number(),
8595
+ skinr_id: z69.string(),
8596
+ created: z69.string(),
8597
+ expires: z69.string(),
8598
+ quantity: z69.number(),
8599
+ price: ParagonHubSkinrPriceSchema
8600
+ });
8601
+ var ParagonHubSkinrTargetSchema = z69.looseObject({
8602
+ character_id: z69.number().optional(),
8603
+ corporation_id: z69.number().optional(),
8604
+ alliance_id: z69.number().optional(),
8605
+ public: z69.boolean().optional()
8606
+ });
8607
+ var ParagonHubCharacterListingSchema = z69.looseObject({
8608
+ id: z69.string(),
8609
+ state: esiEnum(["listed", "sold_out", "expired", "removed"]),
8610
+ last_modified: z69.string(),
8611
+ seller_id: z69.number(),
8612
+ skinr_id: z69.string(),
8613
+ created: z69.string(),
8614
+ expires: z69.string(),
8615
+ quantity: z69.number(),
8616
+ price: ParagonHubSkinrPriceSchema,
8617
+ target: ParagonHubSkinrTargetSchema
8618
+ });
8619
+ var ParagonHubSkinrResponseSchema = z69.looseObject({
8620
+ cursor: ParagonHubCursorSchema.optional(),
8621
+ listings: z69.array(ParagonHubSkinrListingSchema)
8622
+ });
8623
+ var ParagonHubCharacterSkinrResponseSchema = z69.looseObject({
8624
+ cursor: ParagonHubCursorSchema.optional(),
8625
+ listings: z69.array(ParagonHubCharacterListingSchema)
8626
+ });
8627
+
8628
+ // src/core/endpoints/paragonHubEndpoints.ts
8629
+ var paragonHubEndpoints = {
8630
+ getPublicListings: {
8631
+ path: "paragon-hub/skinr",
8632
+ method: "GET",
8633
+ requiresAuth: false,
8634
+ queryParams: { after: "after", before: "before", limit: "limit" },
8635
+ responseSchema: ParagonHubSkinrResponseSchema
8636
+ },
8637
+ getCharacterListings: {
8638
+ path: "characters/{characterId}/paragon-hub/skinr",
8639
+ method: "GET",
8640
+ requiresAuth: true,
8641
+ pathParams: ["characterId"],
8642
+ queryParams: { after: "after", before: "before", limit: "limit" },
8643
+ responseSchema: ParagonHubCharacterSkinrResponseSchema
8644
+ },
8645
+ getAllianceListings: {
8646
+ path: "paragon-hub/skinr/alliances/{allianceId}",
8647
+ method: "GET",
8648
+ requiresAuth: true,
8649
+ pathParams: ["allianceId"],
8650
+ queryParams: { after: "after", before: "before", limit: "limit" },
8651
+ responseSchema: ParagonHubSkinrResponseSchema
8652
+ },
8653
+ getCharacterTargetedListings: {
8654
+ path: "paragon-hub/skinr/characters/{characterId}",
8655
+ method: "GET",
8656
+ requiresAuth: true,
8657
+ pathParams: ["characterId"],
8658
+ queryParams: { after: "after", before: "before", limit: "limit" },
8659
+ responseSchema: ParagonHubSkinrResponseSchema
8660
+ },
8661
+ getCorporationListings: {
8662
+ path: "paragon-hub/skinr/corporations/{corporationId}",
8663
+ method: "GET",
8664
+ requiresAuth: true,
8665
+ pathParams: ["corporationId"],
8666
+ queryParams: { after: "after", before: "before", limit: "limit" },
8667
+ responseSchema: ParagonHubSkinrResponseSchema
8668
+ }
8669
+ };
8670
+
8671
+ // src/clients/ParagonHubClient.ts
8672
+ var ParagonHubClient = class extends BaseEsiClient {
8673
+ constructor(client) {
8674
+ super(client, paragonHubEndpoints);
8675
+ }
8676
+ getPublicListings(after, before, limit) {
8677
+ return this.api.getPublicListings(after, before, limit);
8678
+ }
8679
+ getCharacterListings(characterId, after, before, limit) {
8680
+ return this.api.getCharacterListings(characterId, after, before, limit);
8681
+ }
8682
+ getAllianceListings(allianceId, after, before, limit) {
8683
+ return this.api.getAllianceListings(allianceId, after, before, limit);
8684
+ }
8685
+ getCharacterTargetedListings(characterId, after, before, limit) {
8686
+ return this.api.getCharacterTargetedListings(
8687
+ characterId,
8688
+ after,
8689
+ before,
8690
+ limit
8691
+ );
8692
+ }
8693
+ getCorporationListings(corporationId, after, before, limit) {
8694
+ return this.api.getCorporationListings(corporationId, after, before, limit);
8695
+ }
8696
+ };
8697
+
8698
+ // src/core/endpoints/militaryCampaignEndpoints.ts
8699
+ import { z as z71 } from "zod";
8298
8700
 
8299
8701
  // src/schemas/military-campaigns.ts
8300
- import { z as z68 } from "zod";
8301
- var MilitaryCampaignSchema = z68.looseObject({
8302
- campaign_id: z68.string(),
8303
- state: z68.string(),
8304
- progress: z68.number(),
8305
- start_time: z68.string(),
8306
- finish_time: z68.string().optional()
8307
- });
8308
- var MilitaryCampaignObjectiveSchema = z68.looseObject({
8309
- objective_id: z68.string(),
8310
- campaign_id: z68.string(),
8311
- state: z68.string(),
8312
- progress: z68.number(),
8313
- participants: z68.looseObject({
8314
- total: z68.number(),
8315
- committed: z68.number(),
8316
- contributors: z68.number()
8702
+ import { z as z70 } from "zod";
8703
+ var MilitaryCampaignSchema = z70.looseObject({
8704
+ campaign_id: z70.string(),
8705
+ state: z70.string(),
8706
+ progress: z70.number(),
8707
+ start_time: z70.string(),
8708
+ finish_time: z70.string().optional()
8709
+ });
8710
+ var MilitaryCampaignObjectiveSchema = z70.looseObject({
8711
+ objective_id: z70.string(),
8712
+ campaign_id: z70.string(),
8713
+ state: z70.string(),
8714
+ progress: z70.number(),
8715
+ participants: z70.looseObject({
8716
+ total: z70.number(),
8717
+ committed: z70.number(),
8718
+ contributors: z70.number()
8317
8719
  })
8318
8720
  });
8319
- var CharacterMilitaryCampaignObjectiveSchema = z68.looseObject({
8320
- objective_id: z68.string(),
8321
- campaign_id: z68.string(),
8322
- committed: z68.boolean(),
8323
- contribution: z68.number()
8721
+ var CharacterMilitaryCampaignObjectiveSchema = z70.looseObject({
8722
+ objective_id: z70.string(),
8723
+ campaign_id: z70.string(),
8724
+ committed: z70.boolean(),
8725
+ contribution: z70.number()
8324
8726
  });
8325
8727
 
8326
8728
  // src/core/endpoints/militaryCampaignEndpoints.ts
@@ -8329,7 +8731,7 @@ var militaryCampaignEndpoints = {
8329
8731
  path: "military-campaigns",
8330
8732
  method: "GET",
8331
8733
  requiresAuth: false,
8332
- responseSchema: z69.array(MilitaryCampaignSchema)
8734
+ responseSchema: z71.array(MilitaryCampaignSchema)
8333
8735
  },
8334
8736
  getMilitaryCampaign: {
8335
8737
  path: "military-campaigns/{campaignId}",
@@ -8343,7 +8745,7 @@ var militaryCampaignEndpoints = {
8343
8745
  method: "GET",
8344
8746
  requiresAuth: false,
8345
8747
  pathParams: ["campaignId"],
8346
- responseSchema: z69.array(MilitaryCampaignObjectiveSchema)
8748
+ responseSchema: z71.array(MilitaryCampaignObjectiveSchema)
8347
8749
  },
8348
8750
  getMilitaryCampaignObjective: {
8349
8751
  path: "military-campaigns/{campaignId}/objectives/{objectiveId}",
@@ -8357,7 +8759,7 @@ var militaryCampaignEndpoints = {
8357
8759
  method: "GET",
8358
8760
  requiresAuth: true,
8359
8761
  pathParams: ["characterId"],
8360
- responseSchema: z69.array(CharacterMilitaryCampaignObjectiveSchema)
8762
+ responseSchema: z71.array(CharacterMilitaryCampaignObjectiveSchema)
8361
8763
  },
8362
8764
  getCharacterMilitaryCampaignObjective: {
8363
8765
  path: "characters/{characterId}/military-campaigns/objectives/{objectiveId}",
@@ -8471,6 +8873,8 @@ var clientFactories = {
8471
8873
  meta: MetaClient,
8472
8874
  freelanceJobs: FreelanceJobsClient,
8473
8875
  skyhooks: SkyhooksClient,
8876
+ cosmetics: CosmeticsClient,
8877
+ paragonHub: ParagonHubClient,
8474
8878
  mercenary: MercenaryClient,
8475
8879
  militaryCampaigns: MilitaryCampaignsClient,
8476
8880
  accessLists: AccessListsClient
@@ -8882,8 +9286,8 @@ var esiRateLimitGroups = {
8882
9286
  "PUT:fleets/{fleet_id}/wings/{wing_id}": { group: "fleet", maxTokens: 1800, windowSizeMs: 9e5 },
8883
9287
  "DELETE:fleets/{fleet_id}/wings/{wing_id}": { group: "fleet", maxTokens: 1800, windowSizeMs: 9e5 },
8884
9288
  "POST:fleets/{fleet_id}/wings/{wing_id}/squads": { group: "fleet", maxTokens: 1800, windowSizeMs: 9e5 },
8885
- "GET:freelance-jobs": { group: "freelance-job", maxTokens: 900, windowSizeMs: 9e5 },
8886
- "GET:freelance-jobs/{job_id}": { group: "freelance-job", maxTokens: 900, windowSizeMs: 9e5 },
9289
+ "GET:freelance-jobs": { group: "freelance-job", maxTokens: 12e3, windowSizeMs: 9e5 },
9290
+ "GET:freelance-jobs/{job_id}": { group: "freelance-job", maxTokens: 12e3, windowSizeMs: 9e5 },
8887
9291
  "GET:fw/leaderboards": { group: "factional-warfare", maxTokens: 150, windowSizeMs: 9e5 },
8888
9292
  "GET:fw/leaderboards/characters": { group: "factional-warfare", maxTokens: 150, windowSizeMs: 9e5 },
8889
9293
  "GET:fw/leaderboards/corporations": { group: "factional-warfare", maxTokens: 150, windowSizeMs: 9e5 },
@@ -9465,6 +9869,12 @@ var EsiClient = class {
9465
9869
  get freelanceJobs() {
9466
9870
  return this.getClient("freelanceJobs");
9467
9871
  }
9872
+ get cosmetics() {
9873
+ return this.getClient("cosmetics");
9874
+ }
9875
+ get paragonHub() {
9876
+ return this.getClient("paragonHub");
9877
+ }
9468
9878
  get skyhooks() {
9469
9879
  return this.getClient("skyhooks");
9470
9880
  }
@@ -10054,6 +10464,8 @@ __export(schemas_exports, {
10054
10464
  CharacterShipSchema: () => CharacterShipSchema,
10055
10465
  CharacterSkillSchema: () => CharacterSkillSchema,
10056
10466
  CharacterSkillsResponseSchema: () => CharacterSkillsResponseSchema,
10467
+ CharacterSkinrComponentsSchema: () => CharacterSkinrComponentsSchema,
10468
+ CharacterSkinrSchema: () => CharacterSkinrSchema,
10057
10469
  CharacterTitleSchema: () => CharacterTitleSchema,
10058
10470
  CloneInfoSchema: () => CloneInfoSchema,
10059
10471
  ColonyLayoutSchema: () => ColonyLayoutSchema,
@@ -10134,7 +10546,13 @@ __export(schemas_exports, {
10134
10546
  MarketOrderSchema: () => MarketOrderSchema,
10135
10547
  MarketPriceSchema: () => MarketPriceSchema,
10136
10548
  MedalSchema: () => MedalSchema,
10549
+ MercenaryDenDetailEvolutionSchema: () => MercenaryDenDetailEvolutionSchema,
10550
+ MercenaryDenDetailInfomorphsSchema: () => MercenaryDenDetailInfomorphsSchema,
10551
+ MercenaryDenDetailReinforcementTimerSchema: () => MercenaryDenDetailReinforcementTimerSchema,
10552
+ MercenaryDenDetailSchema: () => MercenaryDenDetailSchema,
10553
+ MercenaryDenDetailSkyhookSchema: () => MercenaryDenDetailSkyhookSchema,
10137
10554
  MercenaryDenSchema: () => MercenaryDenSchema,
10555
+ MercenaryTacticalOperationDetailSchema: () => MercenaryTacticalOperationDetailSchema,
10138
10556
  MercenaryTacticalOperationSchema: () => MercenaryTacticalOperationSchema,
10139
10557
  MetaChangelogEntrySchema: () => MetaChangelogEntrySchema,
10140
10558
  MetaChangelogSchema: () => MetaChangelogSchema,
@@ -10151,6 +10569,13 @@ __export(schemas_exports, {
10151
10569
  NameAndCategorySchema: () => NameAndCategorySchema,
10152
10570
  NotificationSchema: () => NotificationSchema,
10153
10571
  OrbitalSkyhookSchema: () => OrbitalSkyhookSchema,
10572
+ ParagonHubCharacterListingSchema: () => ParagonHubCharacterListingSchema,
10573
+ ParagonHubCharacterSkinrResponseSchema: () => ParagonHubCharacterSkinrResponseSchema,
10574
+ ParagonHubCursorSchema: () => ParagonHubCursorSchema,
10575
+ ParagonHubSkinrListingSchema: () => ParagonHubSkinrListingSchema,
10576
+ ParagonHubSkinrPriceSchema: () => ParagonHubSkinrPriceSchema,
10577
+ ParagonHubSkinrResponseSchema: () => ParagonHubSkinrResponseSchema,
10578
+ ParagonHubSkinrTargetSchema: () => ParagonHubSkinrTargetSchema,
10154
10579
  PlanetInfoSchema: () => PlanetInfoSchema,
10155
10580
  PlanetaryColonySchema: () => PlanetaryColonySchema,
10156
10581
  RaceSchema: () => RaceSchema,
@@ -10161,8 +10586,27 @@ __export(schemas_exports, {
10161
10586
  SearchResultSchema: () => SearchResultSchema,
10162
10587
  ServerStatusSchema: () => ServerStatusSchema,
10163
10588
  SkillQueueSchema: () => SkillQueueSchema,
10589
+ SkinrComponentLicenseSchema: () => SkinrComponentLicenseSchema,
10590
+ SkinrComponentRunsSchema: () => SkinrComponentRunsSchema,
10591
+ SkinrLayoutSchema: () => SkinrLayoutSchema,
10592
+ SkinrLayoutSlotSchema: () => SkinrLayoutSlotSchema,
10593
+ SkinrLicenseSchema: () => SkinrLicenseSchema,
10594
+ SkinrSchema: () => SkinrSchema,
10595
+ SkinrTierSchema: () => SkinrTierSchema,
10596
+ SkyhookDetailReagentSchema: () => SkyhookDetailReagentSchema,
10597
+ SkyhookDetailReinforcementTimerSchema: () => SkyhookDetailReinforcementTimerSchema,
10598
+ SkyhookDetailSchema: () => SkyhookDetailSchema,
10599
+ SkyhookDetailTheftVulnerabilitySchema: () => SkyhookDetailTheftVulnerabilitySchema,
10164
10600
  SolarSystemInfoSchema: () => SolarSystemInfoSchema,
10165
10601
  SovereigntyCampaignSchema: () => SovereigntyCampaignSchema,
10602
+ SovereigntyHubDetailReagentBaySchema: () => SovereigntyHubDetailReagentBaySchema,
10603
+ SovereigntyHubDetailReagentSchema: () => SovereigntyHubDetailReagentSchema,
10604
+ SovereigntyHubDetailResourceSchema: () => SovereigntyHubDetailResourceSchema,
10605
+ SovereigntyHubDetailResourcesSchema: () => SovereigntyHubDetailResourcesSchema,
10606
+ SovereigntyHubDetailSchema: () => SovereigntyHubDetailSchema,
10607
+ SovereigntyHubDetailTransportSchema: () => SovereigntyHubDetailTransportSchema,
10608
+ SovereigntyHubDetailUpgradeSchema: () => SovereigntyHubDetailUpgradeSchema,
10609
+ SovereigntyHubDetailVulnerabilityWindowSchema: () => SovereigntyHubDetailVulnerabilityWindowSchema,
10166
10610
  SovereigntyHubSchema: () => SovereigntyHubSchema2,
10167
10611
  SovereigntySystemSchema: () => SovereigntySystemSchema,
10168
10612
  SovereigntySystemStructureSchema: () => SovereigntySystemStructureSchema,
@@ -10198,6 +10642,7 @@ export {
10198
10642
  ContractsClient,
10199
10643
  CorporationProjectsClient,
10200
10644
  CorporationsClient,
10645
+ CosmeticsClient,
10201
10646
  CustomEsiClient,
10202
10647
  DogmaClient,
10203
10648
  ETagCacheManager,
@@ -10223,6 +10668,7 @@ export {
10223
10668
  MercenaryClient,
10224
10669
  MetaClient,
10225
10670
  MilitaryCampaignsClient,
10671
+ ParagonHubClient,
10226
10672
  PiClient,
10227
10673
  RateLimiter,
10228
10674
  RequestDeduplicator,