| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Types.Preferences
Documentation
data ChatFeature Source #
Constructors
| CFTimedMessages | |
| CFFullDelete | |
| CFReactions | |
| CFVoice | |
| CFFiles | |
| CFCalls | |
| CFSessions |
Instances
| FromJSON ChatFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser ChatFeature parseJSONList :: Value -> Parser [ChatFeature] omittedField :: Maybe ChatFeature | |
| ToJSON ChatFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toJSON :: ChatFeature -> Value toEncoding :: ChatFeature -> Encoding toJSONList :: [ChatFeature] -> Value toEncodingList :: [ChatFeature] -> Encoding omitField :: ChatFeature -> Bool | |
| Show ChatFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> ChatFeature -> ShowS show :: ChatFeature -> String showList :: [ChatFeature] -> ShowS | |
data SChatFeature (f :: ChatFeature) where Source #
Constructors
Instances
| Show (SChatFeature f) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> SChatFeature f -> ShowS show :: SChatFeature f -> String showList :: [SChatFeature f] -> ShowS | |
data AChatFeature Source #
Constructors
| forall f.FeatureI f => ACF (SChatFeature f) |
Instances
| Show AChatFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> AChatFeature -> ShowS show :: AChatFeature -> String showList :: [AChatFeature] -> ShowS | |
chatFeatureNameText :: ChatFeature -> Text Source #
chatFeatureNameText' :: SChatFeature f -> Text Source #
chatPrefSel :: SChatFeature f -> Preferences -> Maybe (FeaturePreference f) Source #
chatFeature :: SChatFeature f -> ChatFeature Source #
class PreferenceI p where Source #
Methods
getPreference :: SChatFeature f -> p -> FeaturePreference f Source #
Instances
| PreferenceI FullPreferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getPreference :: forall (f :: ChatFeature). SChatFeature f -> FullPreferences -> FeaturePreference f Source # | |
| PreferenceI Preferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getPreference :: forall (f :: ChatFeature). SChatFeature f -> Preferences -> FeaturePreference f Source # | |
| PreferenceI (Maybe Preferences) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getPreference :: forall (f :: ChatFeature). SChatFeature f -> Maybe Preferences -> FeaturePreference f Source # | |
setPreference :: forall f. FeatureI f => SChatFeature f -> Maybe FeatureAllowed -> Maybe Preferences -> Preferences Source #
setPreference' :: SChatFeature f -> Maybe (FeaturePreference f) -> Maybe Preferences -> Preferences Source #
setPreference_ :: SChatFeature f -> Maybe (FeaturePreference f) -> Preferences -> Preferences Source #
data Preferences Source #
Constructors
| Preferences | |
Fields
| |
Instances
class HasCommands p where Source #
Methods
commands_ :: p -> Maybe [ChatBotCommand] Source #
Instances
| HasCommands GroupPreferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods commands_ :: GroupPreferences -> Maybe [ChatBotCommand] Source # | |
| HasCommands Preferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods commands_ :: Preferences -> Maybe [ChatBotCommand] Source # | |
data GroupFeature Source #
Constructors
| GFTimedMessages | |
| GFDirectMessages | |
| GFFullDelete | |
| GFReactions | |
| GFVoice | |
| GFFiles | |
| GFSimplexLinks | |
| GFReports | |
| GFHistory | |
| GFSupport | |
| GFSessions | |
| GFComments |
Instances
| FromJSON GroupFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser GroupFeature parseJSONList :: Value -> Parser [GroupFeature] omittedField :: Maybe GroupFeature | |
| ToJSON GroupFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toJSON :: GroupFeature -> Value toEncoding :: GroupFeature -> Encoding toJSONList :: [GroupFeature] -> Value toEncodingList :: [GroupFeature] -> Encoding omitField :: GroupFeature -> Bool | |
| Show GroupFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> GroupFeature -> ShowS show :: GroupFeature -> String showList :: [GroupFeature] -> ShowS | |
data SGroupFeature (f :: GroupFeature) where Source #
Constructors
Instances
| Show (SGroupFeature f) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> SGroupFeature f -> ShowS show :: SGroupFeature f -> String showList :: [SGroupFeature f] -> ShowS | |
data AGroupFeature Source #
Constructors
| forall f.GroupFeatureI f => AGF (SGroupFeature f) |
Instances
| Show AGroupFeature Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> AGroupFeature -> ShowS show :: AGroupFeature -> String showList :: [AGroupFeature] -> ShowS | |
data AGroupFeatureNoRole Source #
Constructors
| forall f.GroupFeatureNoRoleI f => AGFNR (SGroupFeature f) |
Instances
| Show AGroupFeatureNoRole Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> AGroupFeatureNoRole -> ShowS show :: AGroupFeatureNoRole -> String showList :: [AGroupFeatureNoRole] -> ShowS | |
data AGroupFeatureRole Source #
Constructors
| forall f.GroupFeatureRoleI f => AGFR (SGroupFeature f) |
Instances
| Show AGroupFeatureRole Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> AGroupFeatureRole -> ShowS show :: AGroupFeatureRole -> String showList :: [AGroupFeatureRole] -> ShowS | |
groupFeatureNameText :: GroupFeature -> Text Source #
groupFeatureNameText' :: SGroupFeature f -> Text Source #
groupFeatureAllowed' :: GroupFeatureNoRoleI f => SGroupFeature f -> FullGroupPreferences -> Bool Source #
groupFeatureMemberAllowed' :: GroupFeatureRoleI f => SGroupFeature f -> GroupMemberRole -> FullGroupPreferences -> Bool Source #
groupPrefSel :: SGroupFeature f -> GroupPreferences -> Maybe (GroupFeaturePreference f) Source #
toGroupFeature :: SGroupFeature f -> GroupFeature Source #
class GroupPreferenceI p where Source #
Methods
getGroupPreference :: SGroupFeature f -> p -> GroupFeaturePreference f Source #
Instances
| GroupPreferenceI FullGroupPreferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getGroupPreference :: forall (f :: GroupFeature). SGroupFeature f -> FullGroupPreferences -> GroupFeaturePreference f Source # | |
| GroupPreferenceI GroupPreferences Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getGroupPreference :: forall (f :: GroupFeature). SGroupFeature f -> GroupPreferences -> GroupFeaturePreference f Source # | |
| GroupPreferenceI (Maybe GroupPreferences) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods getGroupPreference :: forall (f :: GroupFeature). SGroupFeature f -> Maybe GroupPreferences -> GroupFeaturePreference f Source # | |
data GroupPreferences Source #
Constructors
| GroupPreferences | |
Fields
| |
Instances
data ChatBotCommand Source #
Constructors
| CBCCommand | |
| CBCMenu | |
Fields
| |
Instances
| FromJSON ChatBotCommand Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser ChatBotCommand parseJSONList :: Value -> Parser [ChatBotCommand] omittedField :: Maybe ChatBotCommand | |
| ToJSON ChatBotCommand Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toJSON :: ChatBotCommand -> Value toEncoding :: ChatBotCommand -> Encoding toJSONList :: [ChatBotCommand] -> Value toEncodingList :: [ChatBotCommand] -> Encoding omitField :: ChatBotCommand -> Bool | |
| Show ChatBotCommand Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> ChatBotCommand -> ShowS show :: ChatBotCommand -> String showList :: [ChatBotCommand] -> ShowS | |
| Eq ChatBotCommand Source # | |
Defined in Simplex.Chat.Types.Preferences Methods (==) :: ChatBotCommand -> ChatBotCommand -> Bool (/=) :: ChatBotCommand -> ChatBotCommand -> Bool | |
setGroupPreference :: forall f. GroupFeatureNoRoleI f => SGroupFeature f -> GroupFeatureEnabled -> Maybe GroupPreferences -> GroupPreferences Source #
setGroupPreferenceRole :: forall f. GroupFeatureRoleI f => SGroupFeature f -> GroupFeatureEnabled -> Maybe GroupMemberRole -> Maybe GroupPreferences -> GroupPreferences Source #
setGroupPreference' :: SGroupFeature f -> GroupFeaturePreference f -> Maybe GroupPreferences -> GroupPreferences Source #
setGroupPreference_ :: SGroupFeature f -> GroupFeaturePreference f -> FullGroupPreferences -> GroupPreferences Source #
setGroupTimedMessagesPreference :: TimedMessagesGroupPreference -> Maybe GroupPreferences -> GroupPreferences Source #
data FullPreferences Source #
Constructors
| FullPreferences | |
Instances
Constructors
| ListDef [a] |
Instances
| FromJSON a => FromJSON (ListDef a) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser (ListDef a) parseJSONList :: Value -> Parser [ListDef a] omittedField :: Maybe (ListDef a) | |
| ToJSON a => ToJSON (ListDef a) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toEncoding :: ListDef a -> Encoding toJSONList :: [ListDef a] -> Value toEncodingList :: [ListDef a] -> Encoding | |
| Show a => Show (ListDef a) Source # | |
| Eq a => Eq (ListDef a) Source # | |
data FullGroupPreferences Source #
Constructors
Instances
data ContactUserPreferences Source #
Constructors
Instances
data ContactUserPreference p Source #
Constructors
| ContactUserPreference | |
Fields
| |
Instances
data ContactUserPref p Source #
Constructors
| CUPContact | |
Fields
| |
| CUPUser | |
Fields
| |
Instances
| FromJSON p => FromJSON (ContactUserPref p) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser (ContactUserPref p) parseJSONList :: Value -> Parser [ContactUserPref p] omittedField :: Maybe (ContactUserPref p) | |
| ToJSON p => ToJSON (ContactUserPref p) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toJSON :: ContactUserPref p -> Value toEncoding :: ContactUserPref p -> Encoding toJSONList :: [ContactUserPref p] -> Value toEncodingList :: [ContactUserPref p] -> Encoding omitField :: ContactUserPref p -> Bool | |
| Show p => Show (ContactUserPref p) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> ContactUserPref p -> ShowS show :: ContactUserPref p -> String showList :: [ContactUserPref p] -> ShowS | |
| Eq p => Eq (ContactUserPref p) Source # | |
Defined in Simplex.Chat.Types.Preferences Methods (==) :: ContactUserPref p -> ContactUserPref p -> Bool (/=) :: ContactUserPref p -> ContactUserPref p -> Bool | |
data TimedMessagesPreference Source #
Constructors
| TimedMessagesPreference | |
Fields
| |
Instances
data FullDeletePreference Source #
Constructors
| FullDeletePreference | |
Fields | |
Instances
data ReactionsPreference Source #
Constructors
| ReactionsPreference | |
Fields | |
Instances
data VoicePreference Source #
Constructors
| VoicePreference | |
Fields | |
Instances
data FilesPreference Source #
Constructors
| FilesPreference | |
Fields | |
Instances
data CallsPreference Source #
Constructors
| CallsPreference | |
Fields | |
Instances
data SessionsPreference Source #
Constructors
| SessionsPreference | |
Fields | |
Instances
class (Eq (FeaturePreference f), HasField "allow" (FeaturePreference f) FeatureAllowed) => FeatureI f where Source #
Associated Types
type FeaturePreference (f :: ChatFeature) = p | p -> f Source #
Instances
data GroupPreference Source #
Constructors
| GroupPreference | |
Fields | |
Instances
data TimedMessagesGroupPreference Source #
Constructors
| TimedMessagesGroupPreference | |
Fields
| |
Instances
data DirectMessagesGroupPreference Source #
Constructors
| DirectMessagesGroupPreference | |
Fields
| |
Instances
data FullDeleteGroupPreference Source #
Constructors
| FullDeleteGroupPreference | |
Fields
| |
Instances
data ReactionsGroupPreference Source #
Constructors
| ReactionsGroupPreference | |
Fields | |
Instances
data VoiceGroupPreference Source #
Constructors
| VoiceGroupPreference | |
Fields
| |
Instances
data FilesGroupPreference Source #
Constructors
| FilesGroupPreference | |
Fields
| |
Instances
data SimplexLinksGroupPreference Source #
Constructors
| SimplexLinksGroupPreference | |
Fields
| |
Instances
data ReportsGroupPreference Source #
Constructors
| ReportsGroupPreference | |
Fields | |
Instances
data HistoryGroupPreference Source #
Constructors
| HistoryGroupPreference | |
Fields | |
Instances
data SupportGroupPreference Source #
Constructors
| SupportGroupPreference | |
Fields | |
Instances
data SessionsGroupPreference Source #
Constructors
| SessionsGroupPreference | |
Fields
| |
Instances
data CommentsGroupPreference Source #
Constructors
| CommentsGroupPreference | |
Fields
| |
Instances
class (Eq (GroupFeaturePreference f), HasField "enable" (GroupFeaturePreference f) GroupFeatureEnabled) => GroupFeatureI f where Source #
Associated Types
type GroupFeaturePreference (f :: GroupFeature) = p | p -> f Source #
Methods
sGroupFeature :: SGroupFeature f Source #
groupPrefParam :: GroupFeaturePreference f -> Maybe Int Source #
groupPrefRole :: GroupFeaturePreference f -> Maybe GroupMemberRole Source #
Instances
class GroupFeatureI f => GroupFeatureNoRoleI f Source #
Instances
| GroupFeatureNoRoleI 'GFComments Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFFullDelete Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFHistory Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFReactions Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFReports Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFSupport Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureNoRoleI 'GFTimedMessages Source # | |
Defined in Simplex.Chat.Types.Preferences | |
class (GroupFeatureI f, HasField "role" (GroupFeaturePreference f) (Maybe GroupMemberRole)) => GroupFeatureRoleI f Source #
Instances
| GroupFeatureRoleI 'GFDirectMessages Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureRoleI 'GFFiles Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureRoleI 'GFFullDelete Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureRoleI 'GFSessions Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureRoleI 'GFSimplexLinks Source # | |
Defined in Simplex.Chat.Types.Preferences | |
| GroupFeatureRoleI 'GFVoice Source # | |
Defined in Simplex.Chat.Types.Preferences | |
groupPrefStateText :: HasField "enable" p GroupFeatureEnabled => GroupFeature -> p -> Maybe Int -> Maybe GroupMemberRole -> Text Source #
groupParamText_ :: GroupFeature -> Maybe Int -> Text Source #
groupPreferenceText :: forall f. GroupFeatureI f => GroupFeaturePreference f -> Text Source #
timedTTLText :: Int -> Text Source #
data FeatureAllowed Source #
Instances
data GroupFeatureEnabled Source #
Instances
groupFeatureState :: GroupFeatureI f => GroupFeaturePreference f -> (GroupFeatureEnabled, Maybe Int, Maybe GroupMemberRole) Source #
mergePreferences :: Maybe Preferences -> Maybe Preferences -> Bool -> FullPreferences Source #
fullPreferences' :: Maybe Preferences -> FullPreferences Source #
mergeGroupPreferences :: Maybe GroupPreferences -> FullGroupPreferences Source #
data PrefEnabled Source #
Constructors
| PrefEnabled | |
Fields
| |
Instances
| FromJSON PrefEnabled Source # | |
Defined in Simplex.Chat.Types.Preferences Methods parseJSON :: Value -> Parser PrefEnabled parseJSONList :: Value -> Parser [PrefEnabled] omittedField :: Maybe PrefEnabled | |
| ToJSON PrefEnabled Source # | |
Defined in Simplex.Chat.Types.Preferences Methods toJSON :: PrefEnabled -> Value toEncoding :: PrefEnabled -> Encoding toJSONList :: [PrefEnabled] -> Value toEncodingList :: [PrefEnabled] -> Encoding omitField :: PrefEnabled -> Bool | |
| Show PrefEnabled Source # | |
Defined in Simplex.Chat.Types.Preferences Methods showsPrec :: Int -> PrefEnabled -> ShowS show :: PrefEnabled -> String showList :: [PrefEnabled] -> ShowS | |
| Eq PrefEnabled Source # | |
Defined in Simplex.Chat.Types.Preferences | |
prefEnabled :: FeatureI f => Bool -> FeaturePreference f -> FeaturePreference f -> PrefEnabled Source #
prefStateText :: ChatFeature -> FeatureAllowed -> Maybe Int -> Text Source #
featureStateText :: ChatFeature -> PrefEnabled -> Maybe Int -> Text Source #
paramText_ :: ChatFeature -> Maybe Int -> Text Source #
prefEnabledToText :: ChatFeature -> PrefEnabled -> Maybe Int -> Text Source #
preferenceText :: forall f. FeatureI f => FeaturePreference f -> Text Source #
featureState :: FeatureI f => ContactUserPreference (FeaturePreference f) -> (PrefEnabled, Maybe Int) Source #
preferenceState :: FeatureI f => FeaturePreference f -> (FeatureAllowed, Maybe Int) Source #