seon-sdk
v1.0.1
Published
This module provides a TypeScript class, Seon, to interact with Seon's Fraud API. The Seon class allows you to send fraud detection requests using the provided API key and endpoint URL.
Downloads
3
Readme
seon-sdk
This module provides a TypeScript class, Seon, to interact with Seon's Fraud API. The Seon class allows you to send fraud detection requests using the provided API key and endpoint URL.
https://docs.seon.io/api-reference/fraud-api
Installation
You can install the package using npm, yarn, or pnpm.
pnpm add seon-sdk
yarn install seon-sdk
npm install seon-sdk
Usage
import { Seon, FraudApiRequest, FraudApiResponse } from "seon-sdk";
const seon = new Seon(process.env.SEON_KEY, process.env.SEON_URL);
const request: FraudApiRequest = {
/* PARAMETERS */
};
const response: FraudApiResponse = await seon.fraud(request);
console.log(response);
tsup
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
How to use this
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
- Add your code to
src
- Add export statement to
src/index.ts
- Test build command to build
src
. Once the command works properly, you will seedist
folder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
- Publish your package
$ npm publish
test package
https://www.npmjs.com/package/seon-sdk