[{"name":"Webnative","comment":" Generic types across all ports, and general webnative functions.\n\n\n# Authorisation\n\n@docs redirectToLobby, RedirectTo, AppPermissions, FileSystemPermissions, Permissions\n\n\n# Ports\n\nData passing through the ports.\n\n@docs Request, Response\n\n","unions":[{"name":"RedirectTo","comment":" Where the authorisation lobby should redirect to after authorisation.\n","args":[],"cases":[["CurrentUrl",[]],["RedirectTo",["Url.Url"]]]}],"aliases":[{"name":"AppPermissions","comment":" Application permissions.\n","args":[],"type":"{ creator : String.String, name : String.String }"},{"name":"FileSystemPermissions","comment":" Filesystem permissions.\n","args":[],"type":"{ privatePaths : List.List String.String, publicPaths : List.List String.String }"},{"name":"Permissions","comment":" Permissions to ask the user.\n","args":[],"type":"{ app : Maybe.Maybe Webnative.AppPermissions, fs : Maybe.Maybe Webnative.FileSystemPermissions }"},{"name":"Request","comment":" Request from webnative.\n","args":[],"type":"{ tag : String.String, method : String.String, arguments : List.List Json.Encode.Value }"},{"name":"Response","comment":" Response from webnative.\n","args":[],"type":"{ tag : String.String, method : String.String, data : Json.Encode.Value }"}],"values":[{"name":"redirectToLobby","comment":" Redirect to the authorisation lobby.\n","type":"Webnative.RedirectTo -> Maybe.Maybe Webnative.Permissions -> Webnative.Request"}],"binops":[]},{"name":"Wnfs","comment":" Interact with your filesystem.\n\n\n# Actions\n\n@docs publish\n\n\n## Mutations\n\n@docs mkdir, mv, rm, write, writeUtf8\n\n\n## Queries\n\n@docs exists, ls, read, readUtf8\n\n\n## Aliases\n\n@docs add, cat\n\n\n# Ports\n\n@docs decodeResponse\n\n\n# Types\n\n@docs Base, Attributes, Artifact\n\n\n## Lists\n\n@docs Entry, Kind\n\n","unions":[{"name":"Artifact","comment":" Artifact we receive in the response.\n","args":[],"cases":[["NoArtifact",[]],["Boolean",["Basics.Bool"]],["CID",["String.String"]],["DirectoryContent",["List.List Wnfs.Entry"]],["FileContent",["Bytes.Bytes"]],["Utf8Content",["String.String"]]]},{"name":"Base","comment":" Base of the WNFS action.\n","args":[],"cases":[["AppData",["Webnative.AppPermissions"]],["Private",[]],["Public",[]]]},{"name":"Kind","comment":" Kind of `Entry`.\n","args":[],"cases":[["Directory",[]],["File",[]]]}],"aliases":[{"name":"Attributes","comment":" WNFS action attributes.\n","args":[],"type":"{ path : List.List String.String, tag : String.String }"},{"name":"Entry","comment":" Directory `Entry`.\n","args":[],"type":"{ cid : String.String, name : String.String, kind : Wnfs.Kind, size : Basics.Int }"}],"values":[{"name":"add","comment":" Alias for `write`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Bytes.Bytes -> Webnative.Request"},{"name":"cat","comment":" Alias for `read`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"decodeResponse","comment":" Function to be used to decode the response from webnative we got through our port.\n\n    GotWnfsResponse response ->\n        case Wnfs.decodeResponse tagFromString response of\n            Ok ( ReadHelloTxt, Wnfs.Utf8Content helloContents ) ->\n                -- Do something with content from hello.txt\n\n            Ok ( Mutation, _ ) ->\n                ( model\n                , Ports.wnfsRequest Wnfs.publish\n                )\n\n            Err errString ->\n                -- Decoding, or tag parse, error.\n\nSee the [README](../) for the full example.\n\n","type":"(String.String -> Result.Result String.String tag) -> Webnative.Response -> Result.Result String.String ( tag, Wnfs.Artifact )"},{"name":"exists","comment":" Check if something exists in the filesystem.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"ls","comment":" List a directory.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"mkdir","comment":" Create a directory.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"mv","comment":" Move.\n","type":"Wnfs.Base -> { from : List.List String.String, to : List.List String.String, tag : String.String } -> Webnative.Request"},{"name":"publish","comment":" Publish your changes to your filesystem.\n**📢 You should run this after doing mutations.**\nSee [README](../) examples for more info.\n","type":"Webnative.Request"},{"name":"read","comment":" Read something from the filesystem in the form of `Bytes`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"readUtf8","comment":" Read something from the filesystem in the form of a `String`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"rm","comment":" Remove.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Webnative.Request"},{"name":"write","comment":" Write to the filesystem using `Bytes`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> Bytes.Bytes -> Webnative.Request"},{"name":"writeUtf8","comment":" Write to the filesystem using a `String`.\n","type":"Wnfs.Base -> Wnfs.Attributes -> String.String -> Webnative.Request"}],"binops":[]}]