tricycle / morty-api / 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.


type alias KanbanLanesSuccessResponse =
{ 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.


type KanbanStageStatus
    = Ok
    | Problem String

The possible statuses a KanbanStage can have.


type alias KanbanStageStatusFields =
{ status : String
, message : Maybe String 
}

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


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

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


type KanbanTaskPriority
    = HighestPriority
    | SecondHighestPriority
    | ThirdHighestPriority
    | LowerPriority

The different task priorities with unique display properties


type KanbanTaskType
    = 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 : Basics.Int
, title : String
, description : String
, taskType : String
, externalIdentifier : String
, status : String
, secondsSinceStatusChanged : Basics.Int
, ownedBy : Maybe User
, requestedBy : Maybe String
, taskApproaches : List TaskApproach
, predictionGroupId : Maybe Basics.Int
, predictionJudgementAt : Maybe String
, midLevelHourEstimate : Maybe Basics.Int 
}

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


type alias TaskApproach =
{ id : Basics.Int
, taskId : Basics.Int
, user : User
, description : String
, myHours : Maybe Basics.Float
, seniorHours : Maybe Basics.Float
, midLevelHours : Maybe Basics.Float
, juniorHours : Maybe Basics.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 : Basics.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 : Basics.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.


type alias TeamsSuccessResponse =
{ data : TeamsData }

The full JSON compliant response.


type alias User =
{ id : Basics.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.