# Schema for the configuration files of the Update Status module.

update.settings:
  type: config_object
  label: 'Update settings'
  constraints:
    FullyValidatable: ~
  mapping:
    check:
      type: mapping
      label: 'Check settings'
      mapping:
        disabled_extensions:
          type: boolean
          label: 'Check for updates of uninstalled modules and themes'
        interval_days:
          type: integer
          label: 'Days since last check'
          constraints:
            # @see \Drupal\update\UpdateSettingsForm::buildForm()
            # The options are daily and weekly.
            Choice:
              choices: [1, 7]
    fetch:
      type: mapping
      label: 'Fetch settings'
      mapping:
        url:
          type: uri
          nullable: true
          label: 'URL for fetching available update data'
        max_attempts:
          type: integer
          label: 'Maximum attempts'
          constraints:
            Range:
              min: 1
        timeout:
          type: integer
          label: 'Timeout in seconds'
          constraints:
            Range:
              min: 1
    notification:
      type: mapping
      label: 'Notification settings'
      mapping:
        emails:
          type: sequence
          label: 'Email addresses to notify when updates are available'
          sequence:
            type: email
            label: 'Email'
        threshold:
          type: string
          label: 'Email notification threshold'
          constraints:
            # @see \Drupal\update\UpdateSettingsForm::buildForm()
            Choice:
              choices: [all, security]
