import type { WechatMpAccountState } from "./types.js"; export declare function markProcessedMessage(msgId: string): Promise; export declare function getAccountState(accountId: string): Promise; export declare function updateAccountState(accountId: string, patch: Partial): Promise; export declare function flushWechatMpStateForTests(): Promise; export declare function setWechatMpStateFilePathForTests(nextPath?: string): void; /** * Get the last interaction time for a user within an account. * Returns null if the user has never interacted or interaction data doesn't exist. * * @param accountId The account identifier * @param openId The user's openId * @returns Last interaction timestamp in milliseconds, or null */ export declare function getLastInteractionTime(accountId: string, openId: string): Promise; /** * Record a user interaction timestamp. * Called when processing inbound messages to track the 48h interaction window. * * @param accountId The account identifier * @param openId The user's openId * @param timestamp Optional timestamp (defaults to Date.now()) */ export declare function recordUserInteraction(accountId: string, openId: string, timestamp?: number): Promise; /** * Check if a user is within the 48h interaction window. * * @param accountId The account identifier * @param openId The user's openId * @returns true if user has interacted within the last 48 hours */ export declare function isWithinInteractionWindow(accountId: string, openId: string): Promise; /** * Get when the 48h interaction window expires for a user. * * @param accountId The account identifier * @param openId The user's openId * @returns Expiration timestamp in milliseconds, or null if outside window */ export declare function getInteractionWindowExpiry(accountId: string, openId: string): Promise; //# sourceMappingURL=state.d.ts.map