from __future__ import annotations from typing import Any def build_mp_callback_confirmation(echostr: str) -> str: return echostr def build_wecom_callback_confirmation( echostr: str, timestamp: str, nonce: str, msg_signature: str, reply_echostr: str ) -> str: return reply_echostr def build_webhook_response_template(msg_type: str = "text") -> dict[str, Any]: return {"msgtype": msg_type, msg_type: {"content": ""}} def build_webhook_error_template(error_msg: str) -> dict[str, Any]: return { "msgtype": "text", "text": {"content": f"[Error] {error_msg}"}, }