feat: single source of trust from api

This commit is contained in:
dextmorgn
2025-07-09 10:09:04 +02:00
parent b8d434dabf
commit b75d4b2548
43 changed files with 815 additions and 519 deletions

View File

@@ -3,7 +3,7 @@ from fastapi import APIRouter, HTTPException, Depends, status, Query
from typing import Dict, List, Any, Optional
from pydantic import BaseModel
from datetime import datetime
from app.utils import extract_input_schema
from app.utils import extract_input_schema_transform
from app.scanners.registry import ScannerRegistry
from app.core.celery import celery
from app.types.domain import Domain
@@ -63,7 +63,7 @@ def get_transforms(
# Returns the "raw_materials" for the transform editor
@router.get("/raw_materials")
async def get_scans_list():
async def get_material_list():
scanners = ScannerRegistry.list_by_category()
flattened_scanners = {
category: [
@@ -84,18 +84,18 @@ async def get_scans_list():
# Ajoute les types comme des "scanners" spéciaux de type 'type'
object_inputs = [
extract_input_schema("Organization", Organization),
extract_input_schema("Individual", Individual),
extract_input_schema("Domain", Domain),
extract_input_schema("Website", Website),
extract_input_schema("Ip", Ip),
extract_input_schema("ASN", ASN),
extract_input_schema("CIDR", CIDR),
extract_input_schema("SocialProfile", SocialProfile),
extract_input_schema("Email", Email),
extract_input_schema("CryptoWallet", CryptoWallet),
extract_input_schema("CryptoTransaction", CryptoWalletTransaction),
extract_input_schema("CryptoNFT", CryptoNFT)
extract_input_schema_transform(Organization),
extract_input_schema_transform(Individual),
extract_input_schema_transform(Domain),
extract_input_schema_transform(Website),
extract_input_schema_transform(Ip),
extract_input_schema_transform(ASN),
extract_input_schema_transform(CIDR),
extract_input_schema_transform(SocialProfile),
extract_input_schema_transform(Email),
extract_input_schema_transform(CryptoWallet),
extract_input_schema_transform(CryptoWalletTransaction),
extract_input_schema_transform(CryptoNFT)
]
flattened_scanners["types"] = object_inputs