NAV
json

Introduction

Welcome to the IdeasCloud Setup Documentation. Here you will find usefull assets to create any type of project.

Concepts:

Compiler

# RAW JSON
{
  "|&|email": "&.clientParams.email",
  "|$|fullname": {
    "fnKey": "concatText",
    "params": {
      "joinKey": ", ",
      "items": [
        {
          "|&|text": "&.clientParams.lastname"
        },
        {
          "|&|text": "&.clientParams.firstname"
        }
      ]
    }
  }
}

# Compiled JSON
{
  "email": "demo@email.com",
  "fullname": "Smith, John"
}

Injects context information into a RAW JSON specification.

To use a context variable append |&| before the attribute name and the compiler will replace the value of the attribute with the specified context variable.

To use a function append |$| before the attribute name and the compiler will replace the value of the attribute with the function output. In this case two attributes are required, the function name (fnKey) and the function params (params).

Setup Structure

{
  "globalVariables": {},
  "models": [],
  "services": [],
  "functions": [],
  "daemons": [],
  "webapps": [],
  "mobileapps": []
}

Setup components:

Models

{
  "key": "user",
  "name": "user",
  "schema": {
    "properties": {
      "name": { "type": "string" },
      "email": { "type": "string" },
      "phone": { "type": "string" }
    },
    "required": ["name", "email"]
  }
}

Representation of a specific type of information in the database.

Structure:

Functions

{
  "key": "myFunction",
  "paramsSchema": {
    "properties": {
      "details": { "type": "string" }
    },
    "required": ["details"]
  },
  "pipeline": [
    {
      "action": "registerElement",
      "params": {
        "modelKey": "log",
        "mappingSetup": {
          "|&|details": "&.functionParams.details"
        }
      }
    }
  ]
}

Stored pipeline, can be executed from any pipeline.

Structure:

Services

{
  "key": "user",
  "schema": {
    "properties": {
      "name": { "type": "string" },
      "email": { "type": "string" },
      "phone": { "type": "string" }
    },
    "required": ["name", "email"]
  },
  "pipeline": [
    {
      "action": "registerElement",
      "params": {
        "modelKey": "user",
        "mappingSetup": {
          "|&|name": "&.clientParams.name",
          "|&|email": "&.clientParams.email",
          "|&|phone": "&.clientParams.phone"
        }
      }
    }
  ]
}

Endpoint to access your project using HTTP

Structure:

Daemons

{
  "key": "myDaemon",
  "trigger": {
    "weekDays": "0123456",
    "at": 1050
  },
  "enableMultipliers": false,
  "executionPipeline": [
    {
      "action": "resolveActionParams",
      "params": {
        "|&|item": "&.multiplierItem"
      }
    }
  ]
}

Pipleline scheduled to execute in specified intervals.

Structure:

Web Apps

{
  "key": "othe-test-web-app",
  "middlewaresPipeline": [],
  "default": false,
  "plugins": [],
  "template": "",
  "params": {}
}

Web application.

Structure:

Compiler functions

generateRandomString

# Input
{
  "fnKey": "generateRandomString",
  "params": {
    "abc": "abcdefghijklmnopqrstuvwxyz0123456789",
    "size": 6
  }
}
# Output
"a59x0T"

Available in: General

Generates a random string only with the characters indicated in abc:

Params:

arrayMap#

#Input
{
  "fnKey": "arrayMap#",
  "params": {
    "array": [
      {
        "x": 1
      },
      {
        "x": 2
      },
      {
        "x": 3
      }
    ],
    "mapping": [
      { "key": "x" }
    ]
  }
}
#Output
[1,2,3]

Function in experimental development Available in: General

Solve an array with the specified structure resulting in a new array.

Params:

arrayRootMap

#Input
{
  "fnKey": "arrayRootMap",
  "params": {
    "array": [
      {
        "x": 1
      },
      {
        "x": 2
      },
      {
        "x": 3
      }
    ],
    "mappingSetup": {
      "|&|rootValue": "&.item.x"
    }
  }
}
#Output
[1,2,3]

Available in: General

Solve an array with the specified structure resulting in a new array.

Params:

arrayMapToAttribute

