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
66 lines
2.1 KiB
Python
66 lines
2.1 KiB
Python
"""API request models."""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from .enums import DocumentKind
|
|
|
|
|
|
class DocumentUploadRequest(BaseModel):
|
|
"""Request model for document upload"""
|
|
|
|
tenant_id: str = Field(..., description="Tenant identifier")
|
|
kind: DocumentKind = Field(..., description="Document type")
|
|
source: str = Field(..., description="Document source")
|
|
|
|
|
|
class ExtractionRequest(BaseModel):
|
|
"""Request model for document extraction"""
|
|
|
|
strategy: str = Field(default="hybrid", description="Extraction strategy")
|
|
|
|
|
|
class RAGSearchRequest(BaseModel):
|
|
"""Request model for RAG search"""
|
|
|
|
query: str = Field(..., min_length=1, description="Search query")
|
|
tax_year: str | None = Field(None, description="Tax year filter")
|
|
jurisdiction: str | None = Field(None, description="Jurisdiction filter")
|
|
k: int = Field(default=10, ge=1, le=100, description="Number of results")
|
|
|
|
|
|
class ScheduleComputeRequest(BaseModel):
|
|
"""Request model for schedule computation"""
|
|
|
|
tax_year: str = Field(..., pattern=r"^\d{4}-\d{2}$", description="Tax year")
|
|
taxpayer_id: str = Field(..., description="Taxpayer identifier")
|
|
schedule_id: str = Field(..., description="Schedule identifier")
|
|
|
|
|
|
class HMRCSubmissionRequest(BaseModel):
|
|
"""Request model for HMRC submission"""
|
|
|
|
tax_year: str = Field(..., pattern=r"^\d{4}-\d{2}$", description="Tax year")
|
|
taxpayer_id: str = Field(..., description="Taxpayer identifier")
|
|
dry_run: bool = Field(default=True, description="Dry run flag")
|
|
|
|
|
|
class FirmSyncRequest(BaseModel):
|
|
"""Request to sync firm data"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
firm_id: str = Field(..., description="Firm identifier")
|
|
system: str = Field(..., description="Practice management system to sync with")
|
|
sync_type: str = Field(
|
|
default="full", description="Type of sync: full, incremental"
|
|
)
|
|
force_refresh: bool = Field(
|
|
default=False, description="Force refresh of cached data"
|
|
)
|
|
connection_config: dict[str, Any] = Field(
|
|
...,
|
|
description="Configuration for connecting to the practice management system",
|
|
)
|