@lgriffin/esi.ts 7.4.0 → 8.0.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 (395) hide show
  1. package/LICENSE +26 -26
  2. package/README.md +967 -910
  3. package/dist/EsiClient.d.ts +3 -0
  4. package/dist/EsiClient.d.ts.map +1 -1
  5. package/dist/EsiClientBuilder.d.ts +1 -0
  6. package/dist/EsiClientBuilder.d.ts.map +1 -1
  7. package/dist/clients/AllianceClient.d.ts +3 -0
  8. package/dist/clients/AllianceClient.d.ts.map +1 -1
  9. package/dist/clients/BaseEsiClient.d.ts +1 -1
  10. package/dist/clients/BaseEsiClient.d.ts.map +1 -1
  11. package/dist/clients/CalendarClient.d.ts +3 -0
  12. package/dist/clients/CalendarClient.d.ts.map +1 -1
  13. package/dist/clients/CharacterClient.d.ts +10 -2
  14. package/dist/clients/CharacterClient.d.ts.map +1 -1
  15. package/dist/clients/ClonesClient.d.ts +2 -0
  16. package/dist/clients/ClonesClient.d.ts.map +1 -1
  17. package/dist/clients/ContactsClient.d.ts +7 -0
  18. package/dist/clients/ContactsClient.d.ts.map +1 -1
  19. package/dist/clients/CorporationsClient.d.ts +18 -0
  20. package/dist/clients/CorporationsClient.d.ts.map +1 -1
  21. package/dist/clients/FittingsClient.d.ts +2 -0
  22. package/dist/clients/FittingsClient.d.ts.map +1 -1
  23. package/dist/clients/FleetClient.d.ts +3 -0
  24. package/dist/clients/FleetClient.d.ts.map +1 -1
  25. package/dist/clients/IndustryClient.d.ts +9 -0
  26. package/dist/clients/IndustryClient.d.ts.map +1 -1
  27. package/dist/clients/LoyaltyClient.d.ts +3 -0
  28. package/dist/clients/LoyaltyClient.d.ts.map +1 -1
  29. package/dist/clients/MailClient.d.ts +6 -0
  30. package/dist/clients/MailClient.d.ts.map +1 -1
  31. package/dist/clients/MarketClient.d.ts +13 -22
  32. package/dist/clients/MarketClient.d.ts.map +1 -1
  33. package/dist/clients/PiClient.d.ts +3 -0
  34. package/dist/clients/PiClient.d.ts.map +1 -1
  35. package/dist/clients/SkillsClient.d.ts +2 -0
  36. package/dist/clients/SkillsClient.d.ts.map +1 -1
  37. package/dist/clients/WalletClient.d.ts +1 -0
  38. package/dist/clients/WalletClient.d.ts.map +1 -1
  39. package/dist/clients/WarsClient.d.ts +3 -0
  40. package/dist/clients/WarsClient.d.ts.map +1 -1
  41. package/dist/core/ApiClient.d.ts +14 -6
  42. package/dist/core/ApiClient.d.ts.map +1 -1
  43. package/dist/core/ApiRequestHandler.d.ts +3 -11
  44. package/dist/core/ApiRequestHandler.d.ts.map +1 -1
  45. package/dist/core/IDeduplicator.d.ts +6 -0
  46. package/dist/core/IDeduplicator.d.ts.map +1 -0
  47. package/dist/core/IRetryStrategy.d.ts +5 -0
  48. package/dist/core/IRetryStrategy.d.ts.map +1 -0
  49. package/dist/core/RequestDeduplicator.d.ts +2 -1
  50. package/dist/core/RequestDeduplicator.d.ts.map +1 -1
  51. package/dist/core/RetryStrategy.d.ts +19 -0
  52. package/dist/core/RetryStrategy.d.ts.map +1 -0
  53. package/dist/core/circuitBreaker/CircuitBreaker.d.ts +11 -1
  54. package/dist/core/circuitBreaker/CircuitBreaker.d.ts.map +1 -1
  55. package/dist/core/circuitBreaker/ICircuitBreaker.d.ts +23 -0
  56. package/dist/core/circuitBreaker/ICircuitBreaker.d.ts.map +1 -0
  57. package/dist/core/configureApiClient.d.ts +18 -0
  58. package/dist/core/configureApiClient.d.ts.map +1 -0
  59. package/dist/core/endpoints/EndpointDefinition.d.ts +2 -0
  60. package/dist/core/endpoints/EndpointDefinition.d.ts.map +1 -1
  61. package/dist/core/endpoints/calendarEndpoints.d.ts +1 -1
  62. package/dist/core/endpoints/characterEndpoints.d.ts +3 -3
  63. package/dist/core/endpoints/contactEndpoints.d.ts +7 -3
  64. package/dist/core/endpoints/contactEndpoints.d.ts.map +1 -1
  65. package/dist/core/endpoints/corporationEndpoints.d.ts +4 -1
  66. package/dist/core/endpoints/corporationEndpoints.d.ts.map +1 -1
  67. package/dist/core/endpoints/createClient.d.ts +18 -1
  68. package/dist/core/endpoints/createClient.d.ts.map +1 -1
  69. package/dist/core/endpoints/dogmaEndpoints.d.ts +17 -0
  70. package/dist/core/endpoints/dogmaEndpoints.d.ts.map +1 -1
  71. package/dist/core/endpoints/esi-scopes.generated.d.ts +1 -1
  72. package/dist/core/endpoints/esi-scopes.generated.d.ts.map +1 -1
  73. package/dist/core/endpoints/fleetEndpoints.d.ts +5 -0
  74. package/dist/core/endpoints/fleetEndpoints.d.ts.map +1 -1
  75. package/dist/core/endpoints/mailEndpoints.d.ts +13 -0
  76. package/dist/core/endpoints/mailEndpoints.d.ts.map +1 -1
  77. package/dist/core/endpoints/marketEndpoints.d.ts +29 -48
  78. package/dist/core/endpoints/marketEndpoints.d.ts.map +1 -1
  79. package/dist/core/endpoints/piEndpoints.d.ts +3 -0
  80. package/dist/core/endpoints/piEndpoints.d.ts.map +1 -1
  81. package/dist/core/endpoints/universeEndpoints.d.ts +13 -2
  82. package/dist/core/endpoints/universeEndpoints.d.ts.map +1 -1
  83. package/dist/core/endpoints/walletEndpoints.d.ts +4 -0
  84. package/dist/core/endpoints/walletEndpoints.d.ts.map +1 -1
  85. package/dist/core/logger/logger.d.ts +2 -1
  86. package/dist/core/logger/logger.d.ts.map +1 -1
  87. package/dist/core/pagination/AsyncPaginationIterator.d.ts +4 -1
  88. package/dist/core/pagination/AsyncPaginationIterator.d.ts.map +1 -1
  89. package/dist/core/pagination/CursorPaginationHandler.d.ts +6 -2
  90. package/dist/core/pagination/CursorPaginationHandler.d.ts.map +1 -1
  91. package/dist/core/pagination/PaginationHandler.d.ts +1 -1
  92. package/dist/core/pagination/PaginationHandler.d.ts.map +1 -1
  93. package/dist/core/rateLimiter/RateLimiter.d.ts +8 -2
  94. package/dist/core/rateLimiter/RateLimiter.d.ts.map +1 -1
  95. package/dist/core/requestPipeline/cachePolicy.d.ts +30 -0
  96. package/dist/core/requestPipeline/cachePolicy.d.ts.map +1 -0
  97. package/dist/core/requestPipeline/dependencies.d.ts +10 -0
  98. package/dist/core/requestPipeline/dependencies.d.ts.map +1 -0
  99. package/dist/core/requestPipeline/fetchExecution.d.ts +28 -0
  100. package/dist/core/requestPipeline/fetchExecution.d.ts.map +1 -0
  101. package/dist/core/requestPipeline/headers.d.ts +11 -0
  102. package/dist/core/requestPipeline/headers.d.ts.map +1 -0
  103. package/dist/core/requestPipeline/index.d.ts +10 -0
  104. package/dist/core/requestPipeline/index.d.ts.map +1 -0
  105. package/dist/core/requestPipeline/middlewareBridge.d.ts +15 -0
  106. package/dist/core/requestPipeline/middlewareBridge.d.ts.map +1 -0
  107. package/dist/core/requestPipeline/paginationOrchestration.d.ts +15 -0
  108. package/dist/core/requestPipeline/paginationOrchestration.d.ts.map +1 -0
  109. package/dist/core/requestPipeline/statusHandling.d.ts +18 -0
  110. package/dist/core/requestPipeline/statusHandling.d.ts.map +1 -0
  111. package/dist/core/util/error.d.ts +4 -1
  112. package/dist/core/util/error.d.ts.map +1 -1
  113. package/dist/index.d.ts +9 -2
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +9926 -176
  116. package/dist/index.js.map +1 -0
  117. package/dist/index.mjs +9824 -0
  118. package/dist/index.mjs.map +1 -0
  119. package/dist/schemas/calendar.d.ts +1 -1
  120. package/dist/schemas/character.d.ts +1 -10
  121. package/dist/schemas/character.d.ts.map +1 -1
  122. package/dist/schemas/common.d.ts +9 -0
  123. package/dist/schemas/common.d.ts.map +1 -1
  124. package/dist/schemas/contacts.d.ts +2 -1
  125. package/dist/schemas/contacts.d.ts.map +1 -1
  126. package/dist/schemas/corporation.d.ts +4 -9
  127. package/dist/schemas/corporation.d.ts.map +1 -1
  128. package/dist/schemas/dogma.d.ts +17 -0
  129. package/dist/schemas/dogma.d.ts.map +1 -1
  130. package/dist/schemas/fleet.d.ts +1 -0
  131. package/dist/schemas/fleet.d.ts.map +1 -1
  132. package/dist/schemas/generated/alliance.generated.d.ts +15 -0
  133. package/dist/schemas/generated/alliance.generated.d.ts.map +1 -0
  134. package/dist/schemas/generated/assets.generated.d.ts +272 -0
  135. package/dist/schemas/generated/assets.generated.d.ts.map +1 -0
  136. package/dist/schemas/generated/calendar.generated.d.ts +41 -0
  137. package/dist/schemas/generated/calendar.generated.d.ts.map +1 -0
  138. package/dist/schemas/generated/character.generated.d.ts +670 -0
  139. package/dist/schemas/generated/character.generated.d.ts.map +1 -0
  140. package/dist/schemas/generated/clones.generated.d.ts +23 -0
  141. package/dist/schemas/generated/clones.generated.d.ts.map +1 -0
  142. package/dist/schemas/generated/contacts.generated.d.ts +50 -0
  143. package/dist/schemas/generated/contacts.generated.d.ts.map +1 -0
  144. package/dist/schemas/generated/contracts.generated.d.ts +162 -0
  145. package/dist/schemas/generated/contracts.generated.d.ts.map +1 -0
  146. package/dist/schemas/generated/corporation-projects.generated.d.ts +89 -0
  147. package/dist/schemas/generated/corporation-projects.generated.d.ts.map +1 -0
  148. package/dist/schemas/generated/corporation.generated.d.ts +1515 -0
  149. package/dist/schemas/generated/corporation.generated.d.ts.map +1 -0
  150. package/dist/schemas/generated/dogma.generated.d.ts +57 -0
  151. package/dist/schemas/generated/dogma.generated.d.ts.map +1 -0
  152. package/dist/schemas/generated/faction-warfare.generated.d.ts +155 -0
  153. package/dist/schemas/generated/faction-warfare.generated.d.ts.map +1 -0
  154. package/dist/schemas/generated/fittings.generated.d.ts +57 -0
  155. package/dist/schemas/generated/fittings.generated.d.ts.map +1 -0
  156. package/dist/schemas/generated/fleets.generated.d.ts +45 -0
  157. package/dist/schemas/generated/fleets.generated.d.ts.map +1 -0
  158. package/dist/schemas/generated/freelance-jobs.generated.d.ts +173 -0
  159. package/dist/schemas/generated/freelance-jobs.generated.d.ts.map +1 -0
  160. package/dist/schemas/generated/incursions.generated.d.ts +16 -0
  161. package/dist/schemas/generated/incursions.generated.d.ts.map +1 -0
  162. package/dist/schemas/generated/index.d.ts +33 -0
  163. package/dist/schemas/generated/index.d.ts.map +1 -0
  164. package/dist/schemas/generated/industry.generated.d.ts +117 -0
  165. package/dist/schemas/generated/industry.generated.d.ts.map +1 -0
  166. package/dist/schemas/generated/insurance.generated.d.ts +10 -0
  167. package/dist/schemas/generated/insurance.generated.d.ts.map +1 -0
  168. package/dist/schemas/generated/killmails.generated.d.ts +55 -0
  169. package/dist/schemas/generated/killmails.generated.d.ts.map +1 -0
  170. package/dist/schemas/generated/location.generated.d.ts +18 -0
  171. package/dist/schemas/generated/location.generated.d.ts.map +1 -0
  172. package/dist/schemas/generated/loyalty.generated.d.ts +18 -0
  173. package/dist/schemas/generated/loyalty.generated.d.ts.map +1 -0
  174. package/dist/schemas/generated/mail.generated.d.ts +68 -0
  175. package/dist/schemas/generated/mail.generated.d.ts.map +1 -0
  176. package/dist/schemas/generated/market.generated.d.ts +201 -0
  177. package/dist/schemas/generated/market.generated.d.ts.map +1 -0
  178. package/dist/schemas/generated/meta.generated.d.ts +26 -0
  179. package/dist/schemas/generated/meta.generated.d.ts.map +1 -0
  180. package/dist/schemas/generated/planetary-interaction.generated.d.ts +90 -0
  181. package/dist/schemas/generated/planetary-interaction.generated.d.ts.map +1 -0
  182. package/dist/schemas/generated/routes.generated.d.ts +5 -0
  183. package/dist/schemas/generated/routes.generated.d.ts.map +1 -0
  184. package/dist/schemas/generated/search.generated.d.ts +15 -0
  185. package/dist/schemas/generated/search.generated.d.ts.map +1 -0
  186. package/dist/schemas/generated/skills.generated.d.ts +32 -0
  187. package/dist/schemas/generated/skills.generated.d.ts.map +1 -0
  188. package/dist/schemas/generated/sovereignty.generated.d.ts +37 -0
  189. package/dist/schemas/generated/sovereignty.generated.d.ts.map +1 -0
  190. package/dist/schemas/generated/status.generated.d.ts +8 -0
  191. package/dist/schemas/generated/status.generated.d.ts.map +1 -0
  192. package/dist/schemas/generated/universe.generated.d.ts +394 -0
  193. package/dist/schemas/generated/universe.generated.d.ts.map +1 -0
  194. package/dist/schemas/generated/wallet.generated.d.ts +411 -0
  195. package/dist/schemas/generated/wallet.generated.d.ts.map +1 -0
  196. package/dist/schemas/generated/wars.generated.d.ts +31 -0
  197. package/dist/schemas/generated/wars.generated.d.ts.map +1 -0
  198. package/dist/schemas/market.d.ts +91 -4
  199. package/dist/schemas/market.d.ts.map +1 -1
  200. package/dist/schemas/pi.d.ts +3 -0
  201. package/dist/schemas/pi.d.ts.map +1 -1
  202. package/dist/schemas/sovereignty.d.ts +2 -0
  203. package/dist/schemas/sovereignty.d.ts.map +1 -1
  204. package/dist/schemas/universe.d.ts +11 -2
  205. package/dist/schemas/universe.d.ts.map +1 -1
  206. package/dist/schemas/wallet.d.ts +2 -0
  207. package/dist/schemas/wallet.d.ts.map +1 -1
  208. package/dist/testing/TestDataFactory.d.ts.map +1 -1
  209. package/dist/types/character.d.ts +2 -1
  210. package/dist/types/character.d.ts.map +1 -1
  211. package/dist/types/generated/spec-alignment.check.d.ts +9 -0
  212. package/dist/types/generated/spec-alignment.check.d.ts.map +1 -1
  213. package/dist/types/market.d.ts +7 -1
  214. package/dist/types/market.d.ts.map +1 -1
  215. package/package.json +235 -226
  216. package/dist/EsiClient.js +0 -251
  217. package/dist/EsiClientBuilder.js +0 -217
  218. package/dist/clients/AccessListsClient.js +0 -20
  219. package/dist/clients/AllianceClient.js +0 -72
  220. package/dist/clients/AssetsClient.js +0 -81
  221. package/dist/clients/BaseEsiClient.js +0 -40
  222. package/dist/clients/CalendarClient.js +0 -54
  223. package/dist/clients/CharacterClient.js +0 -149
  224. package/dist/clients/ClonesClient.js +0 -31
  225. package/dist/clients/ContactsClient.js +0 -104
  226. package/dist/clients/ContractsClient.js +0 -111
  227. package/dist/clients/CorporationsClient.js +0 -227
  228. package/dist/clients/DogmaClient.js +0 -55
  229. package/dist/clients/FactionClient.js +0 -79
  230. package/dist/clients/FittingsClient.js +0 -42
  231. package/dist/clients/FleetClient.js +0 -162
  232. package/dist/clients/FreelanceJobsClient.js +0 -76
  233. package/dist/clients/IncursionsClient.js +0 -19
  234. package/dist/clients/IndustryClient.js +0 -88
  235. package/dist/clients/InsuranceClient.js +0 -19
  236. package/dist/clients/KillmailsClient.js +0 -47
  237. package/dist/clients/LocationClient.js +0 -41
  238. package/dist/clients/LoyaltyClient.js +0 -30
  239. package/dist/clients/MailClient.js +0 -108
  240. package/dist/clients/MarketClient.js +0 -131
  241. package/dist/clients/MercenaryClient.js +0 -27
  242. package/dist/clients/MetaClient.js +0 -56
  243. package/dist/clients/PiClient.js +0 -51
  244. package/dist/clients/RouteClient.js +0 -24
  245. package/dist/clients/SearchClient.js +0 -22
  246. package/dist/clients/SkillsClient.js +0 -41
  247. package/dist/clients/SkyhooksClient.js +0 -35
  248. package/dist/clients/SovereigntyClient.js +0 -27
  249. package/dist/clients/StatusClient.js +0 -19
  250. package/dist/clients/UiClient.js +0 -58
  251. package/dist/clients/UniverseClient.js +0 -277
  252. package/dist/clients/WalletClient.js +0 -82
  253. package/dist/clients/WarsClient.js +0 -37
  254. package/dist/config/configManager.js +0 -47
  255. package/dist/config/jest/globalSetup.js +0 -7
  256. package/dist/config/jest/globalTeardown.js +0 -7
  257. package/dist/config/jest/jest.setup.js +0 -29
  258. package/dist/core/ApiClient.js +0 -123
  259. package/dist/core/ApiClientBuilder.js +0 -54
  260. package/dist/core/ApiRequestHandler.js +0 -444
  261. package/dist/core/BatchRequestHandler.js +0 -66
  262. package/dist/core/ClientRegistry.js +0 -116
  263. package/dist/core/EsiDiagnostics.js +0 -47
  264. package/dist/core/RequestDeduplicator.js +0 -26
  265. package/dist/core/cache/ETagCacheManager.js +0 -184
  266. package/dist/core/cache/ICache.js +0 -2
  267. package/dist/core/circuitBreaker/CircuitBreaker.js +0 -156
  268. package/dist/core/constants.js +0 -7
  269. package/dist/core/endpoints/EndpointDefinition.js +0 -2
  270. package/dist/core/endpoints/accessListEndpoints.js +0 -13
  271. package/dist/core/endpoints/allianceEndpoints.js +0 -34
  272. package/dist/core/endpoints/assetEndpoints.js +0 -51
  273. package/dist/core/endpoints/buildEndpointPath.js +0 -44
  274. package/dist/core/endpoints/calendarEndpoints.js +0 -35
  275. package/dist/core/endpoints/characterEndpoints.js +0 -104
  276. package/dist/core/endpoints/cloneEndpoints.js +0 -21
  277. package/dist/core/endpoints/contactEndpoints.js +0 -72
  278. package/dist/core/endpoints/contractEndpoints.js +0 -70
  279. package/dist/core/endpoints/corporationEndpoints.js +0 -161
  280. package/dist/core/endpoints/createClient.js +0 -175
  281. package/dist/core/endpoints/dogmaEndpoints.js +0 -40
  282. package/dist/core/endpoints/esi-cache-ttls.generated.js +0 -133
  283. package/dist/core/endpoints/esi-rate-limit-groups.generated.js +0 -153
  284. package/dist/core/endpoints/esi-scopes.generated.js +0 -135
  285. package/dist/core/endpoints/factionEndpoints.js +0 -57
  286. package/dist/core/endpoints/fittingEndpoints.js +0 -27
  287. package/dist/core/endpoints/fleetEndpoints.js +0 -101
  288. package/dist/core/endpoints/freelanceJobsEndpoints.js +0 -51
  289. package/dist/core/endpoints/incursionEndpoints.js +0 -13
  290. package/dist/core/endpoints/industryEndpoints.js +0 -61
  291. package/dist/core/endpoints/insuranceEndpoints.js +0 -13
  292. package/dist/core/endpoints/killmailEndpoints.js +0 -28
  293. package/dist/core/endpoints/locationEndpoints.js +0 -27
  294. package/dist/core/endpoints/loyaltyEndpoints.js +0 -21
  295. package/dist/core/endpoints/mailEndpoints.js +0 -68
  296. package/dist/core/endpoints/marketEndpoints.js +0 -84
  297. package/dist/core/endpoints/mercenaryEndpoints.js +0 -19
  298. package/dist/core/endpoints/metaEndpoints.js +0 -12
  299. package/dist/core/endpoints/piEndpoints.js +0 -36
  300. package/dist/core/endpoints/routeEndpoints.js +0 -14
  301. package/dist/core/endpoints/searchEndpoints.js +0 -14
  302. package/dist/core/endpoints/skillEndpoints.js +0 -29
  303. package/dist/core/endpoints/skyhookEndpoints.js +0 -25
  304. package/dist/core/endpoints/sovereigntyEndpoints.js +0 -19
  305. package/dist/core/endpoints/statusEndpoints.js +0 -12
  306. package/dist/core/endpoints/uiEndpoints.js +0 -39
  307. package/dist/core/endpoints/universeEndpoints.js +0 -210
  308. package/dist/core/endpoints/walletEndpoints.js +0 -50
  309. package/dist/core/endpoints/warEndpoints.js +0 -28
  310. package/dist/core/logger/ILogger.js +0 -2
  311. package/dist/core/logger/logger.js +0 -16
  312. package/dist/core/logger/loggerUtil.js +0 -30
  313. package/dist/core/middleware/Middleware.js +0 -42
  314. package/dist/core/pagination/AsyncPaginationIterator.js +0 -27
  315. package/dist/core/pagination/CursorPaginationHandler.js +0 -148
  316. package/dist/core/pagination/PaginationHandler.js +0 -115
  317. package/dist/core/rateLimiter/IRateLimiter.js +0 -2
  318. package/dist/core/rateLimiter/RateLimiter.js +0 -307
  319. package/dist/core/util/error.js +0 -122
  320. package/dist/core/util/headersUtil.js +0 -37
  321. package/dist/core/util/retry.js +0 -9
  322. package/dist/core/util/sleep.js +0 -6
  323. package/dist/core/util/stringUtil.js +0 -6
  324. package/dist/core/util/testHelpers.js +0 -9
  325. package/dist/core/util/validation.js +0 -52
  326. package/dist/schemas/access-lists.js +0 -14
  327. package/dist/schemas/alliance.js +0 -28
  328. package/dist/schemas/assets.js +0 -26
  329. package/dist/schemas/calendar.js +0 -43
  330. package/dist/schemas/character.js +0 -122
  331. package/dist/schemas/clones.js +0 -21
  332. package/dist/schemas/common.js +0 -34
  333. package/dist/schemas/contacts.js +0 -15
  334. package/dist/schemas/contracts.js +0 -58
  335. package/dist/schemas/corporation.js +0 -192
  336. package/dist/schemas/dogma.js +0 -42
  337. package/dist/schemas/faction-warfare.js +0 -92
  338. package/dist/schemas/fittings.js +0 -15
  339. package/dist/schemas/fleet.js +0 -48
  340. package/dist/schemas/freelance-jobs.js +0 -99
  341. package/dist/schemas/incursions.js +0 -14
  342. package/dist/schemas/index.js +0 -48
  343. package/dist/schemas/industry.js +0 -75
  344. package/dist/schemas/insurance.js +0 -12
  345. package/dist/schemas/killmails.js +0 -42
  346. package/dist/schemas/location.js +0 -20
  347. package/dist/schemas/loyalty.js +0 -20
  348. package/dist/schemas/mail.js +0 -38
  349. package/dist/schemas/market.js +0 -39
  350. package/dist/schemas/mercenary.js +0 -22
  351. package/dist/schemas/pi.js +0 -85
  352. package/dist/schemas/skills.js +0 -30
  353. package/dist/schemas/skyhooks.js +0 -30
  354. package/dist/schemas/sovereignty.js +0 -70
  355. package/dist/schemas/status.js +0 -10
  356. package/dist/schemas/universe.js +0 -245
  357. package/dist/schemas/wallet.js +0 -29
  358. package/dist/schemas/wars.js +0 -31
  359. package/dist/testing/TestDataFactory.js +0 -823
  360. package/dist/types/access-lists.js +0 -2
  361. package/dist/types/alliance.js +0 -2
  362. package/dist/types/api-responses.js +0 -73
  363. package/dist/types/assets.js +0 -2
  364. package/dist/types/branded.js +0 -6
  365. package/dist/types/calendar.js +0 -2
  366. package/dist/types/character.js +0 -2
  367. package/dist/types/clones.js +0 -2
  368. package/dist/types/common.js +0 -2
  369. package/dist/types/contacts.js +0 -2
  370. package/dist/types/contracts.js +0 -2
  371. package/dist/types/corporation.js +0 -2
  372. package/dist/types/dogma.js +0 -2
  373. package/dist/types/faction-warfare.js +0 -2
  374. package/dist/types/fittings.js +0 -2
  375. package/dist/types/fleet.js +0 -2
  376. package/dist/types/freelance-jobs.js +0 -2
  377. package/dist/types/generated/esi-spec.generated.js +0 -6
  378. package/dist/types/generated/spec-alignment.check.js +0 -14
  379. package/dist/types/incursions.js +0 -2
  380. package/dist/types/industry.js +0 -2
  381. package/dist/types/insurance.js +0 -2
  382. package/dist/types/killmails.js +0 -2
  383. package/dist/types/location.js +0 -2
  384. package/dist/types/loyalty.js +0 -2
  385. package/dist/types/mail.js +0 -2
  386. package/dist/types/market.js +0 -2
  387. package/dist/types/mercenary.js +0 -2
  388. package/dist/types/pi.js +0 -2
  389. package/dist/types/skills.js +0 -2
  390. package/dist/types/skyhooks.js +0 -2
  391. package/dist/types/sovereignty.js +0 -2
  392. package/dist/types/status.js +0 -2
  393. package/dist/types/universe.js +0 -2
  394. package/dist/types/wallet.js +0 -2
  395. package/dist/types/wars.js +0 -2