#Input
{
  "fnKey": "arrayMapToAttribute",
  "params": {
    "attributePath": "lastname"
    "array": [
      {
        "x": 1,
        "lastname": "García"
      },
      {
        "x": 2,
        "lastname": "Perez"
      },
      {
        "x": 3,
        "lastname": "Soto"
      }
    ],
  }
}
#Output
["Garcia", "Perez", "Soto"]

Function in experimental development Available in: General

Solve an array with the specified structure resulting in a new array.

Params:

conditionalExecution

#Input
{
  "fnKey": "conditionalExecution",
  "params": {
    "condition": true,
    "onConditionMet": {
      "fnKey": "consoleLog",
      "params": {
        "message": "Condition met"
      }
    },
    "onConditionNotMet": {
      "fnKey": "consoleLog",
      "params": {
        "message": "Condition not met"
      }
    }
  }
}
#Output
{
  "fnKey": "consoleLog",
  "params": {
    "message": "Condition met"
  }
},

Available in: General

Executes the specified function depending on the condition (if is met or not)

Params:

randomResolve

#Input
{
  "fnKey": "randomResolve",
  "params": {
    "items": [
      {
        "value": 1
      },
      {
        "value": 2
      },
      {
        "value": 3
      }
    ]
  }
}
#Output
3

Available in: General

Resolves a random item from the given array

Params:

resolveSwitchCase

#Input
{
  "fnKey": "resolveSwitchCase",
  "params": {
    "defaultValue": "Invalid option",
    "value": 1,
    "cases": [
      {
        "condition": 1,
        "value": "Option 1"
      },
      {
        "condition": 2,
        "value": "Option 2"
      }
    ]
  }
}
#Output
"Option 1"

Available in: General

Resolves value when case condition is met

Params:

generateObjectFromArrayWithConditional

#Input
{
  "fnKey": "generateObjectFromArrayWithConditionalAttributes",
  "params": {
    "array": [
      {
        "condition": true,
        "value": "Tim",
        "key": "name"
      },
      {
        "condition": false,
        "value": "Roberto",
        "key": "name"
      }
    ]
  }
}
#Output
{
  "name": "Tim"
}

Available in: General

Resolves an object with the keys that mets condition (if condition exists)

Params:

generateRandomColor

# Input
{
  "fnKey": "generateRandomColor",
  "params": {
    "representation": "rgb"
  }
}
# Output
"rgb( 59, 93, 13 )"

Available in: General

Generates a random color

Params:

generateRandomColorsArray

# Input
{
  "fnKey": "generateRandomColorsArray",
  "params": {
    "itemsNumber": 3,
    "representation": "rgb"
  }
}
# Output
[
  "rgb( 59, 93, 13 )",
  "rgb( 23, 43, 14 )",
  "rgb( 24, 12, 67 )"
]

Available in: General

Generates a random color

Params:

conditionalResolve

#Input
{
  "fnKey": "conditionalResolve",
  "params": {
    "condition": true,
    "valueOnConditionMet": "Condition met",
    "valueOnConditionNotMet": "Condition not met"
  }
}
#Output
"Condition met"

Available in: General

Resolves the value depending on the condition status (if is met or not)

Params:

consoleLog

{
  "fnKey": "consoleLog",
  "params": {
    "asd": 123
  }
}

Available in: Front-End

Logs parameters (parsed and raw)

Params:

httpStatusCodeIsError

#Input
{
  "fnKey": "httpStatusCodeIsError",
  "params": {
    "statusCode": 201
  }
}
#Output
false

Available in: Back-End

Resolves true when the passed status value is an error

Params:

default

#Input
{
  "fnKey": "default",
  "params": {
    "value": "testing"
    "defaultValue": "mydefault"
  }
}
#Output
"testing"

Available in: General

Resolves the value passed, if value is not available resolves the default value.

Params:

mathFloor

# Input
{
  "fnKey": "mathFloor",
  "params": {
    "value": 12.99
  }
}
# Output
12

Available in: General

Applies the math floor operation to the given value

Params:

mathCeil

# Input
{
  "fnKey": "mathCeil",
  "params": {
    "value": 12.1
  }
}
# Output
13

Available in: General

Applies the math ceil operation to the given value

Params:

mathRound

# Input
{
  "fnKey": "mathRound",
  "params": {
    "value": 12.1
  }
}
# Output
12

Available in: General

Applies the math ceil operation to the given value

Params:

