Version: 0.7.6.dev.260325
后端: - ♻️ 将 `taskquery` 模块迁移至 `agent2`,并完成与 `agent2` 业务链路及整体结构的正式接入 前端: - 🧱 已完成基础框架搭建,并完成了登录、注册、主页等页面并对接了对应接口;但整体功能实现仍在完善中
This commit is contained in:
34
frontend/src/types/api.ts
Normal file
34
frontend/src/types/api.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
export interface ApiResponse<T> {
|
||||
status: string
|
||||
info: string
|
||||
data: T
|
||||
}
|
||||
|
||||
export interface PlainResponse {
|
||||
status: string
|
||||
info: string
|
||||
}
|
||||
|
||||
export interface TokenPair {
|
||||
access_token: string
|
||||
refresh_token: string
|
||||
}
|
||||
|
||||
export interface LoginPayload {
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export interface RegisterPayload {
|
||||
username: string
|
||||
phone_number: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export interface RegisterResult {
|
||||
id: number
|
||||
}
|
||||
|
||||
export interface RefreshTokenPayload {
|
||||
old_refresh_token: string
|
||||
}
|
||||
99
frontend/src/types/dashboard.ts
Normal file
99
frontend/src/types/dashboard.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
export interface TaskItem {
|
||||
id: number
|
||||
user_id: number
|
||||
title: string
|
||||
priority_group: number
|
||||
status: string
|
||||
deadline: string
|
||||
is_completed: boolean
|
||||
}
|
||||
|
||||
export interface TaskCreatePayload {
|
||||
title: string
|
||||
priority_group: number
|
||||
deadline_at?: string | null
|
||||
}
|
||||
|
||||
export interface TaskCreateResult {
|
||||
id: number
|
||||
title: string
|
||||
priority_group: number
|
||||
deadline_at?: string | null
|
||||
status: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface TaskMutationResult {
|
||||
task_id: number
|
||||
is_completed: boolean
|
||||
already_completed?: boolean
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface TaskBrief {
|
||||
id: number
|
||||
name: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface TodayEvent {
|
||||
id: number
|
||||
order: number
|
||||
name: string
|
||||
start_time: string
|
||||
end_time: string
|
||||
location: string
|
||||
type: string
|
||||
span: number
|
||||
embedded_task_info?: TaskBrief
|
||||
}
|
||||
|
||||
export interface TodaySchedule {
|
||||
day_of_week: number
|
||||
week: number
|
||||
events: TodayEvent[]
|
||||
}
|
||||
|
||||
export interface ConversationListItem {
|
||||
conversation_id: string
|
||||
title: string
|
||||
has_title: boolean
|
||||
message_count: number
|
||||
last_message_at?: string | null
|
||||
status: string
|
||||
created_at?: string | null
|
||||
}
|
||||
|
||||
export interface ConversationListResponse {
|
||||
list: ConversationListItem[]
|
||||
page: number
|
||||
page_size: number
|
||||
limit: number
|
||||
total: number
|
||||
has_more: boolean
|
||||
}
|
||||
|
||||
export interface ConversationMeta {
|
||||
conversation_id: string
|
||||
title: string
|
||||
has_title: boolean
|
||||
message_count: number
|
||||
last_message_at?: string | null
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface AssistantMessage {
|
||||
id: string
|
||||
role: 'user' | 'assistant' | 'system'
|
||||
content: string
|
||||
createdAt: string
|
||||
reasoning?: string
|
||||
}
|
||||
|
||||
export interface ChatStreamRequest {
|
||||
conversation_id?: string
|
||||
message: string
|
||||
model?: string
|
||||
thinking?: boolean
|
||||
extra?: Record<string, unknown>
|
||||
}
|
||||
Reference in New Issue
Block a user