{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/advisorppc-com/json-schema/advisorppc-com-anomaly-list-out-schema.json",
  "title": "AnomalyListOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/advisorppc-com-anomalies-api-openapi.yml#/components/schemas/AnomalyListOut",
  "properties": {
    "flags": {
      "items": {
        "$ref": "#/$defs/AnomalyFlagOut"
      },
      "type": "array",
      "title": "Flags"
    }
  },
  "type": "object",
  "required": [
    "flags"
  ],
  "$defs": {
    "AnomalyFlagOut": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "campaign_external_id": {
          "type": "string",
          "title": "Campaign External Id"
        },
        "account_ref": {
          "type": "string",
          "title": "Account Ref"
        },
        "account_label": {
          "type": "string",
          "title": "Account Label"
        },
        "metric": {
          "type": "string",
          "title": "Metric"
        },
        "day": {
          "type": "string",
          "format": "date",
          "title": "Day"
        },
        "observed": {
          "type": "number",
          "title": "Observed"
        },
        "baseline_mean": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Mean"
        },
        "baseline_std": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Std"
        },
        "sigma": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sigma"
        },
        "direction": {
          "type": "string",
          "title": "Direction"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "alerted_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Alerted At"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "provider",
        "campaign_external_id",
        "account_ref",
        "account_label",
        "metric",
        "day",
        "observed",
        "baseline_mean",
        "baseline_std",
        "sigma",
        "direction",
        "status",
        "alerted_at",
        "created_at"
      ],
      "title": "AnomalyFlagOut"
    }
  }
}