diff --git a/bots/api/TYPES.md b/bots/api/TYPES.md index 665dd26889..9008e6065a 100644 --- a/bots/api/TYPES.md +++ b/bots/api/TYPES.md @@ -2197,6 +2197,10 @@ Secret: Small: - type: "small" +Header: +- type: "header" +- level: int + Colored: - type: "colored" - color: [Color](#color) diff --git a/packages/simplex-chat-client/types/typescript/src/types.ts b/packages/simplex-chat-client/types/typescript/src/types.ts index cae52090e7..235876f129 100644 --- a/packages/simplex-chat-client/types/typescript/src/types.ts +++ b/packages/simplex-chat-client/types/typescript/src/types.ts @@ -2466,6 +2466,7 @@ export type Format = | Format.Snippet | Format.Secret | Format.Small + | Format.Header | Format.Colored | Format.Uri | Format.HyperLink @@ -2484,6 +2485,7 @@ export namespace Format { | "snippet" | "secret" | "small" + | "header" | "colored" | "uri" | "hyperLink" @@ -2522,6 +2524,11 @@ export namespace Format { type: "small" } + export interface Header extends Interface { + type: "header" + level: number // int + } + export interface Colored extends Interface { type: "colored" color: Color diff --git a/packages/simplex-chat-python/src/simplex_chat/types/_types.py b/packages/simplex-chat-python/src/simplex_chat/types/_types.py index 512a7464db..20946c34ad 100644 --- a/packages/simplex-chat-python/src/simplex_chat/types/_types.py +++ b/packages/simplex-chat-python/src/simplex_chat/types/_types.py @@ -1747,6 +1747,10 @@ class Format_secret(TypedDict): class Format_small(TypedDict): type: Literal["small"] +class Format_header(TypedDict): + type: Literal["header"] + level: int # int + class Format_colored(TypedDict): type: Literal["colored"] color: "Color" @@ -1791,6 +1795,7 @@ Format = ( | Format_snippet | Format_secret | Format_small + | Format_header | Format_colored | Format_uri | Format_hyperLink @@ -1802,7 +1807,7 @@ Format = ( | Format_phone ) -Format_Tag = Literal["bold", "italic", "strikeThrough", "snippet", "secret", "small", "colored", "uri", "hyperLink", "simplexLink", "simplexName", "command", "mention", "email", "phone"] +Format_Tag = Literal["bold", "italic", "strikeThrough", "snippet", "secret", "small", "header", "colored", "uri", "hyperLink", "simplexLink", "simplexName", "command", "mention", "email", "phone"] class FormattedText(TypedDict): format: NotRequired["Format"]