feat(ECR-011): 昵称、首页贴士与档案 Self 唯一/合盘交叉校验
每账号仅一条 self(migration 40902);合盘只选 TA;账号昵称可改;首页穿衣/颜色/养生贴士。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
GrowthCheckin,
|
||||
GrowthPlan,
|
||||
GrowthReport,
|
||||
HomeDailyTips,
|
||||
ImageCardDrawn,
|
||||
ImageCardQuota,
|
||||
ImageCardScene,
|
||||
@@ -89,6 +90,8 @@ export function createClient(opts: CreateClientOptions) {
|
||||
call<AuthSession>('/api/v1/auth/login', { method: 'POST', body }),
|
||||
authLogout: () => call<{ ok: boolean }>('/api/v1/auth/logout', { method: 'POST' }),
|
||||
authMe: () => call<AuthUser>('/api/v1/auth/me'),
|
||||
authUpdateMe: (body: { nickname: string }) =>
|
||||
call<AuthUser>('/api/v1/auth/me', { method: 'PATCH', body }),
|
||||
listProfiles: () => call<{ items: Profile[] }>('/api/v1/profiles'),
|
||||
createProfile: (body: CreateProfileBody) =>
|
||||
call<Profile>('/api/v1/profiles', { method: 'POST', body }),
|
||||
@@ -222,6 +225,7 @@ export function createClient(opts: CreateClientOptions) {
|
||||
enabled?: boolean
|
||||
}>
|
||||
}>('/api/v1/home/tools'),
|
||||
getHomeDailyTips: () => call<HomeDailyTips>('/api/v1/home/daily-tips'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -187,6 +187,19 @@ export interface SolarTermToday {
|
||||
date: string
|
||||
}
|
||||
|
||||
/** 首页「自己」卡片:穿衣 / 颜色 / 养生 */
|
||||
export interface HomeDailyTips {
|
||||
clothing_index: number
|
||||
clothing: string
|
||||
color_note: string
|
||||
palette: { name: string; hex: string }[]
|
||||
wellness: string
|
||||
source: 'llm' | 'fallback' | string
|
||||
gua_name?: string
|
||||
day_part?: string
|
||||
need_birth?: boolean
|
||||
}
|
||||
|
||||
export interface MoodEntry {
|
||||
id: string
|
||||
day: string
|
||||
|
||||
Reference in New Issue
Block a user