2026-09-03 18:12:31 +01:00
|
|
|
export interface User {
|
|
|
|
|
id: number
|
|
|
|
|
email: string
|
|
|
|
|
email_verified: boolean
|
|
|
|
|
email_verified_at: string | null
|
2026-09-03 20:04:49 +01:00
|
|
|
/** A confirmed-but-not-yet-applied email change is waiting on this address. */
|
|
|
|
|
pending_email: string | null
|
2026-09-04 19:34:53 +01:00
|
|
|
/** Whether this user has at least one registered passkey. */
|
|
|
|
|
has_passkey: boolean
|
2026-09-03 18:12:31 +01:00
|
|
|
created_at: string | null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AuthResponse {
|
|
|
|
|
user: User
|
|
|
|
|
token: string
|
|
|
|
|
expires_at: string
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-04 19:34:53 +01:00
|
|
|
export interface Passkey {
|
|
|
|
|
id: number
|
|
|
|
|
label: string
|
|
|
|
|
created_at: string
|
|
|
|
|
last_used_at: string | null
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-04 11:28:59 +01:00
|
|
|
export interface Project {
|
2026-09-03 18:42:15 +01:00
|
|
|
id: number
|
|
|
|
|
title: string
|
|
|
|
|
description: string
|
|
|
|
|
owner_id: number
|
2026-09-04 11:28:59 +01:00
|
|
|
card_count: number
|
2026-09-03 18:42:15 +01:00
|
|
|
completed_count: number
|
|
|
|
|
created_at: string
|
|
|
|
|
updated_at: string
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-04 13:37:17 +01:00
|
|
|
/** A project-specific card status ("To do", "Doing", "Done", …). */
|
|
|
|
|
export interface CardStatus {
|
|
|
|
|
id: number
|
|
|
|
|
name: string
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-04 15:22:33 +01:00
|
|
|
/**
|
|
|
|
|
* A card either sits in its owner's global inbox (project_id and status_id
|
|
|
|
|
* both null) or belongs to one project with a status in it (both set).
|
|
|
|
|
*/
|
2026-09-04 11:28:59 +01:00
|
|
|
export interface Card {
|
2026-09-03 18:59:51 +01:00
|
|
|
id: number
|
2026-09-04 15:22:33 +01:00
|
|
|
project_id: number | null
|
2026-09-03 18:59:51 +01:00
|
|
|
text: string
|
|
|
|
|
complete: boolean
|
|
|
|
|
position: number
|
2026-09-04 13:37:17 +01:00
|
|
|
status_id: number | null
|
|
|
|
|
status: CardStatus | null
|
2026-09-03 18:59:51 +01:00
|
|
|
created_at: string
|
|
|
|
|
updated_at: string
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-03 18:12:31 +01:00
|
|
|
/** Shape of every error body returned by the API. */
|
|
|
|
|
export interface ApiErrorBody {
|
|
|
|
|
error: {
|
|
|
|
|
message: string
|
|
|
|
|
details?: Record<string, string[]>
|
|
|
|
|
}
|
|
|
|
|
}
|