Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
e58f87e
1
Parent(s): da377dd
backend stabilization
Browse filesFiles changed (18)
- api/v1/ai.py+1-1
- api/v1/attachments.py+4-4
- api/v1/dashboard.py+5-5
- api/v1/escalations.py+6-6
- api/v1/feedback.py+2-2
- api/v1/kb.py+7-7
- api/v1/kb_insights.py+3-3
- api/v1/messages.py+4-4
- api/v1/nexus.py+3-3
- api/v1/nexus_stream.py+1-1
- api/v1/notifications.py+2-2
- api/v1/projects.py+3-3
- api/v1/system.py+4-4
- api/v1/tickets.py+11-9
- api/v1/users.py+4-4
- api/v1/workspace.py+2-2
- main.py+1-1
- schemas/ticket.py+2-2
16 unmodified lines171819202021222316 unmodified lines
router = APIRouter()
@router.get("/trace/{ticket_id}", response_model=AITraceResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/trace/{ticket_id}/", response_model=AITraceResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def get_ticket_ai_trace( ticket_id: UUID, db: AsyncSession = Depends(get_db),23 unmodified lines242526272728293039 unmodified lines707172737374757627 unmodified lines10410510610710710810911034 unmodified lines14514614714814814915015123 unmodified lines# UPLOAD_DIR = Path("uploads")# UPLOAD_DIR.mkdir(exist_ok=True)
@router.post("/{ticket_id}/attachments", response_model=AttachmentResponse, status_code=status.HTTP_201_CREATED)@router.post("/{ticket_id}/attachments/", response_model=AttachmentResponse, status_code=status.HTTP_201_CREATED)async def upload_attachment( ticket_id: uuid.UUID, file: UploadFile = File(...),39 unmodified lines await db.refresh(new_attachment) return new_attachment
@router.get("/{ticket_id}/attachments", response_model=List[AttachmentResponse])@router.get("/{ticket_id}/attachments/", response_model=List[AttachmentResponse])async def list_attachments( ticket_id: uuid.UUID, current_user: User = Depends(get_current_user),27 unmodified lines att_res = await db.execute(att_stmt) return att_res.scalars().all()
@router.get("/attachments/{attachment_id}/download")@router.get("/attachments/{attachment_id}/download/")async def download_attachment( attachment_id: uuid.UUID, current_user: User = Depends(get_current_user),34 unmodified lines media_type=attachment.content_type )
@router.delete("/attachments/{attachment_id}", status_code=status.HTTP_200_OK)@router.delete("/attachments/{attachment_id}/", status_code=status.HTTP_200_OK)async def delete_attachment( attachment_id: uuid.UUID, current_user: User = Depends(get_current_user),18 unmodified lines1920212222232425115 unmodified lines14114214314414414514614723 unmodified lines17117217317417417517617740 unmodified lines21821922022122122222322484 unmodified lines30931031131231231331431518 unmodified lines
router = APIRouter()
@router.get("/stats")@router.get("/stats/")async def get_dashboard_stats( workspace_id: str = None, current_user: User = Depends(get_current_user),115 unmodified lines return response
@router.get("/my-tickets", response_model=List[Union[TicketInternalResponse, TicketResponse]])@router.get("/my-tickets/", response_model=List[Union[TicketInternalResponse, TicketResponse]])async def get_my_tickets( current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)23 unmodified lines return [await sanitize_ticket_response(t, current_user, db) for t in tickets]
@router.get("/agent-queue", response_model=List[Union[TicketInternalResponse, TicketResponse]])@router.get("/agent-queue/", response_model=List[Union[TicketInternalResponse, TicketResponse]])async def get_agent_queue( workspace_id: str = None, current_user: User = Depends(get_current_user),40 unmodified lines return [await sanitize_ticket_response(t, current_user, db) for t in tickets]
@router.get("/ai-insights")@router.get("/ai-insights/")async def get_ai_insights( workspace_id: str = None, current_user: User = Depends(get_current_user),84 unmodified lines ] }
@router.post("/refresh-global")@router.post("/refresh-global/")async def refresh_global_insights( current_user: User = Depends(get_current_user), arq_pool = Depends(get_arq_pool)16 unmodified lines171819202021222326 unmodified lines505152535354555612 unmodified lines697071727273747519 unmodified lines95969798989910010114 unmodified lines11611711811911912012112210 unmodified lines13313413513613613713813916 unmodified lines
router = APIRouter()
@router.post("/rules", response_model=EscalationRuleResponse, status_code=status.HTTP_201_CREATED, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@router.post("/rules/", response_model=EscalationRuleResponse, status_code=status.HTTP_201_CREATED, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def create_escalation_rule( payload: EscalationRuleCreate, current_user: User = Depends(get_current_user),26 unmodified lines await db.refresh(new_rule) return new_rule
@router.get("/rules", response_model=List[EscalationRuleResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/rules/", response_model=List[EscalationRuleResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def list_escalation_rules( workspace_id: UUID = None, current_user: User = Depends(get_current_user),12 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.patch("/rules/{rule_id}", response_model=EscalationRuleResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@router.patch("/rules/{rule_id}/", response_model=EscalationRuleResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def update_escalation_rule( rule_id: UUID, payload: EscalationRuleUpdate,19 unmodified lines await db.refresh(rule) return rule
@router.delete("/rules/{rule_id}", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@router.delete("/rules/{rule_id}/", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def delete_escalation_rule( rule_id: UUID, current_user: User = Depends(get_current_user),14 unmodified lines await db.commit() return None
@router.get("/audit", response_model=List[AuditLogResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/audit/", response_model=List[AuditLogResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def view_escalation_audit( skip: int = 0, limit: int = 100, current_user: User = Depends(get_current_user),10 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.get("/breaches", dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/breaches/", dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def list_active_breaches( current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)16 unmodified lines171819202021222335 unmodified lines596061626263646516 unmodified lines
router = APIRouter()
@router.post("/{ticket_id}/feedback", response_model=FeedbackResponse, status_code=status.HTTP_201_CREATED)@router.post("/{ticket_id}/feedback/", response_model=FeedbackResponse, status_code=status.HTTP_201_CREATED)async def submit_feedback( ticket_id: uuid.UUID, payload: FeedbackCreate,35 unmodified lines await db.refresh(new_feedback) return new_feedback
@router.get("/{ticket_id}/feedback", response_model=FeedbackResponse)@router.get("/{ticket_id}/feedback/", response_model=FeedbackResponse)async def get_ticket_feedback( ticket_id: uuid.UUID, current_user: User = Depends(get_current_user),101 unmodified lines102103104105105106107108194 unmodified lines30330430530630630730830985 unmodified lines39539639739839839940040111 unmodified lines41341441541641641741841949 unmodified lines46947047147247247347447535 unmodified lines51151251351451451551651762 unmodified lines580581582583583584585586101 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.get("/categories", response_model=List[str])@router.get("/categories/", response_model=List[str])async def list_kb_categories( workspace_id: Optional[str] = None, current_user: User = Depends(get_current_user),194 unmodified lines
return final_output
@router.get("/search", response_model=KBSearchResponse)@router.get("/search/", response_model=KBSearchResponse)async def search_kb_articles( q: str, category: Optional[str] = None,85 unmodified lines return res_data
@router.get("/{article_id}", response_model=KBArticleResponse)@router.get("/{article_id}/", response_model=KBArticleResponse)async def get_kb_article( article_id: UUID, current_user: User = Depends(get_current_user),11 unmodified lines raise HTTPException(status_code=404, detail="Article not found") return article
@router.patch("/{article_id}", response_model=KBArticleResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.patch("/{article_id}/", response_model=KBArticleResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def update_kb_article( article_id: UUID, payload: KBArticleUpdate,49 unmodified lines
return article
@router.delete("/{article_id}", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.delete("/{article_id}/", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def delete_kb_article( article_id: UUID, current_user: User = Depends(get_current_user),35 unmodified lines logger.info(f"KB Article and children inactivated: {article_id} by user {current_user.id}") return {"status": "deleted"}
@router.post("/bulk-publish", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.post("/bulk-publish/", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def bulk_publish_articles( payload: KBBulkSyncRequest, background_tasks: BackgroundTasks,62 unmodified lines logger.info(f"Bulk Sync & Publish (Isolated): {results['created']} created, {results['updated']} updated for workspace {current_user.workspace_id}") return {"status": "success", "summary": results}
@router.post("/bulk-unpublish", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.post("/bulk-unpublish/", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def bulk_unpublish_articles( payload: KBBulkActionRequest, current_user: User = Depends(get_current_user),32 unmodified lines333435363637383918 unmodified lines585960616162636451 unmodified lines11611711811911912012112232 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.patch("/{insight_id}", response_model=KnowledgeInsightResponse)@router.patch("/{insight_id}/", response_model=KnowledgeInsightResponse)async def update_insight( insight_id: UUID, payload: KnowledgeInsightUpdate,18 unmodified lines await db.commit() return insight
@router.post("/{insight_id}/apply", response_model=KBArticleResponse)@router.post("/{insight_id}/apply/", response_model=KBArticleResponse)async def apply_knowledge_insight( insight_id: UUID, current_user: User = Depends(get_current_user),51 unmodified lines logger.info(f"Insight {insight_id} APPLIED by user {current_user.id}. Article: {new_article.id}") return new_article
@router.post("/{insight_id}/dismiss")@router.post("/{insight_id}/dismiss/")async def dismiss_insight( insight_id: UUID, current_user: User = Depends(get_current_user),59 unmodified lines606162636364656675 unmodified lines14214314414514514614714837 unmodified lines18618718818918919019119231 unmodified lines22422522622722722822923059 unmodified lines return message
@router.post("/{ticket_id}/messages", response_model=MessageResponse, status_code=status.HTTP_201_CREATED)@router.post("/{ticket_id}/messages/", response_model=MessageResponse, status_code=status.HTTP_201_CREATED)async def send_message( ticket_id: UUID, payload: MessageCreate,75 unmodified lines return await sanitize_message_response(new_message, db)
@router.patch("/{ticket_id}/messages/{message_id}", response_model=MessageResponse)@router.patch("/{ticket_id}/messages/{message_id}/", response_model=MessageResponse)async def edit_message( ticket_id: UUID, message_id: UUID,37 unmodified lines return await sanitize_message_response(message, db)
@router.delete("/{ticket_id}/messages/{message_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None, response_class=Response)@router.delete("/{ticket_id}/messages/{message_id}/", status_code=status.HTTP_204_NO_CONTENT, response_model=None, response_class=Response)async def delete_message( ticket_id: UUID, message_id: UUID,31 unmodified lines return None
@router.get("/{ticket_id}/messages", response_model=List[MessageResponse])@router.get("/{ticket_id}/messages/", response_model=List[MessageResponse])async def list_messages( ticket_id: UUID, current_user: User = Depends(get_current_user),27 unmodified lines2829303131323334108 unmodified lines14314414514614614714814917 unmodified lines16716816917017017117217327 unmodified lines answer: str sources: List[str] = []
@router.post("/query", response_model=NexusResponse)@router.post("/query/", response_model=NexusResponse)async def query_nexus_master( payload: NexusQueryRequest, current_user: User = Depends(get_current_user),108 unmodified lines detail="Nexus Master encountered an unexpected internal error. Please contact 3SC Support." )
@router.get("/history", response_model=NexusHistoryForensicResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/history/", response_model=NexusHistoryForensicResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def get_nexus_history( db: AsyncSession = Depends(get_db), current_user: User = Depends(get_current_user)17 unmodified lines "count": len(interactions) }
@router.get("/thread/{thread_id}", response_model=List[NexusInteractionResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])@router.get("/thread/{thread_id}/", response_model=List[NexusInteractionResponse], dependencies=[Depends(require_roles(ALL_SC_ROLES))])async def get_nexus_thread_audit( thread_id: UUID, db: AsyncSession = Depends(get_db),71 unmodified lines727374757576777871 unmodified lines # Yield error to frontend before closing stream yield f"data: {json.dumps({'type': 'error', 'message': str(e)})}\n\n"
@router.post("/stream")@router.post("/stream/")async def stream_nexus_master( payload: NexusQueryRequest, current_user: User = Depends(get_current_user),26 unmodified lines27282930303132338 unmodified lines424344454546474826 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.patch("/mark-read", status_code=status.HTTP_200_OK)@router.patch("/mark-read/", status_code=status.HTTP_200_OK)async def mark_notifications_read( current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)8 unmodified lines await db.commit() return {"status": "success"}
@router.delete("/{notification_id}", status_code=status.HTTP_200_OK)@router.delete("/{notification_id}/", status_code=status.HTTP_200_OK)async def delete_notification( notification_id: UUID, current_user: User = Depends(get_current_user),54 unmodified lines555657585859606111 unmodified lines737475767677787919 unmodified lines9910010110210210310410554 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@projects_router.get("/{project_id}", response_model=ProjectResponse)@projects_router.get("/{project_id}/", response_model=ProjectResponse)async def get_project( project_id: str, current_user: User = Depends(get_current_user),11 unmodified lines raise HTTPException(status_code=404, detail="Project not found") return project
@projects_router.patch("/{project_id}", response_model=ProjectResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@projects_router.patch("/{project_id}/", response_model=ProjectResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def update_project( project_id: UUID, payload: ProjectUpdate,19 unmodified lines await db.refresh(project) return project
@projects_router.delete("/{project_id}", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@projects_router.delete("/{project_id}/", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def delete_project( project_id: UUID, current_user: User = Depends(get_current_user),17 unmodified lines181920212122232447 unmodified lines727374757576777813 unmodified lines929394959596979813 unmodified lines11211311411511511611711817 unmodified linesrouter = APIRouter()settings = get_settings()
@router.get("/status", dependencies=[Depends(get_current_staff_user)])@router.get("/status/", dependencies=[Depends(get_current_staff_user)])async def get_system_status( db: AsyncSession = Depends(get_db), arq_pool: ArqRedis = Depends(get_arq_pool)47 unmodified lines
from core.deps import get_db, get_current_staff_user, get_arq_pool...@router.get("/workflows", response_model=List[AIWorkflowRead], dependencies=[Depends(get_current_staff_user)])@router.get("/workflows/", response_model=List[AIWorkflowRead], dependencies=[Depends(get_current_staff_user)])async def get_recent_workflows( db: AsyncSession = Depends(get_db), ticket_id: Optional[UUID] = None,13 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.get("/interactions", response_model=List[AIInteractionRead], dependencies=[Depends(get_current_staff_user)])@router.get("/interactions/", response_model=List[AIInteractionRead], dependencies=[Depends(get_current_staff_user)])async def get_recent_interactions( db: AsyncSession = Depends(get_db), ticket_id: Optional[UUID] = None,13 unmodified lines result = await db.execute(stmt) return result.scalars().all()
@router.get("/history", response_model=List[MetaInfraHealthRead], dependencies=[Depends(get_current_staff_user)])@router.get("/history/", response_model=List[MetaInfraHealthRead], dependencies=[Depends(get_current_staff_user)])async def get_performance_history( db: AsyncSession = Depends(get_db)) -> List[MetaInfraHealth]:93 unmodified lines94959697979899100167 unmodified lines268269270271271272273274317 unmodified lines59259359459559559659759831 unmodified lines63063163263363363463563611 unmodified lines648649650651651652653654655121 unmodified lines77777877977978078178278344 unmodified lines82882983083083183283383463 unmodified lines8988999009009019029039046 unmodified lines91191291391391491591691791893 unmodified lines
# 5. Escalation Lead Lookup (Optimized) setattr(ticket, "escalated_to_name", lead_name) if ticket.is_escalated and is_staff and not lead_name: if ticket.is_escalated and not lead_name: from models.user_workspace import UserWorkspace stmt = select(User.full_name).join(UserWorkspace).where( UserWorkspace.workspace_id == ticket.workspace_id,167 unmodified lines return await sanitize_ticket_response(new_ticket, current_user, db)
@router.get("/search", response_model=TicketSearchResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES + ALL_CUSTOMER_ROLES))])@router.get("/search/", response_model=TicketSearchResponse, dependencies=[Depends(require_roles(ALL_SC_ROLES + ALL_CUSTOMER_ROLES))])async def search_tickets( q: str, project_id: Optional[UUID] = None,317 unmodified lines for t in tickets ]
@router.get("/{ticket_id}", response_model=Union[TicketInternalResponse, TicketResponse])@router.get("/{ticket_id}/", response_model=Union[TicketInternalResponse, TicketResponse])async def get_ticket( ticket_id: UUID, current_user: User = Depends(get_current_user),31 unmodified lines raise HTTPException(status_code=404, detail="Ticket not found or access denied") return await sanitize_ticket_response(ticket, current_user, db)
@router.patch("/{ticket_id}", response_model=Union[TicketInternalResponse, TicketResponse])@router.patch("/{ticket_id}/", response_model=Union[TicketInternalResponse, TicketResponse])async def update_ticket( ticket_id: UUID, payload: TicketUpdate,11 unmodified lines .options( joinedload(Ticket.creator), joinedload(Ticket.assignee), joinedload(Ticket.resolver) joinedload(Ticket.resolver), joinedload(Ticket.feedback) ) .where( Ticket.id == ticket_id, 121 unmodified lines
return await sanitize_ticket_response(ticket, current_user, db)
@router.delete("/{ticket_id}", status_code=status.HTTP_200_OK)@router.delete("/{ticket_id}/", status_code=status.HTTP_200_OK)async def delete_ticket( ticket_id: UUID, current_user: User = Depends(get_current_user),44 unmodified lines logger.info(f"Ticket soft-deleted: {ticket_id} by user {current_user.id}") return {"status": "deleted"}
@router.post("/{ticket_id}/reprocess", status_code=status.HTTP_202_ACCEPTED)@router.post("/{ticket_id}/reprocess/", status_code=status.HTTP_202_ACCEPTED)async def reprocess_ticket_ai( ticket_id: UUID, force_reroute: bool = False,63 unmodified lines "ticket_id": str(ticket.id) }
@router.post("/{ticket_id}/escalate", response_model=TicketResponse)@router.post("/{ticket_id}/escalate/", response_model=TicketResponse)async def escalate_ticket( ticket_id: UUID, current_user: User = Depends(get_current_user),6 unmodified lines .options( joinedload(Ticket.creator), joinedload(Ticket.assignee), joinedload(Ticket.resolver) joinedload(Ticket.resolver), joinedload(Ticket.feedback) ) .where( Ticket.id == ticket_id, 78 unmodified lines7980818282838485868687888963 unmodified lines15315415515615615715815916 unmodified lines17617717817917918018118278 unmodified lines logger.info(f"User created: {new_user.email} (Role: {payload.role}) in workspace {current_user.workspace_id}") return new_user
@router.get("/me", response_model=UserResponse)@router.get("/me/", response_model=UserResponse)async def read_user_me(current_user: User = Depends(get_current_user)) -> Any: return current_user
@router.patch("/me", response_model=UserResponse)@router.patch("/me/", response_model=UserResponse)async def update_user_me( payload: UserUpdate, current_user: User = Depends(get_current_user),63 unmodified lines return users
@router.delete("/{user_id}", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@router.delete("/{user_id}/", status_code=status.HTTP_200_OK, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def deactivate_user_v3( user_id: str, current_user: User = Depends(get_current_user),16 unmodified lines await db.commit() logger.info(f"User deactivated/soft-deleted: {user_id} by admin {current_user.id}") return {"status": "deleted"}@router.patch("/{user_id}", response_model=UserResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])@router.patch("/{user_id}/", response_model=UserResponse, dependencies=[Depends(require_roles(WORKSPACE_ADMIN_ROLES))])async def update_user_admin( user_id: str, payload: UserAdminUpdate,10 unmodified lines111213141415161777 unmodified lines95969798989910010110 unmodified lines
router = APIRouter()
@router.get("/list", response_model=List[WorkspaceWithRole])@router.get("/list/", response_model=List[WorkspaceWithRole])async def list_available_workspaces( current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)77 unmodified lines await db.refresh(workspace) return workspace
@router.get("/branding")@router.get("/branding/")async def get_workspace_branding( current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)127 unmodified lines128129130131131132133127 unmodified linesapp.include_router(system.router, prefix=f"{settings.API_V1_STR}/system", tags=["System Diagnostics"])app.include_router(websockets.router, tags=["websockets"])
@app.get("/health", tags=["System"])@app.get("/health/", tags=["System"])def health_check(): return {"status": "ok"}52 unmodified lines53545556575859605 unmodified lines666768676970717172737452 unmodified lines created_at: datetime updated_at: datetime is_mine: bool = False is_escalated: Optional[datetime] = None escalated_to_name: Optional[str] = None model_config = ConfigDict(from_attributes=True)
5 unmodified lines assigned_to: Optional[UUID] = None resolved_by: Optional[UUID] = None escalated_to_id: Optional[UUID] = None escalated_to_name: Optional[str] = None duplicate_of_id: Optional[UUID] = None estimated_effort_hours: Optional[Union[Dict[str, Any], float, int]] = None ai_metadata: Optional[Dict[str, Any]] = None is_escalated: Optional[datetime] = None
class TicketSearchResult(BaseModel):api/v1/ai.py+1-1
api/v1/attachments.py+4-4
api/v1/dashboard.py+5-5
api/v1/escalations.py+6-6
api/v1/feedback.py+2-2
api/v1/kb.py+7-7
api/v1/kb_insights.py+3-3
api/v1/messages.py+4-4
api/v1/nexus.py+3-3
api/v1/nexus_stream.py+1-1
api/v1/notifications.py+2-2
api/v1/projects.py+3-3
api/v1/system.py+4-4
api/v1/tickets.py+11-9
api/v1/users.py+4-4
api/v1/workspace.py+2-2
main.py+1-1
schemas/ticket.py+2-2