npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

deepxl-node-sdk

v1.2.1

Published

SDK for deepxl fraud detection services

Downloads

101

Readme

DeepXL Node.js SDK

TypeScript/JavaScript SDK for DeepXL fraud detection, document parsing, verification, and file retrieval services.

Installation

npm install deepxl-node-sdk

Usage

Initialize the Client

import { DeepXLClient } from 'deepxl-node-sdk';

const client = new DeepXLClient({
  apiKey: 'your-api-key-here'
});

Fraud Detection

Get Available Models

const models = await client.getDetectionModels();
console.log(models);

Analyze a File for Fraud Detection

import fs from 'fs';

const fileBuffer = fs.readFileSync('document.jpg');

const result = await client.analyzeFile({
  model: 'document', // or 'object'
  file: fileBuffer,
  fileName: 'document.jpg',
  tags: {
    customerId: '9999',
    customerName: 'Acme Corp',
    documentId: 'DOC-2024-001'
  }
});

console.log(result.result);

Get Detection History

const history = await client.getDetectionHistory({
  limit: 25,
  offset: 0,
  sortBy: 'createdOn',
  direction: 'desc',
  fraudSeverity: 'high',
  minLikelihood: 70
});

console.log(history.data);

Get Detection by ID

const detection = await client.getDetectionById(123);
console.log(detection.result);

Document Parsing

Get Available Parsing Models

const models = await client.getParsingModels();
console.log(models);

Parse a Document

import fs from 'fs';

const fileBuffer = fs.readFileSync('drivers_license.jpg');

const result = await client.parseDocument({
  model: 'light', // or 'performance'
  file: fileBuffer,
  fileName: 'drivers_license.jpg',
  tags: {
    customerId: '9999',
    customerName: 'Acme Corp'
  }
});

console.log(result.result.parsedData);

Get Parse History

const history = await client.getParsingHistory({
  limit: 25,
  offset: 0,
  sortBy: 'parseId',
  direction: 'desc',
  documentType: 'usa_driver_license'
});

console.log(history.data);

Get Parse by ID

const parse = await client.getParseById(117);
console.log(parse.result);

Verification

Verify User with ID and Selfie

import fs from 'fs';

const idFile = fs.readFileSync('id.jpg');
const selfieFile = fs.readFileSync('selfie.jpg');

const result = await client.verify({
  idFile: idFile,
  idFileName: 'id.jpg',
  selfieFile: selfieFile,
  selfieFileName: 'selfie.jpg',
  tags: {
    customerId: '9999',
    customerName: 'Acme Corp'
  }
});

console.log(result.result.verified);
console.log(result.result.technicalChecks);

Get Verification History

const history = await client.getVerificationHistory({
  limit: 25,
  offset: 0,
  verified: true,
  sortBy: 'timestamp',
  direction: 'desc'
});

console.log(history.data);

Get Verification by ID

const verification = await client.getVerificationById(456);
console.log(verification.result);

File Retrieval

Download a File

const fileBuffer = await client.downloadFile('fd_123_document.jpg');
fs.writeFileSync('downloaded_file.jpg', fileBuffer);

Get File as Response

const response = await client.getFile('fd_123_document.jpg');
const arrayBuffer = await response.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);

Type Definitions

All TypeScript types are exported from the package:

import {
  FraudDetection,
  DetectionResponse,
  DetectionQueryParams,
  APIParse,
  APIParseResponse,
  Verification,
  VerificationResponse,
  ModelMetadata,
  Tag,
  FileData
} from 'deepxl-node-sdk';

Error Handling

The SDK throws errors with descriptive messages:

try {
  const result = await client.analyzeFile({
    model: 'document',
    file: fileBuffer
  });
} catch (error) {
  console.error('Error:', error.message);
  // Error messages match API error responses
}

Query Parameters

All query parameters are optional and can be used to filter and paginate results:

  • limit: Number of results (1-100, default: 25)
  • offset: Number of results to skip (default: 0)
  • sortBy: Field to sort by
  • direction: 'asc' or 'desc' (default: 'desc')
  • tagFilter: Filter by tags in format 'tagName=tagValue'
  • Various model-specific filters (see TypeScript types for details)

Tags

Tags are optional metadata that can be attached to analyses for organization and filtering:

const tags = {
  customerId: '9999',
  customerName: 'Acme Corp',
  documentId: 'DOC-2024-001',
  companyName: 'DeepXL',
  companyId: 'COMP-001'
};

You can filter results by tags using the tagFilter query parameter:

const history = await client.getDetectionHistory({
  tagFilter: 'customerId=9999'
});