# @ko-fi/nest

> Ko-fi webhook handler for NestJS

Latest version **1.0.5** (published 2022-10-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ko-fi/nest
pnpm add @ko-fi/nest
yarn add @ko-fi/nest
bun add @ko-fi/nest
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-10-18 |
| First published | 2022-10-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | onseso |
| Maintainers | oneso |
| Keywords | ko-fi, kofi, nest |

## Links

- npm: https://www.npmjs.com/package/@ko-fi/nest
- Repository: https://github.com/oneso/ko-fi-nest
- Homepage: https://github.com/oneso/ko-fi-nest#readme
- Issues: https://github.com/oneso/ko-fi-nest/issues
- npm.io page: https://npm.io/package/@ko-fi/nest

## Dependencies (2)

- [@ko-fi/types](https://npm.io/package/@ko-fi/types.md) ^1.0.3
- [@ko-fi/handler](https://npm.io/package/@ko-fi/handler.md) ^1.0.0

## Recent versions

- 1.0.5 (latest) — 2022-10-18
- 1.0.4 — 2022-10-17
- 1.0.3 — 2022-10-17
- 1.0.2 — 2022-10-17
- 1.0.1 — 2022-10-17
- 1.0.0 — 2022-10-17

## README

Ko-fi webhook handler for NestJS.

For more informations visit https://ko-fi.com/manage/webhooks

---

## Installation

### npm

`npm install @ko-fi/nest`

### yarn

`yarn add @ko-fi/nest`

## Example

View example implementation [here](https://github.com/oneso/ko-fi-nest-example);

Example app.module.ts:

    import { kofi } from '@ko-fi/nest';
    import { MiddlewareConsumer, Module } from '@nestjs/common';

    import { AppController } from './app.controller';
    import { AppService } from './app.service';

    @Module({
      imports: [],
      controllers: [AppController],
      providers: [AppService],
    })
    export class AppModule {
      configure(consumer: MiddlewareConsumer) {
        kofi(consumer, {
          onData: (data, req) => {
            console.log('onData called');
          },
          onCommission: (data, req) => {
            console.log('onCommission called');
          },
          onDonation: (data, req) => {
            console.log('onDonation called');
          },
          onShopOrder: (data, req) => {
            console.log('onShopOrder called');
          },
          onSubscription: (data, req) => {
            console.log('onSubscription called');
          },
          onError: (err, req) => {
            console.error('onError called', err);
          },
          verificationToken: 'token',
        });
      }
    }

---
_Source: https://npm.io/package/@ko-fi/nest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
