Skip to content

API Reference parrot_formdesigner.renderers.telegram.models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.renderers.telegram.models

View source

Data models for the Telegram form renderer.

Defines enums, Pydantic models, and aiogram CallbackData factories used by TelegramRenderer and TelegramFormRouter.

Alias FieldType

Re-exported from parrot_formdesigner.core.types.FieldType.

Class FormActionCallback

Callback data for form-level actions (submit, cancel).

Attributes:

Attribute Type Description
fh str Short hash of form_id (max 8 chars).
act str Action identifier ('submit', 'cancel', 'done').

Class FormFieldCallback

Compact callback data for inline form field selections.

Encodes form hash, field index, and option index within the 64-byte Telegram callback_data limit.

Attributes:

Attribute Type Description
fh str Short hash of form_id (max 8 chars).
fi int Field index in the flattened field list.
oi int Selected option index (-1 for special actions like 'done').

Class TelegramFormPayload

Output of TelegramRenderer.render(), stored in RenderedForm.content.

Fields:

Field Type Default Description
mode TelegramRenderMode The rendering mode selected.
form_id str Form identifier.
form_title str Human-readable form title.
steps list[TelegramFormStep] | None None List of inline form steps (inline mode only).
webapp_url str | None None URL to the WebApp page (webapp mode only).
summary_text str | None None Pre-submit summary template.
total_fields int Total number of renderable fields.

Class TelegramFormStep

A single step in an inline keyboard form conversation.

Fields:

Field Type Default Description
field_id str The field this step collects data for.
message_text str Prompt text sent to the user.
reply_markup dict[str, Any] Serialized InlineKeyboardMarkup dict.
field_type FieldType The FieldType of the underlying form field.
required bool False Whether this field is required.
options list[tuple[str, str]] | None None List of (value, label) pairs for select-type fields.

Class TelegramRenderMode

Rendering mode for Telegram forms.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally