
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
@frihet/sdk
Advanced tools
Official TypeScript SDK for the Frihet API. AI-native business management.
npm install @frihet/sdk
import Frihet from '@frihet/sdk';
const frihet = new Frihet({ apiKey: 'fri_...' });
// Create an invoice
const invoice = await frihet.invoices.create({
clientName: 'Acme Corp',
items: [{ description: 'Consulting', quantity: 10, unitPrice: 150 }],
});
// List overdue invoices
const overdue = await frihet.invoices.list({ status: 'overdue' });
// Mark as paid
await frihet.invoices.markPaid(invoice.id);
// Send by email
await frihet.invoices.send(invoice.id, { recipientEmail: 'billing@acme.com' });
// Download PDF
const pdf = await frihet.invoices.pdf(invoice.id);
| Resource | Methods |
|---|---|
frihet.invoices | list, retrieve, create, update, del, search, markPaid, send, pdf, createBatch |
frihet.expenses | list, retrieve, create, update, del, search, createBatch |
frihet.clients | list, retrieve, create, update, del, search |
frihet.vendors | list, retrieve, create, update, del, search |
frihet.products | list, retrieve, create, update, del, search |
frihet.quotes | list, retrieve, create, update, del, search, send, pdf |
frihet.webhooks | list, retrieve, create, update, del |
frihet.intelligence | context, summary, monthly, quarterly |
// Full business context (one call for AI agents)
const ctx = await frihet.intelligence.context();
// Monthly P&L with tax liability
const march = await frihet.intelligence.monthly('2026-03');
// Quarterly tax prep (Modelo 303/130)
const q1 = await frihet.intelligence.quarterly('2026-Q1');
// Financial summary with date range
const ytd = await frihet.intelligence.summary({ from: '2026-01-01', to: '2026-12-31' });
import Frihet, { RateLimitError, NotFoundError, ValidationError } from '@frihet/sdk';
try {
await frihet.invoices.retrieve('nonexistent');
} catch (err) {
if (err instanceof NotFoundError) {
console.log('Invoice not found');
} else if (err instanceof RateLimitError) {
console.log(`Retry after ${err.retryAfter}s`);
} else if (err instanceof ValidationError) {
console.log('Validation:', err.details);
}
}
import { Webhooks } from '@frihet/sdk';
const isValid = Webhooks.verifySignature(
rawBody,
req.headers['x-frihet-signature'],
webhookSecret,
);
const frihet = new Frihet({
apiKey: 'fri_...',
baseUrl: 'https://api.frihet.io/v1', // default
timeout: 30000, // 30s default
});
// Per-request options
await frihet.invoices.create(data, {
idempotencyKey: 'unique-key-123',
timeout: 60000,
});
MIT
FAQs
Official Frihet SDK — AI-native business management API client
The npm package @frihet/sdk receives a total of 19 weekly downloads. As such, @frihet/sdk popularity was classified as not popular.
We found that @frihet/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.