import type { Config } from '@xopcai/xopc/config/schema.js';
import { normalizeWeixinAccountId } from './weixin-account-id.js';
export { normalizeWeixinAccountId };
export declare const DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com";
export declare const CDN_BASE_URL = "https://novac2c.cdn.weixin.qq.com/c2c";
export declare function listIndexedWeixinAccountIds(): string[];
export declare function registerWeixinAccountId(accountId: string): void;
export declare function unregisterWeixinAccountId(accountId: string): void;
export declare function clearStaleAccountsForUserId(currentAccountId: string, userId: string, onClearContextTokens?: (accountId: string) => void): void;
export type WeixinAccountData = {
    token?: string;
    savedAt?: string;
    baseUrl?: string;
    userId?: string;
};
export declare function loadWeixinAccount(accountId: string): WeixinAccountData | null;
export declare function saveWeixinAccount(accountId: string, update: {
    token?: string;
    baseUrl?: string;
    userId?: string;
}): void;
export declare function clearWeixinAccount(accountId: string): void;
export type ResolvedWeixinAccount = {
    accountId: string;
    baseUrl: string;
    cdnBaseUrl: string;
    token?: string;
    enabled: boolean;
    configured: boolean;
    name?: string;
    dmPolicy: 'pairing' | 'allowlist' | 'open' | 'disabled';
    allowFrom: string[];
    streamMode?: 'off' | 'partial' | 'block';
    routeTag?: string;
    debug?: boolean;
};
export declare function listWeixinAccountIds(cfg: Config): string[];
export declare function resolveWeixinAccount(cfg: Config, accountId?: string | null): ResolvedWeixinAccount;
export declare function resolveFrameworkAllowFromPath(accountId: string): string;
