Skip to content

Commit 8cc18ce

Browse files
committed
feat: support chatbot actions on automations
1 parent 1b1a2ef commit 8cc18ce

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

libs/definitions/src/integration-definitions/chatbot/actions/get-user-intent.action.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ export class GetUserIntentAction extends OperationAction {
2222
message: {
2323
title: 'User Message',
2424
type: 'string',
25-
'x-ui:widget': 'hidden',
26-
default: '{{message.content}}',
25+
'x-if:chatbot': {
26+
'x-ui:widget': 'hidden',
27+
default: '{{message.content}}',
28+
},
2729
} as JSONSchema7Definition,
2830
intents: {
2931
title: 'List of User Intents',

libs/definitions/src/integration-definitions/chatbot/actions/send-ai-message.action.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ export class SendAiMessageAction extends OperationAction {
2222
title: 'Conversation ID',
2323
type: 'string',
2424
description: 'ID of the conversation to send the message to',
25-
'x-ui:widget': 'hidden',
26-
default: '{{trigger.conversation.id}}',
25+
'x-if:chatbot': {
26+
'x-ui:widget': 'hidden',
27+
default: '{{trigger.conversation.id}}',
28+
},
2729
} as JSONSchema7Definition,
2830
prompt: {
2931
title: 'Prompt',

libs/definitions/src/integration-definitions/chatbot/actions/send-chatbot-message.action.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ export class SendChatbotMessageAction extends OperationOffChain {
1919
title: 'Conversation ID',
2020
type: 'string',
2121
description: 'ID of the conversation to send the message to',
22-
'x-ui:widget': 'hidden',
23-
default: '{{trigger.conversation.id}}',
22+
'x-if:chatbot': {
23+
'x-ui:widget': 'hidden',
24+
default: '{{trigger.conversation.id}}',
25+
},
2426
} as JSONSchema7Definition,
2527
message: {
2628
title: 'Message',

libs/definitions/src/integration-definitions/contacts/actions/add-tag-contact.action.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ export class AddTagContactAction extends OperationOffChain {
1616
inputs: JSONSchema7 = {
1717
required: ['address', 'tags'],
1818
properties: {
19-
// TODO this should be auto-filled on chatbots but not automations
2019
address: {
2120
title: 'Wallet Address',
2221
type: 'string',
23-
'x-ui:widget': 'hidden',
24-
default: '{{contact.address}}',
22+
'x-if:chatbot': {
23+
'x-ui:widget': 'hidden',
24+
default: '{{contact.address}}',
25+
},
2526
} as JSONSchema7Definition,
2627
tags: {
2728
title: 'Tags',

libs/definitions/src/integration-definitions/contacts/actions/remove-tag-contact.action.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ export class RemoveTagContactAction extends OperationOffChain {
1616
inputs: JSONSchema7 = {
1717
required: ['address', 'tags'],
1818
properties: {
19-
// TODO this should be auto-filled on chatbots but not automations
2019
address: {
2120
title: 'Wallet Address',
2221
type: 'string',
23-
'x-ui:widget': 'hidden',
24-
default: '{{contact.address}}',
22+
'x-if:chatbot': {
23+
'x-ui:widget': 'hidden',
24+
default: '{{contact.address}}',
25+
},
2526
} as JSONSchema7Definition,
2627
tags: {
2728
title: 'Tags',

schemas/openapi3/contacts-1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Contacts",
55
"version": "1",
6-
"x-categories": [],
6+
"x-categories": ["popular"],
77
"x-logo": { "url": "/img/contact.svg" }
88
},
99
"paths": {}

0 commit comments

Comments
 (0)