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

@faqapp/core

v0.1.1

Published

Official TypeScript SDK for TheFAQApp — manage and deliver FAQ content via the v1 API

Readme

@faqapp/core

Official TypeScript SDK for TheFAQApp — manage and deliver FAQ content via the REST API.

Install

npm install @faqapp/core
# or
pnpm add @faqapp/core

Quick Start

import { FAQClient } from "@faqapp/core";

const faq = new FAQClient({
  apiKey: "your-api-key",
  organizationSlug: "your-org",
});

// List questions (paginated)
const page = await faq.questions.list();
console.log(page.data);        // Question[]
console.log(page.pagination);  // { page, limit, total, pages }

// Get a single question by slug
const { data: question } = await faq.questions.get("how-to-reset");

// Search
const { data: results } = await faq.search.query("how do I...");

// Auto-paginate across all pages
for await (const q of faq.questions.list().iter()) {
  console.log(q.question);
}

API Reference

Questions

faq.questions.list(params?)          // List questions (paginated)
faq.questions.get(slug)              // Get question by slug
faq.questions.create(data)           // Create a question
faq.questions.update(slug, data)     // Update a question
faq.questions.delete(slug)           // Delete a question
faq.questions.bulk({ questions })    // Bulk-create questions
faq.questions.export()               // Export all questions

Categories

faq.categories.list(params?)           // List categories (paginated)
faq.categories.get(slug)              // Get category by slug
faq.categories.create(data)           // Create a category
faq.categories.update(slug, data)     // Update a category
faq.categories.delete(slug)           // Delete a category

Search

faq.search.query("search term")               // Simple string search
faq.search.query({ q: "billing", limit: 5 })  // Search with options

Feedback

faq.feedback.submit(slug, { helpful: true })  // Submit feedback
faq.feedback.stats(slug)                      // Get feedback stats

Translations

faq.translations.list("questions", slug)                              // List translations
faq.translations.get("questions", slug, "nl")                         // Get translation
faq.translations.upsert("questions", slug, "nl", { question, answer }) // Upsert translation
faq.translations.aiTranslate("questions", slug, { targetLanguages: ["nl", "de"] })
faq.translations.completeness()                                       // Translation coverage

Webhooks

faq.webhooks.list()                                  // List webhooks
faq.webhooks.get(id)                                 // Get webhook by ID
faq.webhooks.create({ url, events })                 // Create webhook
faq.webhooks.update(id, data)                        // Update webhook
faq.webhooks.delete(id)                              // Delete webhook
faq.webhooks.test(id)                                // Send test event
faq.webhooks.deliveries(id)                          // List deliveries
faq.webhooks.replayDelivery(webhookId, deliveryId)   // Replay delivery

Domains

faq.domains.list()                    // List custom domains
faq.domains.get(id)                   // Get domain
faq.domains.create({ domain })        // Add custom domain
faq.domains.delete(id)                // Remove domain
faq.domains.verify(id)                // Verify DNS
faq.domains.health(id)                // Check domain health

API Keys

faq.apiKeys.list()                              // List API keys
faq.apiKeys.create({ name, scopes })            // Create API key
faq.apiKeys.revoke(id)                          // Revoke API key

Organization

faq.organization.get()  // Get organization info

Pagination

List methods return a PagePromise that resolves to a Page with built-in pagination:

const page = await faq.questions.list({ limit: 10 });
console.log(page.data);         // Question[]
console.log(page.pagination);   // { page, limit, total, pages }
console.log(page.hasNextPage());

// Iterate item-by-item across all pages
for await (const question of faq.questions.list().iter()) {
  console.log(question.question);
}

// Iterate page-by-page
for await (const p of faq.questions.list().iterPages()) {
  console.log(p.data.length, "questions on page", p.pagination.page);
}

Error Handling

import { FAQNotFoundError, FAQValidationError, FAQRateLimitError } from "@faqapp/core";

try {
  await faq.questions.get("nonexistent");
} catch (err) {
  if (err instanceof FAQNotFoundError) {
    console.log("Not found:", err.message);
  } else if (err instanceof FAQValidationError) {
    console.log("Validation errors:", err.errors);
  } else if (err instanceof FAQRateLimitError) {
    console.log("Rate limited, retry after:", err.retryAfter);
  }
}

For Next.js

Use @faqapp/nextjs for React hooks, components, and SSR/SSG helpers:

npm install @faqapp/core @faqapp/nextjs

License

MIT