@ -140,6 +140,7 @@ export interface TaskComment {
person_id : string ;
person_id : string ;
text : string ;
text : string ;
created_at : string ;
created_at : string ;
edited_at? : string | null ;
}
}
export interface Task {
export interface Task {
@ -229,7 +230,6 @@ export interface UiInboxItem extends Omit<InboxItem, "status"> {
status : UiInboxStatus ;
status : UiInboxStatus ;
time : string ;
time : string ;
fresh? : boolean ;
fresh? : boolean ;
fallbackUsed? : boolean ;
}
}
// ---------- 대시보드 (Phase 5) ----------
// ---------- 대시보드 (Phase 5) ----------
@ -337,17 +337,33 @@ export type MailAccount = {
email : string ;
email : string ;
tone : string ;
tone : string ;
kind : string ;
kind : string ;
unread : number ;
unread : number ; // 집중(focused) 안읽음
others? : number ; // 기타(Outlook other) 안읽음
} ;
} ;
export type MailFolder = { id : string ; name : string ; icon : string } ;
export type MailFolder = { id : string ; name : string ; icon : string } ;
export type MailAttachment = { name : string ; size : string } ;
// 계정별 실제 폴더/라벨(사이드바 트리). slug 가 목록 필터 키(inbox/spam/trash/cat:…/label:…/of:…).
export type AccountFolder = {
account : string ;
slug : string ;
name : string ;
kind : "system" | "category" | "label" | "custom" ;
icon : string ;
unread : number ;
total : number ;
sort_order : number ;
} ;
export type MailAttachment = { id : string ; name : string ; mime : string ; size : number } ;
// 목록 행 (가벼움). 응답 키는 'from' (백엔드 alias).
// 목록 행 (가벼움). 응답 키는 'from' (백엔드 alias).
export type EmailRow = {
export type EmailRow = {
id : string ;
id : string ;
account : string ;
account : string ;
from : string ;
from : string ; // 원문 발신자('이름 <메일>' 또는 메일)
from_name : string ; // 표시 이름(이름 없으면 도메인 추정) — 목록/리더 노출
from_email : string ; // 실제 메일 주소(리더 보조)
to : string ;
to : string ;
cc : string ;
thread_id : string ;
subject : string ;
subject : string ;
time : string ;
time : string ;
read : boolean ;
read : boolean ;
@ -355,15 +371,27 @@ export type EmailRow = {
has_attach : boolean ;
has_attach : boolean ;
labels : string [ ] ;
labels : string [ ] ;
preview : string ;
preview : string ;
category : MailCategory ; // 카테고리 탭(기본/프로모션/소셜/업데이트) — 라벨에서 산출
ai : AiAnalysis | null ;
ai : AiAnalysis | null ;
} ;
} ;
// 상세 (+ date/body/attachments)
// 메일 카테고리 — Gmail CATEGORY_* 매핑(Outlook 은 primary). 목록 상단 탭으로 분류.
export type MailCategory = "primary" | "promotions" | "social" | "updates" ;
// 상세 (+ date/body/body_html/attachments)
export type EmailDetail = EmailRow & {
export type EmailDetail = EmailRow & {
date : string ;
date : string ;
body : string [ ] ;
body : string [ ] ;
body_html : string ; // 원본 HTML 본문(있으면 iframe 렌더, 없으면 body 텍스트 폴백)
attachments : MailAttachment [ ] ;
attachments : MailAttachment [ ] ;
} ;
} ;
// 대화(스레드) 묶음
export type Conversation = {
thread_id : string ;
subject : string ;
count : number ;
messages : EmailRow [ ] ;
} ;
export type ExtractKind = "task" | "event" | "file" ;
export type ExtractKind = "task" | "event" | "file" ;
export type ExtractResponse = {
export type ExtractResponse = {
kind : ExtractKind ;
kind : ExtractKind ;
@ -384,12 +412,16 @@ export type ReplyDraft = {
subject : string ;
subject : string ;
body : string ;
body : string ;
} ;
} ;
export type ComposeAttachment = { name : string ; mime : string ; data_b64 : string } ;
export type SendRequest = {
export type SendRequest = {
from_account : string ;
from_account : string ;
to : string ;
to : string ;
cc? : string ;
bcc? : string ;
subject : string ;
subject : string ;
body : string ;
body : string ;
in_reply_to? : string | null ;
in_reply_to? : string | null ;
attachments? : ComposeAttachment [ ] ;
} ;
} ;
export type SendResponse = { approval_id : string ; status : string ; message : string } ;
export type SendResponse = { approval_id : string ; status : string ; message : string } ;
@ -433,330 +465,6 @@ export type SenderRule = {
bucket : NotifyBucket ;
bucket : NotifyBucket ;
} ;
} ;
// ==================== phase-10: 리서치 ====================
export type RsCollection = { id : string ; name : string ; tone : string ; n : number } ;
export type RsSource = {
id : string ;
kind : "pdf" | "web" | "note" ;
title : string ;
from : string ; // 응답 키 'from' (백엔드 serialization_alias)
col : string | null ;
learned : boolean ;
} ;
export type RsEntry = { id : string ; icon : string ; tone : string ; title : string ; desc : string } ;
export type ResearchHome = {
collections : RsCollection [ ] ;
sources : RsSource [ ] ;
prompts : string [ ] ;
entries : RsEntry [ ] ;
} ;
export type RsCount = { k : string ; n : number ; tone : string } ;
export type RsCross = { src : string ; tone : string ; claim : string ; stance : string } ;
export type ResearchReport = {
id : string ;
title : string ;
asked : string ;
meta : string ;
counts : RsCount [ ] ;
synthesis : string ; // HTML
cross : RsCross [ ] ;
note : string ;
} ;
export type RsRef = { title : string ; part : string } ;
export type ResearchQA = { id : string ; q : string ; a : string ; refs : RsRef [ ] } ;
export type RsBar = { y : string ; v : number ; forecast? : boolean } ;
export type ResearchChart = {
id : string ;
title : string ;
asked : string ;
unit : string ;
bars : RsBar [ ] ;
insight : string ; // HTML
caution : string ;
} ;
export type StartResearchResult = {
status : "ready" | "queued" ;
report_id : string | null ;
report : ResearchReport | null ;
queued_text : string | null ;
} ;
export type AskResult = {
a : string ; // HTML
refs : RsRef [ ] ;
grounded : boolean ;
model : string ;
} ;
// ==================== phase-10: 여행 ====================
export type TripWeather = { d : string ; t : string ; icon : string } ;
export type TripInfo = {
id : string ;
dday : string ;
title : string ;
dates : string ;
purpose : string ;
brief : string ;
weather : TripWeather [ ] ;
} ;
export type TripLeg = {
mode : string ;
from : string ;
ft : string ;
to : string ;
tt : string ;
seat : string ;
note : string ;
} ;
export type TripRoute = { out : TripLeg ; back : TripLeg } ;
export type TripStayInfo = { name : string ; desc : string ; conf : string } ;
export type TripPrepItem = { text : string ; state : "done" | "doing" } ;
export type TripDayItem = {
t : string ;
kind : string ;
tone : string ;
title : string ;
meta : string ;
hot? : boolean ;
} ;
export type TripDay = { id : string ; tab : string ; items : TripDayItem [ ] } ;
export type TripCheckItem = { id : string ; text : string ; auto? : string } ;
export type TripCheckGroup = { name : string ; items : TripCheckItem [ ] } ;
export type TripExpenseRow = { name : string ; amt : string ; state : string } ;
export type TripExpense = {
budget : number ;
planned : number ;
rows : TripExpenseRow [ ] ;
note : string ;
} ;
export type UpcomingTrip = {
trip : TripInfo ;
route : TripRoute ;
stay : TripStayInfo ;
prep : TripPrepItem [ ] ;
days : TripDay [ ] ;
check : TripCheckGroup [ ] ;
expense : TripExpense ;
} ;
export type SavedTrip = {
id : string ;
title : string ;
tag : string ;
note : string ;
now : string ;
delta : string ;
down : boolean ;
watch : boolean ;
hint : string ;
spark : number [ ] ;
} ;
export type PlanTransport = {
mode : string ;
name : string ;
desc : string ;
price : string ;
pick? : boolean ;
note? : string ;
} ;
export type PlanStay = {
name : string ;
desc : string ;
price : string ;
unit : string ;
pick? : boolean ;
} ;
export type PlanDayItem = { t : string ; title : string ; tone : string } ;
export type PlanDay = { tab : string ; items : PlanDayItem [ ] } ;
export type PlanBudgetRow = { name : string ; amt : string } ;
export type PlanBudget = { total : string ; cap : string ; rows : PlanBudgetRow [ ] } ;
export type PlanResearchStep = { icon : string ; label : string ; detail : string } ;
export type PlanResult = {
id : string ;
idx : number ;
custom : boolean ;
title : string ;
meta : string ;
summary : string ; // HTML
weather : string ;
transport : PlanTransport [ ] ;
stay : PlanStay [ ] ;
days : PlanDay [ ] ;
budget : PlanBudget ;
checklist : string [ ] ;
sources : string [ ] ;
research? : PlanResearchStep [ ] | null ;
} ;
// ==================== phase-11: 라이프 케어 (건강·금융·지식) ====================
export type LifeDomain = "health" | "finance" | "knowledge" ;
export type LifeInsightKind = "alert" | "save" | "info" ;
export type LifeKnowledgeType = "article" | "note" | "idea" | "highlight" ;
export interface ConnectorSourceOut {
id : string ;
domain : LifeDomain ;
name : string ;
kind : string ;
tone : string ;
on : boolean ;
last : string ;
}
// ---- 건강 ----
export interface RingOut {
label : string ;
val : string ;
unit : string ;
goal : string ;
pct : number ;
icon : string ;
tone : string ;
}
export interface VitalOut {
label : string ;
val : string ;
unit : string ;
trend : string ; // "up" | "down" | "flat"
note : string ;
tone : string ;
}
export interface SleepStageOut {
label : string ;
pct : number ;
tone : string ; // "muted" 는 var(--card-3)/var(--faint)
}
export interface SleepOut {
total : string ;
score : number ;
stages : SleepStageOut [ ] ;
week : number [ ] ;
note : string ;
}
export interface HabitOut {
id : string ;
title : string ;
goal : string ;
done : number ;
total : number ;
streak : number ;
icon : string ;
tone : string ;
at : string ;
automation_rule_id? : string | null ;
}
export interface HealthOut {
rings : RingOut [ ] ;
vitals : VitalOut [ ] ;
sleep : SleepOut ;
coach : string ; // HTML
habits : HabitOut [ ] ;
}
// ---- 금융 ----
export interface BudgetOut {
spent : number ;
limit : number ;
pct : number ;
delta_pct : number ;
days_left : number ;
}
export interface CategoryOut {
name : string ;
amt : number ;
pct : number ;
icon : string ;
tone : string ;
over : boolean ;
}
export interface SubOut {
id : string ;
name : string ;
date : string ;
in_days : number ;
amt : number ;
icon : string ;
tone : string ;
note : string ;
paused : boolean ;
}
export interface InsightOut {
id : string ;
kind : LifeInsightKind ;
icon : string ;
title : string ;
body : string ;
action : string ; // "pause_sub" | "raise_budget" | "auto_transfer" | ""
action_ref : string ;
}
export interface FinanceOut {
budget : BudgetOut ;
cats : CategoryOut [ ] ;
subs : SubOut [ ] ;
coach : string ; // HTML
insights : InsightOut [ ] ;
}
// ---- 지식 ----
export interface CollectionOut {
name : string ;
count : number ;
tone : string ;
}
export interface KnowledgeItemOut {
id : string ;
type : LifeKnowledgeType ;
title : string ;
src : string ;
time : string ;
tone : string ;
icon : string ;
tags : string [ ] ;
excerpt : string ;
ai : string ; // HTML
}
export interface KnowledgeStatsOut {
items : number ;
this_week : number ;
collections : number ;
}
export interface KnowledgeOut {
stats : KnowledgeStatsOut ;
suggested : string [ ] ;
collections : CollectionOut [ ] ;
items : KnowledgeItemOut [ ] ;
}
// ---- 통합 overview ----
export interface LifeOverviewOut {
sources : Record < LifeDomain , ConnectorSourceOut [ ] > ;
health : HealthOut ;
finance : FinanceOut ;
knowledge : KnowledgeOut ;
}
// ---- 액션 응답 ----
export interface HabitTickResponse {
habit : HabitOut ;
}
export interface SubPauseResponse {
sub : SubOut ;
approval_id? : string | null ;
}
export interface InsightActResponse {
approval_id? : string | null ;
task_id? : string | null ;
message : string ;
}
export interface KnowledgeAskResponse {
q : string ;
body : string ; // HTML
sources : string [ ] ;
}
export interface KnowledgeSuggestActResponse {
task_id? : string | null ;
event_id? : string | null ;
message : string ;
}
// ==================== phase-12 여정(journey) ====================
// ==================== phase-12 여정(journey) ====================
export type JourneyPerson = {
export type JourneyPerson = {
id : string ;
id : string ;
@ -838,10 +546,17 @@ export interface ConnectorStatus {
last : string ;
last : string ;
last_synced_at : string | null ;
last_synced_at : string | null ;
error_detail : string ;
error_detail : string ;
email : string ; // phase-16 연결된 실계정 주소
}
}
export interface OAuthStart {
export interface OAuthStart {
authorize_url : string ;
authorize_url : string ;
}
}
export interface ConnectorProvider {
domain : string ;
provider : string ;
label : string ;
configured : boolean ; // client_id 설정 시 OAuth 추가 가능
}
export interface SyncResult {
export interface SyncResult {
domain : string ;
domain : string ;
account_id : string ;
account_id : string ;
@ -862,39 +577,6 @@ export interface ImportResult {
// ==================== phase-14: 능동 에이전트 + 멀티모달 ====================
// ==================== phase-14: 능동 에이전트 + 멀티모달 ====================
// 백엔드 schemas.py(§4.2)와 1:1. snake_case 키 유지.
// 백엔드 schemas.py(§4.2)와 1:1. snake_case 키 유지.
export type ErrandKind = "booking" | "refund" | "cancel" | "support" ;
export type ErrandStatus =
| "planning"
| "running"
| "awaiting_approval"
| "done"
| "failed"
| "cancelled" ;
export type StepState = "pending" | "running" | "done" | "blocked" | "error" ;
export interface ErrandStep {
id : string ;
seq : number ;
phase : "plan" | "act" | "observe" | "reflect" ;
tool : string | null ;
label : string ;
detail : string | null ;
external_effect : boolean ;
state : StepState ;
}
export interface ErrandTask {
id : string ;
kind : ErrandKind ;
title : string ;
goal : string ;
target : string | null ;
tone : Tone ;
status : ErrandStatus ;
approval_id : string | null ;
result_summary : string | null ;
model : string ;
steps : ErrandStep [ ] ;
}
export interface ProactiveCard {
export interface ProactiveCard {
id : string ;
id : string ;
kind : "schedule" | "finance" | "focus" | "health" | "digest" ;
kind : "schedule" | "finance" | "focus" | "health" | "digest" ;