@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 the Findable Assistant (non-streaming)
const answer = await client.assistant({
buildingId: 'bld-789',
query: 'What are the fire safety requirements?',
});
// Ask the Assistant (streaming)
for await (const event of client.assistantStream({
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 |
assistant(options) | Ask a question and get a complete response |
assistantStream(options) | Ask a question with streaming response |
assistantAcrossBuildings(options) | Ask a question across one or more buildings |
assistantAcrossBuildingsStream(options) | Ask across buildings with streaming response |