{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "access_policy": {
      "const": "preview_direct",
      "type": "string"
    },
    "activated_at": {
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "type": "string"
    },
    "deadline_id": {
      "anyOf": [
        {
          "pattern": "^ddl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "deployment_id": {
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "environment_id": {
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "environment_type": {
      "enum": [
        "preview",
        "staging",
        "production"
      ],
      "type": "string"
    },
    "expires_at": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "identity_requirement": {
      "const": "none",
      "type": "string"
    },
    "product_id": {
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "reachability": {
      "properties": {
        "checked_at": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "type": "string"
        },
        "latency_ms": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "status_code": {
          "maximum": 9007199254740991,
          "minimum": -9007199254740991,
          "type": "integer"
        }
      },
      "required": [
        "checked_at",
        "status_code",
        "latency_ms"
      ],
      "type": "object"
    },
    "route": {
      "properties": {
        "host": {
          "minLength": 1,
          "type": "string"
        },
        "path": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "host",
        "path"
      ],
      "type": "object"
    },
    "surface_id": {
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "surface_type": {
      "const": "web",
      "type": "string"
    },
    "url": {
      "minLength": 1,
      "type": "string"
    },
    "workspace_id": {
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    }
  },
  "required": [
    "surface_id",
    "workspace_id",
    "product_id",
    "deployment_id",
    "environment_id",
    "environment_type",
    "surface_type",
    "url",
    "route",
    "identity_requirement",
    "access_policy",
    "expires_at",
    "deadline_id",
    "reachability",
    "activated_at"
  ],
  "type": "object"
}
