import type { AutoMessage, AutoMessageType, Conversation, ConversationType, CreateAutoMessageOptions, MessageItem, MessageParticipant, SendMessageOptions, TikTokClientOptions } from "./types.ts"; /** * Business Messaging API — direct messages, conversations, and auto-messages. * Rate limit: 10 messages within 48h after receiving a user message. */ export declare function createMessaging(opts: TikTokClientOptions): { /** Send a message to a conversation. */ sendMessage(opts: SendMessageOptions): Promise<{ messageId: string; }>; /** List conversations. Only conversations from the past 90 days. */ listConversations(conversationType: ConversationType, opts?: { limit?: number; cursor?: number; }): Promise<{ conversations: Conversation[]; cursor: number; has_more: boolean; }>; /** List messages in a conversation. Returns max 20 most recent messages. */ listMessages(conversationId: string): Promise<{ messages: MessageItem[]; participants: MessageParticipant[]; }>; /** Upload an image for use in messages. JPG/PNG, max 3MB. Returns media_id valid for 30 days. */ uploadImage(imageFile: Blob): Promise<{ mediaId: string; }>; /** Download media from a message. Returns a URL valid for 24 hours. */ downloadMedia(opts: { conversationId: string; messageId: string; mediaId: string; mediaType: "IMAGE" | "VIDEO"; }): Promise<{ downloadUrl: string; }>; /** Check messaging capabilities for a conversation. */ getCapabilities(capabilityTypes: string[], opts?: { conversationId?: string; conversationType?: ConversationType; }): Promise<{ capabilityType: string; capabilityResult: boolean; }[]>; /** Create an auto-message (welcome message, suggested question, or chat prompt). */ createAutoMessage(opts: CreateAutoMessageOptions): Promise<{ autoMessageId: string; }>; /** Update an existing auto-message. */ updateAutoMessage(autoMessageId: string, opts: CreateAutoMessageOptions): Promise<{ autoMessageId: string; }>; /** Enable or disable an auto-message type. */ toggleAutoMessage(autoMessageType: AutoMessageType, status: "ENABLE" | "DISABLE"): Promise; /** Get auto-messages by type. Optionally filter by specific ID. */ getAutoMessages(autoMessageType: AutoMessageType, autoMessageId?: string): Promise<{ operationStatus: string; autoMessages: AutoMessage[]; }>; /** Delete an auto-message. Only SUGGESTED_QUESTION and CHAT_PROMPT can be deleted. */ deleteAutoMessage(autoMessageType: "SUGGESTED_QUESTION" | "CHAT_PROMPT", autoMessageId: string): Promise; /** Sort chat prompts in display order. */ sortAutoMessages(autoMessageIds: string[]): Promise; }; //# sourceMappingURL=messaging.d.ts.map