tricycle/morty-api/4.0.0

Rerouted (cache, verified). The original is gone. This copy comes from a Lamdera package cache made before it went. The Lamdera package server serves a copy recovered from a Lamdera package cache from 2021-02-13.

What we checked: Rebuilt from the unpacked sources in a Lamdera package cache (5 copies agree), which Elm only writes after the published SHA-1 checked out; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/tricycle/morty-api/zipball/4.0.0/

MortyAPI.Types

This library provides all the models you'll get back from the MortyAPI.

Definition

type alias KanbanLane =
{ acceptedStage : KanbanStage
, deliveredStage : KanbanStage
, inProgressStage : KanbanStage
, metaStage : KanbanStage
, toDoStage : KanbanStage
, toEstimateStage : KanbanStage
, user : KanbanUser
}

A Kanban lane - effectively the lane representing a single user. Returned as part of the KanbanLanes record.

type alias KanbanLanes =
{ label : String
, kanbanLanes : List KanbanLane
}

The whole Kanban board.

type alias KanbanLanesData =
{ attributes : KanbanLanes
, id : String
, dataType : String
}

The "data" content of the JSON API compliant response.

{ data : KanbanLanesData }

The full JSON compliant response.

type alias KanbanStage =
{ status : KanbanStageStatus
, tasks : List KanbanTask
}

A stage in the Kanban board - meta, to estimate, to do, in progress, delivered and accepted are all instances of this.

= Ok
| Problem String

The possible statuses a KanbanStage can have.

{ status : String
, message : Maybe String
}

The raw fields from the API, just for decoding purposes.

type alias KanbanTask =
{ daysSinceLastChanged : Int
, description : String
, estimate : Maybe Int
, mortyUrl : String
, pivotalUrl : String
, priority : KanbanTaskPriority
, requestedBy : Maybe String
, taskType : KanbanTaskType
}

A task with only the properties required to render the Kanban board.

= HighestPriority
| SecondHighestPriority
| ThirdHighestPriority
| LowerPriority

The different task priorities with unique display properties

= Feature
| Bug
| Chore

The different types a kanban task can be.

type alias KanbanUser =
{ email : String
, fullName : String
}

A Kanban board user, represented by a lane.

type alias Task =
{ id : Int
, title : String
, description : String
, taskType : String
, externalIdentifier : String
, status : String
, secondsSinceStatusChanged : Int
, ownedBy : Maybe User
, requestedBy : Maybe String
, taskApproaches : List TaskApproach
, predictionGroupId : Maybe Int
, predictionJudgementAt : Maybe String
, midLevelHourEstimate : Maybe Int
}

The record type returned by asking Morty for a Task via MortyAPI.Commands.getTasksCommand or MortyAPI.Commands.getTaskCommand.

type alias TaskApproach =
{ id : Int
, taskId : Int
, user : User
, description : String
, myHours : Maybe Float
, seniorHours : Maybe Float
, midLevelHours : Maybe Float
, juniorHours : Maybe Float
}

The Approach to a task. Used to create a new approach or return a list of existing approaches when you retrieve a task.

type alias Team =
{ id : Int
, identifier : Maybe String
, name : String
, members : List TeamMember
}

The record type returned by asking Morty for Teams via MortyAPI.Commands.getTeamsCommand

type alias TeamMember =
{ id : Int
, fullName : String
, email : String
, seniority : String
}

The record type returned by asking Morty for Teams via MortyAPI.Commands.getTeamsCommand and representing the team members in the team

type alias TeamsData =
{ attributes : List Team }

The "data" content of the JSON API compliant response.

{ data : TeamsData }

The full JSON compliant response.

type alias User =
{ id : Int
, fullName : String
, email : String
, seniority : String
, predictionBookApiToken : Maybe String
}

The record type returned by asking Morty for the current user via MortyAPI.Commands.getUserCommand. It is also how the user is represented in the Task record.