The Flagright Node.js library provides access to the Flagright API from JavaScript/TypeScript.
API documentation is available at https://docs.flagright.com.
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)}`);