Trigger
The Trigger
module declares a set of functions that are called when the event is triggered, such as the Created
event when an item is created.
Manifest example
modules:
trigger:
- key: item-before-save-trigger
events:
- gei:proxima:item:beforeCreate
- gei:proxima:item:beforeUpdate
function: item-before-save-function-key
function:
- key: item-before-save-function-key
handler: index.runItemBeforeSave
Properties
name | type | required | description |
---|---|---|---|
key | String | Yes | A key for the module, which other modules can refer to. Must be unique within the manifest. Regex: ^[a-zA-Z0-9_-]+$ |
function | String | Yes | A reference to the function module that defines the function |
events | String[] | Yes | Event list, refer to event documentation |
Example
export const runItemBeforeSave = async({ payload }) => {
// payload is the input parameter, which varies for different events. Refer to the event list for details.
}