"""
STRING_map_identifiers

Map protein identifiers to STRING (Search Tool for Retrieval of Interacting Genes/Proteins) datab...
"""

from typing import Any, Optional, Callable
from ._shared_client import get_shared_client


def STRING_map_identifiers(
    protein_ids: list[str],
    species: Optional[int] = 9606,
    limit: Optional[int] = 1,
    echo_query: Optional[int] = 1,
    *,
    stream_callback: Optional[Callable[[str], None]] = None,
    use_cache: bool = False,
    validate: bool = True,
) -> list[Any]:
    """
    Map protein identifiers to STRING (Search Tool for Retrieval of Interacting Genes/Proteins) datab...

    Parameters
    ----------
    protein_ids : list[str]
        List of protein identifiers to map (UniProt IDs, gene names, Ensembl IDs, Ref...
    species : int
        NCBI taxonomy ID (default: 9606 for human, 10090 for mouse)
    limit : int
        Maximum number of matches per identifier (default: 1)
    echo_query : int
        Include query identifier in response (1=yes, 0=no, default: 1)
    stream_callback : Callable, optional
        Callback for streaming output
    use_cache : bool, default False
        Enable caching
    validate : bool, default True
        Validate parameters

    Returns
    -------
    list[Any]
    """
    # Handle mutable defaults to avoid B006 linting error

    return get_shared_client().run_one_function(
        {
            "name": "STRING_map_identifiers",
            "arguments": {
                "protein_ids": protein_ids,
                "species": species,
                "limit": limit,
                "echo_query": echo_query,
            },
        },
        stream_callback=stream_callback,
        use_cache=use_cache,
        validate=validate,
    )


__all__ = ["STRING_map_identifiers"]
