From b163b40860b53cb8e4d561da8fad07c98fd084ce Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 17 Apr 2026 15:02:09 +0200 Subject: [PATCH] feat(types): add shared type definitions Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/types.ts | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/lib/types.ts diff --git a/src/lib/types.ts b/src/lib/types.ts new file mode 100644 index 0000000..3129f66 --- /dev/null +++ b/src/lib/types.ts @@ -0,0 +1,44 @@ +export type Ingredient = { + position: number; + quantity: number | null; + unit: string | null; + name: string; + note: string | null; + raw_text: string; +}; + +export type Step = { + position: number; + text: string; +}; + +export type Recipe = { + id: number | null; + title: string; + description: string | null; + source_url: string | null; + source_domain: string | null; + image_path: string | null; + servings_default: number | null; + servings_unit: string | null; + prep_time_min: number | null; + cook_time_min: number | null; + total_time_min: number | null; + cuisine: string | null; + category: string | null; + ingredients: Ingredient[]; + steps: Step[]; + tags: string[]; +}; + +export type Profile = { + id: number; + name: string; + avatar_emoji: string | null; +}; + +export type AllowedDomain = { + id: number; + domain: string; + display_name: string | null; +};