npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-freshdesk-api

v0.1.8

Published

Node wrapper for Freshdesk v2 API

Downloads

24

Readme

Node Freshdesk SDK Build Status

Node wrapper for Freshdesk v2 API

NPM

Install

npm i node-freshdesk-api

Usage

var fd = require('node-freshdesk-api');
var freshdesk = new fd('https://domain.freshdesk.com', 'yourApiKey');

Functions and Responses

Tickets

  • createTicket(ticket, callback) - Create a new ticket, list of parameters
  • getTicket(id, callback) - Get a ticket by its id
  • updateTicket(id, ticket, callback) - Update a ticket by its id, list of parameters
  • deleteTicket(id, callback) - Delete a ticket by its id
  • restoreTicket(id, callback) - Restore a ticket by its id
  • listAllTickets(filter, callback) - List All Tickets, check list of filters
  • listAllTicketFields(callback) - List All Ticket Fields
  • listAllConversations(id, callback) - List All Conversations of a Ticket by its id
  • listAllTimeEntries(id, callback) - List All Time Entries of a Ticket by its id

Conversations

  • createReply(id, reply, callback) - Create a Reply for a ticket by its id, list of parameters
  • createNote(id, note, callback) - Create a Note for a ticket by its id, list of parameters
  • updateConversation(id, conversation, callback) - Update a conversation by its id, list of parameters
  • deleteConversation(id, callback) - Delete a conversation by its id

Contacts

  • createContact(contact, callback) - Create a new contact, list of parameters
  • getContact(id, callback) - Get a contact by its id
  • updateContact(id, contact, callback) - Update a contact by its id, list of parameters
  • deleteContact(id, callback) - Delete a contact by its id
  • listAllContacts(filter, callback) - List All Contact, check list of filters
  • listAllContactFields(callback) - List All Contact Fields
  • makeAgent(id, callback) - Make a contact an Agent, read more

Companies

  • createCompany(data, callback) - Create a new company record using parameters
  • getCompany(id, callback) - Get company by ID; read more
  • listAllCompanies(callback) - List all companies; parameters
  • updateCompany(id, data, callback) - Update a company by ID; parameters
  • deleteCompany(id, callback) - Delelete a company by ID, read more

Examples

Create a new ticket

freshdesk.createTicket({
    name: 'test ticket',
    email: '[email protected]',
    subject: 'test sub',
    description: 'test description',
    status: 2,
    priority: 1
}, function (err, data) {
    console.log(err || data);
})

Update a ticket

freshdesk.updateTicket(21, {
    description: 'updated description',
    status: 2,
    priority: 1
}, function (err, data) {
    console.log(err || data);
})

Get a ticket

freshdesk.getTicket(21, function (err, data) {
    console.log(err || data);
})

Delete a ticket

freshdesk.deleteTicket(21, function (err, data) {
    console.log(err || data);
})

Contributors

Feature Request, Bugs and Ideas can be added here.

About Author

Built with <3 by Arjun Komath, [email protected]

License

See the LICENSE file for license rights and limitations (MIT).