Releases: freshworks/freshworks-api-sdk
Releases · freshworks/freshworks-api-sdk
v0.3.0
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 theheaders
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 ticketsfs.tickets.get(id, opts)
- Get ticket by ID, with additional options to include detailsfs.tickets.create(ticket)
- Create a new ticketfs.tickets.update(id, ticket)
- Update an existing ticketfs.tickets.delete(id)
- Delete ticket by idfs.tickets.restore(id)
- Restore ticket by IDfs.tickets.createChildTicket(parentId, childTicket)
- Create a child ticket for a given parent ticketfs.tickets.timeEntry(ticketId, timeEntryId)
- Get a time entry by ID for a given ticketfs.tickets.timeEntries(ticketId, opts)
- Get all time entries for a ticketfs.tickets.createTimeEntry(ticketId, timeEntry)
- Create a time entry for a ticketfs.tickets.updateTimeEntry(ticketId, timeEntryId, timeEntry)
- Update an existing time entry for a ticketfs.tickets.deleteTimeEntry(ticketId, timeEntryId)
- Delete an existing time entry for a ticketfs.tickets.createSource(source)
- Create a new ticket sourcefs.tickets.getTask(ticketId, taskId)
- Get a specific task by idfs.tickets.getTasks(ticketId, opts)
- Get all tasks for a given ticketfs.tickets.createTask(ticketId, task)
- Create a new task for a given ticketfs.tickets.updateTask(ticketId, taskId, task)
- Update an existing taskfs.tickets.deleteTask(ticketId, taskId)
- Delete an existing task
See the docs for more details.
v0.2.1
What's Changed
- Fix dependency vulnerability from vuepress by @kaustavdm in #63
Full Changelog: v0.2.0...v0.2.1
v0.2.0
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
- Bump markdown-it from 12.3.0 to 12.3.2 by @dependabot in #52
- Bump follow-redirects from 1.14.6 to 1.14.7 by @dependabot in #53
- Bump nanoid from 3.1.30 to 3.2.0 by @dependabot in #54
- Update dependencies to fix security vulnerabilities by @kaustavdm in #55
New Contributors
- @dependabot made their first contribution in #52
Full Changelog: v0.1.0...v0.2.0
v0.1.0
What's Changed
- [DEVREL-1409] Add method signatures for timeoffs and job postings by @ravirajsubramanian in #1
- Get generated client working by @kaustavdm in #3
- [DEVREL-1512] Added wrapper functions for all generated methods by @ravirajsubramanian in #4
- Integrate APIs with generated SDK by @kaustavdm in #5
- Document usage instructions for Freshteam APIs in README by @kaustavdm in #17
- added github actions workflow for npm publish flow by @ravirajsubramanian in #22
- Update build command for release-pipeline by @kaustavdm in #23
- changed pipeline to self-hosted by @ravirajsubramanian in #25
- Added package-lock.json file by @ravirajsubramanian in #26
- Add build and test workflow by @kaustavdm in #24
- Setup HTTP mock tests by @kaustavdm in #28
- Add: Integration-tests for Freshteam Branches API by @teja-kummarikuntla in #31
- Added a sample freshworks serverless app by @ravirajsubramanian in #30
- Move example app to @freshworks-developers/api-sdk-samples by @kaustavdm in #37
- Add: Integration test for freshteam/employees by @teja-kummarikuntla in #41
- Codegen update: Use original case convention for property names by @kaustavdm in #40
- [#35] Remove deployment tasks from GitHub Actions by @ravirajsubramanian in #42
- Document query params by @kaustavdm in #44
- Add: pagination test for freshteam/employees by @teja-kummarikuntla in #47
- Tweaks, test | freshteam/branches by @teja-kummarikuntla in #48
- Setup docs with Vuepress + typedoc by @kaustavdm in #49
- Version pushed up to 0.1.0 by @ravirajsubramanian in #50
New Contributors
- @teja-kummarikuntla made their first contribution in #31
Full Changelog: https://github.com/freshworksinc/freshworks-api-sdk/commits/v0.1.0
v0.0.1 - Initial release
Added package-lock.json file