feat(agent-office): realestate on_new_matches + /notify endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -180,3 +180,22 @@ def conversation_stats(days: int = 7):
|
||||
@app.get("/api/agent-office/activity")
|
||||
def activity_feed(limit: int = 50, offset: int = 0):
|
||||
return get_activity_feed(limit, offset)
|
||||
|
||||
|
||||
# --- Realestate Agent Push Endpoint ---
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Dict, Any
|
||||
|
||||
|
||||
class RealestateNotifyBody(BaseModel):
|
||||
matches: List[Dict[str, Any]]
|
||||
|
||||
|
||||
@app.post("/api/agent-office/realestate/notify")
|
||||
async def realestate_notify(body: RealestateNotifyBody):
|
||||
agent = get_agent("realestate")
|
||||
if agent is None:
|
||||
from fastapi import HTTPException
|
||||
raise HTTPException(status_code=503, detail="RealestateAgent not initialized")
|
||||
return await agent.on_new_matches(body.matches)
|
||||
|
||||
Reference in New Issue
Block a user