# Existing Nickel configuration schema
# This demonstrates Mode D: converting existing Nickel to provisioning structure

# Infrastructure types
{
  # Server configuration
  Server = {
    hostname | String,
    port | Number,
    tls_enabled | Bool | optional,
    certificate_path | String | optional,
  },

  # Database connection configuration
  Database = {
    engine | String,  # "postgres", "mysql", "sqlite"
    host | String | optional,
    port | Number | optional,
    database | String,
    username | String | optional,
    password | String | optional,
    ssl_mode | String | optional,
  },

  # Authentication settings
  Authentication = {
    provider | String,  # "jwt", "oauth2", "basic"
    secret_key | String,
    expiry_hours | Number | optional,
    refresh_enabled | Bool | optional,
  },

  # Monitoring configuration
  Monitoring = {
    enabled | Bool,
    prometheus_url | String | optional,
    scrape_interval | String | optional,
    retention_days | Number | optional,
  },

  # Application features
  Application = {
    name | String,
    version | String,
    debug | Bool | optional,
    log_level | String | optional,  # "trace", "debug", "info", "warn", "error"
    max_connections | Number | optional,
  },

  # Complete service configuration
  ServiceConfig = {
    application | Application,
    server | Server,
    database | Database,
    authentication | Authentication,
    monitoring | Monitoring,
  },
}
