Skip to content

Commit

Permalink
Final changes for release v0.3.0 (#85)
Browse files Browse the repository at this point in the history
* Update homepage URL in package.json

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@freshworks.com>

* Rename fs.tickets.restoreTicket(id) to fs.tickets.restore(id)

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@freshworks.com>

* Remove info about whitelisted-domains from docs

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@freshworks.com>

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@freshworks.com>
  • Loading branch information
Kaustav Das Modak authored Dec 21, 2022
1 parent b4aa584 commit eff8997
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/freshservice/tickets.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Restore a deleted Freshservice Ticket
```js
// Restore ticket with given ticket ID
const ticketId = 14000239432;
const restoredTicket = await fs.tickets.restoreTicket(ticketId);
const restoredTicket = await fs.tickets.restore(ticketId);
// use restoredTicket.json() to access object elements
```

Expand Down
13 changes: 0 additions & 13 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ To use this library in a Freshworks app, add the following to the `"dependencies
}
```

#### Apps on platform-version 2.2

For apps on platform-version up to `2.2`, allow the app to communicate with the domain for the product's REST API that you would be using (currently, only Freshteam and Freshservice). To do this, update the `"whitelisted-domains"` array in `manifest.json`:

```js
{
// ...
"whitelisted-domains": ["https://*.freshteam.com", "https://*.freshservice.com"]
}
```

#### Running

The Freshworks CLI (`fdk`) will fetch the dependency next time you run `fdk run`.

## Sample code
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"author": "Freshworks Inc",
"license": "MIT",
"homepage": "https://freshworks.dev/api-sdk/",
"homepage": "https://developers.freshworks.com/api-sdk/",
"repository": {
"type": "git",
"url": "https://github.com/freshworks/freshworks-api-sdk.git"
Expand Down
2 changes: 1 addition & 1 deletion src/freshservice/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class TicketUtil {
* @param {Number} id - ID of the ticket to be restored
* @return {Promise<Response>} - returns a Promise
*/
async restoreTicket(id) {
async restore(id) {
return this._api.restoreTicketWithHttpInfo(id).then(res => intoResponse(res));
}

Expand Down
2 changes: 1 addition & 1 deletion test/freshservice/ticket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe("Tickets API Test Suite", function () {
it("Restoring a ticket with given ticket ID", async function () {
const ticket_id = 14000239432;
mock.get(`/api/v2/tickets/${ticket_id}/restore`).reply(204);
const restoredTicket = await fs.tickets.restoreTicket(ticket_id);
const restoredTicket = await fs.tickets.restore(ticket_id);
expect(restoredTicket).toBeNull;
});
});
Expand Down

0 comments on commit eff8997

Please sign in to comment.