Skip to content

Releases: freshworks/freshworks-api-sdk

v0.3.0

21 Dec 08:07
eff8997
Compare
Choose a tag to compare

Breaking change

With v0.3.0, all API SDK methods return results wrapped in a Response object Promise<Response<T>>. The Response object has the following properties.

  • Method:
    • .json(): Call the .json() method on the response to access the response body as model objects
  • Properties:
    • .headers: Use the headers property to access response headers as an object
    • .statusCode: Numeric response status code
    • .body: Access the raw response body

Usage example:

v0.2.0:

// `employees` is an Array of `Freshteam.models.Employee`
const employees = await ft.employees.list();
// No further way to access response headers

v0.3.0:

const res = await ft.employees.list();
const { headers, statusCode } = res;
const employees = res.json();

Introducing Freshservice Tickets endpoints

With this release, the API SDK supports the Tickets API endpoints for Freshservice, thanks to the efforts by @thakurganeshsinghfw.

Usage example:

// Setup
const { Freshservice } = require("@freshworks/api-sdk");
const fs = new Freshservice(domain, apiKey);

// Get list of tickets
const res = await fs.tickets.list();
const tickets = res.json();

New methods added

  • fs.tickets.list(query) - List and search tickets
  • fs.tickets.get(id, opts) - Get ticket by ID, with additional options to include details
  • fs.tickets.create(ticket) - Create a new ticket
  • fs.tickets.update(id, ticket) - Update an existing ticket
  • fs.tickets.delete(id) - Delete ticket by id
  • fs.tickets.restore(id) - Restore ticket by ID
  • fs.tickets.createChildTicket(parentId, childTicket) - Create a child ticket for a given parent ticket
  • fs.tickets.timeEntry(ticketId, timeEntryId)- Get a time entry by ID for a given ticket
  • fs.tickets.timeEntries(ticketId, opts) - Get all time entries for a ticket
  • fs.tickets.createTimeEntry(ticketId, timeEntry) - Create a time entry for a ticket
  • fs.tickets.updateTimeEntry(ticketId, timeEntryId, timeEntry) - Update an existing time entry for a ticket
  • fs.tickets.deleteTimeEntry(ticketId, timeEntryId) - Delete an existing time entry for a ticket
  • fs.tickets.createSource(source) - Create a new ticket source
  • fs.tickets.getTask(ticketId, taskId) - Get a specific task by id
  • fs.tickets.getTasks(ticketId, opts) - Get all tasks for a given ticket
  • fs.tickets.createTask(ticketId, task) - Create a new task for a given ticket
  • fs.tickets.updateTask(ticketId, taskId, task) - Update an existing task
  • fs.tickets.deleteTask(ticketId, taskId) - Delete an existing task

See the docs for more details.

v0.2.1

28 Mar 10:17
Compare
Choose a tag to compare

What's Changed

  • Fix dependency vulnerability from vuepress by @kaustavdm in #63

Full Changelog: v0.2.0...v0.2.1

v0.2.0

21 Feb 11:18
Compare
Choose a tag to compare

What's Changed

  • Pagination support added for Freshteam endpoints that support pagination #43
  • Updated code to match Freshteam OpenAPI spec update by @kaustavdm in #57
  • Add "repository" field in package.json by @kaustavdm in #56
  • Add tests by @teja-kummarikuntla in #51
  • Dependency security vulnerabilities addressed

New Contributors

Full Changelog: v0.1.0...v0.2.0

v0.1.0

17 Dec 04:27
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/freshworksinc/freshworks-api-sdk/commits/v0.1.0

v0.0.1 - Initial release

01 Nov 12:21
Compare
Choose a tag to compare
Added package-lock.json file