"""
This type stub file was generated by pyright.
"""

import nexusrpc
from typing import Any, Awaitable, Callable, Optional, Type, TypeVar
from nexusrpc import InputT, OutputT
from temporalio.nexus._operation_context import WorkflowRunOperationContext
from ._token import WorkflowHandle as WorkflowHandle

ServiceHandlerT = TypeVar("ServiceHandlerT")
def get_workflow_run_start_method_input_and_output_type_annotations(start: Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]) -> tuple[Optional[Type[InputT]], Optional[Type[OutputT]],]:
    """Return operation input and output types.

    `start` must be a type-annotated start method that returns a
    :py:class:`temporalio.nexus.WorkflowHandle`.
    """
    ...

def get_callable_name(fn: Callable[..., Any]) -> str:
    """Return the name of a callable object."""
    ...

def get_operation_factory(obj: Any) -> tuple[Optional[Callable[[Any], Any]], Optional[nexusrpc.Operation[Any, Any]],]:
    """Return the :py:class:`Operation` for the object along with the factory function.

    ``obj`` should be a decorated operation start method.
    """
    ...

def set_operation_factory(obj: Any, operation_factory: Callable[[Any], Any]) -> None:
    """Set the :py:class:`OperationHandler` factory for this object.

    ``obj`` should be an operation start method.
    """
    ...

def is_async_callable(obj: Any) -> bool:
    """Return True if `obj` is an async callable.

    Supports partials of async callable class instances.
    """
    ...

