Files
nodejs_example/triggers/counter.yaml
David Culbreth 62c42b3996 Convert all schemas to flat format with inline required/secret
All schemas (parameters, output, output_schema, conf_schema) now use the
StackStorm-style flat format expected by Attune:
  { param_name: { type, description, required, secret, ... } }

Instead of the standard JSON Schema format:
  { type: object, properties: { ... }, required: [...] }

Also fix rule template syntax: trigger.payload.* -> event.payload.*
2026-02-23 09:05:54 -06:00

53 lines
1.3 KiB
YAML

# Counter Trigger
# Fires periodically with an incrementing counter value
ref: nodejs_example.counter
label: "Counter Trigger"
description: "Fires at regular intervals with an incrementing counter value scoped per rule"
enabled: true
# Trigger type
type: custom
# Parameter schema - configuration for the trigger instance (flat format with inline required/secret)
parameters:
interval_seconds:
type: integer
description: "Seconds between each counter emission"
default: 1
minimum: 1
maximum: 3600
# Payload schema - data emitted when trigger fires (flat format with inline required/secret)
output:
counter:
type: integer
description: "Current counter value (monotonically increasing per rule)"
required: true
rule_ref:
type: string
description: "Reference of the rule that this counter is scoped to"
required: true
sensor_ref:
type: string
description: "Reference to the sensor that generated this event"
fired_at:
type: string
description: "Timestamp when the trigger fired"
required: true
# Tags for categorization
tags:
- counter
- example
- nodejs
# Documentation
examples:
- description: "Counter firing every second (default)"
parameters: {}
- description: "Counter firing every 5 seconds"
parameters:
interval_seconds: 5