npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

eve-esi-types

v3.2.7

Published

Extracted the main type of ESI. use for ESI request response types (version 2 only)

Readme

eve-esi-types

Extracted main types of ESI (EVE Swagger Interface). This package is designed to handle ESI request and response types effectively.


Table of Contents

  1. Overview
  2. Installation
  3. Usage
  4. API Overview
  5. Version Highlights
  6. References

Overview

eve-esi-types helps developers interact with the EVE Online ESI API while leveraging strong TypeScript typings.

This package ensures type safety for ESI request parameters, response handling, and authentication requirements.


Installation

npm install eve-esi-types

Usage

This package is configured to use ESI version 2 by default.
If you need to work with version 1, refer to the v1 branch.

Example Usage

A sample script, request-v3.mjs, is provided.

node request-v3.mjs

API Overview

The core export of this package is the TESIRequestFunctionSignature2 type. It specifies the required endpoint,

HTTP method, query parameters, OAuth requirement, and response type for ESI requests.

Main Function Signature

type TESIRequestFunctionSignature2<ActualOpt extends Record<string, unknown>> = <
  Mtd extends TESIEntryMethod,
  REP extends ReplacePathParams<ESIEndpointOf<Mtd>> | ESIEndpointOf<Mtd>,
  EPO extends ResolvedEndpoint<Mtd, REP>,
  Params extends ResolveEndpointParameters<Mtd, REP, EPO, ActualOpt>,
  Opt extends Params["finalOptions"]
>(
  method: Mtd,
  endpoint: REP,
  ...options: Params["optionIsRequire"] extends 1 ? [Opt] : [Opt?]
) => Promise<Params["result"]>;

Authentication via Environment Variable (v3.2.7+)

You can enable authenticated requests by setting the environment variable OAUTH_TOKEN (for testing):

export OAUTH_TOKEN=<Your Access Token>

Version Highlights

v3.2.7

  • Added support for specifying the OAUTH_TOKEN environment variable.
  • Allows authenticated tests to run successfully by providing an OAuth access token.

v3.0.0

  • Renamed TESIRequestFunctionSignature to TESIRequestFunctionSignature2.
  • Improved endpoint inference (RealEP and EP) for better TypeScript type safety.

New API Example

Reusable, narrowing-focused API request using decoreateESIRequestBody:

import * as taggedApi from "eve-esi-types/lib/tagged-request-api.mjs";

const esiRequest = taggedApi.decoreateESIRequestBody(...);
const response = await esiRequest.universe.get("/universe/structures/", { query: { filter: "market" } });

Other Renamed Signatures

  • IESIRequestFunction -> IESIRequestFunction2
  • TESIRequestFunctionMethods -> TESIRequestFunctionMethods2

v2.3.0

  • Introduced intuitive ESI request handling via ESI Tagged Types.
  • Deprecated injectESIRequestBody in favor of decoreateESIRequestBody in later versions.

Minimal default implementation:

import { esi } from "eve-esi-types/lib/tagged-request-api.mjs";
const response = await esi.universe.get("/universe/structures/", { query: { filter: "market" } });

References


Have questions or issues? Feel free to explore the GitHub repository or open an issue!