@@ -313,7 +313,7 @@ data class ListItem internal constructor(
313313@JsonTypeInfo(use = JsonTypeInfo .Id .NAME , property = " type" , include = JsonTypeInfo .As .EXISTING_PROPERTY )
314314@JsonSubTypes(
315315 JsonSubTypes .Type (value = Block .Paragraph ::class , name = Block .Type .PARAGRAPH_STR ),
316- JsonSubTypes .Type (value = Block .SectionHeading ::class , name = Block .Type .SECTION_HEADING_STR ),
316+ JsonSubTypes .Type (value = Block .SectionHeading ::class , name = Block .Type .HEADING_STR ),
317317 JsonSubTypes .Type (value = Block .Preformatted ::class , name = Block .Type .PRE_STR ),
318318 JsonSubTypes .Type (value = Block .Footer ::class , name = Block .Type .FOOTER_STR ),
319319 JsonSubTypes .Type (value = Block .Divider ::class , name = Block .Type .DIVIDER_STR ),
@@ -340,8 +340,8 @@ sealed interface Block {
340340 @TelegramCodegen.Type
341341 data class Paragraph internal constructor(val text : RichTextValue ) : Block { override val type = Type .PARAGRAPH ; companion object }
342342 @TelegramCodegen.Type
343- data class SectionHeading internal constructor(val text : RichTextValue , val level : Int ) : Block {
344- override val type = Type .SECTION_HEADING
343+ data class SectionHeading internal constructor(val text : RichTextValue , val size : Int ) : Block {
344+ override val type = Type .HEADING
345345 companion object
346346 }
347347 @TelegramCodegen.Type
@@ -444,7 +444,7 @@ sealed interface Block {
444444
445445 enum class Type {
446446 @JsonProperty(PARAGRAPH_STR ) PARAGRAPH ,
447- @JsonProperty(SECTION_HEADING_STR ) SECTION_HEADING ,
447+ @JsonProperty(HEADING_STR ) HEADING ,
448448 @JsonProperty(PRE_STR ) PRE ,
449449 @JsonProperty(FOOTER_STR ) FOOTER ,
450450 @JsonProperty(DIVIDER_STR ) DIVIDER ,
@@ -467,7 +467,7 @@ sealed interface Block {
467467
468468 companion object {
469469 const val PARAGRAPH_STR = " paragraph"
470- const val SECTION_HEADING_STR = " section_heading "
470+ const val HEADING_STR = " heading "
471471 const val PRE_STR = " pre"
472472 const val FOOTER_STR = " footer"
473473 const val DIVIDER_STR = " divider"
0 commit comments