Adding concept of internal and external actions.
This commit is contained in:
parent
458db567ea
commit
e94c629bab
|
@ -24,7 +24,7 @@ context("Create a automation", () => {
|
|||
})
|
||||
|
||||
// Create action
|
||||
cy.contains("Action").click()
|
||||
cy.contains("Internal").click()
|
||||
cy.contains("Create Row").click()
|
||||
cy.get(".setup").within(() => {
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
|
|
|
@ -14,15 +14,17 @@
|
|||
disabled: hasTrigger,
|
||||
},
|
||||
{
|
||||
label: "Action",
|
||||
label: "Internal",
|
||||
value: "ACTION",
|
||||
internal: true,
|
||||
icon: "Actions",
|
||||
disabled: !hasTrigger,
|
||||
},
|
||||
{
|
||||
label: "Logic",
|
||||
value: "LOGIC",
|
||||
icon: "Filter",
|
||||
label: "External",
|
||||
value: "ACTION",
|
||||
internal: false,
|
||||
icon: "Extension",
|
||||
disabled: !hasTrigger,
|
||||
},
|
||||
]
|
||||
|
@ -32,9 +34,13 @@
|
|||
let popover
|
||||
let webhookModal
|
||||
$: selectedTab = selectedIndex == null ? null : tabs[selectedIndex].value
|
||||
$: selectedInternal =
|
||||
selectedIndex == null ? null : tabs[selectedIndex].internal
|
||||
$: anchor = selectedIndex === -1 ? null : anchors[selectedIndex]
|
||||
$: blocks = sortBy(entry => entry[1].name)(
|
||||
Object.entries($automationStore.blockDefinitions[selectedTab] ?? {})
|
||||
).filter(
|
||||
entry => selectedInternal == null || entry[1].internal === selectedInternal
|
||||
)
|
||||
|
||||
function onChangeTab(idx) {
|
||||
|
|
|
@ -7,6 +7,7 @@ exports.definition = {
|
|||
icon: "ri-terminal-box-line",
|
||||
description: "Run a bash script",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "EXECUTE_BASH",
|
||||
inputs: {},
|
||||
schema: {
|
||||
|
|
|
@ -9,6 +9,7 @@ exports.definition = {
|
|||
icon: "ri-save-3-line",
|
||||
description: "Add a row to your database",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "CREATE_ROW",
|
||||
inputs: {},
|
||||
schema: {
|
||||
|
|
|
@ -6,6 +6,7 @@ exports.definition = {
|
|||
tagline: "Delay for {{inputs.time}} milliseconds",
|
||||
description: "Delay the automation until an amount of time has passed",
|
||||
stepId: "DELAY",
|
||||
internal: true,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -9,6 +9,7 @@ exports.definition = {
|
|||
tagline: "Delete a {{inputs.enriched.table.name}} row",
|
||||
type: "ACTION",
|
||||
stepId: "DELETE_ROW",
|
||||
internal: true,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -11,6 +11,7 @@ exports.definition = {
|
|||
icon: "ri-discord-line",
|
||||
stepId: "discord",
|
||||
type: "ACTION",
|
||||
internal: false,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -8,6 +8,7 @@ exports.definition = {
|
|||
description: "Execute a query in an external data connector",
|
||||
type: "ACTION",
|
||||
stepId: "EXECUTE_QUERY",
|
||||
internal: true,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -7,6 +7,7 @@ exports.definition = {
|
|||
icon: "ri-terminal-box-line",
|
||||
description: "Run a piece of JavaScript code in your automation",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "EXECUTE_SCRIPT",
|
||||
inputs: {},
|
||||
schema: {
|
||||
|
|
|
@ -21,6 +21,7 @@ exports.definition = {
|
|||
icon: "ri-git-branch-line",
|
||||
description: "Filter any automations which do not meet certain conditions",
|
||||
type: "LOGIC",
|
||||
internal: true,
|
||||
stepId: "FILTER",
|
||||
inputs: {
|
||||
condition: FilterConditions.EQUALS,
|
||||
|
|
|
@ -9,6 +9,7 @@ exports.definition = {
|
|||
icon: "ri-shut-down-line",
|
||||
stepId: "integromat",
|
||||
type: "ACTION",
|
||||
internal: false,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -23,6 +23,7 @@ exports.definition = {
|
|||
icon: "ri-send-plane-line",
|
||||
description: "Send a request of specified method to a URL",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "OUTGOING_WEBHOOK",
|
||||
inputs: {
|
||||
requestMethod: "POST",
|
||||
|
|
|
@ -6,6 +6,7 @@ exports.definition = {
|
|||
icon: "ri-mail-open-line",
|
||||
name: "Send Email (SMTP)",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "SEND_EMAIL_SMTP",
|
||||
inputs: {},
|
||||
schema: {
|
||||
|
|
|
@ -10,6 +10,7 @@ exports.definition = {
|
|||
icon: "ri-server-line",
|
||||
description: "Logs the given text to the server (using console.log)",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "SERVER_LOG",
|
||||
inputs: {
|
||||
text: "",
|
||||
|
|
|
@ -8,6 +8,7 @@ exports.definition = {
|
|||
icon: "ri-slack-line",
|
||||
stepId: "slack",
|
||||
type: "ACTION",
|
||||
internal: false,
|
||||
inputs: {},
|
||||
schema: {
|
||||
inputs: {
|
||||
|
|
|
@ -7,6 +7,7 @@ exports.definition = {
|
|||
icon: "ri-refresh-line",
|
||||
description: "Update a row in your database",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: "UPDATE_ROW",
|
||||
inputs: {},
|
||||
schema: {
|
||||
|
|
|
@ -5,6 +5,7 @@ exports.definition = {
|
|||
name: "Zapier Webhook",
|
||||
stepId: "zapier",
|
||||
type: "ACTION",
|
||||
internal: false,
|
||||
description: "Trigger a Zapier Zap via webhooks",
|
||||
tagline: "Trigger a Zapier Zap",
|
||||
icon: "ri-flashlight-line",
|
||||
|
|
Loading…
Reference in New Issue