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 🙏

© 2026 – Pkg Stats / Ryan Hefner

lever-js

v0.1.9

Published

Unofficial JS SDK for Lever API

Readme

lever-js

lever-js is a lightweight, strongly-typed TypeScript client for the Lever Recruiting API. It provides out-of-the-box endpoint functions, built-in Basic Auth, and full type safety—no runtime URL builders or manual fetch calls required.

Disclaimer: This is not an official Lever product. It is a community-driven open-source project. This README was generated with ChatGPT 04-mini-high.


🚀 Installation

Install via npm or yarn:

npm install lever-js
# or
yarn add lever-js
# or
pnpm add lever-js

📦 Package Contents

  • ROOT: Base URL (https://api.lever.co/v1)
  • Endpoint functions: Predefined functions like listApplications, retrieveOpportunity, createOpportunity, etc.
  • Core types:
    • HttpMethod
    • ListQuery
    • ListResponse<T>
    • Response<T>
    • Resource interfaces (Application, Opportunity, Interview, etc.)

🔒 Note: The internal createEndpoint factory is not exposed—only the curated endpoint functions are available for import.


🔑 Authentication

All endpoint functions accept your API key as the first argument and handle Basic Auth for you:

const apiKey = 'your-lever-api-key';

📋 Usage

Import just the functions and types you need:

import {
	listApplications,
	retrieveApplication,
	createOpportunity,
	type ListQuery,
	type ListResponse,
	type Application,
	type Opportunity,
} from 'lever-js';

Listing Applications

async function fetchAllApplications(apiKey: string, oppId: string) {
	const response = await listApplications(apiKey, {
		params: { opportunity: oppId },
		query: { limit: 50 },
	});

	console.log(response.data); // Application[]
	if (response.hasNext) {
		console.log('Next cursor:', response.next);
	}
}

Retrieving a Single Application

async function getApplication(apiKey: string, oppId: string, appId: string) {
	const response = await retrieveApplication(apiKey, {
		params: { opportunity: oppId, application: appId },
	});
	console.log(response.data); // Application
}

Creating an Opportunity

import {
	createOpportunity,
	type CreateOpportunityBody,
	type Response,
	type Opportunity,
} from 'lever-js';

async function newOpportunity(apiKey: string) {
	const body: CreateOpportunityBody = {
		name: 'Jane Doe',
		headline: 'Acme Corp, University of XYZ',
		location: 'San Francisco, CA',
		emails: ['[email protected]'],
		links: ['https://linkedin.com/in/janedoe'],
		tags: ['Marketing', 'Remote'],
		sources: ['linkedin'],
		origin: 'sourced',
		postings: ['f2f01e16-27f8-4711-a728-7d49499795a0'],
	};

	const resp = await createOpportunity(apiKey, {
		params: {},
		query: { perform_as: 'user-id' },
		body,
	});
	console.log('Created ID:', (resp as Response<Opportunity>).data.id);
}

🛠️ Available Endpoints

Below is a non-exhaustive list of what’s exposed. For full coverage, check the package’s TypeScript definitions.

  • Applications: listApplications, retrieveApplication, createApplication (alias for applyToPosting)
  • Opportunities: listOpportunities, retrieveOpportunity, createOpportunity, updateOpportunityStage, updateOpportunityArchivedState, addContactLinksByOpportunity, removeContactLinksByOpportunity, addOpportunityTags, removeOpportunityTags, addOpportunitySources, removeOpportunitySources
  • Interviews: listInterviews, retrieveInterview, createInterview, updateInterview, deleteInterview
  • Notes: listNotes, retrieveNote, createNote, updateNote, deleteNote
  • Panels / Meta: getStages, getStage, getTags

...and more!


🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/XYZ)
  3. Commit your changes (git commit -m 'feat: add ...')
  4. Push to the branch (git push origin feature/XYZ)
  5. Open a Pull Request

We welcome additions like new endpoint definitions, bug fixes, and improved types!


👤 Author

Isaac Smith

📄 License

Distributed under the MIT License. See LICENSE for details.