platform-core/modules/serviceCenter/services/serviceTicket/mainServiceTicket.py
ValueOn AG 26dd8f6f3f
Some checks failed
Deploy Plattform-Core (Int) / test (push) Failing after 12s
Deploy Plattform-Core (Int) / deploy (push) Has been skipped
cleanup intra referencings in codebase
2026-06-09 07:05:06 +02:00

31 lines
1 KiB
Python

# Copyright (c) 2025 Patrick Motsch
# All rights reserved.
"""Ticket service for creating ticket interfaces."""
import logging
from typing import Dict, Any, Optional, Callable
from modules.interfaces.interfaceTicketObjects import createTicketInterfaceByType
logger = logging.getLogger(__name__)
class TicketService:
"""Service class for ticket interface operations."""
def __init__(self, context, get_service: Callable[[str], Any]):
"""Initialize with context and service resolver."""
self._context = context
self._getService = get_service
async def connectTicket(
self,
taskSyncDefinition: Dict[str, Any],
connectorType: str,
connectorParams: Optional[Dict[str, Any]] = None
):
"""Create a ticket interface by type with the given parameters."""
return await createTicketInterfaceByType(
taskSyncDefinition=taskSyncDefinition,
connectorType=connectorType,
connectorParams=connectorParams
)