1.8.0 • Published 2 years ago
@indiefin/freshsales v1.8.0
Freshsales
This is a modest and ever-incomplete client, for the Freshsales API.
Installation
npm i @indiefin/freshsales
Usage
import { Client } from "@indiefin/freshsales"
// You can define your API key and domain in a couple ways:
// 1. As the first and second parameters to the constructor
// 2. As FRESHSALES_KEY and FRESHSALES_DOMAIN environment variables
const client = new Client(/* FRESHSALES_KEY, FRESHSALES_DOMAIN */)
// creating a new lead
const { id } = await client.createLead({
/* lead data */
})
// viewing an existing lead
const lead = await client.viewLead(id)
// deleting a lead
await client.deleteLead(id)
Roadmap
theseare now implemented.
- Manage other entities:
contacts, accounts,dealsetc. - More advanced lead operations: bulk assignment,
activities,conversionetc. - Decorated responses
Feedback
You can reach out on Twitter for questions and support.