from __future__ import annotations from typing import Any class SetupSurface: @staticmethod def get_config_schema() -> dict[str, Any]: return { "type": "object", "properties": { "server_url": { "type": "string", "title": "Server URL", "description": "BlueBubbles server address", "default": "http://localhost:1234", }, "password": { "type": "string", "title": "Server Password", "description": "Password from BlueBubbles server settings", "format": "password", }, "dm_policy": { "type": "string", "title": "DM Policy", "description": "Policy for direct messages", "enum": ["open", "pairing", "allowlist", "blocklist"], "default": "pairing", }, "group_policy": { "type": "string", "title": "Group Policy", "description": "Policy for group messages", "enum": ["open", "allowlist", "blocklist"], "default": "allowlist", }, "require_mention": { "type": "boolean", "title": "Require @Mention", "description": "Only respond to group messages that @mention the bot", "default": False, }, "tapback_enabled": { "type": "boolean", "title": "Enable Tapback Reactions", "description": "Allow the bot to send Tapback reactions", "default": True, }, }, "required": ["server_url", "password"], } @staticmethod def get_help_texts() -> dict[str, str]: return { "server_url": "The URL of your BlueBubbles server (e.g., http://192.168.1.100:1234)", "password": "Found in BlueBubbles app → Settings → Server → Password", "dm_policy": ( "open: allow all DMs | pairing: auto-accept new DMs | " "allowlist: only listed contacts | blocklist: block listed contacts" ), "group_policy": "open: allow all groups | allowlist: only listed groups | blocklist: block listed groups", "require_mention": "When enabled, the bot only responds to group messages that @mention it", "tapback_enabled": "Enable/disable the bot's ability to send iMessage Tapback reactions", }