"""RPC protocol implementation for NotebookLM batchexecute API."""

from .decoder import (
    AuthError,
    ClientError,
    NetworkError,
    RateLimitError,
    RPCError,
    RPCErrorCode,
    RPCTimeoutError,
    ServerError,
    collect_rpc_ids,
    decode_response,
    extract_rpc_result,
    get_error_message_for_code,
    parse_chunked_response,
    strip_anti_xssi,
)
from .encoder import build_request_body, encode_rpc_request
from .types import (
    BATCHEXECUTE_URL,
    QUERY_URL,
    UPLOAD_URL,
    ArtifactStatus,
    ArtifactTypeCode,
    AudioFormat,
    AudioLength,
    ChatGoal,
    ChatResponseLength,
    DriveMimeType,
    ExportType,
    InfographicDetail,
    InfographicOrientation,
    QuizDifficulty,
    QuizQuantity,
    ReportFormat,
    RPCMethod,
    SlideDeckFormat,
    SlideDeckLength,
    StudioContentType,  # Deprecated alias for ArtifactTypeCode
    VideoFormat,
    VideoStyle,
    artifact_status_to_str,
)

__all__ = [
    "RPCMethod",
    "BATCHEXECUTE_URL",
    "QUERY_URL",
    "UPLOAD_URL",
    "ArtifactTypeCode",
    "StudioContentType",  # Deprecated alias
    "ArtifactStatus",
    "artifact_status_to_str",
    "AudioFormat",
    "AudioLength",
    "VideoFormat",
    "VideoStyle",
    "QuizQuantity",
    "QuizDifficulty",
    "InfographicOrientation",
    "InfographicDetail",
    "SlideDeckFormat",
    "SlideDeckLength",
    "ReportFormat",
    "ChatGoal",
    "ChatResponseLength",
    "DriveMimeType",
    "ExportType",
    "encode_rpc_request",
    "build_request_body",
    "strip_anti_xssi",
    "parse_chunked_response",
    "extract_rpc_result",
    "collect_rpc_ids",
    "decode_response",
    # Exceptions
    "RPCError",
    "AuthError",
    "NetworkError",
    "RPCTimeoutError",
    "RateLimitError",
    "ServerError",
    "ClientError",
    # Error handling utilities
    "RPCErrorCode",
    "get_error_message_for_code",
]
