{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.SendContact whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport Data.Textimport GHC.Generics (Generic)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Typesimport Telegram.Bot.API.Internal.TH-- ** 'sendContact'-- | Request parameters for 'sendContact'.data SendContactRequest = SendContactRequest { sendContactChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format @channelusername). , sendContactMessageThreadId :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only. , sendContactPhoneNumber :: Text -- ^ Contact's phone number , sendContactFirstName :: Text -- ^ Contact's first name , sendContactLastName :: Text -- ^ Contact's last name , sendContactVcard :: Text -- ^ Additional data about the contact in the form of a vCard, 0-2048 bytes , sendContactDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound. , sendContactProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving , sendContactReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message , sendContactAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found , sendContactReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. } deriving Genericinstance ToJSON SendContactRequest where toJSON = gtoJSONinstance FromJSON SendContactRequest where parseJSON = gparseJSONtype SendContact = "sendContact" :> ReqBody '[JSON] SendContactRequest :> Post '[JSON] (Response Message)-- | Use this method to send phone contacts.-- On success, the sent Message is returned.sendContact :: SendContactRequest -> ClientM (Response Message)sendContact = client (Proxy @SendContact)makeDefault ''SendContactRequest