mathOperation

#Input
{
  "fnKey": "mathOperation",
  "params": {
    "operation": "*",
    "items": [
      { "value": 5 },
      { "value": 3 },
      { "value": 2 }
    ]
  }
}
#Output
30

Available in: General

Resolves the math operation with the given values

Params:

resolveItem#

#Input
{
  "fnKey": "resolveItem#",
  "params": {
    "context": "Context",
  }
}
#Output

Function in experimental development Available in: General

changeCase

#Input
{
  "fnKey": "changeCase",
  "params": {
    "text": "I am the best",
    "case": "upperCase"
  }
}
#Output
"I AM THE BEST"

Available in: General

Changes the case of the text

Params:

jsonStringify

#Input
{
  "fnKey": "jsonStringify",
  "params": {
    "data": { "example": "This Will be parsed" },
    "indentation": 2
  }
}
#Output
"
{
  \"example\": \"This Will be parsed\"
}
"

Available in: General

Converts an object to a JSON text string.

Params:

breakDownObjectByAttributes

#Input
{
  "fnKey": "breakDownObjectByAttributes",
  "params": {
    "object": {
      "a": "test",
      "b": "test",
      "c": "test",
      "d": "test"
    },
    "skipEmpty": true
  }
}
#Output
[
  {
    "key": "a",
    "value": "test"
  },
  {
    "key": "b",
    "value": "test"
  },
  {
    "key": "c",
    "value": "test"
  },
  {
    "key": "d",
    "value": "test"
  }
]

Available in: General

Transform the object to an array with value and key.

Params:

getBaseTextSelector

#Input
{
  "fnKey": "getBaseTextSelector",
  "params": {
    "text": "This is an example text?. & I am very happy."
  }
}
#Output
"this is an example text i am very happy"

Available in: General

Remove selectors in input text.

Params:

jsonParse

#Input
{
  "fnKey": "jsonParse",
  "params": {
    "data": "{ \"example\": \"This Will be parsed\" }"
  }
}
#Output
{
  "example": "This Will be parsed"
}

Available in: General

Parses the passed string

Params:

arrayEvery

# Input
{
  "fnKey": "arrayEvery",
  "params": {
    "array": [
      {
        "condition": true
      },
      {
        "condition": false
      }
    ]
  }
}
# Output
false

Available in: General

Determines if all elements in the array satisfy a condition.

Params:

arraySome

# Input
{
  "fnKey": "arrayEvery",
  "params": {
    "array": [
      {
        "condition": true
      },
      {
        "condition": false
      }
    ]
  }
}
# Output
true

Available in: General

Return true if some conditions are met.

Params:

arrayReverse

# Input
{
  "fnKey": "arrayReverse",
  "params": {
    "array": [1,2,3,4,5,6,7]
  }
}
# Output
[7,6,5,4,3,2,1]

Available in: General

Returns the given array with reverse

Params:

splitText

# Input
{
  "fnKey": "splitText",
  "params": {
    "splitKey": ".",
    "splitRegExp": "",
    "splitRegExpFlags": "",
    "text": "This is a example Text. Thanks for supporting our community"

  }
}
# Output
[
  "This is a example Text",
  " Thanks for supporting our community"
]

Available in: General

Splits the given text

Params:

toDateObject

# Input
{
  "fnKey": "toDateObject",
  "params": {
    "date": 12212434123
  }
}
# Output
"1970-05-22T08:20:34.123Z"

Available in: General

Returns a Date type with the given date

Params:

textMatchesExpression

# Input
{
  "fnKey": "textMatchesExpression",
  "params": {
    "text": "This is a example Text. Thanks for supporting our community",
    "matchKey": "T",
    "matchRegExp": "",
    "matchRegExpFlags": ""
  }
}
# Output
false

Available in: General

Returns true if text matches the expression

Params:

multipleActions

# Input
{
  "fnKey": "multipleActions",
  "params": {
    "actions": [
      {
        "action": {
          "fnKey": "arrayReverse",
          "params": {
            "array": [1,2,3,4]
          }
        }
      },
      {
        "action": {
          "fnKey": "not",
          "params": {
            "value": false
          }
        }
      }
    ]
  }
}
# Output
null

Available in: General

Execute multiple actions

Params:

assignItemInArrayPosition

