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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cafe24-webhook

v1.2.0

Published

[카페24 웹훅](https://developers.cafe24.com/app/front/app/develop/webhook)의 [이벤트 데이터](https://developers.cafe24.com/app/front/app/develop/webhook/sample)에 대한 TypeScript 타입 정의를 제공합니다.

Readme

Cafe24 Webhook

카페24 웹훅이벤트 데이터에 대한 TypeScript 타입 정의를 제공합니다.

Installation

npm install cafe24-webhook

Usage

Quick Start

import express from 'express';
import webhook from 'cafe24-webhook';

const app = express();
app.use(express.json());

/**
 * 임의의 카페24 웹훅 이벤트를 처리하는 엔드포인트입니다.
 * 아래와 같이 리퀘스트의 body를 webhook.Event 타입으로 캐스팅하여 사용할 수 있습니다.
 */
app.post('/on-product-added', (req, res) => {
  // 이벤트 NO. 90001에 해당하는 이벤트 데이터입니다.
  const data = new webhook.OnProductAdded(req.body);

  // Class로 생성하지 않고 object literal의 type assertion으로 사용할 수도 있습니다.
  const rawData = req.body as webhook.OnProductAdded;

  // Do something with the data 
  // ...
});

app.listen(3000, () => {
  console.log('Server is running on http://localhost:3000');
});

Get Type or Class by Event No.

webhook.events 네임스페이스를 활용해 원하는 이벤트 번호에 해당하는 타입이나 클래스를 가져올 수 있습니다.

import webhook from 'cafe24-webhook';

const eventNo = 90001;
const EventType = webhook.events[eventNo];

const data = new EventType({/* ... */});

console.log(data instanceof webhook.OnProductAdded); // true

Webhook { 'Event Number' -> 'Name' } Mapping

카페24 웹훅의 이벤트 번호와 이름을 매핑한 테이블은 src/types/event-map.ts에서 확인할 수 있습니다.

[!NOTE] 각 key에 할당된 type이 전부 t로 시작할 것입니다. 실제 사용 시에는 t를 생략하고 사용하시면 됩니다.

License

MIT