package/dist/EsiClient.js DELETED
@@ -1,251 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EsiClient = void 0;
7
- exports.getDefaultClient = getDefaultClient;
8
- const ApiClient_1 = require("./core/ApiClient");
9
- const ClientRegistry_1 = require("./core/ClientRegistry");
10
- const validation_1 = require("./core/util/validation");
11
- const ETagCacheManager_1 = require("./core/cache/ETagCacheManager");
12
- const CircuitBreaker_1 = require("./core/circuitBreaker/CircuitBreaker");
13
- const RateLimiter_1 = require("./core/rateLimiter/RateLimiter");
14
- const RequestDeduplicator_1 = require("./core/RequestDeduplicator");
15
- const EsiDiagnostics_1 = require("./core/EsiDiagnostics");
16
- const BatchRequestHandler_1 = require("./core/BatchRequestHandler");
17
- const logger_1 = __importDefault(require("./core/logger/logger"));
18
- class EsiClient {
19
- apiClient;
20
- clients = new Map();
21
- etagCacheEnabled;
22
- _diagnostics = null;
23
- deduplicator = null;
24
- constructor(config) {
25
- const token = config?.accessToken || process.env.ESI_ACCESS_TOKEN;
26
- const baseUrl = (0, validation_1.validateBaseUrl)(config?.baseUrl || process.env.ESI_BASE_URL || 'https://esi.evetech.net', config?.unsafeAllowCustomHost);
27
- this.apiClient = new ApiClient_1.ApiClient(config?.clientId || process.env.ESI_CLIENT_ID || 'esi-client', baseUrl, token);
28
- const datasource = config?.datasource ||
29
- process.env.ESI_DATASOURCE;
30
- if (datasource) {
31
- this.apiClient.setDatasource(datasource);
32
- }
33
- if (config?.language) {
34
- this.apiClient.setLanguage(config.language);
35
- }
36
- if (config?.timeout !== undefined) {
37
- this.apiClient.setTimeout(config.timeout);
38
- }
39
- if (config?.onTokenRefresh) {
40
- this.apiClient.setTokenProvider(config.onTokenRefresh);
41
- }
42
- this.apiClient.setRateLimiter(new RateLimiter_1.RateLimiter(config?.rateLimiterConfig));
43
- if (config?.enableRequestDeduplication !== false) {
44
- this.deduplicator = new RequestDeduplicator_1.RequestDeduplicator();
45
- this.apiClient.setDeduplicator(this.deduplicator);
46
- }
47
- this.etagCacheEnabled = config?.enableETagCache !== false;
48
- if (this.etagCacheEnabled) {
49
- this.apiClient.setCache(new ETagCacheManager_1.ETagCacheManager(config?.etagCacheConfig));
50
- }
51
- if (config?.enableCircuitBreaker) {
52
- this.apiClient.setCircuitBreaker(new CircuitBreaker_1.CircuitBreaker(config.circuitBreakerConfig));
53
- }
54
- if (config?.retryConfig) {
55
- this.apiClient.setRetryConfig(config.retryConfig);
56
- }
57
- else if (config?.retryAttempts !== undefined) {
58
- this.apiClient.setRetryConfig({ maxRetries: config.retryAttempts });
59
- }
60
- if (config?.requestInterceptors) {
61
- for (const interceptor of config.requestInterceptors) {
62
- this.apiClient.addRequestInterceptor(interceptor);
63
- }
64
- }
65
- if (config?.responseInterceptors) {
66
- for (const interceptor of config.responseInterceptors) {
67
- this.apiClient.addResponseInterceptor(interceptor);
68
- }
69
- }
70
- if (config?.validateResponse !== undefined) {
71
- this.apiClient.setValidateResponse(config.validateResponse);
72
- }
73
- logger_1.default.info('EsiClient initialized successfully');
74
- }
75
- getClient(name) {
76
- if (!this.clients.has(name)) {
77
- this.clients.set(name, (0, ClientRegistry_1.createClientInstance)(name, this.apiClient));
78
- }
79
- return this.clients.get(name);
80
- }
81
- // Domain client accessors
82
- get alliance() {
83
- return this.getClient('alliance');
84
- }
85
- get assets() {
86
- return this.getClient('assets');
87
- }
88
- get calendar() {
89
- return this.getClient('calendar');
90
- }
91
- get characters() {
92
- return this.getClient('characters');
93
- }
94
- get clones() {
95
- return this.getClient('clones');
96
- }
97
- get contacts() {
98
- return this.getClient('contacts');
99
- }
100
- get contracts() {
101
- return this.getClient('contracts');
102
- }
103
- get corporations() {
104
- return this.getClient('corporations');
105
- }
106
- get dogma() {
107
- return this.getClient('dogma');
108
- }
109
- get factions() {
110
- return this.getClient('factions');
111
- }
112
- get fittings() {
113
- return this.getClient('fittings');
114
- }
115
- get fleets() {
116
- return this.getClient('fleets');
117
- }
118
- get incursions() {
119
- return this.getClient('incursions');
120
- }
121
- get industry() {
122
- return this.getClient('industry');
123
- }
124
- get insurance() {
125
- return this.getClient('insurance');
126
- }
127
- get killmails() {
128
- return this.getClient('killmails');
129
- }
130
- get location() {
131
- return this.getClient('location');
132
- }
133
- get loyalty() {
134
- return this.getClient('loyalty');
135
- }
136
- get mail() {
137
- return this.getClient('mail');
138
- }
139
- get market() {
140
- return this.getClient('market');
141
- }
142
- get pi() {
143
- return this.getClient('pi');
144
- }
145
- get route() {
146
- return this.getClient('route');
147
- }
148
- get search() {
149
- return this.getClient('search');
150
- }
151
- get skills() {
152
- return this.getClient('skills');
153
- }
154
- get sovereignty() {
155
- return this.getClient('sovereignty');
156
- }
157
- get status() {
158
- return this.getClient('status');
159
- }
160
- get ui() {
161
- return this.getClient('ui');
162
- }
163
- get universe() {
164
- return this.getClient('universe');
165
- }
166
- get wallet() {
167
- return this.getClient('wallet');
168
- }
169
- get wars() {
170
- return this.getClient('wars');
171
- }
172
- get meta() {
173
- return this.getClient('meta');
174
- }
175
- get freelanceJobs() {
176
- return this.getClient('freelanceJobs');
177
- }
178
- get skyhooks() {
179
- return this.getClient('skyhooks');
180
- }
181
- get mercenary() {
182
- return this.getClient('mercenary');
183
- }
184
- get accessLists() {
185
- return this.getClient('accessLists');
186
- }
187
- addRequestInterceptor(fn) {
188
- return this.apiClient.addRequestInterceptor(fn);
189
- }
190
- addResponseInterceptor(fn) {
191
- return this.apiClient.addResponseInterceptor(fn);
192
- }
193
- setAccessToken(token) {
194
- this.apiClient.setAccessToken(token);
195
- logger_1.default.info('Access token updated');
196
- }
197
- setTokenProvider(provider) {
198
- this.apiClient.setTokenProvider(provider);
199
- logger_1.default.info(provider ? 'Token provider configured' : 'Token provider removed');
200
- }
201
- get diagnostics() {
202
- if (!this._diagnostics) {
203
- this._diagnostics = new EsiDiagnostics_1.EsiDiagnostics(this.apiClient, this.etagCacheEnabled, this.deduplicator);
204
- }
205
- return this._diagnostics;
206
- }
207
- getCacheStats() {
208
- return this.diagnostics.getCacheStats();
209
- }
210
- clearCache() {
211
- this.diagnostics.clearCache();
212
- }
213
- updateCacheConfig(newConfig) {
214
- this.diagnostics.updateCacheConfig(newConfig);
215
- }
216
- getCircuitBreakerStats() {
217
- return this.diagnostics.getCircuitBreakerStats();
218
- }
219
- resetCircuitBreaker(endpoint) {
220
- this.diagnostics.resetCircuitBreaker(endpoint);
221
- }
222
- async batch(keys, fetcher, options) {
223
- return (0, BatchRequestHandler_1.batchFetch)(keys, fetcher, options);
224
- }
225
- async batchPost(ids, poster, chunkSize) {
226
- return (0, BatchRequestHandler_1.batchPost)(ids, poster, chunkSize);
227
- }
228
- shutdown() {
229
- const cache = this.apiClient.getCache();
230
- if (cache) {
231
- cache.shutdown();
232
- }
233
- const cb = this.apiClient.getCircuitBreaker();
234
- if (cb) {
235
- cb.shutdown();
236
- }
237
- if (this.deduplicator) {
238
- this.deduplicator.clear();
239
- }
240
- this.clients.clear();
241
- logger_1.default.info('EsiClient shutdown completed');
242
- }
243
- }
244
- exports.EsiClient = EsiClient;
245
- let _defaultClient = null;
246
- function getDefaultClient() {
247
- if (!_defaultClient) {
248
- _defaultClient = new EsiClient();
249
- }
250
- return _defaultClient;
251
- }
@@ -1,217 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EsiClientBuilder = exports.EsiApiFactory = exports.CustomEsiClient = void 0;
7
- const ApiClient_1 = require("./core/ApiClient");
8
- const RateLimiter_1 = require("./core/rateLimiter/RateLimiter");
9
- const validation_1 = require("./core/util/validation");
10
- const ClientRegistry_1 = require("./core/ClientRegistry");
11
- const logger_1 = __importDefault(require("./core/logger/logger"));
12
- class CustomEsiClient {
13
- apiClient;
14
- clients = new Map();
15
- enabledClients;
16
- constructor(config) {
17
- this.enabledClients = new Set(config.clients);
18
- const baseUrl = (0, validation_1.validateBaseUrl)(config.baseUrl || process.env.ESI_BASE_URL || 'https://esi.evetech.net', config.unsafeAllowCustomHost);
19
- this.apiClient = new ApiClient_1.ApiClient(config.clientId || process.env.ESI_CLIENT_ID || 'esi-custom-client', baseUrl, config.accessToken || process.env.ESI_ACCESS_TOKEN);
20
- this.apiClient.setRateLimiter(new RateLimiter_1.RateLimiter());
21
- for (const name of this.enabledClients) {
22
- this.clients.set(name, (0, ClientRegistry_1.createClientInstance)(name, this.apiClient));
23
- }
24
- logger_1.default.info(`CustomEsiClient initialized with clients: ${config.clients.join(', ')}`);
25
- }
26
- getClient(clientType) {
27
- return this.clients.get(clientType);
28
- }
29
- hasClient(clientType) {
30
- return this.clients.has(clientType);
31
- }
32
- getEnabledClients() {
33
- return Array.from(this.enabledClients);
34
- }
35
- get alliance() {
36
- return this.getClient('alliance');
37
- }
38
- get assets() {
39
- return this.getClient('assets');
40
- }
41
- get calendar() {
42
- return this.getClient('calendar');
43
- }
44
- get characters() {
45
- return this.getClient('characters');
46
- }
47
- get clones() {
48
- return this.getClient('clones');
49
- }
50
- get contacts() {
51
- return this.getClient('contacts');
52
- }
53
- get contracts() {
54
- return this.getClient('contracts');
55
- }
56
- get corporations() {
57
- return this.getClient('corporations');
58
- }
59
- get dogma() {
60
- return this.getClient('dogma');
61
- }
62
- get factions() {
63
- return this.getClient('factions');
64
- }
65
- get fittings() {
66
- return this.getClient('fittings');
67
- }
68
- get fleets() {
69
- return this.getClient('fleets');
70
- }
71
- get incursions() {
72
- return this.getClient('incursions');
73
- }
74
- get industry() {
75
- return this.getClient('industry');
76
- }
77
- get insurance() {
78
- return this.getClient('insurance');
79
- }
80
- get killmails() {
81
- return this.getClient('killmails');
82
- }
83
- get location() {
84
- return this.getClient('location');
85
- }
86
- get loyalty() {
87
- return this.getClient('loyalty');
88
- }
89
- get mail() {
90
- return this.getClient('mail');
91
- }
92
- get market() {
93
- return this.getClient('market');
94
- }
95
- get pi() {
96
- return this.getClient('pi');
97
- }
98
- get route() {
99
- return this.getClient('route');
100
- }
101
- get search() {
102
- return this.getClient('search');
103
- }
104
- get skills() {
105
- return this.getClient('skills');
106
- }
107
- get sovereignty() {
108
- return this.getClient('sovereignty');
109
- }
110
- get status() {
111
- return this.getClient('status');
112
- }
113
- get ui() {
114
- return this.getClient('ui');
115
- }
116
- get universe() {
117
- return this.getClient('universe');
118
- }
119
- get wallet() {
120
- return this.getClient('wallet');
121
- }
122
- get wars() {
123
- return this.getClient('wars');
124
- }
125
- get meta() {
126
- return this.getClient('meta');
127
- }
128
- get freelanceJobs() {
129
- return this.getClient('freelanceJobs');
130
- }
131
- get skyhooks() {
132
- return this.getClient('skyhooks');
133
- }
134
- get mercenary() {
135
- return this.getClient('mercenary');
136
- }
137
- get accessLists() {
138
- return this.getClient('accessLists');
139
- }
140
- shutdown() {
141
- this.clients.clear();
142
- logger_1.default.info('CustomEsiClient shutdown completed');
143
- }
144
- }
145
- exports.CustomEsiClient = CustomEsiClient;
146
- class EsiApiFactory {
147
- static createAllianceClient(config) {
148
- return (0, ClientRegistry_1.createClientInstance)('alliance', this.buildApiClient(config));
149
- }
150
- static createCharacterClient(config) {
151
- return (0, ClientRegistry_1.createClientInstance)('characters', this.buildApiClient(config));
152
- }
153
- static createCorporationClient(config) {
154
- return (0, ClientRegistry_1.createClientInstance)('corporations', this.buildApiClient(config));
155
- }
156
- static createMarketClient(config) {
157
- return (0, ClientRegistry_1.createClientInstance)('market', this.buildApiClient(config));
158
- }
159
- static createUniverseClient(config) {
160
- return (0, ClientRegistry_1.createClientInstance)('universe', this.buildApiClient(config));
161
- }
162
- static createFleetClient(config) {
163
- return (0, ClientRegistry_1.createClientInstance)('fleets', this.buildApiClient(config));
164
- }
165
- static createAssetsClient(config) {
166
- return (0, ClientRegistry_1.createClientInstance)('assets', this.buildApiClient(config));
167
- }
168
- static createWalletClient(config) {
169
- return (0, ClientRegistry_1.createClientInstance)('wallet', this.buildApiClient(config));
170
- }
171
- static createMailClient(config) {
172
- return (0, ClientRegistry_1.createClientInstance)('mail', this.buildApiClient(config));
173
- }
174
- static createClient(clientType, config) {
175
- return (0, ClientRegistry_1.createClientInstance)(clientType, this.buildApiClient(config));
176
- }
177
- static buildApiClient(config) {
178
- const baseUrl = (0, validation_1.validateBaseUrl)(config?.baseUrl || process.env.ESI_BASE_URL || 'https://esi.evetech.net', config?.unsafeAllowCustomHost);
179
- const client = new ApiClient_1.ApiClient(config?.clientId || process.env.ESI_CLIENT_ID || 'esi-standalone-client', baseUrl, config?.accessToken || process.env.ESI_ACCESS_TOKEN);
180
- client.setRateLimiter(new RateLimiter_1.RateLimiter());
181
- return client;
182
- }
183
- }
184
- exports.EsiApiFactory = EsiApiFactory;
185
- class EsiClientBuilder {
186
- clients = [];
187
- config = {};
188
- addClient(clientType) {
189
- if (!this.clients.includes(clientType)) {
190
- this.clients.push(clientType);
191
- }
192
- return this;
193
- }
194
- addClients(clientTypes) {
195
- clientTypes.forEach((type) => this.addClient(type));
196
- return this;
197
- }
198
- withConfig(config) {
199
- this.config = { ...this.config, ...config };
200
- return this;
201
- }
202
- withClientId(clientId) {
203
- this.config.clientId = clientId;
204
- return this;
205
- }
206
- withAccessToken(accessToken) {
207
- this.config.accessToken = accessToken;
208
- return this;
209
- }
210
- build() {
211
- if (this.clients.length === 0) {
212
- throw new Error('At least one client type must be specified');
213
- }
214
- return new CustomEsiClient({ ...this.config, clients: this.clients });
215
- }
216
- }
217
- exports.EsiClientBuilder = EsiClientBuilder;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccessListsClient = void 0;
4
- const BaseEsiClient_1 = require("./BaseEsiClient");
5
- const accessListEndpoints_1 = require("../core/endpoints/accessListEndpoints");
6
- class AccessListsClient extends BaseEsiClient_1.BaseEsiClient {
7
- constructor(client) {
8
- super(client, accessListEndpoints_1.accessListEndpoints);
9
- }
10
- /**
11
- * Retrieves the contents of an access list (ACL) including all character, corporation, and alliance entries.
12
- *
13
- * @param accessListId - The ID of the access list to retrieve
14
- * @returns The access list with its entries
15
- */
16
- getAccessList(accessListId) {
17
- return this.api.getAccessList(accessListId);
18
- }
19
- }
20
- exports.AccessListsClient = AccessListsClient;
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AllianceClient = void 0;
4
- const BaseEsiClient_1 = require("./BaseEsiClient");
5
- const createClient_1 = require("../core/endpoints/createClient");
6
- const allianceEndpoints_1 = require("../core/endpoints/allianceEndpoints");
7
- const contactEndpoints_1 = require("../core/endpoints/contactEndpoints");
8
- class AllianceClient extends BaseEsiClient_1.BaseEsiClient {
9
- contactApi;
10
- constructor(client) {
11
- super(client, allianceEndpoints_1.allianceEndpoints);
12
- this.contactApi = (0, createClient_1.createClient)(client, contactEndpoints_1.contactEndpoints);
13
- }
14
- /**
15
- * Retrieve public information about an alliance.
16
- *
17
- * @param allianceId - The ID of the alliance to look up
18
- * @returns Public alliance information including name, ticker, and founding date
19
- */
20
- getAllianceById(allianceId) {
21
- return this.api.getAllianceById(allianceId);
22
- }
23
- /**
24
- * Retrieve contacts for an alliance.
25
- *
26
- * @deprecated Use ContactsClient.getAllianceContacts() instead
27
- * @param allianceId - The ID of the alliance whose contacts to retrieve
28
- * @returns A list of alliance contacts with standings and contact types
29
- * @requires Authentication
30
- */
31
- getContacts(allianceId) {
32
- return this.contactApi.getAllianceContacts(allianceId);
33
- }
34
- /**
35
- * Retrieve custom contact labels for an alliance.
36
- *
37
- * @deprecated Use ContactsClient.getAllianceContactLabels() instead
38
- * @param allianceId - The ID of the alliance whose contact labels to retrieve
39
- * @returns A list of custom labels used to categorize alliance contacts
40
- * @requires Authentication
41
- */
42
- getContactLabels(allianceId) {
43
- return this.contactApi.getAllianceContactLabels(allianceId);
44
- }
45
- /**
46
- * Retrieve the list of corporation IDs that are members of an alliance.
47
- *
48
- * @param allianceId - The ID of the alliance whose member corporations to retrieve
49
- * @returns An array of corporation IDs belonging to the alliance
50
- */
51
- getCorporations(allianceId) {
52
- return this.api.getCorporations(allianceId);
53
- }
54
- /**
55
- * Retrieve icon URLs for an alliance.
56
- *
57
- * @param allianceId - The ID of the alliance whose icons to retrieve
58
- * @returns Icon URLs at various resolutions for the alliance
59
- */
60
- getIcons(allianceId) {
61
- return this.api.getIcons(allianceId);
62
- }
63
- /**
64
- * Retrieve a list of all active alliance IDs in EVE Online.
65
- *
66
- * @returns An array of all active alliance IDs
67
- */
68
- getAlliances() {
69
- return this.api.getAlliances();
70
- }
71
- }
72
- exports.AllianceClient = AllianceClient;
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssetsClient = void 0;
4
- const BaseEsiClient_1 = require("./BaseEsiClient");
5
- const assetEndpoints_1 = require("../core/endpoints/assetEndpoints");
6
- class AssetsClient extends BaseEsiClient_1.BaseEsiClient {
7
- constructor(client) {
8
- super(client, assetEndpoints_1.assetEndpoints);
9
- }
10
- /**
11
- * Retrieve a list of assets owned by a character.
12
- *
13
- * @param characterId - The ID of the character whose assets to retrieve
14
- * @returns A list of the character's assets including type, quantity, and location
15
- * @requires Authentication
16
- */
17
- getCharacterAssets(characterId) {
18
- return this.api.getCharacterAssets(characterId);
19
- }
20
- /**
21
- * Look up the locations of specific assets owned by a character via a bulk POST request.
22
- *
23
- * @param characterId - The ID of the character who owns the assets
24
- * @param itemIds - An array of item IDs to look up locations for
25
- * @returns Location information for each requested asset
26
- * @requires Authentication
27
- */
28
- postCharacterAssetLocations(characterId, itemIds) {
29
- return this.api.postCharacterAssetLocations(characterId, itemIds);
30
- }
31
- /**
32
- * Look up the names of specific assets owned by a character via a bulk POST request.
33
- *
34
- * @param characterId - The ID of the character who owns the assets
35
- * @param itemIds - An array of item IDs to look up names for
36
- * @returns The user-assigned names for each requested asset
37
- * @requires Authentication
38
- */
39
- postCharacterAssetNames(characterId, itemIds) {
40
- return this.api.postCharacterAssetNames(characterId, itemIds);
41
- }
42
- /**
43
- * Retrieve a list of assets owned by a corporation.
44
- *
45
- * @param corporationId - The ID of the corporation whose assets to retrieve
46
- * @returns A list of the corporation's assets including type, quantity, and location
47
- * @requires Authentication
48
- */
49
- getCorporationAssets(corporationId) {
50
- return this.api.getCorporationAssets(corporationId);
51
- }
52
- /**
53
- * Look up the locations of specific assets owned by a corporation via a bulk POST request.
54
- *
55
- * @param corporationId - The ID of the corporation that owns the assets
56
- * @param itemIds - An array of item IDs to look up locations for
57
- * @returns Location information for each requested asset
58
- * @requires Authentication
59
- */
60
- postCorporationAssetLocations(corporationId, itemIds) {
61
- return this.api.postCorporationAssetLocations(corporationId, itemIds);
62
- }
63
- /**
64
- * Look up the names of specific assets owned by a corporation via a bulk POST request.
65
- *
66
- * @param corporationId - The ID of the corporation that owns the assets
67
- * @param itemIds - An array of item IDs to look up names for
68
- * @returns The user-assigned names for each requested asset
69
- * @requires Authentication
70
- */
71
- postCorporationAssetNames(corporationId, itemIds) {
72
- return this.api.postCorporationAssetNames(corporationId, itemIds);
73
- }
74
- streamCharacterAssets(characterId) {
75
- return this.streamEndpoint('getCharacterAssets', characterId);
76
- }
77
- streamCorporationAssets(corporationId) {
78
- return this.streamEndpoint('getCorporationAssets', corporationId);
79
- }
80
- }
81
- exports.AssetsClient = AssetsClient;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseEsiClient = void 0;
4
- const createClient_1 = require("../core/endpoints/createClient");
5
- const buildEndpointPath_1 = require("../core/endpoints/buildEndpointPath");
6
- const AsyncPaginationIterator_1 = require("../core/pagination/AsyncPaginationIterator");
7
- class BaseEsiClient {
8
- api;
9
- _client;
10
- _endpoints;
11
- _metaApi;
12
- _safeApi;
13
- constructor(client, endpoints) {
14
- this._client = client;
15
- this._endpoints = endpoints;
16
- this.api = (0, createClient_1.createClient)(client, endpoints);
17
- }
18
- streamEndpoint(endpointName, ...args) {
19
- const def = this._endpoints[endpointName];
20
- const { path, body } = (0, buildEndpointPath_1.buildEndpointPath)(def, args, this._client.getDatasource());
21
- return (0, AsyncPaginationIterator_1.fetchPages)(this._client, path, def.method, def.requiresAuth, body);
22
- }
23
- withMetadata() {
24
- if (!this._metaApi) {
25
- this._metaApi = (0, createClient_1.createClient)(this._client, this._endpoints, {
26
- returnMetadata: true,
27
- });
28
- }
29
- return this._metaApi;
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
- }
39
- }
40
- exports.BaseEsiClient = BaseEsiClient;