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

import nexusrpc
import temporalio.api.common.v1
import temporalio.client
from typing import Any, Optional, TYPE_CHECKING

if TYPE_CHECKING:
    ...
logger = ...
_LINK_URL_PATH_REGEX = ...
LINK_EVENT_ID_PARAM_NAME = ...
LINK_EVENT_TYPE_PARAM_NAME = ...
def workflow_execution_started_event_link_from_workflow_handle(handle: temporalio.client.WorkflowHandle[Any, Any]) -> temporalio.api.common.v1.Link.WorkflowEvent:
    """Create a WorkflowEvent link corresponding to a started workflow"""
    ...

def workflow_event_to_nexus_link(workflow_event: temporalio.api.common.v1.Link.WorkflowEvent) -> nexusrpc.Link:
    """Convert a WorkflowEvent link into a nexusrpc link

    Used when propagating links from a StartWorkflow response to a Nexus start operation
    response.
    """
    ...

def nexus_link_to_workflow_event(link: nexusrpc.Link) -> Optional[temporalio.api.common.v1.Link.WorkflowEvent]:
    """Convert a nexus link into a WorkflowEvent link

    This is used when propagating links from a Nexus start operation request to a
    StartWorklow request.
    """
    ...

