{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nudgelink-co/json-schema/nudgelink-co-run-out-schema.json",
  "title": "RunOut",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nudgelink-co-openapi.json#/components/schemas/RunOut",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "target_limit": {
      "type": "integer",
      "title": "Target Limit"
    },
    "score_threshold": {
      "type": "integer",
      "title": "Score Threshold"
    },
    "searched_count": {
      "type": "integer",
      "title": "Searched Count"
    },
    "scored_count": {
      "type": "integer",
      "title": "Scored Count"
    },
    "suggested_count": {
      "type": "integer",
      "title": "Suggested Count"
    },
    "credits_used": {
      "type": "integer",
      "title": "Credits Used"
    },
    "queries_used": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Queries Used"
    },
    "filters_used": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filters Used"
    },
    "score_distribution": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Score Distribution"
    },
    "funnel": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Funnel"
    },
    "failure_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Reason"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "discovery_mode": {
      "type": "string",
      "title": "Discovery Mode",
      "default": "linkedin"
    },
    "enriched_count": {
      "type": "integer",
      "title": "Enriched Count",
      "default": 0
    },
    "can_run_again": {
      "type": "boolean",
      "title": "Can Run Again",
      "default": false
    },
    "campaign_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Campaign Id"
    }
  },
  "type": "object",
  "required": [
    "id",
    "status",
    "target_limit",
    "score_threshold",
    "searched_count",
    "scored_count",
    "suggested_count",
    "credits_used",
    "queries_used",
    "failure_reason",
    "created_at",
    "completed_at"
  ]
}