"""Command handlers for Phase 11.9."""
from app.services.integrations import ExperienceIntegrationsService


class IntegrationsCommands:
    def __init__(self, session):
        self.service = ExperienceIntegrationsService(session)

    async def create_consumer_connector_registration(self, tenant_id, body, *, actor=None):
        return await self.service.create_consumer_connector_registration(tenant_id, body, actor=actor)

    async def update_consumer_connector_registration(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_consumer_connector_registration(
            tenant_id, entity_id, body, actor=actor
        )

    async def delete_consumer_connector_registration(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_consumer_connector_registration(
            tenant_id, entity_id, actor=actor
        )

    async def create_consumer_connector_dispatch(self, tenant_id, body, *, actor=None):
        return await self.service.create_consumer_connector_dispatch(tenant_id, body, actor=actor)

    async def update_consumer_connector_dispatch(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_consumer_connector_dispatch(
            tenant_id, entity_id, body, actor=actor
        )

    async def delete_consumer_connector_dispatch(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_consumer_connector_dispatch(
            tenant_id, entity_id, actor=actor
        )

    async def execute_consumer_connector_dispatch(self, tenant_id, entity_id, *, actor=None):
        return await self.service.execute_consumer_connector_dispatch(
            tenant_id, entity_id, actor=actor
        )

    async def create_widget_definition(self, tenant_id, body, *, actor=None):
        return await self.service.create_widget_definition(tenant_id, body, actor=actor)

    async def update_widget_definition(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_widget_definition(tenant_id, entity_id, body, actor=actor)

    async def delete_widget_definition(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_widget_definition(tenant_id, entity_id, actor=actor)

    async def create_widget_instance(self, tenant_id, body, *, actor=None):
        return await self.service.create_widget_instance(tenant_id, body, actor=actor)

    async def update_widget_instance(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_widget_instance(tenant_id, entity_id, body, actor=actor)

    async def delete_widget_instance(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_widget_instance(tenant_id, entity_id, actor=actor)

    async def create_notify_dispatch(self, tenant_id, body, *, actor=None):
        return await self.service.create_notify_dispatch(tenant_id, body, actor=actor)

    async def update_notify_dispatch(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_notify_dispatch(tenant_id, entity_id, body, actor=actor)

    async def delete_notify_dispatch(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_notify_dispatch(tenant_id, entity_id, actor=actor)

    async def send_notify_dispatch(self, tenant_id, entity_id, *, actor=None):
        return await self.service.send_notify_dispatch(tenant_id, entity_id, actor=actor)
