@findable-ai/sdk
A zero-dependency TypeScript client for the Findable Partner API. Works in Node.js, browsers, and edge runtimes.
Quick Start
import { FindableClient } from '@findable-ai/sdk';
const client = new FindableClient({
apiKey: 'YOUR_API_KEY', // pragma: allowlist secret
buildingOwnerId: 'cust-456',
});
// List buildings
const buildings = await client.listBuildings();
// Search documents
const results = await client.search({
query: 'fire safety',
buildingId: 'bld-789',
});
// Ask a question (non-streaming)
const answer = await client.ask({
buildingId: 'bld-789',
query: 'What are the fire safety requirements?',
});
// Ask a question (streaming)
for await (const event of client.askStream({
buildingId: 'bld-789',
query: 'Fire safety requirements?',
})) {
if (event.event === 'text') process.stdout.write(event.text);
}API Overview
| Method | Description |
|---|---|
listBuildings() | List all buildings for the building owner |
getBuilding(id) | Get a single building by ID |
search(options) | Search documents across one or all buildings |
ask(options) | Ask a question and get a complete response |
askStream(options) | Ask a question with streaming response |
askAcrossBuildings(options) | Ask a question across one or more buildings |
askAcrossBuildingsStream(options) | Ask across buildings with streaming response |