# Input
{
  "fnKey": "assignItemInArrayPosition",
  "params": {
    "array": [1,2,3,4,5,6,7],
    "index": 3,
    "item": 999
  }
}
# Output
[
  1,
  2,
  3,
  999,
  5,
  6,
  7
]

Available in: General

Assign a value in the given array position

Params:

removeItemInArrayPosition

# Input
{
  "fnKey": "removeItemInArrayPosition",
  "params": {
    "array": [1,2,3,4,5,6,7],
    "index": 3
  }
}
# Output
[
  1,
  2,
  3,
  5,
  6,
  7
]

Available in: General

Removes the item in the given array position

Params:

pushItemInArray

# Input
{
  "fnKey": "pushItemInArray",
  "params": {
    "array": [1,2,3,4],
    "item": 5
  }
}
# Output
[1,2,3,4,5]
false

Available in: General

Pushes an item to the given array and returns it

Params:

assignItemInObject

# Input
{
  "fnKey": "assignItemInObject",
  "params": {
    "object": { "name": "John" },
    "key": "lastname",
    "item": "Doe"
  }
}
# Output
{
  "name": "John",
  "lastname": "Doe"
}

Available in: General

Assigns an item in key

Params:

generateDateFromMSDifferenceFromNow

# Input
{
  "fnKey": "generateDateFromMSDifferenceFromNow",
  "params": {
    "msDifference": 3600
  }
}
# Output
"2021-04-20T00:35:51.360Z"

Available in: General

Generates a date applying the timestamp difference from current timestamp

Params:

getArrayItemAtIndex

# Input
{
  "fnKey": "getArrayItemAtIndex",
  "params": {
    "array": ["Hello","Do","You","Have","Some","Money"],
    "index": 2
  }
}
# Output
"You"
false

Available in: General

Resolves the item in the given index of the array

Params:

concatArray

# Input
{
  "fnKey": "concatArray",
  "params": {
    "items": [
      { "array": [1,2,3,4,5] },
      { "array": [6,7,8,9,10] }
    ]
  }
}
# Output
[1,2,3,4,5,6,7,8,9,10]

Available in: General

Concats given arrays

Params:

toDateString

# Input
{
  "fnKey": "toDateString",
  "params": {
    "date": 9999912399
  }
}
# Output
"Sun Apr 26 1970"

Available in: General

Returns a string from the given date

Params:

toTimeString

# Input
{
  "fnKey": "toTimeString",
  "params": {
    "time": 3600
  }
}
# Output
"60:00 hrs"

Available in: General

Resolves the time of the given time

Params:

getMsFromDate

# Input
{
  "fnKey": "getMsFromDate",
  "params": {
    "date": "Sun Apr 26 1970"
  }
}
# Output
9936000000

Available in: General

Resolves the milliseconds from the given date.

Params:

setUTCTimeForDate

# Input
{
  "fnKey": "setUTCTimeForDate",
  "params": {
    "date": "Sun Apr 26 1970",
    "time": {
      "hours": 1,
      "minutes": 10,
      "seconds": 30
    }
  }
}
# Output
9940230000

Available in: General

Returns the UTC value from the given date

Params:

fillWithLeftZerosWhenRequired

# Input
{
  "fnKey": "fillWithLeftZerosWhenRequired",
  "params": {
    "value": 12.2,
    "size": 10
  }
}
# Output
"00000012.2"

Available in: General

Returns a string with the given number with 0's if missing

Params:

conditional

# Input
{
  "fnKey": "conditional",
  "params": {
    "operator": "eq",
    "items": [
      { "value": 1 },
      { "value": 4 }
    ]
  }
}
# Output
false

Available in: General

Resolves the result of the conditional operation

Params:

not

# Input
{
  "fnKey": "not",
  "params": {
    "value": true
  }
}
# Output
false

Available in: General

Takes truth to falsity and vice versa.

Params:

concatText

# Input
{
  "fnKey": "concatText",
  "params": {
    "joinKey": ", ",
    "items": [
      {
        "|&|text": "&.clientParams.lastname"
      },
      {
        "|&|text": "&.clientParams.firstname"
      }
    ]
  }
}
# Output
"Smith, John"

Available in: General

Join all the elements of items into a string and return this string

Params:

