module Types exposing (..) import Browser.Navigation exposing (Key) import Http import RemoteData exposing (RemoteData) import Time type alias Model = { now : Time.Posix , key : Key , userData : UserData , posts : RemoteData (List Post) , composeInputValue : String } type alias UserData = { name : String , email : String , pictureUrl : String } type Msg = NoOp | RequestLogout -- TIME | SetNowPosix Time.Posix -- POSTS | GetPosts | GotPosts (Result Http.Error (List Post)) | LikePost Post | LikedPost (Result Http.Error Post) -- COMPOSE POST | ComposeInputChanged String | ComposePost | ComposedPost (Result Http.Error Post) type alias Author = { id : String , name : String } type alias Post = { id : String , content : String , author : Author , createdAt : Time.Posix , likes : Int , userPictureUrl : String }