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

jassi-platform-sdk

v0.1.0

Published

Official JS/Node SDK for the JASSI Platform API — reward users with JASSI tokens from your own app or website.

Downloads

142

Readme

jassi-platform-sdk

Official JS/Node SDK for the JASSI Platform API. Reward your users with JASSI tokens from your own website, app, or backend — without hand-rolling HTTP calls.

npm version

Install

npm install jassi-platform-sdk

Requires Node 18 or later. Ships as pure ESM with a bundled TypeScript declaration file — no build step required.

Quick start

import { createClient } from "jassi-platform-sdk";

const jassi = createClient({
  apiKey: process.env.JASSI_API_KEY, // sk_test_... or sk_live_...
  baseUrl: "https://yourapp.example.com/api",
});

// Define a rewardable action once (idempotent to re-run; skip if it already exists)
await jassi.createAction({ name: "newsletter_signup", rewardAmount: 50 });

// Reward a user when they complete that action
const event = await jassi.submitEvent({
  action: "newsletter_signup",
  identifier: "[email protected]",
  idempotencyKey: "[email protected]", // use your own unique id
});

console.log(event.status); // "approved" | "pending" | "unclaimed" | "rejected"

Auth

Use either a static secret API key (simplest):

createClient({ apiKey: "sk_live_...", baseUrl: "..." });

...or OAuth2 client-credentials (the SDK fetches and auto-refreshes the access token):

createClient({ clientId: "coid_live_...", clientSecret: "cs_live_...", baseUrl: "..." });

Both are created from the Business Dashboard → Developer tab.

API

  • getBalance() — current JASSI balance available to spend on rewards.
  • listActions() / createAction(input) — manage rewardable actions.
  • lookupUser(identifier) — check whether an identifier (email) has a JASSI account.
  • submitEvent(input) — reward a user for completing an action. Always pass your own idempotencyKey derived from something unique on your side (order id, form submission id, etc.) so retries never double-reward.
  • getEvent(id) — check the status of a previously submitted event.

Webhooks

Register a webhook endpoint from the Business Dashboard → Developer tab and choose which event types it receives (subscribedEvents). Each delivery is a signed POST with body { type, data, createdAt } where type is one of:

  • event.approved — a submitted event was approved (auto or manual review) and JASSI was credited.
  • event.rejected — a submitted event failed verification and was rejected outright.
  • event.pending — a submitted event landed in the review queue, for any reason (above the action's auto-approve threshold, or a fraud-check flag). Fires for every pending event, regardless of cause.
  • event.flagged — fires in addition to event.pending (never instead of it) only when the pending event was caused by a fraud check (duplicate submission, rate limit, daily cap, or GPS mismatch/missing) rather than a plain above-threshold amount. Use this if you want to alert on suspected fraud specifically, without reacting to every ordinary pending review.

Idempotency

Every submitEvent() call requires an idempotency key (the SDK generates a random one if you don't supply one, but you should always supply your own so that retries from your system are also safe). Resubmitting the same key returns the original event instead of creating a duplicate reward.