-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Expand file tree
/
Copy pathdelete-solution-article.mjs
More file actions
49 lines (48 loc) · 1.1 KB
/
delete-solution-article.mjs
File metadata and controls
49 lines (48 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import freshdesk from "../../freshdesk.app.mjs";
export default {
key: "freshdesk-delete-solution-article",
name: "Delete Solution Article",
description: "Delete a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
freshdesk,
categoryId: {
propDefinition: [
freshdesk,
"categoryId",
],
},
folderId: {
propDefinition: [
freshdesk,
"folderId",
(c) => ({
categoryId: c.categoryId,
}),
],
},
articleId: {
propDefinition: [
freshdesk,
"articleId",
(c) => ({
folderId: c.folderId,
}),
],
},
},
async run({ $ }) {
const response = await this.freshdesk.deleteArticle({
$,
articleId: this.articleId,
});
$.export("$summary", `Successfully deleted solution article ${this.articleId}`);
return response;
},
};