TorbatYar/backend/services/experience/app/commands/ai_hooks.py
Mortezakoohjani 203671a7bf feat(experience): ship Experience Platform phases 11.0-11.10
Add the experience service with sites through analytics/AI hooks, migrations through 0011, and phase docs/manifests marking the track complete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 11:43:10 +03:30

31 lines
1.4 KiB
Python

"""Command handlers for Phase 11.10 AI content hooks."""
from app.services.ai_hooks import ExperienceAiHooksService
class AiHooksCommands:
def __init__(self, session):
self.service = ExperienceAiHooksService(session)
async def create_hook_registration(self, tenant_id, body, *, actor=None):
return await self.service.create_hook_registration(tenant_id, body, actor=actor)
async def update_hook_registration(self, tenant_id, entity_id, body, *, actor=None):
return await self.service.update_hook_registration(
tenant_id, entity_id, body, actor=actor
)
async def delete_hook_registration(self, tenant_id, entity_id, *, actor=None):
return await self.service.delete_hook_registration(tenant_id, entity_id, actor=actor)
async def create_dispatch(self, tenant_id, body, *, actor=None):
return await self.service.create_dispatch(tenant_id, body, actor=actor)
async def update_dispatch(self, tenant_id, entity_id, body, *, actor=None):
return await self.service.update_dispatch(tenant_id, entity_id, body, actor=actor)
async def delete_dispatch(self, tenant_id, entity_id, *, actor=None):
return await self.service.delete_dispatch(tenant_id, entity_id, actor=actor)
async def generate_dispatch(self, tenant_id, entity_id, *, actor=None):
return await self.service.generate_dispatch(tenant_id, entity_id, actor=actor)