# Input
{
  "fnKey": "openLink",
  "params": {
    "url": "https://ideascloud.io",
    "externalTab": true
  }
}
# Output
null

Available in: Front-end

Opens a url in the current tab or a new one if specified

Params:

showPrompt

# Input
{
  "fnKey": "showPrompt",
  "params": {
    "message": "Insert a value example",
    "value": "default value"
  }
}
# Output
null

Available in: Front-end

Show a prompt on the web page

Params:

showConfirm

# Input
{
  "fnKey": "showConfirm",
  "params": {
    "message": "Are you sure ?",
  }
}
# Output
null

Available in: Front-end

Displays a dialog box with a specified message, along with an OK and a Cancel button

Params:

showAlert

# Input
{
  "fnKey": "showAlert",
  "params": {
    "message": "The email is invalid.",
  }
}
# Output
null

Available in: Front-end

Displays a dialog box with a specified message, along with an OK button

Params:

decodeURIComponent

# Input
{
  "fnKey": "decodeURIComponent",
  "params": {
    "text": "https%3A%2F%2Fw3schools.com%2Fmy%20test.asp%3Fname%3Dst%C3%A5le%26car%3Dsaab"
  }
}
# Output
"https://w3schools.com/my test.asp?name=ståle&car=saab"

Available in: Front-end

Decodes a URI component.

Params:

encodeURIComponent

# Input
{
  "fnKey": "encodeURIComponent",
  "params": {
    "text": "https://w3schools.com/my test.asp?name=ståle&car=saab"
  }
}
# Output
"https%3A%2F%2Fw3schools.com%2Fmy%20test.asp%3Fname%3Dst%C3%A5le%26car%3Dsaab"

Available in: Front-end

Decodes a URI component.

Params:

translate

# Input
{
  "fnKey": "translate",
  "params": {}
}
# Output
"es"

Available in: Front-end

Returns the current language of the system.

storeInContextGlobalSessionVars

# Input
{
  "fnKey": "storeInContextGlobalSessionVars",
  "params": {
    "key": "isLoggedIn",
    "value": false
  }
}
# Output
null

Available in: Front-end

Save a new parameter in globalSessionVars.

Params:

redirect

# Input
{
  "fnKey": "redirect",
  "params": {
    "url": "www.google.com",
  }
}
# Output
null

Available in: Front-end

Redirect to a new page.

Params:

getLastWeekDaysArray

# Input
{
  "fnKey": "getLastWeekDaysArray",
  "params": {}
}
# Output
[
  {
      "date": "2021-04-14T21:09:26.761Z",
      "label": "Miercoles",
      "index": 3
  },
  {
      "date": "2021-04-15T21:09:26.761Z",
      "label": "Jueves",
      "index": 4
  },
  {
      "date": "2021-04-16T21:09:26.761Z",
      "label": "Viernes",
      "index": 5
  },
  {
      "date": "2021-04-17T21:09:26.761Z",
      "label": "Sabado",
      "index": 6
  },
  {
      "date": "2021-04-18T21:09:26.761Z",
      "label": "Domingo",
      "index": 0
  },
  {
      "date": "2021-04-19T21:09:26.761Z",
      "label": "Lunes",
      "index": 1
  },
  {
      "date": "2021-04-20T21:09:26.761Z",
      "label": "Martes",
      "index": 2
  }
]

Available in: Front-end

Returns information of the last 7 days elapsed

playNotificationSound

# Input
{
  "fnKey": "playNotificationSound",
  "params": {
    "sound": "https://test.com/miau.mp3
  }
}
# Output
null

Available in: Front-end

Play the default sound or a custom sound.

Params:

playSound

# Input
{
  "fnKey": "playSound",
  "params": {
    "sound": "https://test.com/miau.mp3
  }
}
# Output
null

Available in: Front-end

Play a custom sound.

Params:

setupSocketChannel

# Input
{
  "fnKey": "setupSocketChannel",
  "params": {
    "channelKey": "socketkey",
    "onData": {}
  }
}
# Output
null

Available in: Front-end

Set socket channel.

Params:

removeSocketChannel

# Input
{
  "fnKey": "removeSocketChannel",
  "params": {
    "channelKey": "socketkey"
  }
}
# Output
null

Available in: Front-end

Remove socket channel.

Params:

createPushNotification

