From ec4d8ca176d09b8b7a366b40bb46f498eb546804 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Sun, 2 Aug 2026 16:47:53 +0100 Subject: [PATCH] fix type --- bots/api/TYPES.md | 4 ++-- packages/simplex-chat-client/types/typescript/src/types.ts | 4 ++-- .../simplex-chat-python/src/simplex_chat/types/_types.py | 4 ++-- src/Simplex/Chat/Types.hs | 6 +++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bots/api/TYPES.md b/bots/api/TYPES.md index d03c33db52..9e48bf81a2 100644 --- a/bots/api/TYPES.md +++ b/bots/api/TYPES.md @@ -2756,11 +2756,11 @@ Failed: Error: - type: "error" -- : string +- sendError: string Attempts: - type: "attempts" -- : int +- sendAttempts: int --- diff --git a/packages/simplex-chat-client/types/typescript/src/types.ts b/packages/simplex-chat-client/types/typescript/src/types.ts index d850dee011..92a89514c2 100644 --- a/packages/simplex-chat-client/types/typescript/src/types.ts +++ b/packages/simplex-chat-client/types/typescript/src/types.ts @@ -3020,12 +3020,12 @@ export namespace KeySendStatus { export interface Error extends Interface { type: "error" - : string + sendError: string } export interface Attempts extends Interface { type: "attempts" - : number // int + sendAttempts: number // int } } 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 80f023f290..445cde5a4c 100644 --- a/packages/simplex-chat-python/src/simplex_chat/types/_types.py +++ b/packages/simplex-chat-python/src/simplex_chat/types/_types.py @@ -2102,11 +2102,11 @@ class KeySendStatus_failed(TypedDict): class KeySendStatus_error(TypedDict): type: Literal["error"] - : str + sendError: str class KeySendStatus_attempts(TypedDict): type: Literal["attempts"] - : int # int + sendAttempts: int # int KeySendStatus = ( KeySendStatus_sent diff --git a/src/Simplex/Chat/Types.hs b/src/Simplex/Chat/Types.hs index a55eb0df8f..7893d370a5 100644 --- a/src/Simplex/Chat/Types.hs +++ b/src/Simplex/Chat/Types.hs @@ -1150,7 +1150,11 @@ data ReceivedGroupInvitation = ReceivedGroupInvitation type GroupMemberId = Int64 -data KeySendStatus = KSSent | KSFailed | KSError Text | KSAttempts Int +data KeySendStatus + = KSSent + | KSFailed + | KSError {sendError :: Text} + | KSAttempts {sendAttempts :: Int} deriving (Eq, Show) -- memberProfile's profileId is COALESCE(member_profile_id, contact_profile_id), member_profile_id is non null