type: object
properties:
  script_path:
    type: string
    description: Path to the script or flow to execute when triggered
  permissioned_as:
    type: string
    description: The user or group this trigger runs as (permissioned_as)
  is_flow:
    type: boolean
    description: True if script_path points to a flow, false if it points to a script
  labels:
    type: array
    items:
      type: string
  draft_only:
    type: boolean
    description: 'True when this row is a per-user draft with no deployed

      trigger at the same path. Set by list endpoints when

      `include_draft_only=true` synthesizes the row from the

      draft. Frontend renders a "Draft" badge.

      '
  is_draft:
    type: boolean
    description: 'True when the authed user has a per-user draft at this path

      (over a deployed row or a synthesized draft-only row).

      Frontend appends a `*` to the displayed name.

      '
  amqp_resource_path:
    type: string
    description: Path to the AMQP resource containing broker connection configuration
  queue_name:
    type: string
    description: Name of the queue to consume messages from
  exchange:
    type: object
    properties:
      exchange_name:
        type: string
        description: Name of the exchange to bind the consumed queue to
      routing_keys:
        type: array
        items:
          type: string
        description: Routing keys used to bind the queue to the exchange
  options:
    type: object
    properties:
      declare_queue:
        type: boolean
        description: Declare the queue (durable) before consuming; when false the
          queue is declared passively and must already exist
      prefetch_count:
        type: integer
        format: int32
        minimum: 1
        maximum: 65535
        description: Maximum number of unacknowledged messages the broker delivers
          at once (1-65535)
  error_handler_path:
    type: string
    description: Path to a script or flow to run when the triggered job fails
  error_handler_args:
    type: object
    description: The arguments to pass to the script or flow
  retry:
    type: object
    properties:
      constant:
        type: object
        description: Retry with constant delay between attempts
        properties:
          attempts:
            type: integer
            description: Number of retry attempts
          seconds:
            type: integer
            description: Seconds to wait between retries
      exponential:
        type: object
        description: Retry with exponential backoff (delay doubles each time)
        properties:
          attempts:
            type: integer
            description: Number of retry attempts
          multiplier:
            type: integer
            description: Multiplier for exponential backoff
          seconds:
            type: integer
            minimum: 1
            description: Initial delay in seconds
          random_factor:
            type: integer
            minimum: 0
            maximum: 100
            description: Random jitter percentage (0-100) to avoid thundering herd
      retry_if:
        $ref: '#/components/schemas/RetryIf'
    description: Retry configuration for failed module executions
required:
- script_path
- permissioned_as
- is_flow
- amqp_resource_path
- queue_name
