[{"name":"DynamoDB","comment":" Pure Elm client for the [AWS DynamoDB](https://aws.amazon.com/dynamodb/) NoSQL database service.\n\n\n# Types\n\n@docs Request\n\n\n# Turning a Request into a Task\n\n@docs send\n\n\n# Creating requests\n\n@docs getItem, getItemWithMetadata\n@docs putItem, putItemWithMetadata\n@docs deleteItem, deleteItemWithMetadata\n@docs ScanValue, scan, scanWithMetadata\n@docs TransactGetItem, TransactGetItemValue, transactGetItems, transactGetItemsWithMetadata\n@docs TransactWrite, transactWriteItems, transactWriteItemsWithMetadata\n\n\n# Accessing values in items\n\n@docs itemStringValue, itemFloatValue, itemIntValue\n\n\n# Utility functions\n\n@docs makeItem, removeKeyFields, addKeyFields, keyNames\n\n\n# Reading accounts into Elm\n\n@docs readAccounts, decodeAccounts, accountDecoder, encodeAccount\n\n\n# Low-level functions\n\n@docs makeRequest, makeFullRequest\n\n","unions":[{"name":"TransactWrite","comment":" One action for the list passed to `transactWriteItems`.\n\n`TransactWriteDelete` deletes the attribute with the given `key`.\n\n`TransactWritePut` writes (or overwrites) the given `item`, merging\nthe `key` name/value pairs into `item`, if `key` is not Nothing.\n\n","args":[],"cases":[["TransactWriteDelete",["{ tableName : DynamoDB.Types.TableName, key : DynamoDB.Types.Key }"]],["TransactWritePut",["{ tableName : DynamoDB.Types.TableName, key : Maybe.Maybe DynamoDB.Types.Key, item : DynamoDB.Types.Item }"]]]}],"aliases":[{"name":"Request","comment":" A request that can be turned into a Task by `DynamoDB.send`.\n\n`a` is the type of the successful `Task` result from `DynamoDB.send`.\n\n","args":["a"],"type":"AWS.Http.Request AWS.Http.AWSAppError a"},{"name":"ScanValue","comment":" The return value for `scan` and `scanWithMetadata`\n\nPass `lastEvaluatedKey` to a subsequent call to scan to get more.\n\nThis doesn't include `ScannedCount`, because that's the same as\n`Count` unless you do filtering, which isn't yet supported.\n\n","args":[],"type":"{ count : Basics.Int, items : List.List DynamoDB.Types.Item, lastEvaluatedKey : Maybe.Maybe DynamoDB.Types.Key }"},{"name":"TransactGetItem","comment":" Specify one item for `transactGetItems`.\n\nAll attributes are returned if `returnedAttributeNames` is `Nothing`.\n\n","args":[],"type":"{ tableName : DynamoDB.Types.TableName, key : DynamoDB.Types.Key, returnedAttributeNames : Maybe.Maybe (List.List String.String) }"},{"name":"TransactGetItemValue","comment":" One of the return values from `transactGetItems`.\n","args":[],"type":"{ tableName : DynamoDB.Types.TableName, key : DynamoDB.Types.Key, item : Maybe.Maybe DynamoDB.Types.Item }"}],"values":[{"name":"accountDecoder","comment":" A `Decoder` for the `Account` type.\n","type":"Json.Decode.Decoder DynamoDB.Types.Account"},{"name":"addKeyFields","comment":" Add key fields to an `Item`.\n","type":"DynamoDB.Types.Key -> DynamoDB.Types.Item -> DynamoDB.Types.Item"},{"name":"decodeAccounts","comment":" Decode a JSON string encoding a list of `Account`s\n","type":"String.String -> Result.Result DynamoDB.Types.Error (List.List DynamoDB.Types.Account)"},{"name":"deleteItem","comment":" Delete an item from a table. There is no return value.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html>\n\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Request ()"},{"name":"deleteItemWithMetadata","comment":" Delete an item from a table, returning the Http request `Metadata`.\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Request Http.Metadata"},{"name":"encodeAccount","comment":" Encode an account as a JSON value.\n","type":"DynamoDB.Types.Account -> Json.Encode.Value"},{"name":"getItem","comment":" Get an item from a table.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html>\n\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Request (Maybe.Maybe DynamoDB.Types.Item)"},{"name":"getItemWithMetadata","comment":" Get an item, returning the Http request `Metadata`.\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Request ( Http.Metadata, Maybe.Maybe DynamoDB.Types.Item )"},{"name":"itemFloatValue","comment":" Return the value of an item's float attribute.\n\nIf the attribute does not exist or doesn't have a float value, return `NaN`.\n\n","type":"String.String -> DynamoDB.Types.Item -> Basics.Float"},{"name":"itemIntValue","comment":" Round an item's float value to an integer.\n\nIf the attribute does not exist or doesn't have a float value, returns\n`NaN` as an integer, which can only be detected via `isNan (toFloat n)`.\n\n","type":"String.String -> DynamoDB.Types.Item -> Basics.Int"},{"name":"itemStringValue","comment":" Return the value of an item's string attribute.\n\nIf the attribute does not exist or doesn't have a string value, return `\"\"`.\n\n","type":"String.String -> DynamoDB.Types.Item -> String.String"},{"name":"keyNames","comment":" Return a list of the key names in a `Key`.\n","type":"DynamoDB.Types.Key -> List.List String.String"},{"name":"makeFullRequest","comment":" Request creator with retained `Metadata`\n\nSame as `makeRequest`, but the decoder takes metadata\n\n","type":"String.String -> Json.Encode.Value -> (Http.Metadata -> Json.Decode.Decoder a) -> DynamoDB.Request a"},{"name":"makeItem","comment":" Create an `Item` from a list of (key, value) tuples.\n","type":"List.List ( String.String, DynamoDB.Types.AttributeValue ) -> DynamoDB.Types.Item"},{"name":"makeRequest","comment":" Low-level request creator.\n\nSimilar to`AWS.Http.request`, but assumes the HTTP result is JSON and\nuses `AWS.Http.awsAppErrDecoder` as the `ErrorDecoder`.\n\n","type":"String.String -> Json.Encode.Value -> Json.Decode.Decoder a -> DynamoDB.Request a"},{"name":"putItem","comment":" Put an item into a table. There is no return value.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html>\n\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Types.Item -> DynamoDB.Request ()"},{"name":"putItemWithMetadata","comment":" Put an item into a table, returning the Http request `Metadata`.\n","type":"DynamoDB.Types.TableName -> DynamoDB.Types.Key -> DynamoDB.Types.Item -> DynamoDB.Request Http.Metadata"},{"name":"readAccounts","comment":" Read JSON from a URL and turn it into a list of `Account`s.\n\nIf `Nothing` is passed for the first arg (the URL), will use the default of `\"accounts.json\"`.\n\nYou're not going to want to store the secret keys in this JSON in plain text anywhere but your development machine. In applications, they will ususally be stored in `LocalStorage`.\n\nExample JSON:\n\n    [{\"name\": \"Dynamo DB\",\n      \"region\": \"us-east-1\",\n      \"access-key\": \"<20-character access key>\",\n      \"secret-key\": \"<40-character secret key>\",\n      \"tableName\": \"<your table name>\"\n     }\n    ]\n\n","type":"Maybe.Maybe String.String -> Task.Task DynamoDB.Types.Error (List.List DynamoDB.Types.Account)"},{"name":"removeKeyFields","comment":" Remove the key fields from an `Item`.\n\nThe `Item` that comes back from `getItem` or `getItemWithMetadata` contains the key fields. Sometimes you'd rather not see them there.\n\n","type":"DynamoDB.Types.Key -> DynamoDB.Types.Item -> DynamoDB.Types.Item"},{"name":"scan","comment":" Scan a table for items.\n\nIf `Maybe Key` isn't `Nothing`, it's the `ExclusiveStartKey`.\n\nIf `Maybe Int` isn't `Nothing`, it's the `Limit`.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html>\n\n","type":"DynamoDB.Types.TableName -> Maybe.Maybe DynamoDB.Types.Key -> Maybe.Maybe Basics.Int -> DynamoDB.Request (Maybe.Maybe DynamoDB.ScanValue)"},{"name":"scanWithMetadata","comment":" Scan a table for items, returning the Http request `Metadata`.\n\nIf `Maybe Key` isn't `Nothing`, it's the `ExclusiveStartKey`.\n\nIf `Maybe Int` isn't `Nothing`, it's the `Limit`.\n\n","type":"DynamoDB.Types.TableName -> Maybe.Maybe DynamoDB.Types.Key -> Maybe.Maybe Basics.Int -> DynamoDB.Request ( Http.Metadata, Maybe.Maybe DynamoDB.ScanValue )"},{"name":"send","comment":" Create a `Task` to send a signed request over the wire.\n","type":"DynamoDB.Types.Account -> DynamoDB.Request a -> Task.Task DynamoDB.Types.Error a"},{"name":"transactGetItems","comment":" Do a bunch of `TransactGetItem` requests inside a transaction.\n\nWill error if the list has more than 100 elements.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html>\n\n","type":"List.List DynamoDB.TransactGetItem -> DynamoDB.Request (List.List DynamoDB.TransactGetItemValue)"},{"name":"transactGetItemsWithMetadata","comment":" Do a bunch of `TransactGetItem` requests inside a transaction, returning the Http request `Metadata`.\n\nWill error if the list has more than 100 elements.\n\n","type":"List.List DynamoDB.TransactGetItem -> DynamoDB.Request ( Http.Metadata, List.List DynamoDB.TransactGetItemValue )"},{"name":"transactWriteItems","comment":" Do a bunch of `TransactWrite` requests inside a transaction. There is no return value.\n\nWill error if the list has more than 100 elements.\n\nSee <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html>\n\n","type":"List.List DynamoDB.TransactWrite -> DynamoDB.Request ()"},{"name":"transactWriteItemsWithMetadata","comment":" Do a bunch of `TransactWrite` requests inside a transaction, returning the Http request `Metdata`.\n\nWill error if the list has more than 100 elements.\n\n","type":"List.List DynamoDB.TransactWrite -> DynamoDB.Request Http.Metadata"}],"binops":[]},{"name":"DynamoDB.EncodeDecode","comment":" Encoders and decoders\n\n@docs encodeKey, keyDecoder\n@docs encodeItem, itemDecoder\n@docs encodeAttributeValue, attributeValueDecoder\n\n","unions":[],"aliases":[],"values":[{"name":"attributeValueDecoder","comment":" Decoder for an `AttributeValue`\n","type":"Json.Decode.Decoder DynamoDB.Types.AttributeValue"},{"name":"encodeAttributeValue","comment":" Encode an `AttributeValue`\n","type":"DynamoDB.Types.AttributeValue -> Json.Encode.Value"},{"name":"encodeItem","comment":" Encode an `Item`.\n","type":"DynamoDB.Types.Item -> Json.Encode.Value"},{"name":"encodeKey","comment":" Encode a `Key`\n","type":"DynamoDB.Types.Key -> Json.Encode.Value"},{"name":"itemDecoder","comment":" Decoder for an `Item`\n","type":"Json.Decode.Decoder DynamoDB.Types.Item"},{"name":"keyDecoder","comment":" Decoder for a `Key`\n","type":"Json.Decode.Decoder DynamoDB.Types.Key"}],"binops":[]},{"name":"DynamoDB.Html","comment":" Simple rendering for a list of `DynamoDB.Types.Item`.\n\n@docs renderItemTable\n\n","unions":[],"aliases":[],"values":[{"name":"renderItemTable","comment":" Render a table for a list of `Item`s.\n\nThe list of strings is the key names which should appear first in the\ndisplayed table.\n\nThe wrapper, `(Item -> msg)`, is called when the user clicks on a row.\n\n","type":"(DynamoDB.Types.Item -> msg) -> List.List String.String -> List.List DynamoDB.Types.Item -> Html.Html msg"}],"binops":[]},{"name":"DynamoDB.Types","comment":" Types for DynamoDB module\n\n\n# Types\n\n@docs TableName\n@docs Key, Item, AttributeValue\n@docs Error, Account\n\n","unions":[{"name":"AttributeValue","comment":" A value in a database key or item.\n\nSee: <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html>\n\n","args":[],"cases":[["BinaryValue",["String.String"]],["BoolValue",["Basics.Bool"]],["BinarySetValue",["List.List String.String"]],["ListValue",["List.List DynamoDB.Types.AttributeValue"]],["MapValue",["Dict.Dict String.String DynamoDB.Types.AttributeValue"]],["NumberValue",["Basics.Float"]],["NumberSetValue",["List.List Basics.Float"]],["NullValue",[]],["StringValue",["String.String"]],["StringSetValue",["List.List String.String"]]]},{"name":"Error","comment":" Errors returned from S3 operations\n\n`HttpError` is from the standard Elm `Http` module.\n\n`AWSError` is from the AWS.Http module.\n\n`DecodeError` denotes a Decoder error in parsing DynamoDB account info.\n\n","args":[],"cases":[["HttpError",["Http.Error"]],["AWSError",["AWS.Http.AWSAppError"]],["DecodeError",["String.String"]]]},{"name":"Key","comment":" A key for a database item.\n","args":[],"cases":[["SimpleKey",["( String.String, DynamoDB.Types.AttributeValue )"]],["CompositeKey",["( String.String, DynamoDB.Types.AttributeValue )","( String.String, DynamoDB.Types.AttributeValue )"]]]}],"aliases":[{"name":"Account","comment":" Information about a DynamoDB account\n","args":[],"type":"{ name : String.String, region : Maybe.Maybe String.String, accessKey : String.String, secretKey : String.String, tableName : DynamoDB.Types.TableName }"},{"name":"Item","comment":" An item in a database.\n","args":[],"type":"Dict.Dict String.String DynamoDB.Types.AttributeValue"},{"name":"TableName","comment":" The name of a DynamoDB table.\n","args":[],"type":"String.String"}],"values":[],"binops":[]}]