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

webhookevent-sdk

v1.0.2

Published

JS API client generated by OpenAPI Generator

Readme

WebhookEvent SDK

WebhookEvent SDK provides a simple way to integrate webhook functionality into your JavaScript applications. It allows you to manage webhook endpoints and events with features like creation, retrieval, enumeration, and deletion.

Features

  • Webhook endpoint management (create, retrieve, update, delete)
  • Webhook event handling
  • User onboarding and account management
  • API key management
  • Built-in error handling
  • Comprehensive test coverage

Requirements

  • Node.js (v18.20.4 or higher)
  • npm

Installation

Install the package using npm:

npm install webhookevent-sdk

Quick Start

const { WebhookEventSdk } = require('webhookevent-sdk');

//only endpoint is required, other parameters are optional
//rest parameters are optional, and can be set later using setter methods
const sdk = new WebhookEventSdk({
  endpoint: 'https://api.webhookevent.com/',
  bearerToken: '**********',
  accountGuid: 'default',
  basicAuth: {
    username: '[email protected]',
    password: 'password',
  },

});

const createWebhookEndpoint = async () => {
  try {
    const result = await sdk.Endpoint.create({
      Name: 'My webhook endpoint',
      Notes: 'My notes',
      HttpMethod: 'POST',
      HttpStatus: 200,
    });
    console.log(result, 'result');
  } catch (error) {
    console.log(error, 'error');
  }
};
createWebhookEndpoint();

const sendWebhookEvent = async () => {
  try {
    const result = await sdk.Event.send('09a8748e-6741-4065-8305-dfde2a3080bb', {
      message: 'Hello, world!',
    });
    console.log(result, 'result');
  } catch (error) {
    console.log(error, 'error');
  }
};
sendWebhookEvent();

API Reference

For detailed information on the available methods and their parameters, please refer below

| Method | Description | Parameters | Returns | Endpoint | | --------------------------- | --------------------------------------- | --------------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------- | | sdk.User.onboard | Onboards a new user. | userData, cancellationToken? | Promise<OnboardingResponse> | POST /v1.0/onboarding | | sdk.Account.retrieve | Retrieves an account using credentials. | credentials, cancellationToken? | Promise<Account> | GET /v1.0/accounts | | sdk.Account.exists | Checks if an account exists by GUID. | accountGuid, cancellationToken? | Promise<boolean> | HEAD /v1.0/accounts/{accountGuid} | | sdk.Account.update | Updates an existing account. | accountData, cancellationToken? | Promise<Account> | PUT /v1.0/accounts/{accountGuid} | | sdk.User.retrieve | Retrieves a user by their GUID. | userGuid, cancellationToken? | Promise<User> | GET /v1.0/accounts/{accountGuid}/users/{userGuid} | | sdk.User.exists | Checks if a user exists. | userGuid, cancellationToken? | Promise<boolean> | HEAD /v1.0/accounts/{accountGuid}/users/{userGuid} | | sdk.User.update | Updates a user by their GUID. | userData, cancellationToken? | Promise<User> | PUT /v1.0/accounts/{accountGuid}/users/{userGuid} | | sdk.ApiKey.enumerate | Lists all API keys for an account. | cancellationToken? | Promise<EnumeratedApiKey> | GET /v1.0/accounts/{accountGuid}/keys | | sdk.ApiKey.exists | Checks if an API key exists. | apiKeyGuid, cancellationToken? | Promise<boolean> | HEAD /v1.0/accounts/{accountGuid}/keys/{apiKeyGuid} | | sdk.ApiKey.generate | Generates a new API key. | obj?, cancellationToken? | Promise<ApiKey> | PUT /v1.0/accounts/{accountGuid}/keys | | sdk.ApiKey.update | Updates an API key. | updateData, cancellationToken? | Promise<ApiKey> | PUT /v1.0/accounts/{accountGuid}/keys/{guid} | | sdk.ApiKey.delete | Deletes an API key. | apiKeyGuid, cancellationToken? | Promise<boolean> | DELETE /v1.0/accounts/{accountGuid}/keys/{apiKeyGuid} | | sdk.Endpoint.retrieve | Retrieves a webhook endpoint by GUID. | webhookEndpointGuid, cancellationToken? | Promise<WebhookEndpoint> | GET /v1.0/accounts/{accountGuid}/endpoints/{guid} | | sdk.Endpoint.enumerate | Lists all webhook endpoints. | cancellationToken? | Promise<EnumeratedWebhookEndpoint> | GET /v1.0/accounts/{accountGuid}/endpoints | | sdk.Endpoint.exists | Checks if a webhook endpoint exists. | webhookEndpointGuid, cancellationToken? | Promise<boolean> | HEAD /v1.0/accounts/{accountGuid}/endpoints/{guid} | | sdk.Endpoint.create | Creates a new webhook endpoint. | webhookEndpointData, cancellationToken? | Promise<WebhookEndpoint> | PUT /v1.0/accounts/{accountGuid}/endpoints | | sdk.Endpoint.update | Updates an existing webhook endpoint. | webhookEndpointData, cancellationToken? | Promise<WebhookEndpoint> | PUT /v1.0/accounts/{accountGuid}/endpoints/{guid} | | sdk.Endpoint.delete | Deletes a webhook endpoint. | webhookEndpointGuid, cancellationToken? | Promise<boolean> | DELETE /v1.0/accounts/{accountGuid}/endpoints/{guid} | | sdk.Event.retrieve | Retrieves a webhook event. | webhookEndpointGuid, webhookEventGuid, cancellationToken? | Promise<WebhookEvent> | GET /v1.0/accounts/{accountGuid}/endpoints/{endpointGuid}/events/{eventGuid} | | sdk.Event.enumerate | Lists webhook events for an endpoint. | webhookEndpointGuid, cancellationToken? | Promise<EnumeratedWebhookEvent> | GET /v1.0/accounts/{accountGuid}/endpoints/{endpointGuid}/events | | sdk.Event.exists | Checks if a webhook event exists. | webhookEndpointGuid, webhookEventGuid, cancellationToken? | Promise<boolean> | HEAD /v1.0/accounts/{accountGuid}/endpoints/{endpointGuid}/events/{eventGuid} | | sdk.Event.delete | Deletes a webhook event. | webhookEndpointGuid, webhookEventGuid, cancellationToken? | Promise<boolean> | DELETE /v1.0/accounts/{accountGuid}/endpoints/{endpointGuid}/events/{eventGuid} | | sdk.Event.send | Sends a new webhook event. | webhookEndpointGuid, webhookEventData, cancellationToken? | Promise<WebhookEvent> | POST /v1.0/endpoints/{endpointGuid} |


Development

Linking the project locally (for development and testing)

To use the library locally without publishing to a remote npm registry, first install the dependencies with the command:

npm install

Next, link it globally in local system's npm with the following command:

npm link

To use the link you just defined in your project, switch to the directory you want to use your litegraphdb from, and run:

npm link webhookevent-sdk

Finally, you need to build the sdk, use command:

npm run build

You can then import the SDK with either import or require based on the ES Module (esm) or CommonJS (cjs) project, as shown below:

import { WebhookEventSdk } from 'webhookevent-sdk';
//or
var { WebhookEventSdk } = require('webhookevent-sdk');

Setting up Pre-commit Hooks

The pre-commit hooks will run automatically on git commit. They help maintain:

  • Code formatting (using ruff)
  • Import sorting
  • Code quality checks
  • And other project-specific checks

Running Tests

The project uses jest for running tests in isolated environments. Make sure you have jest installed, which should automatically be there if you have installed dependencies via npm i command:

# Run only the tests
npm run test

# Run tests with coverage report
npm run test:coverage

Contributing

We welcome contributions! Please see our Contributing Guidelines for details

Feedback and Issues

Have feedback or found an issue? Please file an issue in our GitHub repository.

Version History

Please refer to CHANGELOG.md for a detailed version history.