Module

Lunapark.Types

Package
purescript-lunapark
Repository
slamdata/purescript-lunapark

This module contains types for requests and response. Most of them are records with α → Json and Json → Either String α functions not newtypes with Encode|DecodeJson instances.

#Element Source

#encodeElement Source

#CreateSessionResponse Source

type CreateSessionResponse = { capabilities :: Array Capability, session :: SessionId }

#ServerStatus Source

type ServerStatus = { message :: String, ready :: Boolean }

#Timeouts Source

type Timeouts = { implicit :: Milliseconds, pageLoad :: Milliseconds, script :: Milliseconds }

#encodeTimeouts Source

#encodeLegacyTimeouts Source

#encodeGoRequest Source

#encodeSwitchToWindowRequest Source

#encodeFrameId Source

#Rectangle Source

type Rectangle = { height :: Int, width :: Int, x :: Int, y :: Int }

#decodeRectangleLegacy Source

decodeRectangleLegacy :: { position :: Json, size :: Json } -> Either String Rectangle

#encodeRectangleLegacy Source

encodeRectangleLegacy :: Rectangle -> { position :: Json, size :: Json }

#encodeRectangle Source

#RawLocator Source

type RawLocator = { using :: String, value :: String }

#encodeLocator Source

#encodeSendKeysRequest Source

#Script Source

type Script = { args :: Array Json, script :: String }

#encodeScript Source

#Cookie Source

type Cookie = { domain :: Maybe String, expiry :: Maybe Int, httpOnly :: Maybe Boolean, name :: String, path :: Maybe String, secure :: Maybe Boolean, value :: String }

#encodeCookie Source

#Screenshot Source

type Screenshot = { content :: String, encoding :: Encoding }

#encodeButton Source

#PointerMove Source

type PointerMove = { duration :: Milliseconds, origin :: PointerMoveOrigin, x :: Int, y :: Int }

#Action Source

type Action = Variant (keyDown :: Char, keyUp :: Char, pause :: Milliseconds, pointerDown :: Button, pointerMove :: PointerMove, pointerUp :: Button)

#pause Source

pause :: forall a r. a -> Variant (pause :: a | r)

#keyDown Source

keyDown :: forall a r. a -> Variant (keyDown :: a | r)

#keyUp Source

keyUp :: forall a r. a -> Variant (keyUp :: a | r)

#pointerUp Source

pointerUp :: forall a r. a -> Variant (pointerUp :: a | r)

#pointerDown Source

pointerDown :: forall a r. a -> Variant (pointerDown :: a | r)

#pointerMove Source

pointerMove :: forall a r. a -> Variant (pointerMove :: a | r)

#encodeAction Source

#PointerType Source

data PointerType

Constructors

#ActionSequence Source

data ActionSequence

Constructors

#PageLoad Source

#UnhandledPrompt Source

#Platform Source

#encodeCapabilities Source

#CapabilitiesRequest Source

type CapabilitiesRequest = { alwaysMatch :: Array Capability, firstMatch :: Array (Array Capability) }

#MoveToRequest Source

type MoveToRequest = { element :: Maybe Element, xoffset :: Int, yoffset :: Int }