{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/calypsoai-com/json-schema/calypsoai-com-get-campaign-run-results-response-schema.json",
  "title": "GetCampaignRunResultsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/calypsoai-com-campaign-runs-api-openapi.yml#/components/schemas/GetCampaignRunResultsResponse",
  "properties": {
    "count": {
      "description": "Total number of results matching the given filters, across all pages",
      "title": "Count",
      "type": "integer"
    },
    "next": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cursor to the next page, if any.",
      "title": "Next"
    },
    "prev": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cursor to the previous page, if any.",
      "title": "Prev"
    },
    "results": {
      "description": "Campaign run results matching the given filters",
      "items": {
        "$ref": "#/$defs/AttackRunResult"
      },
      "title": "Results",
      "type": "array"
    }
  },
  "required": [
    "results",
    "count"
  ],
  "type": "object",
  "$defs": {
    "AttackErrorSummary": {
      "properties": {
        "message": {
          "title": "Message",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/CampaignRunErrorType"
        }
      },
      "required": [
        "type",
        "message"
      ],
      "title": "AttackErrorSummary",
      "type": "object"
    },
    "AttackRunResult": {
      "properties": {
        "attackRunId": {
          "format": "uuid",
          "title": "Attackrunid",
          "type": "string"
        },
        "campaignRunId": {
          "format": "uuid",
          "title": "Campaignrunid",
          "type": "string"
        },
        "conversation": {
          "default": [],
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Conversation",
          "type": "array"
        },
        "conversationSteps": {
          "default": 0,
          "title": "Conversationsteps",
          "type": "integer"
        },
        "converter": {
          "anyOf": [
            {
              "$ref": "#/$defs/PromptConverter"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error"
        },
        "errorSummary": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttackErrorSummary"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "intent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Intent"
        },
        "intentCategory": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Intentcategory"
        },
        "intentType": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntentType"
            },
            {
              "type": "null"
            }
          ]
        },
        "providerId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Providerid"
        },
        "refusalCheck": {
          "anyOf": [
            {
              "$ref": "#/$defs/RefusalCheck"
            },
            {
              "type": "null"
            }
          ]
        },
        "severity": {
          "anyOf": [
            {
              "maximum": 4.0,
              "minimum": 1.0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Severity"
        },
        "technique": {
          "$ref": "#/$defs/AttackTechnique"
        },
        "vector": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vector"
        },
        "vulnerable": {
          "title": "Vulnerable",
          "type": "boolean"
        }
      },
      "required": [
        "vulnerable",
        "id",
        "campaignRunId",
        "attackRunId",
        "providerId",
        "technique",
        "vector"
      ],
      "title": "AttackRunResult",
      "type": "object"
    },
    "AttackTechnique": {
      "enum": [
        "static_content",
        "dynamic_content",
        "operational",
        "custom"
      ],
      "title": "AttackTechnique",
      "type": "string"
    },
    "CampaignRunErrorType": {
      "enum": [
        "api_token",
        "permission",
        "not_found",
        "validation",
        "rate_limit",
        "client_error",
        "server_error",
        "timeout",
        "service_unavailable",
        "unknown",
        "failure_limit_reached",
        "bad_provider_configuration"
      ],
      "title": "CampaignRunErrorType",
      "type": "string"
    },
    "IntentType": {
      "enum": [
        "custom",
        "system"
      ],
      "title": "IntentType",
      "type": "string"
    },
    "PromptConverter": {
      "enum": [
        "base64",
        "leetspeak",
        "unicode_confusable",
        "caesar",
        "repeat_token",
        "single_character"
      ],
      "title": "PromptConverter",
      "type": "string"
    },
    "RefusalCheck": {
      "properties": {
        "isDeterministic": {
          "default": false,
          "title": "Isdeterministic",
          "type": "boolean"
        },
        "isRefusal": {
          "default": false,
          "title": "Isrefusal",
          "type": "boolean"
        },
        "matchedPhrases": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Matchedphrases",
          "type": "array"
        },
        "score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Score"
        },
        "sources": {
          "default": [],
          "items": {
            "$ref": "#/$defs/RefusalSources"
          },
          "title": "Sources",
          "type": "array"
        }
      },
      "title": "RefusalCheck",
      "type": "object"
    },
    "RefusalSources": {
      "enum": [
        "builtin",
        "custom"
      ],
      "title": "RefusalSources",
      "type": "string"
    }
  }
}