Skip to content

Commit 0b7a109

Browse files
committed
Relax InteractionCreate.input_type to accept any valid identifier
The hardcoded enum of allowed input types required a schema change for every new flow input type. Replace with a simple identifier pattern so flow authors can define custom input types without API changes.
1 parent fe0e41f commit 0b7a109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/schemas/cms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class InteractionCreate(BaseModel):
465465
input: str
466466
input_type: str = Field(
467467
...,
468-
pattern="^(text|button|file|choice|number|email|phone|url|date|slider|image_choice|carousel|multiple_choice|book_feedback|continue)$",
468+
pattern=r"^[a-z][a-z0-9_]{0,49}$",
469469
)
470470

471471

0 commit comments

Comments
 (0)