{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/live-prospect-sprint.schema.json",
  "title": "Live Prospect Sprint",
  "type": "object",
  "required": [
    "schema_version",
    "mode"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "read_live_prospect_sprint",
        "list_targets",
        "build_prospect_record",
        "build_message",
        "create_prospect",
        "record_message_sent",
        "record_conversation_state",
        "update_prospect_state",
        "read_prospects",
        "read_sprint_status",
        "record_sprint_summary"
      ]
    },
    "prospect_id": {
      "type": "string"
    },
    "message_id": {
      "type": "string"
    },
    "summary_id": {
      "type": "string"
    },
    "target_name": {
      "type": "string"
    },
    "target_url": {
      "type": "string"
    },
    "target_role": {
      "type": "string"
    },
    "segment": {
      "type": "string"
    },
    "rail_fit": {
      "type": "string",
      "enum": [
        "packetops",
        "diligenceops"
      ]
    },
    "matched_rails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fit_reason": {
      "type": "string"
    },
    "contact_channel": {
      "type": "string"
    },
    "message_subject": {
      "type": "string"
    },
    "message_body": {
      "type": "string"
    },
    "message_state": {
      "type": "string",
      "enum": [
        "target_identified",
        "fit_scored",
        "message_drafted",
        "message_sent",
        "reply_received",
        "qualified_conversation",
        "pilot_intake_opened",
        "agent_use_run_started",
        "paid_run_scheduled",
        "closed_not_fit"
      ]
    },
    "next_action": {
      "type": "string"
    },
    "pilot_intake_url": {
      "type": "string"
    },
    "agent_use_url": {
      "type": "string"
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "messages_sent": {
      "type": "integer",
      "minimum": 0
    },
    "replies_received": {
      "type": "integer",
      "minimum": 0
    },
    "qualified_conversations": {
      "type": "integer",
      "minimum": 0
    },
    "pilot_intakes": {
      "type": "integer",
      "minimum": 0
    },
    "agent_use_runs_started": {
      "type": "integer",
      "minimum": 0
    },
    "paid_runs_scheduled": {
      "type": "integer",
      "minimum": 0
    },
    "rail_key": {
      "type": "string"
    },
    "company_name": {
      "type": "string"
    },
    "conversation_state": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
