tricycle/morty-api/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

MortyAPI.Models

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

Definition

type alias Approach =
{ 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 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
, requestedBy : Maybe String
, taskType : KanbanTaskType
}

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

= 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 Approach
, 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 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.