[{"name":"Websockets","comment":" Simple interfaces for getting started with Websockets in Elm\n\nOther modules are exposed for advanced usage.\n\n# Defining your Ports\n\n@docs withPorts, CommandPort, EventPort, Methods\n\n\n# Event data received from your Sockets\n\n@docs EventHandlers\n@docs WebsocketOpened, WebsocketMessage, WebsocketClosed, WebsocketError\n\n","unions":[],"aliases":[{"name":"CommandPort","comment":" Port to send Commands to the Websocket\n","args":["msg"],"type":"Json.Encode.Value -> Platform.Cmd.Cmd msg"},{"name":"EventHandlers","comment":" Event handlers for subscriptions\n","args":["msg"],"type":"{ onOpened : Websockets.WebsocketOpened -> msg, onClosed : Websockets.WebsocketClosed -> msg, onError : Websockets.WebsocketError -> msg, onMessage : Websockets.WebsocketMessage -> msg, onDecodeError : String.String -> msg }"},{"name":"EventPort","comment":" Port for subscribing to income events\n","args":["msg"],"type":"(Json.Encode.Value -> msg) -> Platform.Sub.Sub msg"},{"name":"Methods","comment":" Methods for using your sockets\n","args":["msg"],"type":"{ open : String.String -> String.String -> List.List ( String.String, Maybe.Maybe String.String ) -> Platform.Cmd.Cmd msg, close : String.String -> Platform.Cmd.Cmd msg, send : String.String -> Json.Encode.Value -> Platform.Cmd.Cmd msg, onEvent : Websockets.EventHandlers msg -> Platform.Sub.Sub msg }"},{"name":"WebsocketClosed","comment":" Record data when a socket is Closed\n","args":[],"type":"{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, reason : String.String }"},{"name":"WebsocketError","comment":" Record data when a socket is Error\n","args":[],"type":"{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, error : Maybe.Maybe String.String }"},{"name":"WebsocketMessage","comment":" Record data when a socket is Message\n","args":[],"type":"{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, data : String.String }"},{"name":"WebsocketOpened","comment":" Record data when a socket is Opened\n","args":[],"type":"{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta }"}],"values":[{"name":"withPorts","comment":" Helper to wrap your Ports\n","type":"{ command : Websockets.CommandPort msg, event : Websockets.EventPort msg } -> Websockets.Methods msg"}],"binops":[]},{"name":"Websockets.Command","comment":" Commands for interacting with Websockets\n\n@docs Command, open, send, close\n\n","unions":[{"name":"Command","comment":" Type for wrapping Commands before JSON encoding\n","args":[],"cases":[["Open",["String.String","String.String","Websockets.Meta.Meta"]],["Close",["String.String"]],["Send",["String.String","Json.Encode.Value"]]]}],"aliases":[],"values":[{"name":"close","comment":" JSON Encode a Close command for sending through the Command Port\n","type":"String.String -> Json.Encode.Value"},{"name":"open","comment":" JSON Encode a Open command for sending through the Command Port\n","type":"String.String -> String.String -> List.List ( String.String, String.String ) -> Json.Encode.Value"},{"name":"send","comment":" JSON Encode a Send command for sending through the Command Port\n","type":"String.String -> Json.Encode.Value -> Json.Encode.Value"}],"binops":[]},{"name":"Websockets.Event","comment":" Utilities for handling incoming Websocket events\n\n@docs Event, Name, decodeEvent\n\n","unions":[{"name":"Event","comment":" Incoming events\n","args":[],"cases":[["Opened",["{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta }"]],["Closed",["{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, reason : String.String }"]],["Error",["{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, error : Maybe.Maybe String.String }"]],["Message",["{ name : Websockets.Event.Name, meta : Websockets.Meta.Meta, data : String.String }"]]]}],"aliases":[{"name":"Name","comment":" Websocket Names are Strings\n","args":[],"type":"String.String"}],"values":[{"name":"decodeEvent","comment":" Decode a JSON object from the Events port into an `Event`\n","type":"Json.Encode.Value -> Result.Result String.String Websockets.Event.Event"}],"binops":[]},{"name":"Websockets.Meta","comment":" Storing metadata as Key-Value pairs on a Websocket\n\n@docs Meta, encodeMeta, metaDecoder\n\n","unions":[],"aliases":[{"name":"Meta","comment":"\n\n    Metadata is just a `Dict String String`\n\n","args":[],"type":"Dict.Dict String.String String.String"}],"values":[{"name":"encodeMeta","comment":" JSON Encode Meta\n","type":"Websockets.Meta.Meta -> Json.Encode.Value"},{"name":"metaDecoder","comment":" JSON Decoder for Meta\n","type":"Json.Decode.Decoder Websockets.Meta.Meta"}],"binops":[]}]