| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- /**
- * @node click-trigger
- * @name Click Trigger
- * @category triggers
- * @version 1.0.0
- * @description Manual execution trigger - starts workflow when clicked
- * @trigger
- * @icon play
- */
- const configSchema = {
- type: 'object',
- properties: {
- label: {
- type: 'string',
- title: 'Button Label',
- default: 'Execute'
- }
- }
- };
- const inputSchema = {
- type: 'object',
- properties: {}
- };
- const outputSchema = {
- type: 'object',
- properties: {
- timestamp: { type: 'number' },
- triggeredBy: { type: 'string' },
- executionId: { type: 'string' }
- }
- };
- async function execute(config, input, context) {
- smartbotic.log.info('Click trigger activated');
- return {
- timestamp: Date.now(),
- triggeredBy: 'manual',
- executionId: context.executionId || smartbotic.utils.uuid()
- };
- }
- module.exports = { configSchema, inputSchema, outputSchema, execute };
|