Skip to content

Commit eff8997

Browse files
author
Kaustav Das Modak
authored
Final changes for release v0.3.0 (#85)
* 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>
1 parent b4aa584 commit eff8997

File tree

5 files changed

+4
-17
lines changed

5 files changed

+4
-17
lines changed

docs/freshservice/tickets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Restore a deleted Freshservice Ticket
147147
```js
148148
// Restore ticket with given ticket ID
149149
const ticketId = 14000239432;
150-
const restoredTicket = await fs.tickets.restoreTicket(ticketId);
150+
const restoredTicket = await fs.tickets.restore(ticketId);
151151
// use restoredTicket.json() to access object elements
152152
```
153153

docs/get-started.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,6 @@ To use this library in a Freshworks app, add the following to the `"dependencies
3434
}
3535
```
3636

37-
#### Apps on platform-version 2.2
38-
39-
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`:
40-
41-
```js
42-
{
43-
// ...
44-
"whitelisted-domains": ["https://*.freshteam.com", "https://*.freshservice.com"]
45-
}
46-
```
47-
48-
#### Running
49-
5037
The Freshworks CLI (`fdk`) will fetch the dependency next time you run `fdk run`.
5138

5239
## Sample code

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"author": "Freshworks Inc",
2929
"license": "MIT",
30-
"homepage": "https://freshworks.dev/api-sdk/",
30+
"homepage": "https://developers.freshworks.com/api-sdk/",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/freshworks/freshworks-api-sdk.git"

src/freshservice/tickets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TicketUtil {
6969
* @param {Number} id - ID of the ticket to be restored
7070
* @return {Promise<Response>} - returns a Promise
7171
*/
72-
async restoreTicket(id) {
72+
async restore(id) {
7373
return this._api.restoreTicketWithHttpInfo(id).then(res => intoResponse(res));
7474
}
7575

test/freshservice/ticket.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ describe("Tickets API Test Suite", function () {
9595
it("Restoring a ticket with given ticket ID", async function () {
9696
const ticket_id = 14000239432;
9797
mock.get(`/api/v2/tickets/${ticket_id}/restore`).reply(204);
98-
const restoredTicket = await fs.tickets.restoreTicket(ticket_id);
98+
const restoredTicket = await fs.tickets.restore(ticket_id);
9999
expect(restoredTicket).toBeNull;
100100
});
101101
});

0 commit comments

Comments
 (0)