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

@jeeny/jeeny-js-sdk

v1.0.11

Published

JavaScript SDK for the Jeeny API (inventory, procurement, manufacturing)

Readme

The jeeny-js-sdk package provides an intuitive and typesafe way to interact with the Jeeny API.

🏠 Jeeny.com

What is Jeeny?

Jeeny is a warehouse management system and enterprise resource planning API. It is a headless system for procurement, inventory, standard operating procedures, manufacturing, and fulfillment. Without replacing your current systems you can extend, enhance, and embed in order to create the customizations your teams need.

Table of contents

Why use this?

The Jeeny JavaScript/TypeScript SDK provides a few advantages over rolling your own API layer.

  1. Autocomplete - a self-documenting API that provides tree-like access to the API, showcasing all available queries and mutations in your IDE
  2. Validation - see errors in your code before compiling with validation that always matches our latest spec
  3. Inline documentation - view property and record documentation in your IDE
  4. Up-to-date - always have access to the latest features

Installation

yarn add @jeeny/jeeny-js-sdk
npm install @jeeny/jeeny-js-sdk

Authentication

When you first import the Jeeny class you will need to authenticate with your companyId and API key.

You can get your free API key from the Jeeny Hub under the Headless menu.

Import

import { Jeeny } from "@jeeny/jeeny-js-sdk";

const jeeny = new Jeeny({
  apiKey: TOKEN,
  companyId: COMPANY_ID,
});

Adding default user information

You can set a default user string to send to Jeeny. This default user string will be added to records in places like createdBy, updatedBy, etc.

import { Jeeny } from "@jeeny/jeeny-js-sdk";

const jeeny = new Jeeny({
  apiKey: TOKEN,
  companyId: COMPANY_ID,
  user: "oracle_application"
});

Setting the user

At any point in time you can change the user string that is sent to Jeeny. This can be useful if are going to authenticate users before they can access your application. For the best experience, you should match your userIds with users created in the Jeeny system and pass a Jeeny userId. This lets the Jeeny system add more information to records and provide better indexing and querying.

You can create users in the Jeeny Hub.

jeeny.setUser("test-user");

Usage

This SDK was built in TypeScript (but works great with JavaScript too). It is fully typed and meant to be self-documenting. This means that autocomplete will provide all available query and mutation options to you. Properties will have inline documentation that matches our GraphQL introspection. Validation is built-in so that you can't pass incorrect objects to endpoints.

It's a wrapper around the Jeeny API and so our official API documentation can provide further insight into using this SDK. You can also see a complete API reference in a single page if that's easier for you.

import { Jeeny } from "@jeeny/jeeny-js-sdk";

const newItem = await jeeny.items.createItem({
  data: {
    status: "active",
    name: "Wooden block",
    partNumber: "ABC-123",
  },
});

const id = newItem.createItem?.id ?? "";

console.log(`Created a new item with id ${newItem.createItem?.id}`);

const existingItem = await jeeny.items.getItem({ id });

console.log("Existing item", existingItem.getItem);

Available queries and mutations

The following top level record types are available. The links below will take you to the official API documentation that will display all available queries and mutations for that specific record type.

| Record | Record associations | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | jeeny.apps | App | | jeeny.arrivals | Arrival, ArrivalDetails, ArrivalRelease, ArrivalDelivery, ArrivalLineItem, ArrivalReleaseLineItem, ArrivalDeliveryLineItem | | jeeny.bids | BidRequest, Bid, BidRequestLineItem, BidLineItem | | jeeny.companies | Company | | jeeny.companyUsers | CompanyUser | | jeeny.departures | Departure, DeparturePickList, DeparturePick, DepartureLineItem, DeparturePickListLineItem, DeparturePickLineItem | | jeeny.devices | Device | | jeeny.dynamicContainers | DynamicContainer | | jeeny.events | Event | | jeeny.facilities | Facility, FacilityDetails | | jeeny.facilityItems | FacilityItem | | jeeny.instructions | InstructionTemplate, InstructionExecution, InstructionSubject | | jeeny.inventoryAreas | StorageInventoryArea | | jeeny.inventoryRecords | InventoryRecord, InventoryLog | | jeeny.items | Item, ItemDetails | | jeeny.itemGroups | ItemGroup | | jeeny.kiosks | Kiosk | | jeeny.kits | KitTemplate, KitTemplatePart, KitTemplatePartOption, KitTemplateTree, KitTemplateBomEntry | | jeeny.operators | Operator, SafeOperator | | jeeny.products | Product | | jeeny.staticItemLocations | ItemStorageInventoryAreaLocation, ItemStorageInventoryAreaRule | | jeeny.storageInventories | StorageInventory | | jeeny.storageLocations | StorageInventoryAreaLocation, StorageInventoryAreaLocationPayload | | jeeny.suppliers | Supplier | | jeeny.supplierItems | SupplierItem | | jeeny.teams | Team |

Error handling

Errors can easily be caught and acted upon. The error message will tell you what went wrong - typically it is a validation issue from incorrect user input.

  const newItem = await jeeny.items
    .createItem({
      data: {
        status: "active",
        name: "Wooden block",
        partNumber: "ABC-123",
      },
    })
    .catch((e) => {
      console.log(e.response.errors);
    });

or

try {
  const newItem = await jeeny.items
    .createItem({
      data: {
        status: "active",
        name: "Wooden block",
        partNumber: "ABC-123",
      },
    })
} catch (e) {
  console.log(e.response.errors);
}

The errors object looks like this and can hold multiple errors:

 [
  {
    message: 'Variable "$data" got invalid value { status: "active", partNumber: "ABC-123" }; Field "name" of required type "String!" was not provided.',
    extensions: { code: 'BAD_USER_INPUT', exception: [Object] }
  }
]

React SDK

If you're building a UI in React we have a great SDK that lets the API fade into the background. Table, form, and action components are provided (fully typed and validated). Check it out here.

Author

👤 Jeeny

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2023 Jeeny. This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator