Files
ai-tax-agent/libs/schemas/utils.py
harkon b324ff09ef
Some checks failed
CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
CI/CD Pipeline / Policy Validation (push) Has been cancelled
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-firm-connectors) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-forms) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-hmrc) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ingestion) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-normalize-map) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ocr) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-indexer) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-reason) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rpa) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (ui-review) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (ui-review) (push) Has been cancelled
CI/CD Pipeline / Generate SBOM (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Notifications (push) Has been cancelled
Initial commit
2025-10-11 08:41:36 +01:00

70 lines
2.4 KiB
Python

"""Utility functions for schema export."""
from typing import Any
from .entities import (
Account,
Calculation,
Document,
Evidence,
ExpenseItem,
FormBox,
IncomeItem,
Party,
Payment,
PropertyAsset,
Rule,
TaxpayerProfile,
)
from .requests import (
DocumentUploadRequest,
ExtractionRequest,
FirmSyncRequest,
HMRCSubmissionRequest,
RAGSearchRequest,
ScheduleComputeRequest,
)
from .responses import (
DocumentUploadResponse,
ExtractionResponse,
FirmSyncResponse,
HMRCSubmissionResponse,
RAGSearchResponse,
ScheduleComputeResponse,
)
def get_entity_schemas() -> dict[str, dict[str, Any]]:
"""Export JSON schemas for all models"""
schemas = {}
# Core entities
schemas["TaxpayerProfile"] = TaxpayerProfile.model_json_schema()
schemas["Document"] = Document.model_json_schema()
schemas["Evidence"] = Evidence.model_json_schema()
schemas["IncomeItem"] = IncomeItem.model_json_schema()
schemas["ExpenseItem"] = ExpenseItem.model_json_schema()
schemas["Party"] = Party.model_json_schema()
schemas["Account"] = Account.model_json_schema()
schemas["PropertyAsset"] = PropertyAsset.model_json_schema()
schemas["Payment"] = Payment.model_json_schema()
schemas["Calculation"] = Calculation.model_json_schema()
schemas["FormBox"] = FormBox.model_json_schema()
schemas["Rule"] = Rule.model_json_schema()
# Request/Response models
schemas["DocumentUploadRequest"] = DocumentUploadRequest.model_json_schema()
schemas["DocumentUploadResponse"] = DocumentUploadResponse.model_json_schema()
schemas["ExtractionRequest"] = ExtractionRequest.model_json_schema()
schemas["ExtractionResponse"] = ExtractionResponse.model_json_schema()
schemas["RAGSearchRequest"] = RAGSearchRequest.model_json_schema()
schemas["RAGSearchResponse"] = RAGSearchResponse.model_json_schema()
schemas["ScheduleComputeRequest"] = ScheduleComputeRequest.model_json_schema()
schemas["ScheduleComputeResponse"] = ScheduleComputeResponse.model_json_schema()
schemas["HMRCSubmissionRequest"] = HMRCSubmissionRequest.model_json_schema()
schemas["HMRCSubmissionResponse"] = HMRCSubmissionResponse.model_json_schema()
schemas["FirmSyncRequest"] = FirmSyncRequest.model_json_schema()
schemas["FirmSyncResponse"] = FirmSyncResponse.model_json_schema()
return schemas