Functions
Using functions, you can provide custom code and link it to your event sources, automations, or snap-kit actions. Functions are written in JavaScript and can be used to transform events, send notifications, or perform any other custom logic including network calls.
In order to create a snap-in version, functions must be defined as shown in the code samples. Functions are packaged and provided as an artifact at the time of snap-in version creation and then used to deploy functions to snap-in versions. An artifact may contain multiple function definitions. The artifact is a zip file containing the following files:
Function manifest
The function manifest consists of the following fields:
name
: It is the function name that should match the corresponding function name in the folder.description
: It describes the function.
Refer to the function invocation for details about the exact payload of the function.