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

@ryan-weber-ltd/fivestar

v1.1.1

Published

TypeScript SDK for FiveStar Support - Customer feedback platform

Readme

@ryan-weber-ltd/fivestar

npm version License: MIT

TypeScript/JavaScript SDK for FiveStar Support - Customer feedback platform.

Installation

npm install @ryan-weber-ltd/fivestar
# or
yarn add @ryan-weber-ltd/fivestar
# or
pnpm add @ryan-weber-ltd/fivestar

Features

  • Server-Side Customer ID Generation: Secure customer IDs generated by the server
  • Response Types: Fetch available feedback categories (bug, feature request, etc.)
  • Feedback Submission: Submit bug reports and feature requests
  • Type-Safe: Written in TypeScript with full type definitions

Quick Start

import { FiveStarClient } from '@ryan-weber-ltd/fivestar'

// Initialize the client
const client = new FiveStarClient({
  clientId: 'your-client-uuid', // Get this from your FiveStar dashboard
  platform: 'web', // 'web', 'ios', 'android', 'flutter', 'laravel'
  appVersion: '1.0.0', // Your app version
})

// Generate a customer ID from the server
const { customerId, expiresAt } = await client.generateCustomerId()

// Register the customer (recommended on first launch)
await client.registerCustomer(customerId, {
  email: '[email protected]',
  name: 'John Doe',
})

// Get available response types
const responseTypes = await client.getResponseTypes()

// Submit feedback
await client.submitResponse({
  customerId,
  title: 'Feature request: Dark mode',
  description: 'Please add a dark mode to the application',
  typeId: responseTypes[0].id,
})

API Reference

FiveStarClient

constructor(config: FiveStarClientConfig)

Creates a new FiveStar client instance.

const client = new FiveStarClient({
  clientId: string,              // Required: Your client UUID
  apiUrl?: string,               // Optional: API URL (defaults to 'https://fivestar.support')
  platform?: string,             // Optional: 'web', 'ios', 'android', 'flutter', 'laravel'
  appVersion?: string,           // Optional: Your app version
  deviceModel?: string,          // Optional: Device model (e.g., 'iPhone14,2')
  osVersion?: string             // Optional: OS version (e.g., '16.0')
})

async generateCustomerId(): Promise<GenerateCustomerIdResult>

Generate a new customer ID from the server.

const { customerId, expiresAt, deviceId } = await client.generateCustomerId()

// customerId: The server-generated customer ID
// expiresAt: When the customer ID expires (90 days)
// deviceId: Short device identifier for tracking

async getResponseTypes(): Promise<ResponseType[]>

Get all available response types for this client.

const types = await client.getResponseTypes()
// Returns: [{ id, name, slug, color, icon }, ...]

async submitResponse(options: SubmitResponseOptions): Promise<SubmitResponseResult>

Submit a new response/feedback.

await client.submitResponse({
  customerId: string,            // Required: Customer ID from generateCustomerId()
  title: string,                 // Required: Feedback title
  description: string,           // Required: Feedback description
  typeId: string,               // Required: Response type ID
  email?: string,                // Optional: Customer email
  name?: string                  // Optional: Customer name
})

async registerCustomer(customerId: string, options?: RegisterCustomerOptions): Promise<RegisterCustomerResult>

Register a customer ID for this client with optional customer information.

await client.registerCustomer(customerId, {
  email?: string,  // Optional: Customer email
  name?: string    // Optional: Customer name
})

async verifyCustomer(customerId: string): Promise<{ valid: boolean; message?: string }>

Check if a customer ID is valid and registered for this client.

const result = await client.verifyCustomer(customerId)
if (result.valid) {
  // Customer ID is valid and registered
}

getPublicUrl(locale?: string): string

Get the public feedback page URL for this client.

const url = client.getPublicUrl('en')
// Returns: 'https://fivestar.support/en/c/{clientId}'

Migration from v1.x

The SDK has been simplified in v2.x:

Customer ID Generation

const { customerId } = await client.generateCustomerId()

License

MIT © Ryan Weber Ltd

Support