tricycle/morty-api/3.0.1

NOTE: the latest version is 4.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/tricycle/morty-api is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 3.0.1 found (9 same-name repos checked); no cached copy. Use another version.

Details

MortyAPI.Types

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