{
  "openapi": "3.0.0",
  "info": {
    "title": "backend_securesphere",
    "version": "0.0.1",
    "description": "Backend de ROUNDBOX SecureSphere",
    "contact": {
      "name": "",
      "email": "sheylab@unitec.edu"
    }
  },
  "paths": {
    "/ai/ask-rag": {
      "post": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "askRag",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/ask-rag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "query"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "top": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiBffController.askRag"
      }
    },
    "/ai/chat": {
      "post": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "chat",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/chat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "maxDocuments": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  },
                  "pageSegment": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "selectedEntityId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "mlUseCase": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiBffController.chat"
      }
    },
    "/ai/prompts/versions": {
      "get": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "promptVersions",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/prompts/versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "AiBffController.promptVersions"
      }
    },
    "/ai/voice/capability": {
      "get": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "voiceCapability",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/voice/capability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiBffController.voiceCapability"
      }
    },
    "/ai/voice/speech-token": {
      "get": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "voiceSpeechToken",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/voice/speech-token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiBffController.voiceSpeechToken"
      }
    },
    "/ai/voice/synthesize": {
      "post": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "voiceSynthesize",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/voice/synthesize",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "text"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 12000
                  },
                  "voiceName": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiBffController.voiceSynthesize"
      }
    },
    "/ai/voice/transcribe": {
      "post": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "voiceTranscribe",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Proxy BFF to Backend Central AI /ai/voice/transcribe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "audioBase64"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "audioBase64": {
                    "type": "string",
                    "minLength": 1
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiBffController.voiceTranscribe"
      }
    },
    "/api/ai/usage/debug/events": {
      "get": {
        "x-controller-name": "AiUsageAnalyticsController",
        "x-operation-name": "getDebugEvents",
        "tags": [
          "AiUsageAnalyticsController"
        ],
        "responses": {
          "200": {
            "description": "Debug endpoint: returns raw AiUsageEvents documents as seen by backend repository.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "AiUsageAnalyticsController.getDebugEvents"
      }
    },
    "/api/ai/usage/summary": {
      "get": {
        "x-controller-name": "AiUsageAnalyticsController",
        "x-operation-name": "getSummary",
        "tags": [
          "AiUsageAnalyticsController"
        ],
        "responses": {
          "200": {
            "description": "Real AI usage summary by tenant for dashboard consumption.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "AiUsageAnalyticsController.getSummary"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/comments": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "addComment",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Adds an inline review comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "anchor": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 2
        },
        "operationId": "DocumentsController.addComment"
      },
      "get": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "getComments",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Lists comments for a document version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "DocumentsController.getComments"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/content": {
      "get": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "getVersionContent",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Downloads report artifact (pdf/docx/md)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "DocumentsController.getVersionContent"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/corrected-upload": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "uploadCorrectedVersion",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Creates a corrected version from a user-uploaded document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "fileName",
                  "contentBase64"
                ],
                "properties": {
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 260
                  },
                  "contentBase64": {
                    "type": "string",
                    "minLength": 1
                  },
                  "mimeType": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 2
        },
        "operationId": "DocumentsController.uploadCorrectedVersion"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/review/approve": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "approveVersion",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Approves document version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "DocumentsController.approveVersion"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/review/reject": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "rejectVersion",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Rejects document version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 2
        },
        "operationId": "DocumentsController.rejectVersion"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}/send-email": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "sendVersionByEmail",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Sends executive report PDF via Azure Communication Email",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "to"
                ],
                "properties": {
                  "to": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  },
                  "cc": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  },
                  "bcc": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "senderAddress": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 2
        },
        "operationId": "DocumentsController.sendVersionByEmail"
      }
    },
    "/api/documents/{documentId}/versions/{versionId}": {
      "get": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "getDocumentVersion",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Returns document version detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "versionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "DocumentsController.getDocumentVersion"
      }
    },
    "/api/documents/{documentId}": {
      "delete": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "deleteDocument",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Deletes a document and all stored artifacts/versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "DocumentsController.deleteDocument"
      }
    },
    "/api/documents": {
      "get": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "listDocuments",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Lists documents by tenant and type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "DocumentsController.listDocuments"
      }
    },
    "/api/eset/alerts/flat": {
      "get": {
        "x-controller-name": "EsetCommonAlertsController",
        "x-operation-name": "listEsetAlertsFlat",
        "tags": [
          "EsetCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Lista plana de eventos ESET para UI"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "EsetCommonAlertsController.listEsetAlertsFlat"
      }
    },
    "/api/eset/alerts/group": {
      "get": {
        "x-controller-name": "EsetCommonAlertsController",
        "x-operation-name": "groupEsetAlerts",
        "tags": [
          "EsetCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Agrupación de eventos ESET"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "EsetCommonAlertsController.groupEsetAlerts"
      }
    },
    "/api/eset/alerts/summary": {
      "get": {
        "x-controller-name": "EsetCommonAlertsController",
        "x-operation-name": "getEsetSummary",
        "tags": [
          "EsetCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Resumen ESET por severidad"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "EsetCommonAlertsController.getEsetSummary"
      }
    },
    "/api/eset/alerts": {
      "get": {
        "x-controller-name": "EsetCommonAlertsController",
        "x-operation-name": "listEsetAlerts",
        "tags": [
          "EsetCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Página de eventos ESET"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageFromKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "EsetCommonAlertsController.listEsetAlerts"
      }
    },
    "/api/module-factory/metrics/summary": {
      "get": {
        "x-controller-name": "ModuleFactoryRunsBffController",
        "x-operation-name": "getMetricsSummary",
        "tags": [
          "ModuleFactoryRunsBffController"
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped module factory metrics summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "moduleName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ModuleFactoryRunsBffController.getMetricsSummary"
      }
    },
    "/api/module-factory/runs/{runId}": {
      "get": {
        "x-controller-name": "ModuleFactoryRunsBffController",
        "x-operation-name": "getRunById",
        "tags": [
          "ModuleFactoryRunsBffController"
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped module factory run detail by runId.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ModuleFactoryRunsBffController.getRunById"
      }
    },
    "/api/module-factory/runs": {
      "get": {
        "x-controller-name": "ModuleFactoryRunsBffController",
        "x-operation-name": "getRuns",
        "tags": [
          "ModuleFactoryRunsBffController"
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped module factory runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "moduleName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ModuleFactoryRunsBffController.getRuns"
      }
    },
    "/api/module-factory/status/last-run": {
      "get": {
        "x-controller-name": "ModuleFactoryRunsBffController",
        "x-operation-name": "getOrganizationLastRun",
        "tags": [
          "ModuleFactoryRunsBffController"
        ],
        "responses": {
          "200": {
            "description": "Last persisted run per provider/module for a single organization. Deterministic snapshot — no time window, no stale-after threshold. Use this for marketplace UI chips that should reflect the actual state of the database, not derived freshness signals.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ModuleFactoryRunsBffController.getOrganizationLastRun"
      }
    },
    "/api/module-factory/status/operational": {
      "get": {
        "x-controller-name": "ModuleFactoryRunsBffController",
        "x-operation-name": "getOperationalStatus",
        "tags": [
          "ModuleFactoryRunsBffController"
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped operational status derived from module runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "staleAfterMinutes",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "moduleName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ModuleFactoryRunsBffController.getOperationalStatus"
      }
    },
    "/api/reports/executive/generate": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "generateExecutiveReport",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Queues executive report generation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "contextId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "includeDocx": {
                        "type": "boolean"
                      },
                      "priority": {
                        "type": "string",
                        "enum": [
                          "high",
                          "medium",
                          "low"
                        ]
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "tenantName": {
                        "type": "string"
                      },
                      "promptVersion": {
                        "type": "string"
                      },
                      "model": {
                        "type": "string"
                      },
                      "temperature": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 2
                      },
                      "locale": {
                        "type": "string",
                        "enum": [
                          "es",
                          "en"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "DocumentsController.generateExecutiveReport"
      }
    },
    "/api/reports/technical/generate": {
      "post": {
        "x-controller-name": "DocumentsController",
        "x-operation-name": "generateTechnicalReport",
        "tags": [
          "DocumentsController"
        ],
        "responses": {
          "200": {
            "description": "Queues technical report generation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "contextId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "includeDocx": {
                        "type": "boolean"
                      },
                      "priority": {
                        "type": "string",
                        "enum": [
                          "high",
                          "medium",
                          "low"
                        ]
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "tenantName": {
                        "type": "string"
                      },
                      "promptVersion": {
                        "type": "string"
                      },
                      "model": {
                        "type": "string"
                      },
                      "temperature": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 2
                      },
                      "locale": {
                        "type": "string",
                        "enum": [
                          "es",
                          "en"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "DocumentsController.generateTechnicalReport"
      }
    },
    "/auth/profile": {
      "get": {
        "x-controller-name": "AuthProfileController",
        "x-operation-name": "getProfile",
        "tags": [
          "AuthProfileController"
        ],
        "responses": {
          "200": {
            "description": "Perfil para frontend",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "organization": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    },
                    "tenantSophos": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "adomFAZ": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kaseyaOrgId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "organizations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "partnerId": {
                            "type": "string"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "orgId",
                          "role"
                        ]
                      }
                    },
                    "tenants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "role"
                        ]
                      }
                    }
                  },
                  "required": [
                    "role",
                    "organization",
                    "organizations",
                    "tenantSophos",
                    "adomFAZ",
                    "kaseyaOrgId",
                    "tenants"
                  ]
                }
              }
            }
          }
        },
        "operationId": "AuthProfileController.getProfile"
      }
    },
    "/chat": {
      "post": {
        "x-controller-name": "AiBffController",
        "x-operation-name": "chatLegacy",
        "tags": [
          "AiBffController"
        ],
        "responses": {
          "200": {
            "description": "Legacy alias for /ai/chat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "maxDocuments": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  },
                  "pageSegment": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "selectedEntityId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "mlUseCase": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiBffController.chatLegacy"
      }
    },
    "/client-integrations/count": {
      "get": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "count",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "ClientIntegration model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "ClientIntegration.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<ClientIntegration>"
                }
              }
            }
          }
        ],
        "operationId": "ClientIntegrationController.count"
      }
    },
    "/client-integrations/{id}": {
      "put": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "replaceById",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "ClientIntegration PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientIntegration"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ClientIntegrationController.replaceById"
      },
      "patch": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "updateById",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "ClientIntegration PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientIntegrationPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ClientIntegrationController.updateById"
      },
      "get": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "findById",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "ClientIntegration model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientIntegrationWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientIntegration.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ClientIntegrationController.findById"
      },
      "delete": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "deleteById",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "ClientIntegration DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ClientIntegrationController.deleteById"
      }
    },
    "/client-integrations": {
      "post": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "create",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "ClientIntegration model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientIntegration"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewClientIntegration"
              }
            }
          }
        },
        "operationId": "ClientIntegrationController.create"
      },
      "patch": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "updateAll",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "ClientIntegration PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "ClientIntegration.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<ClientIntegration>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientIntegrationPartial"
              }
            }
          }
        },
        "operationId": "ClientIntegrationController.updateAll"
      },
      "get": {
        "x-controller-name": "ClientIntegrationController",
        "x-operation-name": "find",
        "tags": [
          "ClientIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Array of ClientIntegration model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClientIntegrationWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientIntegration.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "ClientIntegrationController.find"
      }
    },
    "/conversations/{id}": {
      "put": {
        "x-controller-name": "ConversationController",
        "x-operation-name": "update",
        "tags": [
          "ConversationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update conversation messages"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "ConversationController.update"
      },
      "get": {
        "x-controller-name": "ConversationController",
        "x-operation-name": "findById",
        "tags": [
          "ConversationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get a single conversation with messages"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ConversationController.findById"
      },
      "delete": {
        "x-controller-name": "ConversationController",
        "x-operation-name": "deleteById",
        "tags": [
          "ConversationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Delete a conversation"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ConversationController.deleteById"
      }
    },
    "/conversations": {
      "post": {
        "x-controller-name": "ConversationController",
        "x-operation-name": "create",
        "tags": [
          "ConversationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create a new conversation"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId",
                  "messages"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "title": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "ConversationController.create"
      },
      "get": {
        "x-controller-name": "ConversationController",
        "x-operation-name": "list",
        "tags": [
          "ConversationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List conversations for the current user"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ConversationController.list"
      }
    },
    "/dashboard/alerts/group": {
      "get": {
        "x-controller-name": "SophosCommonAlertsController",
        "x-operation-name": "groupAlerts",
        "tags": [
          "SophosCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Agrupación de alertas",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlertGroup"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPages",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageFromKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SophosCommonAlertsController.groupAlerts"
      }
    },
    "/dashboard/alerts/list": {
      "get": {
        "x-controller-name": "SophosCommonAlertsController",
        "x-operation-name": "listRawAlerts",
        "tags": [
          "SophosCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Página de alertas crudas API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertPage"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageFromKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SophosCommonAlertsController.listRawAlerts"
      }
    },
    "/dashboard/alerts/list-flat": {
      "get": {
        "x-controller-name": "SophosCommonAlertsController",
        "x-operation-name": "listUngroupedAlerts",
        "tags": [
          "SophosCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Lista plana de alertas (UI)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlertListRow"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPages",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageFromKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SophosCommonAlertsController.listUngroupedAlerts"
      }
    },
    "/dashboard/alerts/summary": {
      "get": {
        "x-controller-name": "SophosCommonAlertsController",
        "x-operation-name": "getSummary",
        "tags": [
          "SophosCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Resumen de alertas agrupadas por severidad",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertSummary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPages",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageFromKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SophosCommonAlertsController.getSummary"
      }
    },
    "/dashboard/detections/counts": {
      "get": {
        "x-controller-name": "SophosDetectionCountsController",
        "x-operation-name": "counts",
        "tags": [
          "SophosDetectionCountsController"
        ],
        "responses": {
          "200": {
            "description": "Detections counts from Sophos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SophosDetectionCounts"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolution",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SophosDetectionCountsController.counts"
      }
    },
    "/dashboard/detections/list": {
      "get": {
        "x-controller-name": "SophosDetectionResultsController",
        "x-operation-name": "list",
        "tags": [
          "SophosDetectionResultsController"
        ],
        "responses": {
          "200": {
            "description": "Detections results from runId query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SophosDetectionResults"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severities",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "SophosDetectionResultsController.list"
      }
    },
    "/data-lake/events": {
      "get": {
        "x-controller-name": "DataLakeEventsController",
        "x-operation-name": "list",
        "tags": [
          "DataLakeEventsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Read normalized events from Data Lake partitions."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantAliases",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "DataLakeEventsController.list"
      }
    },
    "/faz/alerts/counts": {
      "post": {
        "x-controller-name": "FazAlertsController",
        "x-operation-name": "getAlertsCounts",
        "tags": [
          "FazAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of FazAlertsController.getAlertsCounts"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "adom": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                },
                "required": [
                  "adom",
                  "from",
                  "to"
                ]
              }
            }
          },
          "required": true
        },
        "operationId": "FazAlertsController.getAlertsCounts"
      }
    },
    "/faz/alerts": {
      "post": {
        "x-controller-name": "FazAlertsController",
        "x-operation-name": "getAlerts",
        "tags": [
          "FazAlertsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of FazAlertsController.getAlerts"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "FazAlertsController.getAlerts"
      }
    },
    "/integration-catalogs/sync": {
      "post": {
        "x-controller-name": "IntegrationCatalogController",
        "x-operation-name": "sync",
        "tags": [
          "IntegrationCatalogController"
        ],
        "responses": {
          "200": {
            "description": "Bootstrap catalog from the seed ONLY when empty; never overwrites (Mongo is the source of truth)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationCatalog"
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/IntegrationCatalog"
                }
              }
            }
          }
        },
        "operationId": "IntegrationCatalogController.sync"
      }
    },
    "/integration-catalogs/{id}": {
      "get": {
        "x-controller-name": "IntegrationCatalogController",
        "x-operation-name": "findById",
        "tags": [
          "IntegrationCatalogController"
        ],
        "responses": {
          "200": {
            "description": "Catalog entry by id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationCatalog"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "IntegrationCatalogController.findById"
      }
    },
    "/integration-catalogs": {
      "get": {
        "x-controller-name": "IntegrationCatalogController",
        "x-operation-name": "find",
        "tags": [
          "IntegrationCatalogController"
        ],
        "responses": {
          "200": {
            "description": "List all catalog entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationCatalog"
                  }
                }
              }
            }
          }
        },
        "operationId": "IntegrationCatalogController.find"
      }
    },
    "/kaseya/dashboard/alerts/group": {
      "get": {
        "x-controller-name": "KaseyaCommonAlertsController",
        "x-operation-name": "groupAlerts",
        "tags": [
          "KaseyaCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Grouped Kaseya alerts"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "kaseyaOrgId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPages",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "KaseyaCommonAlertsController.groupAlerts"
      }
    },
    "/kaseya/dashboard/alerts/list": {
      "get": {
        "x-controller-name": "KaseyaCommonAlertsController",
        "x-operation-name": "listAlerts",
        "tags": [
          "KaseyaCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Flat list of Kaseya alerts"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "kaseyaOrgId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPages",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "KaseyaCommonAlertsController.listAlerts"
      }
    },
    "/kaseya/dashboard/alerts/summary": {
      "get": {
        "x-controller-name": "KaseyaCommonAlertsController",
        "x-operation-name": "getSummary",
        "tags": [
          "KaseyaCommonAlertsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Kaseya alert summary by severity and category"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "kaseyaOrgId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "KaseyaCommonAlertsController.getSummary"
      }
    },
    "/marketplace/integrations/{provider}": {
      "patch": {
        "x-controller-name": "MarketplaceIntegrationController",
        "x-operation-name": "updateStatus",
        "tags": [
          "MarketplaceIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Update integration enabled status for the resolved tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          },
          "x-parameter-index": 2
        },
        "operationId": "MarketplaceIntegrationController.updateStatus"
      }
    },
    "/marketplace/integrations": {
      "get": {
        "x-controller-name": "MarketplaceIntegrationController",
        "x-operation-name": "list",
        "tags": [
          "MarketplaceIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "List marketplace integrations for the resolved tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "MarketplaceIntegrationController.list"
      }
    },
    "/ml-host-risks/{host_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLHostRisksProxyController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLHostRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a host risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLHostRisksProxyController.acknowledge"
      }
    },
    "/ml-host-risks/{host_id}/dismiss": {
      "post": {
        "x-controller-name": "MLHostRisksProxyController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLHostRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a host risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLHostRisksProxyController.dismiss"
      }
    },
    "/ml-host-risks/{host_id}": {
      "get": {
        "x-controller-name": "MLHostRisksProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLHostRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one host risk for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLHostRisksProxyController.getOne"
      }
    },
    "/ml-host-risks": {
      "get": {
        "x-controller-name": "MLHostRisksProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLHostRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List host risks for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLHostRisksProxyController.list"
      }
    },
    "/ml-login-decisions/{decision_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLLoginDecisionsProxyController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLLoginDecisionsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a login decision"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLLoginDecisionsProxyController.acknowledge"
      }
    },
    "/ml-login-decisions/{decision_id}/dismiss": {
      "post": {
        "x-controller-name": "MLLoginDecisionsProxyController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLLoginDecisionsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a login decision"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLLoginDecisionsProxyController.dismiss"
      }
    },
    "/ml-login-decisions/{decision_id}": {
      "get": {
        "x-controller-name": "MLLoginDecisionsProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLLoginDecisionsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one login decision for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLLoginDecisionsProxyController.getOne"
      }
    },
    "/ml-login-decisions": {
      "get": {
        "x-controller-name": "MLLoginDecisionsProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLLoginDecisionsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List anomalous-login decisions for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLLoginDecisionsProxyController.list"
      }
    },
    "/ml-login-location-risks/{login_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLLoginLocationRisksProxyController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLLoginLocationRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a login-location risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLLoginLocationRisksProxyController.acknowledge"
      }
    },
    "/ml-login-location-risks/{login_id}/dismiss": {
      "post": {
        "x-controller-name": "MLLoginLocationRisksProxyController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLLoginLocationRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a login-location risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLLoginLocationRisksProxyController.dismiss"
      }
    },
    "/ml-login-location-risks/{login_id}": {
      "get": {
        "x-controller-name": "MLLoginLocationRisksProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLLoginLocationRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one login-location risk for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLLoginLocationRisksProxyController.getOne"
      }
    },
    "/ml-login-location-risks": {
      "get": {
        "x-controller-name": "MLLoginLocationRisksProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLLoginLocationRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List login-location risks for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLLoginLocationRisksProxyController.list"
      }
    },
    "/ml-signature-trends/{signature_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLSignatureTrendsProxyController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLSignatureTrendsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a signature trend"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLSignatureTrendsProxyController.acknowledge"
      }
    },
    "/ml-signature-trends/{signature_id}/dismiss": {
      "post": {
        "x-controller-name": "MLSignatureTrendsProxyController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLSignatureTrendsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a signature trend"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLSignatureTrendsProxyController.dismiss"
      }
    },
    "/ml-signature-trends/{signature_id}": {
      "get": {
        "x-controller-name": "MLSignatureTrendsProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLSignatureTrendsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one signature trend for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLSignatureTrendsProxyController.getOne"
      }
    },
    "/ml-signature-trends": {
      "get": {
        "x-controller-name": "MLSignatureTrendsProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLSignatureTrendsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List IPS signature trends for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLSignatureTrendsProxyController.list"
      }
    },
    "/ml-suggestions/{suggestion_id}/approve": {
      "post": {
        "x-controller-name": "MLSuggestionsProxyController",
        "x-operation-name": "approve",
        "tags": [
          "MLSuggestionsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Approve a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLSuggestionsProxyController.approve"
      }
    },
    "/ml-suggestions/{suggestion_id}/reject": {
      "post": {
        "x-controller-name": "MLSuggestionsProxyController",
        "x-operation-name": "reject",
        "tags": [
          "MLSuggestionsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Reject a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLSuggestionsProxyController.reject"
      }
    },
    "/ml-suggestions/{suggestion_id}/snooze": {
      "post": {
        "x-controller-name": "MLSuggestionsProxyController",
        "x-operation-name": "snooze",
        "tags": [
          "MLSuggestionsProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Snooze a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLSuggestionsProxyController.snooze"
      }
    },
    "/ml-suggestions/{suggestion_id}": {
      "get": {
        "x-controller-name": "MLSuggestionsProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLSuggestionsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one ML rule suggestion for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLSuggestionsProxyController.getOne"
      }
    },
    "/ml-suggestions": {
      "get": {
        "x-controller-name": "MLSuggestionsProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLSuggestionsProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List ML rule suggestions for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLSuggestionsProxyController.list"
      }
    },
    "/ml-user-app-risks/{user_app_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLUserAppRisksProxyController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLUserAppRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a user-app risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLUserAppRisksProxyController.acknowledge"
      }
    },
    "/ml-user-app-risks/{user_app_id}/dismiss": {
      "post": {
        "x-controller-name": "MLUserAppRisksProxyController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLUserAppRisksProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a user-app risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "MLUserAppRisksProxyController.dismiss"
      }
    },
    "/ml-user-app-risks/{user_app_id}": {
      "get": {
        "x-controller-name": "MLUserAppRisksProxyController",
        "x-operation-name": "getOne",
        "tags": [
          "MLUserAppRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get one user-app risk for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLUserAppRisksProxyController.getOne"
      }
    },
    "/ml-user-app-risks": {
      "get": {
        "x-controller-name": "MLUserAppRisksProxyController",
        "x-operation-name": "list",
        "tags": [
          "MLUserAppRisksProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List user-app risks for the active tenant."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLUserAppRisksProxyController.list"
      }
    },
    "/organizations/{id}/logo": {
      "patch": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "updateLogo",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "200": {
            "description": "Organization logo updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "imageUrl"
                ],
                "properties": {
                  "imageUrl": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "OrganizationController.updateLogo"
      }
    },
    "/organizations/{id}": {
      "patch": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "update",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "200": {
            "description": "Organization updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "countryCode": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "NORTH_AMERICA",
                      "CENTRAL_AMERICA",
                      "SOUTH_AMERICA"
                    ]
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{1,14}$"
                  },
                  "imageUrl": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "contact": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 120
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 160
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+[1-9]\\d{1,14}$"
                      }
                    }
                  },
                  "tenantId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "tenantSophos": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "adom": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaOrgId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaLocId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaLocName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 253
                    },
                    "maxItems": 200
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "OrganizationController.update"
      },
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "get",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "200": {
            "description": "Organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.get"
      },
      "delete": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "remove",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "No Content"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.remove"
      }
    },
    "/organizations": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "create",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "201": {
            "description": "Organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "code",
                  "countryCode",
                  "contact"
                ],
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "nameNormalized": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "countryCode": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "NORTH_AMERICA",
                      "CENTRAL_AMERICA",
                      "SOUTH_AMERICA"
                    ]
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{1,14}$"
                  },
                  "imageUrl": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "contact": {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 120
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 160
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+[1-9]\\d{1,14}$"
                      }
                    }
                  },
                  "tenantId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "tenantSophos": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "adom": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaOrgId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaLocId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "kaseyaLocName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 253
                    },
                    "maxItems": 200
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "OrganizationController.create"
      },
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "list",
        "tags": [
          "OrganizationController"
        ],
        "responses": {
          "200": {
            "description": "Organization[]",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Organization"
                  }
                }
              }
            }
          }
        },
        "operationId": "OrganizationController.list"
      }
    },
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/tenant-credentials/{orgId}/{provider}/validate": {
      "post": {
        "x-controller-name": "TenantCredentialProxyController",
        "x-operation-name": "validate",
        "tags": [
          "TenantCredentialProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Trigger immediate validation tick for the provider"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialProxyController.validate"
      }
    },
    "/tenant-credentials/{tenantId}/{provider}": {
      "get": {
        "x-controller-name": "TenantCredentialProxyController",
        "x-operation-name": "read",
        "tags": [
          "TenantCredentialProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Read decrypted credentials"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialProxyController.read"
      },
      "delete": {
        "x-controller-name": "TenantCredentialProxyController",
        "x-operation-name": "remove",
        "tags": [
          "TenantCredentialProxyController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Credentials deleted"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialProxyController.remove"
      }
    },
    "/tenant-credentials/{tenantId}": {
      "get": {
        "x-controller-name": "TenantCredentialProxyController",
        "x-operation-name": "list",
        "tags": [
          "TenantCredentialProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List providers with credentials"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialProxyController.list"
      }
    },
    "/tenant-credentials": {
      "post": {
        "x-controller-name": "TenantCredentialProxyController",
        "x-operation-name": "save",
        "tags": [
          "TenantCredentialProxyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Save encrypted credentials"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "TenantCredentialProxyController.save"
      }
    },
    "/user/profile": {
      "patch": {
        "x-controller-name": "UserProfileController",
        "x-operation-name": "updateMyProfile",
        "tags": [
          "UserProfileController"
        ],
        "responses": {
          "200": {
            "description": "Perfil actualizado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "preferredLang": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string"
                  },
                  "preferredLang": {
                    "type": "string",
                    "enum": [
                      "en",
                      "es"
                    ]
                  },
                  "photoUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserProfileController.updateMyProfile"
      },
      "get": {
        "x-controller-name": "UserProfileController",
        "x-operation-name": "getMyProfile",
        "tags": [
          "UserProfileController"
        ],
        "responses": {
          "200": {
            "description": "Perfil del usuario autenticado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "preferredLang": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "UserProfileController.getMyProfile"
      }
    },
    "/whoami": {
      "get": {
        "x-controller-name": "UserVerifyController",
        "x-operation-name": "whoAmI",
        "tags": [
          "UserVerifyController"
        ],
        "responses": {
          "200": {
            "description": "Return value of UserVerifyController.whoAmI"
          }
        },
        "operationId": "UserVerifyController.whoAmI"
      }
    }
  },
  "servers": [
    {
      "url": "https://basic-backend.orbis.roundbox.dev"
    }
  ],
  "components": {
    "schemas": {
      "SophosDetectionItem": {
        "title": "SophosDetectionItem",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "attackType": {
            "type": "string"
          },
          "caseDescription": {
            "type": "object"
          },
          "detectionDescription": {
            "type": "object"
          },
          "detectionRule": {
            "type": "string"
          },
          "sensorGeneratedAt": {
            "type": "string"
          },
          "sensor": {
            "type": "object"
          },
          "device": {
            "type": "object"
          },
          "detectionSigma": {
            "type": "object"
          },
          "detectionEql": {
            "type": "string"
          },
          "detectionAttack": {
            "type": "string"
          },
          "detectionLicenses": {
            "type": "string"
          },
          "geolocation": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "intelixFileReputation": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "mitreAttacks": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "processedData": {
            "type": "string"
          },
          "rawData": {
            "type": "object"
          },
          "ruleDescription": {
            "type": "string"
          },
          "severity": {
            "type": "number"
          },
          "schema": {
            "type": "string"
          },
          "suppressed": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "detectionRule",
          "rawData",
          "severity",
          "time",
          "type"
        ],
        "additionalProperties": true
      },
      "SophosDetectionPages": {
        "title": "SophosDetectionPages",
        "type": "object",
        "properties": {
          "current": {
            "type": "number"
          },
          "size": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "items": {
            "type": "number"
          },
          "maxSize": {
            "type": "number"
          }
        },
        "additionalProperties": false
      },
      "SophosDetectionResults": {
        "title": "SophosDetectionResults",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SophosDetectionItem"
            }
          },
          "pages": {
            "$ref": "#/components/schemas/SophosDetectionPages"
          }
        },
        "additionalProperties": true
      },
      "SophosTenant": {
        "title": "SophosTenant",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "apiHost": {
            "type": "string"
          },
          "dataRegion": {
            "type": "string"
          },
          "raw": {
            "type": "object"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "SophosDetectionCountBySeverity": {
        "title": "SophosDetectionCountBySeverity",
        "type": "object",
        "properties": {
          "info": {
            "type": "integer"
          },
          "low": {
            "type": "integer"
          },
          "medium": {
            "type": "integer"
          },
          "high": {
            "type": "integer"
          },
          "critical": {
            "type": "integer"
          }
        },
        "required": [
          "info",
          "low",
          "medium",
          "high",
          "critical"
        ],
        "additionalProperties": false
      },
      "SophosDetectionCountByType": {
        "title": "SophosDetectionCountByType",
        "type": "object",
        "properties": {
          "process": {
            "type": "integer"
          },
          "threat": {
            "type": "integer"
          },
          "vulnerability": {
            "type": "integer"
          }
        },
        "required": [
          "process",
          "threat",
          "vulnerability"
        ],
        "additionalProperties": false
      },
      "SophosDetectionResolution": {
        "title": "SophosDetectionResolution",
        "type": "object",
        "properties": {
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "totalCount": {
            "type": "integer"
          },
          "countBySeverity": {
            "$ref": "#/components/schemas/SophosDetectionCountBySeverity"
          },
          "countByType": {
            "$ref": "#/components/schemas/SophosDetectionCountByType"
          }
        },
        "required": [
          "startsAt",
          "totalCount",
          "countBySeverity",
          "countByType"
        ],
        "additionalProperties": false
      },
      "SophosDetectionCounts": {
        "title": "SophosDetectionCounts",
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "tenant": {
            "$ref": "#/components/schemas/SophosTenant"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "day",
              "hour",
              "minute"
            ]
          },
          "resolutionDetectionCounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SophosDetectionResolution"
            }
          }
        },
        "required": [
          "from",
          "to",
          "tenant",
          "resolution",
          "resolutionDetectionCounts"
        ],
        "additionalProperties": true
      },
      "AlertSeverityTotals": {
        "title": "AlertSeverityTotals",
        "type": "object",
        "properties": {
          "low": {
            "type": "number"
          },
          "medium": {
            "type": "number"
          },
          "high": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "AlertSummary": {
        "title": "AlertSummary",
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "bySeverity": {
            "$ref": "#/components/schemas/AlertSeverityTotals"
          }
        },
        "required": [
          "total",
          "bySeverity"
        ],
        "additionalProperties": true
      },
      "ManagedAgent": {
        "title": "ManagedAgent",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "mobile",
              "computer",
              "server",
              "securityVm",
              "utm",
              "accessPoint",
              "wirelessNetwork",
              "mailbox",
              "slec",
              "xgFirewall",
              "ztnaGateway"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "additionalProperties": true
      },
      "AlertPerson": {
        "title": "AlertPerson",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Alert": {
        "title": "Alert",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "type": "string",
            "enum": [
              "azure",
              "adSync",
              "applicationControl",
              "appReputation",
              "blockListed",
              "connectivity",
              "cwg",
              "denc",
              "downloadReputation",
              "endpointFirewall",
              "fenc",
              "forensicSnapshot",
              "general",
              "isolation",
              "malware",
              "mtr",
              "mobiles",
              "policy",
              "protection",
              "pua",
              "runtimeDetections",
              "security",
              "smc",
              "systemHealth",
              "uav",
              "uncategorized",
              "updating",
              "utm",
              "virt",
              "wireless",
              "xgEmail",
              "ztnaAuthentication",
              "ztnaGateway",
              "ztnaResource"
            ]
          },
          "description": {
            "type": "string"
          },
          "groupKey": {
            "type": "string"
          },
          "managedAgent": {
            "$ref": "#/components/schemas/ManagedAgent"
          },
          "person": {
            "$ref": "#/components/schemas/AlertPerson"
          },
          "product": {
            "type": "string",
            "enum": [
              "other",
              "endpoint",
              "server",
              "mobile",
              "encryption",
              "emailGateway",
              "webGateway",
              "phishThreat",
              "wireless",
              "firewall",
              "ztna"
            ]
          },
          "raisedAt": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "tenant": {
            "$ref": "#/components/schemas/SophosTenant"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "raisedAt",
          "severity",
          "tenant"
        ],
        "additionalProperties": true
      },
      "AlertPageInfo": {
        "title": "AlertPageInfo",
        "type": "object",
        "properties": {
          "fromKey": {
            "type": "string"
          },
          "nextKey": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "items": {
            "type": "number"
          },
          "maxSize": {
            "type": "number"
          }
        },
        "required": [
          "size",
          "maxSize"
        ],
        "additionalProperties": true
      },
      "AlertPage": {
        "title": "AlertPage",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Alert"
            }
          },
          "pages": {
            "$ref": "#/components/schemas/AlertPageInfo"
          }
        },
        "required": [
          "items",
          "pages"
        ],
        "additionalProperties": true
      },
      "AlertListRow": {
        "title": "AlertListRow",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "os": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "AlertGroup": {
        "title": "AlertGroup",
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "key",
          "count"
        ],
        "additionalProperties": true
      },
      "Organization": {
        "title": "Organization",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameNormalized": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "enum": [
              "NORTH_AMERICA",
              "CENTRAL_AMERICA",
              "SOUTH_AMERICA"
            ]
          },
          "phone": {
            "type": "string",
            "pattern": "^\\+[1-9]\\d{1,14}$"
          },
          "imageUrl": {
            "type": "string"
          },
          "contact": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 160
              },
              "phone": {
                "type": "string",
                "pattern": "^\\+[1-9]\\d{1,14}$"
              }
            }
          },
          "tenantId": {
            "type": "string"
          },
          "tenantSophos": {
            "type": "string"
          },
          "adom": {
            "type": "string"
          },
          "kaseyaOrgId": {
            "type": "string"
          },
          "kaseyaLocId": {
            "type": "string"
          },
          "kaseyaLocName": {
            "type": "string"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "code",
          "name",
          "countryCode"
        ],
        "additionalProperties": false
      },
      "UpdateIntegrationStatusDTO": {
        "title": "UpdateIntegrationStatusDTO",
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "enabled"
        ],
        "additionalProperties": false
      },
      "IntegrationCatalog": {
        "title": "IntegrationCatalog",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "providerKey": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string"
          },
          "officialLogoUrl": {
            "type": "string"
          },
          "brandColor": {
            "type": "string"
          },
          "initials": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "categoryTitle": {
            "type": "string"
          },
          "categoryIcon": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "status",
          "brandColor",
          "initials",
          "categoryId",
          "categoryTitle"
        ],
        "additionalProperties": false
      },
      "ClientIntegration": {
        "title": "ClientIntegration",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "purchased": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "externalTenantId": {
            "type": "string"
          },
          "externalAdom": {
            "type": "string"
          },
          "externalKaseyaOrgId": {
            "type": "string"
          },
          "externalKaseyaOrgName": {
            "type": "string"
          },
          "externalRegion": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "healthStatus": {
            "type": "string",
            "enum": [
              "ONLINE",
              "DEGRADED",
              "OFFLINE"
            ]
          }
        },
        "required": [
          "clientId",
          "provider"
        ],
        "additionalProperties": true
      },
      "NewClientIntegration": {
        "title": "NewClientIntegration",
        "type": "object",
        "description": "(tsType: ClientIntegration, schemaOptions: { title: 'NewClientIntegration' })",
        "properties": {
          "id": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "purchased": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "externalTenantId": {
            "type": "string"
          },
          "externalAdom": {
            "type": "string"
          },
          "externalKaseyaOrgId": {
            "type": "string"
          },
          "externalKaseyaOrgName": {
            "type": "string"
          },
          "externalRegion": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "healthStatus": {
            "type": "string",
            "enum": [
              "ONLINE",
              "DEGRADED",
              "OFFLINE"
            ]
          }
        },
        "required": [
          "clientId",
          "provider"
        ],
        "additionalProperties": true,
        "x-typescript-type": "ClientIntegration"
      },
      "ClientIntegrationWithRelations": {
        "title": "ClientIntegrationWithRelations",
        "type": "object",
        "description": "(tsType: ClientIntegrationWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "purchased": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "externalTenantId": {
            "type": "string"
          },
          "externalAdom": {
            "type": "string"
          },
          "externalKaseyaOrgId": {
            "type": "string"
          },
          "externalKaseyaOrgName": {
            "type": "string"
          },
          "externalRegion": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "healthStatus": {
            "type": "string",
            "enum": [
              "ONLINE",
              "DEGRADED",
              "OFFLINE"
            ]
          }
        },
        "required": [
          "clientId",
          "provider"
        ],
        "additionalProperties": true,
        "x-typescript-type": "ClientIntegrationWithRelations"
      },
      "ClientIntegrationPartial": {
        "title": "ClientIntegrationPartial",
        "type": "object",
        "description": "(tsType: Partial<ClientIntegration>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "purchased": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "externalTenantId": {
            "type": "string"
          },
          "externalAdom": {
            "type": "string"
          },
          "externalKaseyaOrgId": {
            "type": "string"
          },
          "externalKaseyaOrgName": {
            "type": "string"
          },
          "externalRegion": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "healthStatus": {
            "type": "string",
            "enum": [
              "ONLINE",
              "DEGRADED",
              "OFFLINE"
            ]
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<ClientIntegration>"
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "ClientIntegration.Filter": {
        "type": "object",
        "title": "ClientIntegration.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "clientId": {
                    "type": "boolean"
                  },
                  "provider": {
                    "type": "boolean"
                  },
                  "purchased": {
                    "type": "boolean"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "externalTenantId": {
                    "type": "boolean"
                  },
                  "externalAdom": {
                    "type": "boolean"
                  },
                  "externalKaseyaOrgId": {
                    "type": "boolean"
                  },
                  "externalKaseyaOrgName": {
                    "type": "boolean"
                  },
                  "externalRegion": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "boolean"
                  },
                  "healthStatus": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "ClientIntegration.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<ClientIntegration>"
      },
      "ClientIntegration.Filter1": {
        "type": "object",
        "title": "ClientIntegration.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "ClientIntegration.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "clientId": {
                    "type": "boolean"
                  },
                  "provider": {
                    "type": "boolean"
                  },
                  "purchased": {
                    "type": "boolean"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "externalTenantId": {
                    "type": "boolean"
                  },
                  "externalAdom": {
                    "type": "boolean"
                  },
                  "externalKaseyaOrgId": {
                    "type": "boolean"
                  },
                  "externalKaseyaOrgName": {
                    "type": "boolean"
                  },
                  "externalRegion": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "boolean"
                  },
                  "healthStatus": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "ClientIntegration.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<ClientIntegration>"
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      }
    }
  }
}