feat(profile): add profile settings and LLM user context

This commit is contained in:
Piotr Oleszczyk 2026-03-05 15:57:21 +01:00
parent db3d9514d5
commit b99b9ed68e
25 changed files with 472 additions and 9 deletions

View file

@ -17,6 +17,7 @@ import type {
RoutineSuggestion,
RoutineStep,
SkinConditionSnapshot,
UserProfile,
} from "./types";
// ─── Core fetch helpers ──────────────────────────────────────────────────────
@ -47,6 +48,14 @@ export const api = {
del: (path: string) => request<void>(path, { method: "DELETE" }),
};
// ─── Profile ─────────────────────────────────────────────────────────────────
export const getProfile = (): Promise<UserProfile | null> => api.get("/profile");
export const updateProfile = (
body: { birth_date?: string; sex_at_birth?: "male" | "female" | "intersex" },
): Promise<UserProfile> => api.patch("/profile", body);
// ─── Products ────────────────────────────────────────────────────────────────
export interface ProductListParams {