Skip to main content

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

nametyperequireddescription
keyStringYesA key for the module, which other modules can refer to. Must be unique within the manifest.
Regex: ^[a-zA-Z0-9_-]+$
functionStringYesA reference to the function module that defines the function
eventsString[]YesEvent 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.
}