import pyscripts

from typing import Union

from mbcontextmessagehandler import MbContextMessageBus
from update_api import PosUpdaterService


def get_pos_updater_service(
    pos_id,     # type: Union[int, str]
):
    # type: (...) -> PosUpdaterService

    return PosUpdaterService(
        message_bus=MbContextMessageBus(mbcontext=pyscripts.mbcontext),
        pos_id=int(pos_id),
    )
