Flagright Node Library

npm shield fern shield

The Flagright Node.js library provides access to the Flagright API from JavaScript/TypeScript.

Documentation

API documentation is available at https://docs.flagright.com.

Usage

import { FlagrightClient } from 'flagright';

const client = new FlagrightClient({ environment: 'https://sandbox.api.flagright.com', apiKey: 'YOUR_API_KEY', })
const response = await client.transactions.verify({
  body: {
    transactionId: 'my-transaction-id',
    type: 'DEPOSIT',
    timestamp: 1692624734000,
  },
})

console.log(`Received response from Flagright: ${JSON.stringify(response)}`);