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

@finsys/lender-client

v1.0.0

Published

Typed API client for the FinSys Lender API with built-in environment management

Readme

@finsys/lender-client

Official typed API client for the FinSys Lender API, developed by ExtraGalaxies, a subsidiary of FinHero. Built-in environment management and strongly typed interfaces.

Installation

npm install @finsys/lender-client

Usage

import { LenderClient } from '@finsys/lender-client'

const client = new LenderClient({
  environment: 'staging',
  credentials: {
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret',
    subscriptionKey: 'your-subscription-key',
  },
})

await client.login()

// List applications
const result = await client.getApplicationList({ status: ['New'] })
console.log(result.applications)

// Get application details
const app = await client.getApplicationDetails(12345)

// Update status
await client.updateApplicationStatus(12345, {
  status: 'Approved',
  statusDescription: 'Application approved',
  approvedAmount: 50000,
})

// Download documents
const archive = await client.downloadAllDocuments(12345)
const file = await client.downloadFile(12345, 1)

// Upload document
await client.uploadDocument(12345, {
  path: '/path/to/file.pdf',
  name: 'document.pdf',
  mimeType: 'application/pdf',
})

// List programs
const programs = await client.getPrograms()

Environments

The client manages API URLs internally. Pass 'staging' or 'production' — no URL configuration needed.

client.getEnvironment() // 'staging' | 'production'
client.isAuthenticated() // boolean

Error Handling

All API errors throw LenderApiError with structured context:

import { LenderApiError } from '@finsys/lender-client'

try {
  await client.getApplicationDetails(99999)
} catch (error) {
  if (error instanceof LenderApiError) {
    console.log(error.statusCode)    // 404
    console.log(error.isAuthError)   // false
    console.log(error.isNetworkError) // false
    console.log(error.responseData)  // raw API response
  }
}

API

LenderClient

| Method | Returns | |---|---| | login() | Promise<void> | | getApplicationList(filter?, page?, size?) | Promise<ApplicationListResult> | | getApplicationDetails(ihsId) | Promise<Application> | | updateApplicationStatus(id, request) | Promise<StatusUpdateResult> | | downloadAllDocuments(ihsId) | Promise<DocumentArchive> | | downloadFile(ihsId, documentId) | Promise<FileDownload> | | uploadDocument(ihsId, file) | Promise<UploadResult> | | getPrograms() | Promise<Program[]> | | isAuthenticated() | boolean | | getEnvironment() | LenderEnvironment |

Data Handling

This package retrieves and transmits loan application data that may contain personally identifiable information (PII). Consumers are responsible for handling this data in compliance with applicable privacy regulations (e.g., PDPA, GDPR).

Credentials and tokens are held in memory only and are not persisted to disk or logs.

License

Apache-2.0 — see LICENSE and NOTICE for details.