| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /**
- * @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' }
- }
- };
- 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 };
|