feat: 支持健康数据上报

This commit is contained in:
richarjiang
2025-12-02 19:10:55 +08:00
parent 5b46104564
commit 02b2de3ea3
5 changed files with 239 additions and 9 deletions

View File

@@ -54,4 +54,24 @@ export async function updateBodyMeasurements(dto: BodyMeasurementsDto): Promise<
return await api.put('/users/body-measurements', dto);
}
export type DailyHealthDataDto = {
date?: string; // YYYY-MM-DD
waterIntake?: number; // ml
exerciseMinutes?: number; // minutes
caloriesBurned?: number; // kcal
standingMinutes?: number; // minutes
basalMetabolism?: number; // kcal
sleepMinutes?: number; // minutes
bloodOxygen?: number; // % (0-100)
stressLevel?: number; // ms (based on HRV)
};
export async function updateDailyHealthData(dto: DailyHealthDataDto): Promise<{
code: number;
message: string;
data: any;
}> {
return await api.put('/users/daily-health', dto);
}