{"_id":"@dscr-ai/app-pricing-engine","name":"@dscr-ai/app-pricing-engine","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dscr-ai/app-pricing-engine","version":"0.1.0","description":"Official TypeScript SDK for pricingengine.pro REST API. Create and manage deals, loans, borrowers, entities, and scenarios on dscr.ai.","type":"module","sideEffects":false,"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js","default":"./dist/esm/index.js"},"./resources/*":{"types":"./dist/esm/resources/*.d.ts","import":"./dist/esm/resources/*.js","require":"./dist/cjs/resources/*.js","default":"./dist/esm/resources/*.js"},"./*.mjs":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js"},"./*.js":{"types":"./dist/esm/*.d.ts","require":"./dist/cjs/*.js","default":"./dist/cjs/*.js"},"./*":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","require":"./dist/cjs/*.js","default":"./dist/esm/*.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finalize-build.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.cjs.json --noEmit"},"dependencies":{},"devDependencies":{"typescript":"^6.0.0"},"_id":"@dscr-ai/app-pricing-engine@0.1.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-MHkPrptroDGfYzZGuVM2hA3QdFTrJtaEB5ckZBml61/42qdAjywCpPrN1v/UaM84tcYyY/lwO48F8nWwiSrhKw==","shasum":"a16b917e4f4ece0ec065bd313c835be17331873f","tarball":"https://registry.npmjs.org/@dscr-ai/app-pricing-engine/-/app-pricing-engine-0.1.0.tgz","fileCount":227,"unpackedSize":403520,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLdDqSWSsHaQMmM1+5qqgFbcihhw4kNCBgrzXNa2O01AIgIp4CyyozMTY0CFctgKJLckjIBTiV+eFSPEsy8ROuv7c="}]},"_npmUser":{"name":"akraut","email":"akraut@brrrr.com"},"directories":{},"maintainers":[{"name":"akraut","email":"akraut@brrrr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/app-pricing-engine_0.1.0_1780930874696_0.03740885959288698"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-08T15:01:14.566Z","0.1.0":"2026-06-08T15:01:14.871Z","modified":"2026-06-08T15:01:15.076Z"},"maintainers":[{"name":"akraut","email":"akraut@brrrr.com"}],"description":"Official TypeScript SDK for pricingengine.pro REST API. Create and manage deals, loans, borrowers, entities, and scenarios on dscr.ai.","readme":"# dscr.ai API\n\nGenerated TypeScript SDK for the dscr.ai API API.\nREST API for managing deals, loans, borrowers, entities, scenarios, and more within the dscr.ai platform.\n\n<br />\n\n## Contents\n\n- [Installation](#installation)\n- [Quickstart](#quickstart)\n- [Authentication](#authentication)\n- [Client Options](#client-options)\n- [Request Options](#request-options)\n- [Resources](#resources)\n- [Errors](#errors)\n- [Retries and Timeouts](#retries-and-timeouts)\n- [Logging](#logging)\n- [Debugging](#debugging)\n- [Requirements](#requirements)\n\n<br />\n\n## Installation\n\n```sh\nnpm install @dscr-ai/app-pricing-engine\n```\n\n<br />\n\n## Quickstart\n\n```ts\nimport DscrAiAppPricingEngine from \"@dscr-ai/app-pricing-engine\";\n\nconst client = new DscrAiAppPricingEngine();\n\nconst listDeals = await client.deals.list({\n  page: 1,\n  per_page: 25,\n});\nconsole.log(listDeals);\n```\n\n<br />\n\n## Authentication\n\nPass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `bearerAuth` | `string \\| provider` | - | Use your organization API key secret as the bearer token: Authorization: Bearer <api_key_secret> Defaults to BEARER_AUTH. |\n\nDeclared schemes:\n\n- `bearerAuth` bearer token\n\n<br />\n\n## Client Options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `bearerAuth` | `string \\| AuthTokenProvider` | `process.env[\"BEARER_AUTH\"]` | Use your organization API key secret as the bearer token: Authorization: Bearer <api_key_secret> |\n| `baseURL` | `string \\| null` | `process.env[\"DSCR-AI_BASE_URL\"]` | Override the default API base URL. Pass `null` when selecting a configured environment. |\n| `timeout` | `number` | `60000` | Maximum time in milliseconds to wait for a response before aborting a request. |\n| `maxRetries` | `number` | `2` | Number of retries for temporary failures. |\n| `defaultHeaders` | `HeadersInit` | - | Headers sent with every request. |\n| `defaultQuery` | `Record<string, string \\| undefined>` | - | Query parameters sent with every request. |\n| `fetchOptions` | `RequestInit` | - | Additional fetch options sent with every request. |\n| `fetch` | `Fetch` | - | Custom fetch implementation. |\n| `logLevel` | `\"off\" \\| \"error\" \\| \"warn\" \\| \"info\" \\| \"debug\" \\| null` | `process.env[\"DSCR-AI_LOG\"]` | Controls request and retry debug logging. |\n| `logger` | `Logger \\| null` | `console` | Custom logger implementation. |\n\n<br />\n\n## Request Options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `headers` | `HeadersInit` | - | Per-request headers. |\n| `query` | `Record<string, unknown>` | - | Per-request query parameters. |\n| `body` | `unknown` | - | Override the generated request body. |\n| `timeout` | `number` | - | Per-request timeout in milliseconds. |\n| `maxRetries` | `number` | - | Per-request retry count. |\n| `signal` | `AbortSignal` | - | Abort an in-flight request. |\n| `fetchOptions` | `RequestInit` | - | Per-request fetch options. |\n| `idempotencyKey` | `string` | - | Idempotency key for retry-safe operations. |\n\n<br />\n\n## Resources\n\n### `Deals`\n\n### List deals\n\nReturns a paginated list of deals visible to the authenticated API key's organization.\n\n```ts\nconst listDeals = await client.deals.list({\n  page: 1,\n  per_page: 25,\n});\n```\n\n<br />\n\n### Create a deal\n\nCreates a new deal with the supplied inputs. Each input is identified by its input_id and input_type.\n\n```ts\nconst createDeal = await client.deals.create();\n```\n\n<br />\n\n### List deal inputs\n\nReturns 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.\n\n```ts\nconst inputs = await client.deals.listInputs(\"id\");\n```\n\n### `Spreadsheets`\n\n### Compute spreadsheet values\n\nStateless 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.\n\n```ts\nconst computeSpreadsheet = await client.spreadsheets.compute(\"id\");\n```\n\n### `Loans`\n\n### List loans\n\nReturns all loans visible to the organization.\n\n```ts\nconst listLoans = await client.loans.list({\n  page: 1,\n  per_page: 25,\n});\n```\n\n<br />\n\n### Archive a loan\n\nSoft-deletes a loan by moving it to the archive.\n\n```ts\nconst success = await client.loans.archive(\"id\");\n```\n\n<br />\n\n### Update a loan\n\nUpdates an existing loan's status or triggers an action (e.g. submit, approve).\n\n```ts\nconst updateLoan = await client.loans.update(\"id\");\n```\n\n### `Applications`\n\n### List applications\n\nReturns all loan applications across the organization pipeline.\n\n```ts\nconst listApplications = await client.applications.list({\n  page: 1,\n  per_page: 25,\n});\n```\n\n### `Borrowers`\n\n### Search borrowers\n\nFull-text search across borrowers by name, email, or ID. Optionally filter by entity.\n\n```ts\nconst searchBorrowers = await client.borrowers.search();\n```\n\n<br />\n\n### Create a borrower\n\nCreates a new borrower profile attached to the organization.\n\n```ts\nconst createBorrower = await client.borrowers.create();\n```\n\n<br />\n\n### List borrowers\n\nReturns a pipeline view of all borrowers with summary information.\n\n```ts\nconst listBorrowers = await client.borrowers.list({\n  page: 1,\n  per_page: 25,\n});\n```\n\n### `Entities`\n\n### Search entities\n\nFull-text search across entities (LLCs, Trusts, etc.).\n\n```ts\nconst searchEntities = await client.entities.search();\n```\n\n<br />\n\n### Create an entity\n\nCreates a new entity (LLC, Trust, Corporation, etc.) and optionally attaches owners.\n\n```ts\nconst createEntity = await client.entities.create();\n```\n\n<br />\n\n### List entities\n\nReturns a pipeline view of entities with owner mapping.\n\n```ts\nconst listEntities = await client.entities.list();\n```\n\n### `Scenarios`\n\n### Archive a scenario\n\nSoft-deletes a scenario. Pass action=restore as a query param to unarchive.\n\n```ts\nconst success = await client.scenarios.archive(\"id\");\n```\n\n<br />\n\n### Get a scenario\n\nReturns a single scenario by ID, including its inputs and outputs.\n\n```ts\nconst getScenario = await client.scenarios.retrieve(\"id\");\n```\n\n<br />\n\n### Update a scenario\n\nUpdates a scenario's name, inputs, or outputs.\n\n```ts\nconst updateScenario = await client.scenarios.update(\"id\");\n```\n\n### `Programs`\n\n### List programs\n\nReturns all lending programs configured for the organization.\n\n```ts\nconst listPrograms = await client.programs.list();\n```\n\n### `Appraisals`\n\n### List appraisal orders\n\nReturns all appraisal orders for the organization.\n\n```ts\nconst listAppraisalOrders = await client.appraisals.listOrders();\n```\n\n<br />\n\n### Create an appraisal order\n\nCreates a new appraisal order for a deal.\n\n```ts\nconst createAppraisalOrder = await client.appraisals.createOrder();\n```\n\n<br />\n\n### Update an appraisal order\n\nUpdates an existing appraisal order's status, due date, or other fields.\n\n```ts\nconst updateAppraisalOrder = await client.appraisals.updateOrder(\"id\");\n```\n\n### `Documents`\n\n### List document templates\n\nReturns all document templates configured for the organization.\n\n```ts\nconst listDocumentTemplates = await client.documents.listTemplates();\n```\n\n<br />\n\n### Create a document template\n\nCreates a new document template with optional HTML content.\n\n```ts\nconst createDocumentTemplate = await client.documents.createTemplate();\n```\n\n### `CreditReports`\n\n### List credit reports\n\nReturns credit report documents for a specific borrower. The borrowerId query parameter is required.\n\n```ts\nconst listCreditReports = await client.creditReports.list({\n  borrowerId: \"borrowerId\",\n});\n```\n\n### `BackgroundReports`\n\n### List background reports\n\nReturns all background check reports for the organization.\n\n```ts\nconst listBackgroundReports = await client.backgroundReports.list();\n```\n\n<br />\n\n### Create a background report\n\nInitiates a background check for a borrower or entity.\n\n```ts\nconst createBackgroundReport = await client.backgroundReports.create();\n```\n\n### `Pipeline`\n\n### Get pipeline data\n\nReturns pipeline-view data. The shape depends on the view query parameter.\n\n```ts\nconst getPipeline = await client.pipeline.list();\n```\n\n### `SignatureRequests`\n\n### List signature requests\n\nReturns e-signature requests for a deal. The dealId query parameter is required.\n\n```ts\nconst listSignatureRequests = await client.signatureRequests.list({\n  dealId: \"dealId\",\n});\n```\n\n<br />\n\n## Errors\n\nNon-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.\n\nDocumented error statuses: `400`, `401`, `404`, `422`, `500`.\n\n<br />\n\n## Retries and Timeouts\n\nGenerated 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.\n\n<br />\n\n## Logging\n\n- Set `logLevel: \"debug\"` to log request URLs, options, response status, response headers, and retry attempts.\n- Pass a custom `logger` to route logs into your own observability pipeline.\n- Set `logLevel: null` to disable environment-driven logging.\n\n<br />\n\n## Debugging\n\n- Use `.withResponse()` on any request to inspect both parsed data and the raw `Response` object.\n- Catch generated API errors to inspect status, headers, response body, and request metadata.\n\n<br />\n\n## Requirements\n\n- Node.js 20+, a modern browser, or any runtime with `fetch` support\n\nPowered by Scalar.\n\n\n## Contributions\n\nThis SDK is generated programmatically. Manual edits to generated files will be\noverwritten on the next build.\n\n### SDK created by [Scalar](https://www.scalar.com/?utm_source=app-pricing-engine-typescript&utm_campaign=sdk)\n","readmeFilename":"README.md","_rev":"1-9a3a08063de6dd96891385fc84fde864"}