import type { PluginConfig, MediaMessageType, TimeWindowConfig, SendCapabilityResult } from "./types.js"; export declare const wechatMpOutbound: { deliveryMode: "direct"; textChunkLimit: number; sendText: (params: { cfg: PluginConfig; accountId?: string; to: string; text: string; }) => Promise<{ channel: string; ok: boolean; messageId: string; error: Error | undefined; }>; /** * Send template message via WeChat MP template message API * @see https://developers.weixin.qq.com/doc/offiaccount/Message_management/Template_message_interface.html */ sendTemplate: (params: { cfg: PluginConfig; accountId?: string; to: string; templateId: string; data: Record; url?: string; miniprogram?: { appid: string; pagepath?: string; }; }) => Promise<{ channel: string; ok: boolean; messageId: string; error: Error | undefined; }>; /** * Send media message (image/voice/video) via WeChat MP customer service API * Workflow: Upload media -> Get media_id -> Send message */ sendMedia: (params: { cfg: PluginConfig; accountId?: string; to: string; mediaType: MediaMessageType; buffer: Buffer | Uint8Array; filename?: string; title?: string; description?: string; }) => Promise<{ channel: string; ok: boolean; messageId: string; error: Error | undefined; }>; /** * Check if a message can be sent to a user without actually sending. * Useful for pre-flight checks and user feedback. * * Checks: * - Account is configured for active sending * - User is within 48h interaction window * - (Optional) Current time is within allowed window * * @param params Check parameters * @returns Detailed capability result */ checkCapability: (params: { cfg: PluginConfig; accountId?: string; to: string; /** Optional time window configuration */ timeWindowConfig?: TimeWindowConfig; }) => Promise; /** * Check if current time is within allowed sending window. * * @param params Check parameters with time window configuration * @returns true if within allowed window */ checkTimeWindow: (params: { /** Time window configuration */ config?: TimeWindowConfig; }) => boolean; /** * Record a user interaction (call when receiving inbound messages). * This is needed for the 48h interaction window tracking. * * @param params Interaction parameters */ recordInteraction: (params: { cfg: PluginConfig; accountId?: string; openId: string; timestamp?: number; }) => Promise; }; //# sourceMappingURL=outbound.d.ts.map