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

sessionhero-sdk

v0.3.1

Published

Session Hero integration SDK — Open API client, env helpers, and Session Player embed

Readme

sessionhero-sdk

Public TypeScript SDK for Session Hero integrations. Ships:

  • Open API client — typed access to /api/v1/open/* (topics, campaigns, embed tokens, controls)
  • Env helpers — reads required API keys from the environment
  • Session Player embed — drop-in Next.js Session Player + withSessionsEmbed()
npm install sessionhero-sdk

Required environment variables

| Variable | Used by | Purpose | |----------|---------|---------| | SESSIONS_OPEN_API_KEY | Open API client (server only) | Organisation Open API app key | | NEXT_PUBLIC_SESSIONS_APP_API_KEY | Session Player embed (browser) | Session Hero core/app key for guest conduct | | SESSIONS_ORGANISATION_ID | Open API client (optional) | Sent as X-Organisation-ID | | SESSIONS_API_BASE_URL | Open API client | API origin (default http://localhost:8080) | | NEXT_PUBLIC_API_BASE_URL | Embed | Browser API base (e.g. /sessions-api) |

Never put SESSIONS_OPEN_API_KEY in a NEXT_PUBLIC_* variable.

createSessionHeroClient() throws if SESSIONS_OPEN_API_KEY is missing.
Live Session Player throws / fails closed if NEXT_PUBLIC_SESSIONS_APP_API_KEY is missing. Mock mode does not need the core key.

Open API (server)

import { createSessionHeroClient } from "sessionhero-sdk";

const client = createSessionHeroClient(); // requires SESSIONS_OPEN_API_KEY

const topics = await client.listPublicTopics({ page: 1, page_size: 50 });
const { token } = await client.mintEmbedAccessToken(campaignId, topicId);

Session Player embed (Next.js)

// next.config.ts
import path from "path";
import type { NextConfig } from "next";
import { withSessionsEmbed } from "sessionhero-sdk/next";

const nextConfig: NextConfig = { /* … */ };

export default withSessionsEmbed(nextConfig, {
  hostDir: __dirname,
  // Optional host-only aliases:
  // hostAliases: { "@admin": path.join(__dirname, "app") },
});
import { SessionPlayer, embedTopicPlayerSeed } from "sessionhero-sdk/embed";
import { createSessionHeroClient } from "sessionhero-sdk";

const topic = await createSessionHeroClient().getTopic(topicId);

<SessionPlayer
  topicId={topic.id}
  organisationId={orgId}
  embeddedTopic={embedTopicPlayerSeed(topic)}
  className="h-[min(720px,80vh)] w-full"
/>

See sessions-fe-next/embed/INTEGRATION.md and organisation admin Docs → TypeScript SDK for full host setup.

Subpath exports

| Import | Contents | |--------|----------| | sessionhero-sdk | Open API client + env + types | | sessionhero-sdk/open-api | Open API only | | sessionhero-sdk/embed | React Session Player + helpers | | sessionhero-sdk/next | withSessionsEmbed() |

Monorepo / local development

From the Session Hero monorepo:

cd sessions-integrate-sdk
npm run prepare-package   # vendors sessions-fe-next embed+app into runtime/

Hosts may use "sessionhero-sdk": "file:../sessions-integrate-sdk" while iterating. postinstall runs prepare-package when a sibling sessions-fe-next is present.

Publishing

Requires npm org ownership of @session-hero and an NPM_TOKEN secret.

npm run prepare-package
npm publish --access public

Or push a v* tag to run .github/workflows/publish.yml.