# Schema for the configuration files of the Rules module.

rules.component.*:
  type: config_entity
  label: 'Rules component'
  mapping:
    id:
      type: string
      label: 'ID'
    label:
      type: label
      label: 'Label'
    description:
      type: text
      label: 'Administrative description'
    tags:
      type: sequence
      label: Tags
      sequence:
        type: string
        label: 'Tag'
    config_version:
      type: string
      label: 'Configuration schema version'
    component:
      type: rules_component

rules.reaction.*:
  type: config_entity
  label: 'Reaction rule'
  mapping:
    id:
      type: string
      label: 'ID'
    label:
      type: label
      label: 'Label'
    events:
      type: sequence
      label: 'Events'
      sequence:
        type: mapping
        label: 'Event'
        mapping:
          event_name:
            type: string
            label: 'Name'
          configuration:
            type: sequence
            label: 'Configuration'
            sequence:
              type: mapping
    description:
      type: text
      label: 'Administrative description'
    tags:
      type: sequence
      label: Tags
      sequence:
        type: string
        label: 'Tag'
    config_version:
      type: string
      label: 'Configuration schema version'
    expression:
      type: rules_expression.[id]
      label: 'Expression configuration'

rules.settings:
  type: config_object
  label: 'Rules settings'
  mapping:
    system_log:
      type: mapping
      label: 'System logging'
      mapping:
        log_level:
          type: string
          label: 'Evaluation errors log level'
    debug_log:
      type: mapping
      label: 'Debug logging'
      mapping:
        enabled:
          type: boolean
          label: 'Enable debug logging to screen'
        system_debug:
          type: boolean
          label: 'Also log debug information to system log'
        log_level:
          type: string
          label: 'Debug log level'
