-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
46 lines (40 loc) · 1.04 KB
/
types.ts
File metadata and controls
46 lines (40 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Shared TypeScript interfaces that describe recipes, forms, and UI state.
import { COOKING_TIMES, DISH_TYPES, LANGUAGES } from './constants';
export interface Recipe {
dishName: string;
description: string;
timeNeeded: string;
estimatedCost: string;
difficulty: string;
servings: string;
ingredients: {
name: string;
quantity: string;
}[];
instructions: string[];
analysis?: string;
}
export interface RecipeFormData {
ingredients: string[];
cookingTime: typeof COOKING_TIMES[number];
dishType: typeof DISH_TYPES[number];
language: typeof LANGUAGES[number];
}
export type RecipeSource = 'local' | 'onchain';
export interface SavedRecipe {
recipe: Recipe;
imageUrl: string;
source?: RecipeSource;
metadataUri?: string;
txHash?: string;
creator?: string;
createdAt?: number;
}
export type LoadingState = 'idle' | 'recipe' | 'transition' | 'image';
export interface AuthProfile {
address: string;
linkedGoogleId: string | null;
wallets: string[];
email?: string | null;
displayName?: string | null;
}