[{"name":"Firestore","comment":" A library to have your app interact with Firestore in Elm\n\n@docs Firestore\n\n\n# Constructors\n\n@docs init, withCollection, withConfig\n\n\n# CRUDs\n\n@docs Document, get, ListOption, list, create, patch, delete\n\n\n# Error\n\n@docs Error, FirestoreError\n\n\n# Transaction\n\n@docs Transaction, CommitTime, begin, update, commit\n\n","unions":[{"name":"Error","comment":" An error type\n\nThis type is available in order to disregard type of errors between protocol related errors as Http\\_ or backend related errors as Response.\n\n","args":[],"cases":[["Http_",["Http.Error"]],["Response",["Firestore.FirestoreError"]]]},{"name":"Firestore","comment":" Data type for Firestore\n","args":[],"cases":[]},{"name":"Transaction","comment":" Data type for Transaction\n","args":[],"cases":[]}],"aliases":[{"name":"CommitTime","comment":" A time transaction commited at\n","args":[],"type":"Time.Posix"},{"name":"Document","comment":" A record structure for a document fetched from Firestore.\n","args":["a"],"type":"{ name : String.String, fields : a, createTime : Time.Posix, updateTime : Time.Posix }"},{"name":"FirestoreError","comment":" Data structure for errors from Firestore\n","args":[],"type":"{ code : Basics.Int, message : String.String, status : String.String }"},{"name":"ListOption","comment":" Data structure for query parameter in calling `list` operation.\n","args":[],"type":"{ pageSize : Basics.Int, orderBy : String.String }"}],"values":[{"name":"begin","comment":" Starts a new transaction.\n","type":"Firestore.Firestore -> Task.Task Firestore.Error Firestore.Transaction"},{"name":"commit","comment":" Commits a transaction, while optionally updating documents.\n\nOnly `readWrite` transaction is currently supported which requires authorization that can be set via `Config.withAuthorization` function.\n\n","type":"Firestore.Transaction -> Firestore.Firestore -> Task.Task Firestore.Error Firestore.CommitTime"},{"name":"create","comment":" Creates a new document.\n","type":"Firestore.Decode.Decoder a -> Firestore.Encode.Encoder -> Firestore.Firestore -> Task.Task Firestore.Error (Firestore.Document a)"},{"name":"delete","comment":" Deletes a document.\n","type":"Firestore.Firestore -> Task.Task Firestore.Error ()"},{"name":"get","comment":" Gets a single document.\n","type":"Firestore.Decode.Decoder a -> Firestore.Firestore -> Task.Task Firestore.Error (Firestore.Document a)"},{"name":"init","comment":" Builds a new Firestore connection with Config\n","type":"Firestore.Config.Config -> Firestore.Firestore"},{"name":"list","comment":" Lists documents.\n","type":"Firestore.ListOption -> Firestore.Decode.Decoder a -> Firestore.Firestore -> Task.Task Firestore.Error (List.List (Firestore.Document a))"},{"name":"patch","comment":" Updates or inserts a document.\n","type":"Firestore.Decode.Decoder a -> Firestore.Encode.Encoder -> Firestore.Firestore -> Task.Task Firestore.Error (Firestore.Document a)"},{"name":"update","comment":" Adds a new update into the transaction\n\n    model.firestore\n        |> Firestore.commit\n            (transaction\n                |> Firestore.update draft1\n                |> Firestore.update draft2\n                |> Firestore.update draft3\n            )\n        |> Task.attempt Commited\n\n","type":"Firestore.Encode.Encoder -> Firestore.Transaction -> Firestore.Transaction"},{"name":"withCollection","comment":" Drills down document paths with a specific path name.\n\nThis function is aimed to be chanind with pipeline operators in order to build up document path.\n\n    firestore\n        |> Firestore.collection \"users\"\n        |> Firestore.collection \"items\"\n        |> Firestore.collection \"tags\"\n        |> Firestore.get\n        |> Task.attempt GotUserItemTags\n\nOf course, you can make it a single string as well\n\n    firestore\n        |> Firestore.collection \"users/items/tags\"\n        |> Firestore.get\n        |> Task.attempt GotUserItemTags\n\n","type":"String.String -> Firestore.Firestore -> Firestore.Firestore"},{"name":"withConfig","comment":" Updates configuration\n","type":"Firestore.Config.Config -> Firestore.Firestore -> Firestore.Firestore"}],"binops":[]},{"name":"Firestore.Config","comment":" Configuration types for Firestore\n\n@docs Config\n\n\n# Constructors\n\n@docs new, withAuthorization, withDatabase\n\n\n# Extractors\n\n@docs endpoint, httpHeader\n\n","unions":[{"name":"Config","comment":" Data type for Firestore configuration\n\nThis type internally has all information which is required to send requests to Firestore through REST API.\n\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"endpoint","comment":" Builds an endpoint string without path\n","type":"List.List Url.Builder.QueryParameter -> Firestore.Internals.Path.Path -> Firestore.Config.Config -> String.String"},{"name":"httpHeader","comment":" Extracts authorization with bearer prefix as `Http.Header`.\n","type":"Firestore.Config.Config -> List.List Http.Header"},{"name":"new","comment":" Creates a new Config\n","type":"{ apiKey : String.String, project : String.String } -> Firestore.Config.Config"},{"name":"withAuthorization","comment":" Specifies Firebase Authorization token which can be obtained through [`firebase.User#getIdToken`][verify_token] method.\n\n[verify_token]: https://firebase.google.com/docs/auth/admin/verify-id-tokens#web\n\n","type":"String.String -> Firestore.Config.Config -> Firestore.Config.Config"},{"name":"withDatabase","comment":" Specifies database ID to connect to.\n","type":"String.String -> Firestore.Config.Config -> Firestore.Config.Config"}],"binops":[]},{"name":"Firestore.Decode","comment":" Decoders for Firestore\n\n@docs Decoder, decode\n\n\n# Constructors\n\n@docs document, required, optional\n\n\n# Types\n\n@docs Field, bool, bytes, int, string, list, dict, maybe, timestamp, geopoint, reference\n\n","unions":[{"name":"Decoder","comment":" A decoder consisted of Firestore specific decoders.\n\n`Json.Decode.Decoder` can be generate from this through `decode` function.\n\n","args":["a"],"cases":[]},{"name":"Field","comment":" An identifier type for Firestore encoder\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"name":"bool","comment":" ","type":"Firestore.Decode.Field Basics.Bool"},{"name":"bytes","comment":" ","type":"Firestore.Decode.Field String.String"},{"name":"decode","comment":" Generates Json.Decode.Decoder\n","type":"Firestore.Decode.Decoder a -> Json.Decode.Decoder a"},{"name":"dict","comment":" ","type":"Firestore.Decode.Field a -> Firestore.Decode.Field (Dict.Dict String.String a)"},{"name":"document","comment":" Creates a new decoder\n\nThis function works like `Json.Decode.Pipeline`.\n\n    Firestore.Decode.document Document\n        |> Firestore.Decode.required \"name\" Firestore.Decode.string\n        |> Firestore.Decode.required \"age\" Firestore.Decode.int\n        |> Firestore.Decode.optional \"canCode\" Firestore.Decode.bool False\n\n","type":"a -> Firestore.Decode.Decoder a"},{"name":"geopoint","comment":" ","type":"Firestore.Decode.Field Firestore.Types.Geopoint.Geopoint"},{"name":"int","comment":" ","type":"Firestore.Decode.Field Basics.Int"},{"name":"list","comment":" ","type":"Firestore.Decode.Field a -> Firestore.Decode.Field (List.List a)"},{"name":"maybe","comment":" ","type":"Firestore.Decode.Field a -> Firestore.Decode.Field (Maybe.Maybe a)"},{"name":"optional","comment":" Decodes an optional field.\n\nThis function is internally delegated into [`Json.Decode.Pipeline.optional`][optional].\n\n[optional]: https://package.elm-lang.org/packages/NoRedInk/elm-json-decode-pipeline/latest/Json-Decode-Pipeline#optional\n\n","type":"String.String -> Firestore.Decode.Field a -> a -> Firestore.Decode.Decoder (a -> b) -> Firestore.Decode.Decoder b"},{"name":"reference","comment":" ","type":"Firestore.Decode.Field Firestore.Types.Reference.Reference"},{"name":"required","comment":" Decodes a required field.\n\nThis function is internally delegated into [`json.Decode.Pipeline.required`][required].\n\n[required]: https://package.elm-lang.org/packages/NoRedInk/elm-json-decode-pipeline/latest/Json-Decode-Pipeline#required\n\n","type":"String.String -> Firestore.Decode.Field a -> Firestore.Decode.Decoder (a -> b) -> Firestore.Decode.Decoder b"},{"name":"string","comment":" ","type":"Firestore.Decode.Field String.String"},{"name":"timestamp","comment":" ","type":"Firestore.Decode.Field Time.Posix"}],"binops":[]},{"name":"Firestore.Encode","comment":" Encoders for Firestore\n\n@docs Encoder, encode\n\n\n# Constructors\n\n@docs document\n\n\n# Types\n\n@docs Field, bool, bytes, int, string, list, dict, maybe, timestamp, geopoint, reference\n\n","unions":[{"name":"Encoder","comment":" An encoder consisted of Firestore specific encoders.\n\nThis can be encoded into `Json.Value` through `encode` function.\n\n","args":[],"cases":[]},{"name":"Field","comment":" An identifier type for Firestore encoder\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"bool","comment":" ","type":"Basics.Bool -> Firestore.Encode.Field"},{"name":"bytes","comment":" ","type":"String.String -> Firestore.Encode.Field"},{"name":"dict","comment":" ","type":"Dict.Dict String.String a -> (a -> Firestore.Encode.Field) -> Firestore.Encode.Field"},{"name":"document","comment":" Creates a new encoder\n\nThis function works like `Encode.object` but accepts a list of tuples which has only encoders provided from `Firestore.Encode` module\n\n    Firestore.Encode.document\n        [ ( \"name\", Firestore.Encode.string \"IzumiSy\" )\n        , ( \"age\", Firestore.Encode.int 26 )\n        , ( \"canCode\", Firestore.Encode.bool True )\n        ]\n\n","type":"List.List ( String.String, Firestore.Encode.Field ) -> Firestore.Encode.Encoder"},{"name":"encode","comment":" Generates Json.Encode.Value from Encoder\n","type":"Firestore.Encode.Encoder -> Json.Encode.Value"},{"name":"geopoint","comment":" ","type":"Firestore.Types.Geopoint.Geopoint -> Firestore.Encode.Field"},{"name":"int","comment":" ","type":"Basics.Int -> Firestore.Encode.Field"},{"name":"list","comment":" ","type":"List.List a -> (a -> Firestore.Encode.Field) -> Firestore.Encode.Field"},{"name":"maybe","comment":" ","type":"Maybe.Maybe ( a, a -> Json.Encode.Value ) -> Firestore.Encode.Field"},{"name":"reference","comment":" ","type":"Firestore.Types.Reference.Reference -> Firestore.Encode.Field"},{"name":"string","comment":" ","type":"String.String -> Firestore.Encode.Field"},{"name":"timestamp","comment":" ","type":"Time.Posix -> Firestore.Encode.Field"}],"binops":[]},{"name":"Firestore.Types.Geopoint","comment":" Geopoint data type for Firestore\n\n@docs Geopoint, new, latitude, longitude\n\n","unions":[{"name":"Geopoint","comment":" ","args":[],"cases":[]}],"aliases":[],"values":[{"name":"latitude","comment":" ","type":"Firestore.Types.Geopoint.Geopoint -> Basics.Int"},{"name":"longitude","comment":" ","type":"Firestore.Types.Geopoint.Geopoint -> Basics.Int"},{"name":"new","comment":" ","type":"{ latitude : Basics.Int, longitude : Basics.Int } -> Firestore.Types.Geopoint.Geopoint"}],"binops":[]},{"name":"Firestore.Types.Reference","comment":" Reference data type for Firestore\n\n@docs Reference, new, toString\n\n","unions":[{"name":"Reference","comment":" ","args":[],"cases":[]}],"aliases":[],"values":[{"name":"new","comment":" ","type":"String.String -> Firestore.Types.Reference.Reference"},{"name":"toString","comment":" ","type":"Firestore.Types.Reference.Reference -> String.String"}],"binops":[]}]