Frontend API structure.
This commit is contained in:
parent
7d2b7fc90c
commit
c443a13a14
10 changed files with 1810 additions and 4 deletions
35
frontend/app/types/task.ts
Normal file
35
frontend/app/types/task.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
export enum TaskStatus {
|
||||
Todo = 'todo',
|
||||
Done = 'done',
|
||||
Backlog = 'backlog',
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: string
|
||||
title: string
|
||||
description: string | null
|
||||
status: TaskStatus
|
||||
created_at: string
|
||||
updated_at: string
|
||||
completed_at: string | null
|
||||
}
|
||||
|
||||
export interface CreateTaskRequest {
|
||||
title: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface UpdateTaskRequest {
|
||||
title?: string
|
||||
description?: string
|
||||
status?: TaskStatus
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
message: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
export interface TaskListResponse {
|
||||
tasks: Task[]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue