open-index/open-npm huggingface dataset:
npm package: @microfox/weather
Description: Microfox SDK for weatherapi.com.
Latest version: 1.0.2

<p align="center">
  <a href="https://microfox.so">
    <img alt="Microfox" src="https://raw.githubusercontent.com/microfox-ai/microfox/main/docs/media/microfox-header.jpg" width="308">
  </a>
</p>

<p align="center">
  <em>AI agent stdlib that works with any LLM and TypeScript AI SDK.</em>
</p>

<p align="center">
  <a href="https://github.com/microfox-ai/microfox/actions/workflows/main.yml"><img alt="Build Status" src="https://github.com/microfox-ai/microfox/actions/workflows/main.yml/badge.svg" /></a>
  <a href="https://www.npmjs.com/package/@microfox/stdlib"><img alt="NPM" src="https://img.shields.io/npm/v/@microfox/stdlib.svg" /></a>
  <a href="https://github.com/microfox-ai/microfox/blob/main/license"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-blue" /></a>
  <a href="https://prettier.io"><img alt="Prettier Code Formatting" src="https://img.shields.io/badge/code_style-prettier-brightgreen.svg" /></a>
</p>

# Microfox

**See the [github repo](https://github.com/microfox-ai/microfox) or [docs](https://microfox.so) for more info.**
npm package: @microfox/webhook-octokit
Description: A TypeScript package for receiving webhooks from Octokit properly parsed.
Author: TheMoonDevs
Latest version: 1.3.0

# @microfox/webhook-octokit

A TypeScript package for receiving and handling GitHub webhooks using Octokit. This package provides a simple and type-safe way to interact with GitHub webhooks in your applications.

## Installation

```bash
npm install @microfox/webhook-octokit
# or
yarn add @microfox/webhook-octokit
# or
pnpm add @microfox/webhook-octokit
```

## Features

- 🔒 Secure webhook signature verification
- 📦 TypeScript support with full type definitions
- 🎯 Event-based webhook handling
- 🔄 Support for all GitHub webhook events
- 🛡️ Built-in security features

## Usage

```typescript
import { OctokitWebhook } from '@microfox/webhook-octokit';

// Initialize the webhook handler with your secret
const webhook = new OctokitWebhook({
  secret: 'your-github-webhook-secret',
});

// Handle specific events
webhook.on('push', event => {
  console.log('Push event received:', event.payload);
});

// Handle multiple events
webhook.on(['issues', 'pull_request'], event => {
  console.log(`${event.name} event received:`, event.payload);
});

// Handle all events
webhook.onAny(event => {
  console.log(`Received ${event.name} event:`, event.payload);
});

// Verify webhook signatures
const isValid = await webhook.verifySignature(payload, signature);
```

## API Reference

### `OctokitWebhook`

The main class for handling GitHub webhooks.

#### Constructor

```typescript
constructor(props: { secret: string })
```

- `secret`: Your GitHub webhook secret used for signature verification

#### Methods

- `sign(payload: string)`: Signs a payload with the webhook secret
- `verifySignature(payload: string, signature: string)`: Verifies a webhook signature
- `on(event: WebhookEvents | WebhookEvents[], handler: Function)`: Registers a handler for specific events
- `onAny(handler: Function)`: Registers a handler for all events

## Requirements

- Node.js >= 20.0.0
- TypeScript >= 5.6.3

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

- 📖 [Documentation](https://github.com/microfox-ai/microfox)
- 🐛 [Issue Tracker](https://github.com/microfox-ai/microfox/issues)
- 💬 [Discussions](https://github.com/microfox-ai/microfox/discussions)

## Related Packages

- `@octokit/webhooks` - The underlying GitHub webhooks framework
- `@microfox/webhook-core` - Core Microfox webhook utilities
npm package: @microfox/webhook-whatsapp
Description: A TypeScript package for handling WhatsApp webhooks.
Author: TheMoonDevs
Latest version: 1.1.0

# @microfox/webhook-whatsapp

A TypeScript package for handling WhatsApp Business API webhooks. This package provides a simple way to create a webhook listener, verify webhook authenticity, and process incoming messages and events from WhatsApp.

## Features

- ⚡️ **Webhook verification** for WhatsApp Business API
- 📨 **Message handling** for text and other message types
- 🚀 **Built for serverless environments** like AWS Lambda
- 🛡️ **TypeScript support** with full type safety

## Installation

```bash
npm install @microfox/webhook-whatsapp
# or
yarn add @microfox/webhook-whatsapp
# or
pnpm add @microfox/webhook-whatsapp
```

## Prerequisites

Before using this package, you'll need:

1.  A [WhatsApp Business Account](https://business.whatsapp.com/).
2.  A [Meta for Developers](https://developers.facebook.com/) app.
3.  A verification token for your webhook.
4.  A serverless environment (e.g., AWS Lambda) to host your webhook endpoint.

## Requirements

- Node.js >= 20.0.0
- TypeScript >= 5.6.3

## Quick Start

The following is an example of how to set up a webhook listener using `express`. This is suitable for running in a serverless function.

```typescript
import { WhatsAppWebhook } from '@microfox/webhook-whatsapp';
import express from 'express';
import serverless from 'serverless-http';

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

const webhook = new WhatsAppWebhook({
  verifyToken: process.env.WHATSAPP_VERIFY_TOKEN,
});

// Webhook verification endpoint
app.get('/webhook', (req, res) => {
  const challenge = webhook.verifyGetRequest(req.query);
  if (challenge) {
    res.status(200).send(challenge);
  } else {
    res.sendStatus(403);
  }
});

// Handle incoming messages
app.post('/webhook', (req, res) => {
  try {
    webhook.on('message', (message) => {
      console.log('Received message:', message);
      // Process your message here
    });

    webhook.process(req.body);
    res.sendStatus(200);
  } catch (error) {
    console.error('Error processing webhook:', error);
    res.sendStatus(500);
  }
});

export const handler = serverless(app);
```

## Environment Variables

Set these environment variables in your environment:

```bash
WHATSAPP_VERIFY_TOKEN=your_whatsapp_verify_token
```

This token is used to verify that incoming `GET` requests to your webhook endpoint are from Meta.

---
_This is a new package under development. More features and documentation will be added soon._