Module

Database.ElasticSearch.Common

#Optional

#Response

type Response a = { body :: Record a, headers :: Object Json, meta :: Object Json, statusCode :: Int, warnings :: Optional (Array String) }

#RequestParams

type RequestParams = { ignore :: Optional (Array Number), maxRetries :: Optional Number }

#CommonParams

type CommonParams a = { error_trace :: Optional Boolean, filter_path :: Optional (Array Json), human :: Optional Boolean, pretty :: Optional Boolean, source :: Optional String | a }

#Api

type Api a b = forall c d. Castable (Record c) (CommonParams a) => Castable (Record d) RequestParams => Client -> Record c -> Record d -> Aff (Response b)

#DataType

type DataType = (StringLit "boolean") |+| (StringLit "date") |+| (StringLit "double") |+| (StringLit "geo_point") |+| (StringLit "ip") |+| (StringLit "keyword") |+| (StringLit "long")

#Cast

type Cast a = forall b. Castable b a => b -> a

#api

api :: forall a b c d. (a -> b -> c -> Effect (Promise d)) -> a -> b -> c -> Aff d

#toObject

toObject :: forall a. EncodeJson (Record a) => Record a -> Object Json

#boolean

#date

#double

#geo_point

#keyword

#long

Modules