# Input
{
  "fnKey": "createPushNotification",
  "params": {
    "title": "Lorem",
    "body": "Lorem ipsum",
    "icon": "www.test.com/icon.png",
    "timeout": 3600,
    "onClick": {}
  }
}
# Output
null

Create a push notification.

Params:

downloadFromJSONToExcel

# Input
{
  "fnKey": "downloadFromJSONToExcel",
  "params": {
    "data": [],
    "options": {},
  }
}
# Output
null

Available in: Front-End

Convert a JSON object list to an Excel file.

Params:

callService

# Input
{
  "fnKey": "callService",
  "params": {
    "serviceName": "deleteTodo",
    "serviceParams": {
      "|&|id": "&.item.id"
    },
    "onError": {
      "fnKey": "consoleLog",
      "params": {
        "message": "onError"
      }
    },
    "onSuccess" {
      "fnKey": "consoleLog",
      "params": {
        "message": "onSuccess"
      }
    }
  }
}
# Output
null

Available in: Front-End

Invoke a service.

Params:

callHTTPService

# Input
{
  "fnKey": "callHTTPService",
  "params": {
    "method": "POST",
    "url": "www.pokemonapi/postPokemon",
    "body": { "name": "Charmander" } ,
    "onError": {
      "fnKey": "consoleLog",
      "params": {
        "message": "onError"
      }
    },
    "onSuccess" {
      "fnKey": "consoleLog",
      "params": {
        "message": "onSuccess"
      }
    }
  }
}
# Output
null

Available in: Front-End

Invoke a service.

Params:

parseData

# Input
{
  "fnKey": "parseData",
  "params": {
    "type" : "objectid",
    "data": "123451234512345123451234"
  }
}
# Output
ObjectId("123451234512345123451234")

Available in: Back-end

Parses the passed data attribute to the specified type, available types: objectid, number, date

Params:

Pipeline Actions

registerElement

{
  "action": "registerElement",
  "params": {
    "modelKey": "user",
    "mappingSetup": {
      "|&|name": "&.clientParams.name",
      "|&|email": "&.clientParams.email",
      "|&|phone": "&.clientParams.phone"
    }
  }
}

Available in: General

Registers an element into the database

redirectWhenMatch

{
  "action": "redirectWhenMatch",
  "params": {
    "|&|match": "&.clientParams.data",
    "targetWhenMatch": "/url-to-redirect"
  }
}

Available in: Web app middlewares, services, functions

Redirects to a specified route when match value is true

updateElementById

{
  "action": "updateElementById",
  "params": {
    "modelKey": "user",
    "itemId": "&.clientParams.userId",
    "updateData": {
      "phone": "&.clientParams.phone"
    }
  }
}

Available in: Web app middlewares, services, functions

Updates a database element by id

Params:

updateElement

{
  "action": "updateElement",
  "params": {
    "modelKey": "user",
    "updateData": {
      "phone": "&.clientParams.phone"
    },
    "updateCriteria": {
      "email": null
    },
    "updateOptions": {
      "multi": true
    }
  }
}

Available in: Web app middlewares, services, functions

Updates item that matches passed criteria (if multi option passed updates multiple elements)

Params:

removeElementById

{
  "action": "removeElementById",
  "params": {
    "modelKey": "user",
    "itemId": "&.clientParams.userId"
  }
}

Available in: Web app middlewares, services, functions

Removes an element by id

Params:

findOneElement

{
  "action": "findOneElement",
  "params": {
    "modelKey": "user",
    "mappingSetup": {
      "|&|email": "&.clientParams.email"
    }
  }
}

Available in: Web app middlewares, services, functions

Find the element that matches criteria

Params:

elementsAggregation

{
  "action": "elementsAggregation",
  "params": {
    "modelKey": "user",
    "aggregationPipeline": [
      {
        "$match": {
          "|&|email": "&.clientParams.email"
        }
      },
      {
        "$lookup": {
          "from": "session",
          "localField": "_id",
          "foreignField": "userId",
          "as": "session"
        }
      }
    ]
  }
}

Available in: Web app middlewares, services, functions

Resolves the specified aggregation (executes a mongodb aggregation to the specified model)

Params:

resolveFirstElementOfOutputArray

{
  "action": "resolveFirstElementOfOutputArray",
  "params": {}
}

Available in: Web app middlewares, services, functions

