Skip to content

Commit 76dd092

Browse files
committed
updates
1 parent 7b76ded commit 76dd092

File tree

7 files changed

+89
-24
lines changed

7 files changed

+89
-24
lines changed

components/zoho_desk/actions/get-article/get-article.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import zohoDesk from "../../zoho_desk.app.mjs";
33
export default {
44
key: "zoho_desk-get-article",
55
name: "Get Article",
6-
description: "Retrieves the details of a knowledge base article. [See the docs here](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Getarticle)",
6+
description: "Retrieves the details of a knowledge base article. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Getarticle)",
77
type: "action",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,
@@ -32,6 +32,9 @@ export default {
3232
propDefinition: [
3333
zohoDesk,
3434
"articleId",
35+
({ portalId }) => ({
36+
portalId,
37+
}),
3538
],
3639
},
3740
},

components/zoho_desk/actions/list-articles/list-articles.mjs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import zohoDesk from "../../zoho_desk.app.mjs";
22
export default {
33
key: "zoho_desk-list-articles",
44
name: "List Articles",
5-
description: "Lists knowledge base articles for a help center. [See the docs here](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase#KnowledgeBase_Listarticles)",
5+
description: "Lists knowledge base articles for a help center. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase#KnowledgeBase_Listarticles)",
66
type: "action",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -28,15 +28,18 @@ export default {
2828
],
2929
},
3030
categoryId: {
31-
type: "string",
32-
label: "Category ID",
33-
description: "Filter by the ID(s) of the categories the articles belong to. Use comma-separated IDs to include multiple categories.",
34-
optional: true,
31+
propDefinition: [
32+
zohoDesk,
33+
"categoryId",
34+
({ portalId }) => ({
35+
portalId,
36+
}),
37+
],
3538
},
3639
sortBy: {
3740
type: "string",
3841
label: "Sort By",
39-
description: "Sort articles by the specified attribute.",
42+
description: "Sort articles by the specified attribute",
4043
optional: true,
4144
options: [
4245
"createdTime",
@@ -50,7 +53,7 @@ export default {
5053
tag: {
5154
type: "string",
5255
label: "Tag",
53-
description: "Filter articles by a tag.",
56+
description: "Filter articles by a tag",
5457
optional: true,
5558
},
5659
maxResults: {

components/zoho_desk/actions/list-help-centers/list-help-centers.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import zohoDesk from "../../zoho_desk.app.mjs";
33
export default {
44
key: "zoho_desk-list-help-centers",
55
name: "List Help Centers",
6-
description: "Lists the help centers configured in an organization. [See the docs here](https://desk.zoho.com/portal/APIDocument.do#HelpCenters_Listhelpcenters)",
6+
description: "Lists the help centers configured in an organization. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#HelpCenters_Listhelpcenters)",
77
type: "action",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/zoho_desk/actions/list-root-categories/list-root-categories.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import zohoDesk from "../../zoho_desk.app.mjs";
22
export default {
33
key: "zoho_desk-list-root-categories",
44
name: "List Root Categories",
5-
description: "Lists root knowledge base categories for a help center. [See the docs here](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Listallrootcategoriesofthehelpcenter)",
5+
description: "Lists root knowledge base categories for a help center. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Listallrootcategoriesofthehelpcenter)",
66
type: "action",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -50,8 +50,10 @@ export default {
5050
optional: true,
5151
},
5252
departmentId: {
53-
type: "string",
54-
label: "Department ID",
53+
propDefinition: [
54+
zohoDesk,
55+
"departmentId",
56+
],
5557
description: "Filter categories associated with the specified department.",
5658
optional: true,
5759
},

components/zoho_desk/actions/search-articles/search-articles.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import zohoDesk from "../../zoho_desk.app.mjs";
22
export default {
33
key: "zoho_desk-search-articles",
44
name: "Search Articles",
5-
description: "Searches for knowledge base articles. [See the docs here](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Searcharticles)",
5+
description: "Searches for knowledge base articles. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Searcharticles)",
66
type: "action",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -33,10 +33,13 @@ export default {
3333
description: "The keywords to search for within articles.",
3434
},
3535
categoryId: {
36-
type: "string",
37-
label: "Category ID",
38-
description: "Filter by articles belonging to the specified category.",
39-
optional: true,
36+
propDefinition: [
37+
zohoDesk,
38+
"categoryId",
39+
({ portalId }) => ({
40+
portalId,
41+
}),
42+
],
4043
},
4144
sortBy: {
4245
type: "string",

components/zoho_desk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/zoho_desk",
3-
"version": "0.2.3",
3+
"version": "0.3.0",
44
"description": "Pipedream Zoho_desk Components",
55
"main": "zoho_desk.app.mjs",
66
"keywords": [

components/zoho_desk/zoho_desk.app.mjs

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,61 @@ export default {
126126
articleId: {
127127
type: "string",
128128
label: "Article ID",
129-
description: "The ID of the knowledge base article.",
129+
description: "The ID of the knowledge base article",
130+
async options({
131+
portalId, prevContext,
132+
}) {
133+
const { data } = await this.listKnowledgeBaseArticles({
134+
params: {
135+
portalId,
136+
from: prevContext?.from,
137+
limit: constants.DEFAULT_LIMIT,
138+
},
139+
});
140+
return {
141+
options: data?.map(({
142+
id: value, title: label,
143+
}) => ({
144+
value,
145+
label,
146+
})) || [],
147+
context: {
148+
from: data?.length
149+
? data[data.length - 1].id
150+
: null,
151+
},
152+
};
153+
},
154+
},
155+
categoryId: {
156+
type: "string",
157+
label: "Category ID",
158+
description: "Filter by the ID(s) of the categories the articles belong to. Use comma-separated IDs to include multiple categories.",
159+
optional: true,
160+
async options({
161+
portalId, prevContext,
162+
}) {
163+
const { data } = await this.listKnowledgeBaseRootCategories({
164+
params: {
165+
portalId,
166+
from: prevContext?.from,
167+
limit: constants.DEFAULT_LIMIT,
168+
},
169+
});
170+
return {
171+
options: data?.map(({
172+
id: value, name: label,
173+
}) => ({
174+
value,
175+
label,
176+
})) || [],
177+
context: {
178+
from: data?.length
179+
? data[data.length - 1].id
180+
: null,
181+
},
182+
};
183+
},
130184
},
131185
maxResults: {
132186
type: "integer",

0 commit comments

Comments
 (0)