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

@webbyon/promptly-sdk

v1.0.1

Published

Promptly AI CMS SDK for JavaScript/TypeScript

Readme

@webbyon/promptly-sdk

Promptly AI CMS SDK for JavaScript/TypeScript

Installation

npm install @webbyon/promptly-sdk

Quick Start

import { Promptly } from '@webbyon/promptly-sdk';

const client = new Promptly({
  tenantId: 'demo',
  baseUrl: 'https://promptly.webbyon.com',
});

API Reference

Boards (게시판)

// 게시판 목록
const boards = await client.boards.list();
// Returns: Board[]

// 게시판 상세
const board = await client.boards.get('first'); // slug or id
// Returns: Board

// 게시판 글 목록
const posts = await client.boards.listPosts('first', {
  page: 1,
  per_page: 10,
  search: '검색어', // optional
});
// Returns: { data: BoardPost[], meta: { current_page, last_page, per_page, total } }

// 글 상세
const post = await client.boards.getPost(1);
// Returns: BoardPost

// 댓글 목록
const comments = await client.boards.listComments(1);
// Returns: BoardComment[]

Blog (블로그)

// 블로그 글 목록
const posts = await client.blog.list({
  page: 1,
  per_page: 10,
  category: 'news', // optional
  tag: 'featured',  // optional
});
// Returns: { data: BlogPost[], meta: {...} }

// 블로그 글 상세
const post = await client.blog.get('post-slug');
// Returns: BlogPost

Shop (쇼핑)

// 상품 목록
const products = await client.shop.listProducts({
  page: 1,
  per_page: 10,
  category: 'electronics', // optional
  is_featured: true,       // optional
});
// Returns: { data: Product[], meta: {...} }

// 상품 상세
const product = await client.shop.getProduct('product-slug');
// Returns: Product

// 카테고리 목록
const categories = await client.shop.listCategories();
// Returns: ProductCategory[]

// 장바구니 조회
const cart = await client.shop.getCart();
// Returns: Cart

// 장바구니 추가
await client.shop.addToCart({
  product_id: 1,
  quantity: 2,
  variant_id: 10, // optional
});

// 주문 목록
const orders = await client.shop.listOrders();
// Returns: { data: Order[], meta: {...} }

Auth (인증)

// 로그인
const response = await client.auth.login({
  email: '[email protected]',
  password: 'password',
});
// Returns: { member: Member, token: string }

// 회원가입
await client.auth.register({
  name: '홍길동',
  email: '[email protected]',
  password: 'password',
  password_confirmation: 'password',
});

// 로그아웃
await client.auth.logout();

// 내 정보
const me = await client.auth.me();
// Returns: Member

// 인증 여부 확인
client.isAuthenticated(); // true or false

Forms (폼)

// 폼 목록
const forms = await client.forms.list();
// Returns: Form[]

// 폼 상세
const form = await client.forms.get('contact');
// Returns: Form

// 폼 제출
await client.forms.submit('contact', {
  name: '홍길동',
  email: '[email protected]',
  message: '문의 내용',
});

Media (미디어)

// 파일 업로드 (인증 필요)
const media = await client.media.upload(file);
// Returns: Media

// 내 미디어 목록
const mediaList = await client.media.list();
// Returns: { data: Media[], meta: {...} }

Types

interface Board {
  id: number;
  slug: string;
  name: string;
  description?: string;
  is_active: boolean;
  created_at: string;
}

interface BoardPost {
  id: number;
  title: string;
  content: string;
  excerpt?: string;
  author: string;
  views: number;
  is_notice: boolean;
  created_at: string;
}

interface BlogPost {
  id: number;
  slug: string;
  title: string;
  content: string;
  excerpt?: string;
  featured_image?: string;
  category?: string;
  tags?: string[];
  is_published: boolean;
  published_at?: string;
  view_count: number;
  created_at: string;
}

interface Product {
  id: number;
  slug: string;
  name: string;
  description?: string;
  price: number;
  compare_price?: number;
  thumbnail?: string;
  images?: string[];
  status: 'draft' | 'active' | 'inactive';
  is_featured: boolean;
  in_stock?: boolean;
  created_at: string;
}

interface Member {
  id: number;
  name: string;
  email: string;
  phone?: string;
  avatar?: string;
  is_active: boolean;
  created_at: string;
}

React Example

import { useState, useEffect } from 'react';
import { Promptly } from '@webbyon/promptly-sdk';

const client = new Promptly({
  tenantId: 'demo',
  baseUrl: 'https://promptly.webbyon.com',
});

function BoardPosts() {
  const [posts, setPosts] = useState([]);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    client.boards.listPosts('first')
      .then(res => setPosts(res.data))
      .finally(() => setLoading(false));
  }, []);

  if (loading) return <div>Loading...</div>;

  return (
    <table>
      <thead>
        <tr>
          <th>제목</th>
          <th>작성자</th>
          <th>조회수</th>
          <th>작성일</th>
        </tr>
      </thead>
      <tbody>
        {posts.map(post => (
          <tr key={post.id}>
            <td>{post.title}</td>
            <td>{post.author}</td>
            <td>{post.views}</td>
            <td>{new Date(post.created_at).toLocaleDateString()}</td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}

License

MIT