| Copyright | (C) 2014-15 Mark Andrus Roberts |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Mark Andrus Roberts <markandrusroberts@gmail.com> |
| Stability | provisional |
| Safe Haskell | None |
| Language | Haskell98 |
Text.XML.Twiml.Internal.Twiml
Contents
Description
This module defines all of the TwiML verbs and nouns in a single place (mainly due to a few mutually-recursive definitions). This modules also exposeses the internals of each TwiML's attributes.
Prefer the definitions re-exported by the Text.XML.Twiml and Text.XML.Twiml.Verbs modules to those exported here.
- data MessagingTwiml = forall i . MessagingTwiml (IxFree MessagingVerbsF i Void)
- newtype MessagingVerbsF i a = MessagingVerbsF {}
- data VoiceTwiml = forall i . VoiceTwiml (IxFree VoiceVerbsF i Void)
- newtype VoiceVerbsF i a = VoiceVerbsF {}
- type family Base d
- type IsTwimlLike f i = (Functor1 f, Base i `[i]` :<: f `[i]`)
- type TwimlLike f i = TwimlLike' f `[i]`
- type TwimlLike' f = IxFree f
- response :: IxFree VoiceVerbsF i Void -> VoiceTwiml
- data DialNoun = forall i . DialNoun (IxFree DialNounF i Void)
- newtype DialNounF i a = DialNounF {
- getDialNounF :: (ClientF i :+: (ConferenceF i :+: (NumberF i :+: (QueueF i :+: SipF i)))) a
- data Client
- data ClientF i a = (Proxy i ~ Proxy `[Client]`) => ClientF String ClientAttributes
- data ClientAttributes = ClientAttributes {
- _clientUrl :: !(Maybe URL)
- _clientMethod :: !(Maybe Method)
- data Conference
- data ConferenceF i a = (Proxy i ~ Proxy `[Conference]`) => ConferenceF String ConferenceAttributes
- data ConferenceAttributes = ConferenceAttributes {
- _conferenceMuted :: !(Maybe Bool)
- _conferenceBeep :: !(Maybe Bool)
- _conferenceStartOnEnter :: !(Maybe Bool)
- _conferenceEndOnExit :: !(Maybe Bool)
- _conferenceWaitURL :: !(Maybe URL)
- _conferenceWaitMethod :: !(Maybe Method)
- _conferenceMaxParticipants :: !(Maybe Natural)
- data Number
- data NumberF i a = (Proxy i ~ Proxy `[Number]`) => NumberF String NumberAttributes
- data NumberAttributes = NumberAttributes {
- _numberSendDigits :: !(Maybe Digits)
- _numberUrl :: !(Maybe URL)
- _numberMethod :: !(Maybe Method)
- data Queue
- data QueueF i a = (Proxy i ~ Proxy `[Queue]`) => QueueF String QueueAttributes
- data QueueAttributes = QueueAttributes {}
- data Sip
- data SipF i a = (Proxy i ~ Proxy `[Sip]`) => SipF URL SipAttributes
- data SipAttributes = SipAttributes {
- _sipUsername :: !(Maybe String)
- _sipPassword :: !(Maybe String)
- _sipTransport :: !(Maybe Transport)
- _sipHeaders :: !(Maybe String)
- _sipUrl :: !(Maybe URL)
- _sipMethod :: !(Maybe Method)
- data Dial
- data DialF i a = (Proxy i ~ Proxy `[Dial]`) => DialF EitherDialNounString DialAttributes a
- data DialAttributes = DialAttributes {
- _dialAction :: !(Maybe URL)
- _dialMethod :: !(Maybe Method)
- _dialTimeout :: !(Maybe Natural)
- _dialHangupOnStar :: !(Maybe Bool)
- _dialTimeLimit :: !(Maybe Natural)
- _dialCallerId :: !(Maybe String)
- _dialRecord' :: !(Maybe Bool)
- data End
- data EndF i a = (Proxy i ~ Proxy `[End]`) => EndF
- data Enqueue
- data EnqueueF i a = (Proxy i ~ Proxy `[Enqueue]`) => EnqueueF String EnqueueAttributes a
- data EnqueueAttributes = EnqueueAttributes {
- _enqueueAction :: !(Maybe URL)
- _enqueueMethod :: !(Maybe Method)
- _enqueueWaitURL :: !(Maybe URL)
- _enqueueWaitMethod :: !(Maybe Method)
- data Gather
- data GatherF i a where
- GatherF :: Nest i In Gather => GatherAttributes -> IxFree VoiceVerbsF i Void -> a -> GatherF `[Gather]` a
- data GatherAttributes = GatherAttributes {}
- type family Nest a i b
- data In
- data Hangup
- data HangupF i a = (Proxy i ~ Proxy `[Hangup]`) => HangupF
- data Leave
- data LeaveF i a = (Proxy i ~ Proxy `[Leave]`) => LeaveF
- data Message
- data MessageF i a = (Proxy i ~ Proxy `[Message]`) => MessageF String MessageAttributes a
- data MessageAttributes = MessageAttributes {
- _messageTo :: !(Maybe String)
- _messageFrom :: !(Maybe String)
- _messageAction :: !(Maybe URL)
- _messageMethod :: !(Maybe Method)
- _messageStatusCallback :: !(Maybe URL)
- data Pause
- data PauseF i a = (Proxy i ~ Proxy `[Pause]`) => PauseF PauseAttributes a
- data PauseAttributes = PauseAttributes {
- _pauseDuration :: !(Maybe Natural)
- data Play
- data PlayF i a = (Proxy i ~ Proxy `[Play]`) => PlayF MaybeURL PlayAttributes a
- data PlayAttributes = PlayAttributes {
- _playLoop :: !(Maybe Natural)
- _playDigits :: !(Maybe Digits)
- data Record
- data RecordF i a = (Proxy i ~ Proxy `[Record]`) => RecordF RecordAttributes a
- data RecordAttributes = RecordAttributes {
- _recordAction :: !(Maybe URL)
- _recordMethod :: !(Maybe Method)
- _recordTimeout :: !(Maybe Natural)
- _recordFinishOnKey :: !(Maybe Key)
- _recordMaxLength :: !(Maybe Natural)
- _recordTranscribe :: !(Maybe Bool)
- _recordTranscribeCallback :: !(Maybe URL)
- _recordPlayBeep :: !(Maybe Bool)
- data Redirect
- data RedirectF i a = (Proxy i ~ Proxy `[Redirect]`) => RedirectF URL RedirectAttributes
- data RedirectAttributes = RedirectAttributes {
- _redirectMethod :: !(Maybe Method)
- data Reject
- data RejectF i a = (Proxy i ~ Proxy `[Reject]`) => RejectF RejectAttributes
- data RejectAttributes = RejectAttributes {
- _rejectReason :: !(Maybe Reason)
- data Say
- data SayF i a = (Proxy i ~ Proxy `[Say]`) => SayF String SayAttributes a
- data SayAttributes = SayAttributes {}
- data Sms
- data SmsF i a = (Proxy i ~ Proxy `[Sms]`) => SmsF String SmsAttributes a
- data SmsAttributes = SmsAttributes {
- _smsTo :: !(Maybe String)
- _smsFrom :: !(Maybe String)
- _smsAction :: !(Maybe URL)
- _smsMethod :: !(Maybe Method)
- _smsStatusCallback :: !(Maybe URL)
TwiML
newtype MessagingVerbsF i a
Constructors
| MessagingVerbsF | |
Instances
| Functor (MessagingVerbsF i) | |
| Show1 [*] MessagingVerbsF | |
| Functor1 [*] MessagingVerbsF | |
| (:<:) (f i) ((:+:) * (MessageF i) ((:+:) * (RedirectF i) ((:+:) * (SmsF i) (EndF i)))) => (f i) :<: (MessagingVerbsF i) | |
| Show a => Show (MessagingVerbsF i a) | |
| Generic (MessagingVerbsF i a) | |
| ToXML a => ToXML (MessagingVerbsF i a) | |
| ToXML (IxFree * MessagingVerbsF i Void) | |
| type Rep (MessagingVerbsF i a) |
newtype VoiceVerbsF i a
Constructors
| VoiceVerbsF | |
Instances
| Functor (VoiceVerbsF i) | |
| Show1 [*] VoiceVerbsF | |
| Functor1 [*] VoiceVerbsF | |
| (:<:) (f i) ((:+:) * (SayF i) ((:+:) * (PlayF i) ((:+:) * (GatherF i) ((:+:) * (SmsF i) ((:+:) * (DialF i) ((:+:) * (EnqueueF i) ((:+:) * (LeaveF i) ((:+:) * (HangupF i) ((:+:) * (RecordF i) ((:+:) * (RedirectF i) ((:+:) * (RejectF i) ((:+:) * (PauseF i) (EndF i))))))))))))) => (f i) :<: (VoiceVerbsF i) | |
| Show a => Show (VoiceVerbsF i a) | |
| Generic (VoiceVerbsF i a) | |
| ToXML a => ToXML (VoiceVerbsF i a) | |
| ToXML (IxFree * VoiceVerbsF i Void) | |
| type Rep (VoiceVerbsF i a) |
type family Base d
Base maps the empty data declaration for a TwiML verb to its
corresponding base functor.
Equations
| Base Dial = DialF | |
| Base End = EndF | |
| Base Enqueue = EnqueueF | |
| Base Gather = GatherF | |
| Base Hangup = HangupF | |
| Base Leave = LeaveF | |
| Base Message = MessageF | |
| Base Pause = PauseF | |
| Base Play = PlayF | |
| Base Record = RecordF | |
| Base Redirect = RedirectF | |
| Base Reject = RejectF | |
| Base Say = SayF | |
| Base Sms = SmsF | |
| Base Client = ClientF | |
| Base Conference = ConferenceF | |
| Base Number = NumberF | |
| Base Queue = QueueF | |
| Base Sip = SipF |
type IsTwimlLike f i = (Functor1 f, Base i `[i]` :<: f `[i]`)
type TwimlLike f i = TwimlLike' f `[i]`
type TwimlLike' f = IxFree f
response :: IxFree VoiceVerbsF i Void -> VoiceTwiml
Nouns
data DialNoun
newtype DialNounF i a
Constructors
| DialNounF | |
Fields
| |
Instances
| Functor (DialNounF i) | |
| Show1 [*] DialNounF | |
| Functor1 [*] DialNounF | |
| (:<:) (f i) ((:+:) * (ClientF i) ((:+:) * (ConferenceF i) ((:+:) * (NumberF i) ((:+:) * (QueueF i) (SipF i))))) => (f i) :<: (DialNounF i) | |
| Show a => Show (DialNounF i a) | |
| Generic (DialNounF i a) | |
| ToXML a => ToXML (DialNounF i a) | |
| ToXML (IxFree * DialNounF i Void) | |
| type Rep (DialNounF i a) |
Client
data Client
data ClientF i a
data ClientAttributes
Constructors
| ClientAttributes | |
Fields
| |
Instances
Conference
data Conference
data ConferenceF i a
Constructors
| (Proxy i ~ Proxy `[Conference]`) => ConferenceF String ConferenceAttributes |
Instances
| Functor (ConferenceF i) | |
| Functor1 [*] ConferenceF | |
| Show a => Show (ConferenceF i a) | |
| ToXML (ConferenceF i a) |
data ConferenceAttributes
Constructors
| ConferenceAttributes | |
Fields
| |
Instances
Number
data Number
data NumberF i a
data NumberAttributes
Constructors
| NumberAttributes | |
Fields
| |
Instances
Queue
data Queue
data QueueF i a
Sip
data Sip
data SipF i a
data SipAttributes
Constructors
| SipAttributes | |
Fields
| |
Instances
Verbs
Dial
data Dial
data DialAttributes
Constructors
| DialAttributes | |
Fields
| |
Instances
End
data End
data EndF i a
Enqueue
data Enqueue
data EnqueueF i a
data EnqueueAttributes
Constructors
| EnqueueAttributes | |
Fields
| |
Instances
Hangup
data Gather
data GatherF i a where
Constructors
| GatherF :: Nest i In Gather => GatherAttributes -> IxFree VoiceVerbsF i Void -> a -> GatherF `[Gather]` a |
data GatherAttributes
Constructors
| GatherAttributes | |
Fields | |
Instances
type family Nest a i b
data In
Hangup
data Hangup
data HangupF i a
Leave
data Leave
data LeaveF i a
Message
data Message
data MessageF i a
data MessageAttributes
Constructors
| MessageAttributes | |
Fields
| |
Instances
Pause
data Pause
data PauseAttributes
Constructors
| PauseAttributes | |
Fields
| |
Play
data Play
data PlayAttributes
Constructors
| PlayAttributes | |
Fields
| |
Record
data Record
data RecordAttributes
Constructors
| RecordAttributes | |
Fields
| |
Instances
Redirect
data Redirect
data RedirectF i a
data RedirectAttributes
Constructors
| RedirectAttributes | |
Fields
| |
Instances
Reject
data Reject
data RejectAttributes
Constructors
| RejectAttributes | |
Fields
| |
Say
data Say
data SayF i a
data SayAttributes
Sms
data Sms
data SmsF i a
data SmsAttributes
Constructors
| SmsAttributes | |
Fields
| |
Instances