import type { PluginConfig, WechatMpAccountConfig, WechatMpASRCredentials } from "./types.js"; /** * Default account identifier for single-account configurations. */ export declare const DEFAULT_ACCOUNT_ID = "default"; /** * List all configured WeChat MP account IDs. * Returns the default account ID if no multi-account config exists. */ export declare function listWechatMpAccountIds(cfg: PluginConfig): string[]; /** * Resolve the default WeChat MP account ID. * Returns the first available account or "default". */ export declare function resolveDefaultWechatMpAccountId(cfg: PluginConfig): string; /** * Resolved WeChat MP account with merged configuration. */ export interface ResolvedWechatMpAccount { accountId: string; name: string; enabled: boolean; configured: boolean; canSendActive: boolean; config: WechatMpAccountConfig; } /** * Resolve a WeChat MP account configuration. * Merges root config with account-specific overrides. */ export declare function resolveWechatMpAccount(params: { cfg: PluginConfig; accountId?: string; }): ResolvedWechatMpAccount; /** * Resolve the allowFrom list from account configuration. */ export declare function resolveAllowFrom(config: WechatMpAccountConfig): string[]; /** * Parse an external target string into openId and accountId components. * Supports formats: * - `user:` (default account) * - `user:@` (explicit account) * - `wechat-mp:user:` (legacy prefix) * - `wechat-mp:user:@` (legacy with account) * - `` (bare openid, default account) * - `@` (bare with account) */ export declare function parseWechatMpTarget(target: string): { openId: string; accountId?: string; } | null; /** * Build an external target string from openId and optional accountId. */ export declare function buildWechatMpTarget(openId: string, accountId?: string): string; /** * Build an internal session key from appId and openId. * Format: `dm::` */ export declare function buildWechatMpSessionKey(appId: string, openId: string): string; /** * Parse an internal session key to extract appId and openId. */ export declare function parseWechatMpSessionKey(sessionKey: string): { appId: string; openId: string; } | null; /** * Resolve ASR credentials from account configuration. * Returns undefined if ASR is disabled or not fully configured. */ export declare function resolveWechatMpASRCredentials(config: WechatMpAccountConfig): WechatMpASRCredentials | undefined; //# sourceMappingURL=config.d.ts.map