feat(types): add shared type definitions
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
44
src/lib/types.ts
Normal file
44
src/lib/types.ts
Normal file
@@ -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;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user