Resolves the first element of the pevious action output

Params:

randomizeOutputArray

{
  "action": "randomizeOutputArray",
  "params": {}
}

Available in: Web app middlewares, services, functions

Resolves a randomized list of the previous action output

Params:

stopIfDoesntMatch

{
  "action": "stopIfDoesntMatch",
  "params": {
    "|&|match": "&.outputsMap.foundUser",
    "onError": {
      "status": 401,
      "details": "Invalid session"
    }
  }
}

Available in: Web app middlewares, services, functions

Stops the pipeline execution if the condition is not met.

Params:

resolveActionParams

#Input
{
  "action": "resolveActionParams",
  "params": {
    "|&|clientParams": "&.clientParams.title"
  }
}
#Output
{
  "clientParams": "The title!"
}

Available in: Web app middlewares, services, functions

Resolves parsed action params, useful for mapping pipeline outputs.

Params: Parameters are dynamic

replaceRoot

{
  "action": "replaceRoot",
  "params": {
    "newRoot": "&.outputsMap.foundUser"
  }
}

Available in: Web app middlewares, services, functions

Resolves the newRoot attribute, useful for mapping

Params:

sendRAWEmail

{
  "action": "sendRAWEmail",
  "params": {
    "emailTransporterSetup": {
      "host": "..",
      "port": "465",
      "secure": true,
      "auth": {
        "email": "myemail@domain.com",
        "passwoord": "password"
      }
    },
    "emailSetup": {
      "subject": "Hello!",
      "|&|to": "&.clientParams.email",
      "html": "<h1>Welcome!</h1>"
    }
  }
}

Available in: Web app middlewares, services, functions

Sends an email with HTML content, uses Nodemailer module

Params:

sendSlackMessage

{
  "action": "sendSlackMessage",
  "params": {
    "webhookUrl": "SLACK_WEBHOOK",
    "message": {
      "title": "Title",
      "text": "Hello!",
      "smallText": "Hello!",
      "color": "#555555"
    }
  }
}

Available in: Web app middlewares, services, functions

Sends a Slack message.

Params:

sshExecution

{
  "action": "sshExecution",
  "params": {}
}

Available in: web app middlewares, services, functions.

executes an ssh command to the specified connection.

httpRequest

{
  "action": "httpRequest",
  "params": {
    "url": "https://mydomain.com/api",
    "method": "POST",
    "headers": {
      "Content-Type": "application/json"
    },
    "body": {
      "content": "Hello World"
    }
  }
}

Available in: web app middlewares, services, functions.

Makes and resolves an HTTP Call.

Params:

conditionalPipelineExecution

{
  "action": "conditionalPipelineExecution",
  "params": {
    "defaultPipeline": [
      {
        "action": "resolveActionParams",
        "params": {
          "text": "Ops, try again"
        }
      }
    ],
    "pipelines": [
      {
        "|$|condition": {
          "fnKey": "conditional",
          "params": {
            "operator": "eq",
            "items": [
              {
                "|&|value": "&.clientParams.selectedOption"
              },
              {
                "value": "a"
              }
            ]
          }
        },
        "pipeline": [
          {
            "action": "resolveActionParams",
            "params": {
              "text": "You selected option a"
            }
          }
        ]
      },
      {
        "|$|condition": {
          "fnKey": "conditional",
          "params": {
            "operator": "eq",
            "items": [
              {
                "|&|value": "&.clientParams.selectedOption"
              },
              {
                "value": "b"
              }
            ]
          }
        },
        "pipeline": [
          {
            "action": "resolveActionParams",
            "params": {
              "text": "You selected option b"
            }
          }
        ]
      }
    ]
  }
}

Available in: web app middlewares, services, functions.

Executes an specific pipeline when the condition is met.

Params:

executeFunction

{
  "action": "executeFunction",
  "params": {
    "functionKey": "functionKey",
    "params": {
      "text": "Test"
    }
  }
}

Available in: web app middlewares, services, functions.

Execute a stored function.

Params:

setCookiesWhenRequired

{
  "action": "setCookiesWhenRequired",
  "params": {
    "mappingSetup": {
      "|&|sessionKey": "&.outputsMap.newSession.key"
    }
  }
}

Available in: web app middlewares, services, functions.

Sets cookies when client has enabled it.

Params: