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

@dscr-ai/app-pricing-engine

v0.1.0

Published

Official TypeScript SDK for pricingengine.pro REST API. Create and manage deals, loans, borrowers, entities, and scenarios on dscr.ai.

Readme

dscr.ai API

Generated TypeScript SDK for the dscr.ai API API. REST API for managing deals, loans, borrowers, entities, scenarios, and more within the dscr.ai platform.

Contents

Installation

npm install @dscr-ai/app-pricing-engine

Quickstart

import DscrAiAppPricingEngine from "@dscr-ai/app-pricing-engine";

const client = new DscrAiAppPricingEngine();

const listDeals = await client.deals.list({
  page: 1,
  per_page: 25,
});
console.log(listDeals);

Authentication

Pass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.

| Option | Type | Default | Description | | --- | --- | --- | --- | | bearerAuth | string \| provider | - | Use your organization API key secret as the bearer token: Authorization: Bearer <api_key_secret> Defaults to BEARER_AUTH. |

Declared schemes:

  • bearerAuth bearer token

Client Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | bearerAuth | string \| AuthTokenProvider | process.env["BEARER_AUTH"] | Use your organization API key secret as the bearer token: Authorization: Bearer <api_key_secret> | | baseURL | string \| null | process.env["DSCR-AI_BASE_URL"] | Override the default API base URL. Pass null when selecting a configured environment. | | timeout | number | 60000 | Maximum time in milliseconds to wait for a response before aborting a request. | | maxRetries | number | 2 | Number of retries for temporary failures. | | defaultHeaders | HeadersInit | - | Headers sent with every request. | | defaultQuery | Record<string, string \| undefined> | - | Query parameters sent with every request. | | fetchOptions | RequestInit | - | Additional fetch options sent with every request. | | fetch | Fetch | - | Custom fetch implementation. | | logLevel | "off" \| "error" \| "warn" \| "info" \| "debug" \| null | process.env["DSCR-AI_LOG"] | Controls request and retry debug logging. | | logger | Logger \| null | console | Custom logger implementation. |

Request Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | headers | HeadersInit | - | Per-request headers. | | query | Record<string, unknown> | - | Per-request query parameters. | | body | unknown | - | Override the generated request body. | | timeout | number | - | Per-request timeout in milliseconds. | | maxRetries | number | - | Per-request retry count. | | signal | AbortSignal | - | Abort an in-flight request. | | fetchOptions | RequestInit | - | Per-request fetch options. | | idempotencyKey | string | - | Idempotency key for retry-safe operations. |

Resources

Deals

List deals

Returns a paginated list of deals visible to the authenticated API key's organization.

const listDeals = await client.deals.list({
  page: 1,
  per_page: 25,
});

Create a deal

Creates a new deal with the supplied inputs. Each input is identified by its input_id and input_type.

const createDeal = await client.deals.create();

List deal inputs

Returns a flat object mapping input_code to the current value for every input on the deal, exactly as the API key's creator user would see them on the Deal Details page. Includes both stored values (typed primitives) and computed/expression-driven values evaluated live from the logic engine. Inputs hidden by logic-rule visibility, archived inputs, and section headers are omitted. Stored values take precedence over computed values when both exist.

const inputs = await client.deals.listInputs("id");

Spreadsheets

Compute spreadsheet values

Stateless compute against a Sheets spreadsheet. Overlays optional input cell values on top of the spreadsheet's persisted cells, recalculates the HyperFormula graph, and returns the requested ranges. Nothing is written back to the database. Input cells must be input widgets on a table whose Form switch is enabled. Authenticate with an organization API key (Authorization: Bearer <api_key_secret>); the key's organization must own the spreadsheet.

const computeSpreadsheet = await client.spreadsheets.compute("id");

Loans

List loans

Returns all loans visible to the organization.

const listLoans = await client.loans.list({
  page: 1,
  per_page: 25,
});

Archive a loan

Soft-deletes a loan by moving it to the archive.

const success = await client.loans.archive("id");

Update a loan

Updates an existing loan's status or triggers an action (e.g. submit, approve).

const updateLoan = await client.loans.update("id");

Applications

List applications

Returns all loan applications across the organization pipeline.

const listApplications = await client.applications.list({
  page: 1,
  per_page: 25,
});

Borrowers

Search borrowers

Full-text search across borrowers by name, email, or ID. Optionally filter by entity.

const searchBorrowers = await client.borrowers.search();

Create a borrower

Creates a new borrower profile attached to the organization.

const createBorrower = await client.borrowers.create();

List borrowers

Returns a pipeline view of all borrowers with summary information.

const listBorrowers = await client.borrowers.list({
  page: 1,
  per_page: 25,
});

Entities

Search entities

Full-text search across entities (LLCs, Trusts, etc.).

const searchEntities = await client.entities.search();

Create an entity

Creates a new entity (LLC, Trust, Corporation, etc.) and optionally attaches owners.

const createEntity = await client.entities.create();

List entities

Returns a pipeline view of entities with owner mapping.

const listEntities = await client.entities.list();

Scenarios

Archive a scenario

Soft-deletes a scenario. Pass action=restore as a query param to unarchive.

const success = await client.scenarios.archive("id");

Get a scenario

Returns a single scenario by ID, including its inputs and outputs.

const getScenario = await client.scenarios.retrieve("id");

Update a scenario

Updates a scenario's name, inputs, or outputs.

const updateScenario = await client.scenarios.update("id");

Programs

List programs

Returns all lending programs configured for the organization.

const listPrograms = await client.programs.list();

Appraisals

List appraisal orders

Returns all appraisal orders for the organization.

const listAppraisalOrders = await client.appraisals.listOrders();

Create an appraisal order

Creates a new appraisal order for a deal.

const createAppraisalOrder = await client.appraisals.createOrder();

Update an appraisal order

Updates an existing appraisal order's status, due date, or other fields.

const updateAppraisalOrder = await client.appraisals.updateOrder("id");

Documents

List document templates

Returns all document templates configured for the organization.

const listDocumentTemplates = await client.documents.listTemplates();

Create a document template

Creates a new document template with optional HTML content.

const createDocumentTemplate = await client.documents.createTemplate();

CreditReports

List credit reports

Returns credit report documents for a specific borrower. The borrowerId query parameter is required.

const listCreditReports = await client.creditReports.list({
  borrowerId: "borrowerId",
});

BackgroundReports

List background reports

Returns all background check reports for the organization.

const listBackgroundReports = await client.backgroundReports.list();

Create a background report

Initiates a background check for a borrower or entity.

const createBackgroundReport = await client.backgroundReports.create();

Pipeline

Get pipeline data

Returns pipeline-view data. The shape depends on the view query parameter.

const getPipeline = await client.pipeline.list();

SignatureRequests

List signature requests

Returns e-signature requests for a deal. The dealId query parameter is required.

const listSignatureRequests = await client.signatureRequests.list({
  dealId: "dealId",
});

Errors

Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.

Documented error statuses: 400, 401, 404, 422, 500.

Retries and Timeouts

Generated clients support request timeouts and retry temporary failures such as network errors, 408, 409, 429, and 5xx responses. Retry delays honor Retry-After headers when present.

Logging

  • Set logLevel: "debug" to log request URLs, options, response status, response headers, and retry attempts.
  • Pass a custom logger to route logs into your own observability pipeline.
  • Set logLevel: null to disable environment-driven logging.

Debugging

  • Use .withResponse() on any request to inspect both parsed data and the raw Response object.
  • Catch generated API errors to inspect status, headers, response body, and request metadata.

Requirements

  • Node.js 20+, a modern browser, or any runtime with fetch support

Powered by Scalar.

Contributions

This SDK is generated programmatically. Manual edits to generated files will be overwritten on the next build.

SDK created by Scalar