{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/pilot-intake-request.schema.json",
  "title": "Wever Labs Pilot Intake Request v1",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "rail",
    "requester",
    "pilot_scope",
    "consent"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "pilot_intake_request.v1"
    },
    "rail": {
      "type": "string",
      "enum": [
        "packetops",
        "diligenceops"
      ]
    },
    "requester": {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "company": {
          "type": "string"
        },
        "requester_type": {
          "type": "string",
          "enum": [
            "operator_customer",
            "agent_builder",
            "operator",
            "partner",
            "unknown"
          ]
        }
      }
    },
    "pilot_scope": {
      "type": "string",
      "minLength": 5
    },
    "workflow_context": {
      "type": "object",
      "properties": {
        "available_items": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "expected_items": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operator_notes": {
          "type": "string"
        }
      }
    },
    "consent": {
      "type": "object",
      "required": [
        "operator_review_review_accepted"
      ],
      "properties": {
        "operator_review_review_accepted": {
          "type": "boolean",
          "const": true
        }
      }
    },
    "callback_url": {
      "type": "string",
      "format": "uri"
    },
    "sample_seen": {
      "type": "boolean"
    }
  }
}