import { RpcMethod } from './commonTypes'; export type WhatsAppPresetsService_List = RpcMethod; export type WhatsAppPresetsService_Get = RpcMethod; export interface WhatsAppPresetsService { /** Lists APPROVED WhatsApp message templates (presets) for an application by querying the Meta WhatsApp Business API, optionally filtered by name or body content. Use to browse a project's WhatsApp presets or find a preset code before fetching one with get_whatsapp_preset. */ List: WhatsAppPresetsService_List; /** Returns a single WhatsApp preset by its code (template name, format templateName:language) from the Meta WhatsApp Business API, including body text, header, buttons and variables. Use after list_whatsapp_presets to inspect one preset. */ Get: WhatsAppPresetsService_Get; } export type ListWhatsAppPresetsRequest = { /** Application code (format XXXXX-XXXXX) whose WhatsApp presets to list; must have the WhatsApp platform configured. */ application?: string; /** Free-text filter matched against preset name or body content (Meta name_or_content). */ searchByName?: string; }; export type WhatsAppPreset = { name: string; code: string; properties: WhatsAppPresetProperties; created: Date; updated: Date; }; export type WhatsAppPresetProperties = { contentId: string; text: string; /** field not set in the code, maybe used in clients */ variables: Record; quickReplies: string[]; buttonUrlVariables: ButtonVariable[]; headerType: string; headerText: string; headerVariables: string[]; /** New field to replace 'variables' without changing type */ variableList: string[]; }; export type ButtonVariable = { index: number; text: string; url: string; type: string; variable: string; }; export type ListWhatsAppPresetsResponse = { presets: WhatsAppPreset[]; page: number; perPage: number; total: number; }; export type GetWhatsAppPresetRequest = { /** Preset code (WhatsApp template name, format templateName:language) to fetch. */ code?: string; /** Application code (format XXXXX-XXXXX) the preset belongs to; must have the WhatsApp platform configured. */ application?: string; }; export type GetWhatsAppPresetResponse = { preset: WhatsAppPreset; };