mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 00:44:27 +00:00
api types, schema
This commit is contained in:
+12
-4
@@ -176,6 +176,7 @@ This file is generated automatically.
|
||||
- [SecurityCode](#securitycode)
|
||||
- [SimplePreference](#simplepreference)
|
||||
- [SimplexLinkType](#simplexlinktype)
|
||||
- [SimplexNameClaim](#simplexnameclaim)
|
||||
- [SimplexNameDomain](#simplexnamedomain)
|
||||
- [SimplexNameError](#simplexnameerror)
|
||||
- [SimplexNameInfo](#simplexnameinfo)
|
||||
@@ -2787,9 +2788,8 @@ Unknown:
|
||||
- peerType: [ChatPeerType](#chatpeertype)?
|
||||
- localBadge: [LocalBadge](#localbadge)?
|
||||
- localAlias: string
|
||||
- contactDomain: [SimplexNameInfo](#simplexnameinfo)?
|
||||
- simplexName: [SimplexNameClaim](#simplexnameclaim)?
|
||||
- contactDomainVerification: bool?
|
||||
- contactDomainProof: [NameClaimProof](#nameclaimproof)?
|
||||
|
||||
|
||||
---
|
||||
@@ -3162,8 +3162,7 @@ count=<count>
|
||||
- preferences: [Preferences](#preferences)?
|
||||
- peerType: [ChatPeerType](#chatpeertype)?
|
||||
- badge: [BadgeProof](#badgeproof)?
|
||||
- contactDomain: string?
|
||||
- contactDomainProof: [NameClaimProof](#nameclaimproof)?
|
||||
- simplexName: [SimplexNameClaim](#simplexnameclaim)?
|
||||
|
||||
|
||||
---
|
||||
@@ -3609,6 +3608,15 @@ A_QUEUE:
|
||||
- "relay"
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SimplexNameClaim
|
||||
|
||||
**Record type**:
|
||||
- name: [SimplexNameInfo](#simplexnameinfo)
|
||||
- proof: [NameClaimProof](#nameclaimproof)?
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SimplexNameDomain
|
||||
|
||||
@@ -358,6 +358,7 @@ chatTypesDocsData =
|
||||
(sti @SecurityCode, STRecord, "", [], "", ""),
|
||||
(sti @SimplePreference, STRecord, "", [], "", ""),
|
||||
(sti @SimplexLinkType, STEnum, "XL", [], "", ""),
|
||||
(sti @SimplexNameClaim, STRecord, "", [], "", ""),
|
||||
(sti @SimplexNameDomain, STRecord, "", [], "", ""),
|
||||
(sti @SimplexNameError, STUnion, "SNE", [], "", ""),
|
||||
(sti @SimplexNameInfo, STRecord, "", [], "", ""),
|
||||
@@ -587,6 +588,7 @@ deriving instance Generic RelayStatus
|
||||
deriving instance Generic ReportReason
|
||||
deriving instance Generic SecurityCode
|
||||
deriving instance Generic SimplexLinkType
|
||||
deriving instance Generic SimplexNameClaim
|
||||
deriving instance Generic SimplexNameDomain
|
||||
deriving instance Generic SimplexNameError
|
||||
deriving instance Generic SimplexNameInfo
|
||||
|
||||
@@ -3027,9 +3027,8 @@ export interface LocalProfile {
|
||||
peerType?: ChatPeerType
|
||||
localBadge?: LocalBadge
|
||||
localAlias: string
|
||||
contactDomain?: SimplexNameInfo
|
||||
simplexName?: SimplexNameClaim
|
||||
contactDomainVerification?: boolean
|
||||
contactDomainProof?: NameClaimProof
|
||||
}
|
||||
|
||||
export enum MemberCriteria {
|
||||
@@ -3410,8 +3409,7 @@ export interface Profile {
|
||||
preferences?: Preferences
|
||||
peerType?: ChatPeerType
|
||||
badge?: BadgeProof
|
||||
contactDomain?: string
|
||||
contactDomainProof?: NameClaimProof
|
||||
simplexName?: SimplexNameClaim
|
||||
}
|
||||
|
||||
export type ProxyClientError =
|
||||
@@ -3984,6 +3982,11 @@ export enum SimplexLinkType {
|
||||
Relay = "relay",
|
||||
}
|
||||
|
||||
export interface SimplexNameClaim {
|
||||
name: SimplexNameInfo
|
||||
proof?: NameClaimProof
|
||||
}
|
||||
|
||||
export interface SimplexNameDomain {
|
||||
nameTLD: SimplexTLD
|
||||
domain: string
|
||||
|
||||
@@ -2119,9 +2119,8 @@ class LocalProfile(TypedDict):
|
||||
peerType: NotRequired["ChatPeerType"]
|
||||
localBadge: NotRequired["LocalBadge"]
|
||||
localAlias: str
|
||||
contactDomain: NotRequired["SimplexNameInfo"]
|
||||
simplexName: NotRequired["SimplexNameClaim"]
|
||||
contactDomainVerification: NotRequired[bool]
|
||||
contactDomainProof: NotRequired["NameClaimProof"]
|
||||
|
||||
MemberCriteria = Literal["all"]
|
||||
|
||||
@@ -2392,8 +2391,7 @@ class Profile(TypedDict):
|
||||
preferences: NotRequired["Preferences"]
|
||||
peerType: NotRequired["ChatPeerType"]
|
||||
badge: NotRequired["BadgeProof"]
|
||||
contactDomain: NotRequired[str]
|
||||
contactDomainProof: NotRequired["NameClaimProof"]
|
||||
simplexName: NotRequired["SimplexNameClaim"]
|
||||
|
||||
class ProxyClientError_protocolError(TypedDict):
|
||||
type: Literal["protocolError"]
|
||||
@@ -2781,6 +2779,10 @@ class SimplePreference(TypedDict):
|
||||
|
||||
SimplexLinkType = Literal["contact", "invitation", "group", "channel", "relay"]
|
||||
|
||||
class SimplexNameClaim(TypedDict):
|
||||
name: "SimplexNameInfo"
|
||||
proof: NotRequired["NameClaimProof"]
|
||||
|
||||
class SimplexNameDomain(TypedDict):
|
||||
nameTLD: "SimplexTLD"
|
||||
domain: str
|
||||
|
||||
@@ -57,7 +57,6 @@ import Simplex.Messaging.Client (ProtocolClientConfig (..))
|
||||
import Simplex.Messaging.Client.Agent (defaultSMPClientAgentConfig)
|
||||
import Simplex.Messaging.Crypto.Ratchet (supportedE2EEncryptVRange)
|
||||
import qualified Simplex.Messaging.Crypto.Ratchet as CR
|
||||
import Simplex.Messaging.Protocol (sndAuthKeySMPClientVersion)
|
||||
import Simplex.Messaging.Server (runSMPServerBlocking)
|
||||
import Simplex.Messaging.Server.Env.STM (ServerConfig (..), ServerStoreCfg (..), StartOptions (..), StorePaths (..), defaultMessageExpiration, defaultIdleQueueInterval, defaultNtfExpiration, defaultInactiveClientExpiration)
|
||||
import Simplex.Messaging.Server.MsgStore.STM (STMMsgStore)
|
||||
|
||||
@@ -80,5 +80,7 @@ skipComparisonForDownMigrations =
|
||||
-- group_member_intro_id field moves
|
||||
"20251128_migrate_member_relations",
|
||||
-- on down migration single_sender_group_member_id column is re-added at the end of the table
|
||||
"20260529_delivery_job_senders"
|
||||
"20260529_delivery_job_senders",
|
||||
-- group_domain is removed
|
||||
"20260603_simplex_name"
|
||||
]
|
||||
|
||||
+3
-1
@@ -145,7 +145,9 @@ skipComparisonForDownMigrations =
|
||||
-- on down migration single_sender_group_member_id column and its index
|
||||
-- are re-added at the end of the table / file (ALTER TABLE ADD COLUMN
|
||||
-- appends; CREATE INDEX appends).
|
||||
"20260529_delivery_job_senders"
|
||||
"20260529_delivery_job_senders",
|
||||
-- group_domain is removed
|
||||
"20260603_simplex_name"
|
||||
]
|
||||
|
||||
getSchema :: FilePath -> FilePath -> IO String
|
||||
|
||||
Reference in New Issue
Block a user