Skip to content

Commit 5bdc8e5

Browse files
committed
Enhance Dixa component with new actions and version updates
- Added `getArticle` and `getArticleTranslations` actions to retrieve articles and their translations from Dixa. - Updated version numbers for existing actions to 0.0.3. - Incremented package version to 0.2.0 and updated dependency for `@pipedream/platform` to ^3.1.0. - Updated source components' versions to 0.0.2 for consistency.
1 parent 1ccd2b4 commit 5bdc8e5

File tree

13 files changed

+87
-11
lines changed

13 files changed

+87
-11
lines changed

components/dixa/actions/add-message/add-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "dixa-add-message",
55
name: "Add Message to Conversation",
66
description: "Adds a message to an existing conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/postConversationsConversationidMessages).",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/dixa/actions/create-conversation/create-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "dixa-create-conversation",
55
name: "Create Conversation",
66
description: "Creates a new email or contact form-based conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/postConversations).",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import dixa from "../../dixa.app.mjs";
2+
3+
export default {
4+
key: "dixa-get-article-translations",
5+
name: "Get Article Translations",
6+
description: "Get the translations of an article from Dixa. [See the documentation](https://docs.dixa.io/openapi/dixa-api/beta/tag/Knowledge/#tag/Knowledge/operation/getKnowledgeArticlesArticleidTranslations)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: true,
13+
},
14+
props: {
15+
dixa,
16+
articleId: {
17+
type: "string",
18+
label: "Article ID",
19+
description: "The ID of the article to get translations for",
20+
},
21+
},
22+
async run({ $ }) {
23+
const response = await this.dixa.getArticleTranslations({
24+
articleId: this.articleId,
25+
$,
26+
});
27+
$.export("$summary", `Successfully retrieved translations for article with ID ${this.articleId}`);
28+
return response;
29+
},
30+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import dixa from "../../dixa.app.mjs";
2+
3+
export default {
4+
key: "dixa-get-article",
5+
name: "Get Article",
6+
description: "Get an article from Dixa. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Knowledge/#tag/Knowledge/operation/getKnowledgeArticlesArticleid)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: true,
13+
},
14+
props: {
15+
dixa,
16+
articleId: {
17+
type: "string",
18+
label: "Article ID",
19+
description: "The ID of the article to get",
20+
},
21+
},
22+
async run({ $ }) {
23+
const response = await this.dixa.getArticle({
24+
articleId: this.articleId,
25+
$,
26+
});
27+
$.export("$summary", `Successfully retrieved article with ID ${this.articleId}`);
28+
return response;
29+
},
30+
};

components/dixa/actions/set-custom-contact-attributes/set-custom-contact-attributes.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "dixa-set-custom-contact-attributes",
55
name: "Set Custom Contact Attributes",
66
description: "Updates custom attributes for a specified user. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Custom-Attributes/#tag/Custom-Attributes/operation/patchEndusersUseridCustom-attributes)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: true,
1010
openWorldHint: true,

components/dixa/actions/tag-conversation/tag-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "dixa-tag-conversation",
55
name: "Add Tag to Conversation",
66
description: "Adds a tag to a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Tags/#tag/Tags/operation/putConversationsConversationidTagsTagid)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/dixa/dixa.app.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,21 @@ export default {
208208
...opts,
209209
});
210210
},
211+
getArticle({
212+
articleId, ...opts
213+
}) {
214+
return this._makeRequest({
215+
path: `/knowledge/articles/${articleId}`,
216+
...opts,
217+
});
218+
},
219+
getArticleTranslations({
220+
articleId, ...opts
221+
}) {
222+
return this._makeRequest({
223+
path: `/knowledge/articles/${articleId}/translations`,
224+
...opts,
225+
});
226+
},
211227
},
212228
};

components/dixa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/dixa",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Pipedream Dixa Components",
55
"main": "dixa.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^3.0.3"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

components/dixa/sources/conversation-status-changed-instant/conversation-status-changed-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "dixa-conversation-status-changed-instant",
77
name: "New Conversation Status Changed (Instant)",
88
description: "Emit new events when the status of a conversation changes (e.g., open, closed, or abandoned). [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Webhooks/).",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

components/dixa/sources/new-conversation-created-instant/new-conversation-created-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "dixa-new-conversation-created-instant",
77
name: "New Conversation Created (Instant)",
88
description: "Emit new event when a conversation is created in Dixa. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Webhooks/).",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

0 commit comments

Comments
 (0)