/** Parameters for retrieving configuration templates. */ interface GetConfigTemplatesParams { /** Optional template name filter. */ templateName?: string; /** Optional maximum number of templates to return. */ limit?: number; /** Optional status filter (e.g. 'APPROVED', 'REJECTED', 'PENDING'). */ status?: string; /** Optional category filter (e.g. 'UTILITY', 'MARKETING', 'AUTHENTICATION'). */ category?: string; /** Optional pagination cursor token/URL. */ next?: string; /** Optional pagination cursor 'after' parameter. */ after?: string; } /** Component of a message template. */ interface MessageTemplateComponent { /** Type of the component (e.g. 'HEADER', 'BODY', 'FOOTER', 'BUTTONS'). */ type: string; /** Format of the component (e.g. 'TEXT', 'IMAGE', 'DOCUMENT', 'VIDEO'). */ format?: string; /** Text content of the component. */ text?: string; /** List of buttons in the component if type is 'BUTTONS'. */ buttons?: Array<{ type: string; text: string; url?: string; phoneNumber?: string; }>; } /** Details of a message template. */ interface MessageTemplate { /** Name of the message template. */ name: string; /** Status of the template (e.g. 'APPROVED', 'REJECTED', 'PENDING'). */ status: string; /** Category of the template (e.g. 'UTILITY', 'MARKETING', 'AUTHENTICATION'). */ category: string; /** Language locale of the template (e.g. 'pt_BR', 'en_US'). */ language: string; /** Components that build up the template content. */ components: MessageTemplateComponent[]; /** Unique identifier of the template. */ id: string; } /** Pagination information for the template query response. */ interface ConfigTemplatesPaging { /** Cursors used to paginate results. */ cursors?: { /** Cursor pointing to the start of the current range. */ before?: string; /** Cursor pointing to the end of the current range. */ after?: string; }; /** URL for the next page of results. */ next?: string; } /** Response containing the list of message templates configured. */ interface GetConfigTemplatesResponse { /** List of message templates. */ data: MessageTemplate[]; /** Pagination information. */ paging?: ConfigTemplatesPaging; } interface FlowReadiness { ready: boolean; phoneNumberId?: string; reason?: string | null; } interface FlowCatalogItem { metaFlowId: string; name: string; status: string; } interface FlowCatalogParams { limit?: number; after?: string; before?: string; } interface FlowCatalogResponse { data: FlowCatalogItem[]; paging?: ConfigTemplatesPaging; } interface FlowDefinition extends FlowCatalogItem { screens: string[]; } export type { ConfigTemplatesPaging, FlowCatalogItem, FlowCatalogParams, FlowCatalogResponse, FlowDefinition, FlowReadiness, GetConfigTemplatesParams, GetConfigTemplatesResponse, MessageTemplate, MessageTemplateComponent };