Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-freshdesk-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-freshdesk-api - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

49

lib/client.js

@@ -90,2 +90,51 @@ /**

//Conversations
Freshdesk.prototype.createReply = function (id, data, cb) {
this.req('POST', '{domain}/api/v2/tickets/{id}/reply'.replace('{domain}', this.domain).replace('{id}', id), null, data, cb)
}
Freshdesk.prototype.createNote = function (id, data, cb) {
this.req('POST', '{domain}/api/v2/tickets/{id}/notes'.replace('{domain}', this.domain).replace('{id}', id), null, data, cb)
}
Freshdesk.prototype.updateConversation = function (id, data, cb) {
this.req('PUT', '{domain}/api/v2/conversations/{id}'.replace('{domain}', this.domain).replace('{id}', id), null, data, cb)
}
Freshdesk.prototype.deleteConversation = function (id, cb) {
this.req('DELETE', '{domain}/api/v2/conversations/{id}'.replace('{domain}', this.domain).replace('{id}', id), null, null, cb)
}
//Contacts
Freshdesk.prototype.createContact = function (data, cb) {
this.req('POST', '{domain}/api/v2/contacts'.replace('{domain}', this.domain), null, data, cb)
}
Freshdesk.prototype.getContact = function (id, cb) {
this.req('GET', '{domain}/api/v2/contacts/{id}'.replace('{domain}', this.domain).replace('{id}', id), null, null, cb)
}
Freshdesk.prototype.listAllContacts = function (params, cb) {
this.req('GET', '{domain}/api/v2/contacts'.replace('{domain}', this.domain), params, null, cb)
}
Freshdesk.prototype.updateContact = function (id, data, cb) {
this.req('PUT', '{domain}/api/v2/contacts/{id}'.replace('{domain}', this.domain).replace('{id}', id), null, data, cb)
}
Freshdesk.prototype.deleteContact = function (id, cb) {
this.req('DELETE', '{domain}/api/v2/contacts/{id}'.replace('{domain}', this.domain).replace('{id}', id), null, null, cb)
}
Freshdesk.prototype.makeAgent = function (id, cb) {
this.req('PUT', '{domain}/api/v2/contacts/{id}/make_agent'.replace('{domain}', this.domain).replace('{id}', id), null, null, cb)
}
Freshdesk.prototype.listAllContactFields = function (cb) {
this.req('GET', '{domain}/api/v2/contact_fields'.replace('{domain}', this.domain), null, null, cb)
}
module.exports = Freshdesk;

2

package.json
{
"name": "node-freshdesk-api",
"version": "0.0.3",
"version": "0.0.4",
"description": "Node wrapper for Freshdesk v2 API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,2 +16,4 @@ # node-freshdesk-api

## Functions and Responses
### Tickets
- **createTicket(ticket, callback)** - Create a new ticket, list of [parameters](http://developer.freshdesk.com/api/#create_ticket)

@@ -26,3 +28,18 @@ - **getTicket(id, callback)** - Get 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](http://developer.freshdesk.com/api/#reply_ticket)
- **createNote(id, note, callback)** - Create a Note for a ticket by its id, list of [parameters](http://developer.freshdesk.com/api/#add_note_to_a_ticket)
- **updateConversation(id, conversation, callback)** - Update a conversation by its id, list of [parameters](http://developer.freshdesk.com/api/#update_conversation)
- **deleteConversation(id, callback)** - Delete a conversation by its id
### Contacts
- **createContact(contact, callback)** - Create a new contact, list of [parameters](http://developer.freshdesk.com/api/#create_contact)
- **getContact(id, callback)** - Get a contact by its id
- **updateContact(id, contact, callback)** - Update a contact by its id, list of [parameters](http://developer.freshdesk.com/api/#update_contact)
- **deleteContact(id, callback)** - Delete a contact by its id
- **listAllContacts(filter, callback)** - List All Contact, check list of [filters](http://developer.freshdesk.com/api/#list_all_contacts)
- **listAllContactFields(callback)** - List All Contact Fields
- **makeAgent(id, callback)** - Make a contact an Agent, [read more](http://developer.freshdesk.com/api/#make_agent)
## Examples

@@ -29,0 +46,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc