@cravery/core 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/ai/flow.d.ts +1 -1
- package/dist/lib/ai/flow.d.ts.map +1 -1
- package/dist/lib/ai/flow.js +11 -11
- package/dist/lib/ai/flow.js.map +1 -1
- package/dist/lib/api.d.ts +1 -1
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +2 -2
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/utils/sanitize.d.ts +1 -1
- package/dist/lib/utils/sanitize.d.ts.map +1 -1
- package/dist/types/ai/recipe.d.ts +20 -3
- package/dist/types/ai/recipe.d.ts.map +1 -1
- package/dist/types/ai/recipe.js +14 -14
- package/dist/types/ai/recipe.js.map +1 -1
- package/dist/types/ai/translation.d.ts +10 -3
- package/dist/types/ai/translation.d.ts.map +1 -1
- package/dist/types/ai/translation.js +8 -8
- package/dist/types/ai/translation.js.map +1 -1
- package/dist/types/core/asset.d.ts +8 -3
- package/dist/types/core/asset.d.ts.map +1 -1
- package/dist/types/core/asset.js +6 -6
- package/dist/types/core/asset.js.map +1 -1
- package/dist/types/core/enums/image_type.d.ts +1 -1
- package/dist/types/core/enums/image_type.d.ts.map +1 -1
- package/dist/types/core/enums/image_type.js +2 -2
- package/dist/types/core/enums/image_type.js.map +1 -1
- package/dist/types/core/enums/locale.d.ts +1 -1
- package/dist/types/core/enums/locale.d.ts.map +1 -1
- package/dist/types/core/enums/locale.js +2 -2
- package/dist/types/core/enums/locale.js.map +1 -1
- package/dist/types/core/enums/measurement_system.d.ts +1 -1
- package/dist/types/core/enums/measurement_system.d.ts.map +1 -1
- package/dist/types/core/enums/measurement_system.js +2 -2
- package/dist/types/core/enums/measurement_system.js.map +1 -1
- package/dist/types/core/enums/theme.d.ts +1 -1
- package/dist/types/core/enums/theme.d.ts.map +1 -1
- package/dist/types/core/enums/theme.js +2 -2
- package/dist/types/core/enums/theme.js.map +1 -1
- package/dist/types/core/enums/url_type.d.ts +1 -1
- package/dist/types/core/enums/url_type.d.ts.map +1 -1
- package/dist/types/core/enums/url_type.js +2 -2
- package/dist/types/core/enums/url_type.js.map +1 -1
- package/dist/types/core/settings.d.ts +24 -4
- package/dist/types/core/settings.d.ts.map +1 -1
- package/dist/types/core/settings.js +14 -14
- package/dist/types/core/settings.js.map +1 -1
- package/dist/types/iam/enums/profile_status.d.ts +1 -1
- package/dist/types/iam/enums/profile_status.d.ts.map +1 -1
- package/dist/types/iam/enums/profile_status.js +2 -2
- package/dist/types/iam/enums/profile_status.js.map +1 -1
- package/dist/types/iam/enums/subscription_role.d.ts +1 -1
- package/dist/types/iam/enums/subscription_role.d.ts.map +1 -1
- package/dist/types/iam/enums/subscription_role.js +2 -2
- package/dist/types/iam/enums/subscription_role.js.map +1 -1
- package/dist/types/iam/enums/subscription_status.d.ts +1 -1
- package/dist/types/iam/enums/subscription_status.d.ts.map +1 -1
- package/dist/types/iam/enums/subscription_status.js +2 -2
- package/dist/types/iam/enums/subscription_status.js.map +1 -1
- package/dist/types/iam/enums/subscription_tier.d.ts +1 -1
- package/dist/types/iam/enums/subscription_tier.d.ts.map +1 -1
- package/dist/types/iam/enums/subscription_tier.js +2 -2
- package/dist/types/iam/enums/subscription_tier.js.map +1 -1
- package/dist/types/iam/enums/user_role.d.ts +1 -1
- package/dist/types/iam/enums/user_role.d.ts.map +1 -1
- package/dist/types/iam/enums/user_role.js +2 -2
- package/dist/types/iam/enums/user_role.js.map +1 -1
- package/dist/types/iam/enums/user_status.d.ts +1 -1
- package/dist/types/iam/enums/user_status.d.ts.map +1 -1
- package/dist/types/iam/enums/user_status.js +2 -2
- package/dist/types/iam/enums/user_status.js.map +1 -1
- package/dist/types/iam/profile.d.ts +21 -4
- package/dist/types/iam/profile.d.ts.map +1 -1
- package/dist/types/iam/profile.js +17 -17
- package/dist/types/iam/profile.js.map +1 -1
- package/dist/types/iam/subscription.d.ts +17 -4
- package/dist/types/iam/subscription.d.ts.map +1 -1
- package/dist/types/iam/subscription.js +11 -11
- package/dist/types/iam/subscription.js.map +1 -1
- package/dist/types/iam/user.d.ts +15 -3
- package/dist/types/iam/user.d.ts.map +1 -1
- package/dist/types/iam/user.js +10 -10
- package/dist/types/iam/user.js.map +1 -1
- package/dist/types/moderation/enums/moderation_status.d.ts +1 -1
- package/dist/types/moderation/enums/moderation_status.d.ts.map +1 -1
- package/dist/types/moderation/enums/moderation_status.js +2 -2
- package/dist/types/moderation/enums/moderation_status.js.map +1 -1
- package/dist/types/moderation/enums/priority.d.ts +1 -1
- package/dist/types/moderation/enums/priority.d.ts.map +1 -1
- package/dist/types/moderation/enums/priority.js +2 -2
- package/dist/types/moderation/enums/priority.js.map +1 -1
- package/dist/types/moderation/enums/severity.d.ts +1 -1
- package/dist/types/moderation/enums/severity.d.ts.map +1 -1
- package/dist/types/moderation/enums/severity.js +2 -2
- package/dist/types/moderation/enums/severity.js.map +1 -1
- package/dist/types/moderation/enums/suggestion_category.d.ts +1 -1
- package/dist/types/moderation/enums/suggestion_category.d.ts.map +1 -1
- package/dist/types/moderation/enums/suggestion_category.js +2 -2
- package/dist/types/moderation/enums/suggestion_category.js.map +1 -1
- package/dist/types/moderation/moderation.d.ts +34 -6
- package/dist/types/moderation/moderation.d.ts.map +1 -1
- package/dist/types/moderation/moderation.js +25 -25
- package/dist/types/moderation/moderation.js.map +1 -1
- package/dist/types/recipe/enums/allergen.d.ts +1 -1
- package/dist/types/recipe/enums/allergen.d.ts.map +1 -1
- package/dist/types/recipe/enums/allergen.js +2 -2
- package/dist/types/recipe/enums/allergen.js.map +1 -1
- package/dist/types/recipe/enums/cuisine.d.ts +1 -1
- package/dist/types/recipe/enums/cuisine.d.ts.map +1 -1
- package/dist/types/recipe/enums/cuisine.js +2 -2
- package/dist/types/recipe/enums/cuisine.js.map +1 -1
- package/dist/types/recipe/enums/dietary_tag.d.ts +1 -1
- package/dist/types/recipe/enums/dietary_tag.d.ts.map +1 -1
- package/dist/types/recipe/enums/dietary_tag.js +2 -2
- package/dist/types/recipe/enums/dietary_tag.js.map +1 -1
- package/dist/types/recipe/enums/difficulty.d.ts +1 -1
- package/dist/types/recipe/enums/difficulty.d.ts.map +1 -1
- package/dist/types/recipe/enums/difficulty.js +2 -2
- package/dist/types/recipe/enums/difficulty.js.map +1 -1
- package/dist/types/recipe/enums/meal_type.d.ts +1 -1
- package/dist/types/recipe/enums/meal_type.d.ts.map +1 -1
- package/dist/types/recipe/enums/meal_type.js +2 -2
- package/dist/types/recipe/enums/meal_type.js.map +1 -1
- package/dist/types/recipe/enums/recipe_source.d.ts +1 -1
- package/dist/types/recipe/enums/recipe_source.d.ts.map +1 -1
- package/dist/types/recipe/enums/recipe_source.js +2 -2
- package/dist/types/recipe/enums/recipe_source.js.map +1 -1
- package/dist/types/recipe/enums/recipe_status.d.ts +1 -1
- package/dist/types/recipe/enums/recipe_status.d.ts.map +1 -1
- package/dist/types/recipe/enums/recipe_status.js +2 -2
- package/dist/types/recipe/enums/recipe_status.js.map +1 -1
- package/dist/types/recipe/enums/spiciness.d.ts +1 -1
- package/dist/types/recipe/enums/spiciness.d.ts.map +1 -1
- package/dist/types/recipe/enums/spiciness.js +2 -2
- package/dist/types/recipe/enums/spiciness.js.map +1 -1
- package/dist/types/recipe/enums/temperature_unit.d.ts +1 -1
- package/dist/types/recipe/enums/temperature_unit.d.ts.map +1 -1
- package/dist/types/recipe/enums/temperature_unit.js +2 -2
- package/dist/types/recipe/enums/temperature_unit.js.map +1 -1
- package/dist/types/recipe/enums/unit.d.ts +1 -1
- package/dist/types/recipe/enums/unit.d.ts.map +1 -1
- package/dist/types/recipe/enums/unit.js +2 -2
- package/dist/types/recipe/enums/unit.js.map +1 -1
- package/dist/types/recipe/equipment.d.ts +10 -5
- package/dist/types/recipe/equipment.d.ts.map +1 -1
- package/dist/types/recipe/equipment.js +9 -9
- package/dist/types/recipe/equipment.js.map +1 -1
- package/dist/types/recipe/filters.d.ts +12 -3
- package/dist/types/recipe/filters.d.ts.map +1 -1
- package/dist/types/recipe/filters.js +8 -8
- package/dist/types/recipe/filters.js.map +1 -1
- package/dist/types/recipe/ingredient.d.ts +25 -8
- package/dist/types/recipe/ingredient.d.ts.map +1 -1
- package/dist/types/recipe/ingredient.js +21 -21
- package/dist/types/recipe/ingredient.js.map +1 -1
- package/dist/types/recipe/instruction.d.ts +11 -5
- package/dist/types/recipe/instruction.d.ts.map +1 -1
- package/dist/types/recipe/instruction.js +8 -8
- package/dist/types/recipe/instruction.js.map +1 -1
- package/dist/types/recipe/nutrition.d.ts +12 -3
- package/dist/types/recipe/nutrition.d.ts.map +1 -1
- package/dist/types/recipe/nutrition.js +11 -15
- package/dist/types/recipe/nutrition.js.map +1 -1
- package/dist/types/recipe/recipe.d.ts +77 -6
- package/dist/types/recipe/recipe.d.ts.map +1 -1
- package/dist/types/recipe/recipe.js +53 -53
- package/dist/types/recipe/recipe.js.map +1 -1
- package/dist/types/recipe/temperature.d.ts +6 -3
- package/dist/types/recipe/temperature.d.ts.map +1 -1
- package/dist/types/recipe/temperature.js +3 -3
- package/dist/types/recipe/temperature.js.map +1 -1
- package/dist/types/report/enums/report_priority.d.ts +1 -1
- package/dist/types/report/enums/report_priority.d.ts.map +1 -1
- package/dist/types/report/enums/report_priority.js +2 -2
- package/dist/types/report/enums/report_priority.js.map +1 -1
- package/dist/types/report/enums/report_status.d.ts +1 -1
- package/dist/types/report/enums/report_status.d.ts.map +1 -1
- package/dist/types/report/enums/report_status.js +2 -2
- package/dist/types/report/enums/report_status.js.map +1 -1
- package/dist/types/report/enums/report_target_type.d.ts +1 -1
- package/dist/types/report/enums/report_target_type.d.ts.map +1 -1
- package/dist/types/report/enums/report_target_type.js +2 -2
- package/dist/types/report/enums/report_target_type.js.map +1 -1
- package/dist/types/report/enums/report_type.d.ts +1 -1
- package/dist/types/report/enums/report_type.d.ts.map +1 -1
- package/dist/types/report/enums/report_type.js +2 -2
- package/dist/types/report/enums/report_type.js.map +1 -1
- package/dist/types/report/report.d.ts +28 -4
- package/dist/types/report/report.d.ts.map +1 -1
- package/dist/types/report/report.js +20 -20
- package/dist/types/report/report.js.map +1 -1
- package/package.json +56 -57
- package/src/lib/ai/flow.ts +89 -89
- package/src/lib/api.ts +103 -103
- package/src/lib/utils/sanitize.ts +38 -38
- package/src/types/ai/recipe.ts +61 -34
- package/src/types/ai/translation.ts +27 -16
- package/src/types/core/asset.ts +17 -11
- package/src/types/core/enums/image_type.ts +5 -5
- package/src/types/core/enums/locale.ts +5 -5
- package/src/types/core/enums/measurement_system.ts +5 -5
- package/src/types/core/enums/theme.ts +5 -5
- package/src/types/core/enums/url_type.ts +13 -13
- package/src/types/core/settings.ts +61 -35
- package/src/types/iam/enums/profile_status.ts +10 -10
- package/src/types/iam/enums/subscription_role.ts +5 -5
- package/src/types/iam/enums/subscription_status.ts +10 -10
- package/src/types/iam/enums/subscription_tier.ts +4 -4
- package/src/types/iam/enums/user_role.ts +11 -11
- package/src/types/iam/enums/user_status.ts +10 -10
- package/src/types/iam/profile.ts +45 -26
- package/src/types/iam/subscription.ts +45 -27
- package/src/types/iam/user.ts +29 -17
- package/src/types/moderation/enums/moderation_status.ts +9 -9
- package/src/types/moderation/enums/priority.ts +5 -5
- package/src/types/moderation/enums/severity.ts +5 -5
- package/src/types/moderation/enums/suggestion_category.ts +11 -11
- package/src/types/moderation/moderation.ts +87 -50
- package/src/types/recipe/enums/allergen.ts +19 -19
- package/src/types/recipe/enums/cuisine.ts +39 -39
- package/src/types/recipe/enums/dietary_tag.ts +21 -21
- package/src/types/recipe/enums/difficulty.ts +10 -10
- package/src/types/recipe/enums/meal_type.ts +14 -14
- package/src/types/recipe/enums/recipe_source.ts +5 -5
- package/src/types/recipe/enums/recipe_status.ts +12 -12
- package/src/types/recipe/enums/spiciness.ts +5 -5
- package/src/types/recipe/enums/temperature_unit.ts +5 -5
- package/src/types/recipe/enums/unit.ts +51 -51
- package/src/types/recipe/equipment.ts +31 -21
- package/src/types/recipe/filters.ts +35 -20
- package/src/types/recipe/ingredient.ts +70 -46
- package/src/types/recipe/instruction.ts +31 -21
- package/src/types/recipe/nutrition.ts +29 -18
- package/src/types/recipe/recipe.ts +198 -109
- package/src/types/recipe/temperature.ts +12 -8
- package/src/types/report/enums/report_priority.ts +10 -10
- package/src/types/report/enums/report_status.ts +10 -10
- package/src/types/report/enums/report_target_type.ts +10 -10
- package/src/types/report/enums/report_type.ts +12 -12
- package/src/types/report/report.ts +68 -38
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const ALLERGEN_VALUES = [
|
|
4
|
-
"celery",
|
|
5
|
-
"dairy",
|
|
6
|
-
"eggs",
|
|
7
|
-
"fish",
|
|
8
|
-
"gluten",
|
|
9
|
-
"lupin",
|
|
10
|
-
"mustard",
|
|
11
|
-
"nuts",
|
|
12
|
-
"peanuts",
|
|
13
|
-
"sesame",
|
|
14
|
-
"shellfish",
|
|
15
|
-
"soy",
|
|
16
|
-
"sulfites",
|
|
17
|
-
] as const;
|
|
18
|
-
export const AllergenSchema = z.enum(ALLERGEN_VALUES);
|
|
19
|
-
export type Allergen = (typeof ALLERGEN_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const ALLERGEN_VALUES = [
|
|
4
|
+
"celery",
|
|
5
|
+
"dairy",
|
|
6
|
+
"eggs",
|
|
7
|
+
"fish",
|
|
8
|
+
"gluten",
|
|
9
|
+
"lupin",
|
|
10
|
+
"mustard",
|
|
11
|
+
"nuts",
|
|
12
|
+
"peanuts",
|
|
13
|
+
"sesame",
|
|
14
|
+
"shellfish",
|
|
15
|
+
"soy",
|
|
16
|
+
"sulfites",
|
|
17
|
+
] as const;
|
|
18
|
+
export const AllergenSchema = z.enum(ALLERGEN_VALUES);
|
|
19
|
+
export type Allergen = (typeof ALLERGEN_VALUES)[number];
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const CUISINE_VALUES = [
|
|
4
|
-
"african",
|
|
5
|
-
"american",
|
|
6
|
-
"brazilian",
|
|
7
|
-
"british",
|
|
8
|
-
"caribbean",
|
|
9
|
-
"chinese",
|
|
10
|
-
"egyptian",
|
|
11
|
-
"emirati",
|
|
12
|
-
"ethiopian",
|
|
13
|
-
"filipino",
|
|
14
|
-
"french",
|
|
15
|
-
"fusion",
|
|
16
|
-
"german",
|
|
17
|
-
"greek",
|
|
18
|
-
"indian",
|
|
19
|
-
"indonesian",
|
|
20
|
-
"italian",
|
|
21
|
-
"japanese",
|
|
22
|
-
"korean",
|
|
23
|
-
"lebanese",
|
|
24
|
-
"malaysian",
|
|
25
|
-
"mexican",
|
|
26
|
-
"moroccan",
|
|
27
|
-
"pakistani",
|
|
28
|
-
"persian",
|
|
29
|
-
"russian",
|
|
30
|
-
"saudi",
|
|
31
|
-
"spanish",
|
|
32
|
-
"sudanese",
|
|
33
|
-
"thai",
|
|
34
|
-
"turkish",
|
|
35
|
-
"vietnamese",
|
|
36
|
-
"other",
|
|
37
|
-
] as const;
|
|
38
|
-
export const CuisineSchema = z.enum(CUISINE_VALUES);
|
|
39
|
-
export type Cuisine = (typeof CUISINE_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const CUISINE_VALUES = [
|
|
4
|
+
"african",
|
|
5
|
+
"american",
|
|
6
|
+
"brazilian",
|
|
7
|
+
"british",
|
|
8
|
+
"caribbean",
|
|
9
|
+
"chinese",
|
|
10
|
+
"egyptian",
|
|
11
|
+
"emirati",
|
|
12
|
+
"ethiopian",
|
|
13
|
+
"filipino",
|
|
14
|
+
"french",
|
|
15
|
+
"fusion",
|
|
16
|
+
"german",
|
|
17
|
+
"greek",
|
|
18
|
+
"indian",
|
|
19
|
+
"indonesian",
|
|
20
|
+
"italian",
|
|
21
|
+
"japanese",
|
|
22
|
+
"korean",
|
|
23
|
+
"lebanese",
|
|
24
|
+
"malaysian",
|
|
25
|
+
"mexican",
|
|
26
|
+
"moroccan",
|
|
27
|
+
"pakistani",
|
|
28
|
+
"persian",
|
|
29
|
+
"russian",
|
|
30
|
+
"saudi",
|
|
31
|
+
"spanish",
|
|
32
|
+
"sudanese",
|
|
33
|
+
"thai",
|
|
34
|
+
"turkish",
|
|
35
|
+
"vietnamese",
|
|
36
|
+
"other",
|
|
37
|
+
] as const;
|
|
38
|
+
export const CuisineSchema = z.enum(CUISINE_VALUES);
|
|
39
|
+
export type Cuisine = (typeof CUISINE_VALUES)[number];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const DIETARY_TAG_VALUES = [
|
|
4
|
-
"dairy_free",
|
|
5
|
-
"egg_free",
|
|
6
|
-
"gluten_free",
|
|
7
|
-
"halal",
|
|
8
|
-
"high_protein",
|
|
9
|
-
"keto",
|
|
10
|
-
"low_carb",
|
|
11
|
-
"low_fat",
|
|
12
|
-
"low_sodium",
|
|
13
|
-
"low_sugar",
|
|
14
|
-
"nut_free",
|
|
15
|
-
"pescatarian",
|
|
16
|
-
"soy_free",
|
|
17
|
-
"vegan",
|
|
18
|
-
"vegetarian",
|
|
19
|
-
] as const;
|
|
20
|
-
export const DietaryTagSchema = z.enum(DIETARY_TAG_VALUES);
|
|
21
|
-
export type DietaryTag = (typeof DIETARY_TAG_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const DIETARY_TAG_VALUES = [
|
|
4
|
+
"dairy_free",
|
|
5
|
+
"egg_free",
|
|
6
|
+
"gluten_free",
|
|
7
|
+
"halal",
|
|
8
|
+
"high_protein",
|
|
9
|
+
"keto",
|
|
10
|
+
"low_carb",
|
|
11
|
+
"low_fat",
|
|
12
|
+
"low_sodium",
|
|
13
|
+
"low_sugar",
|
|
14
|
+
"nut_free",
|
|
15
|
+
"pescatarian",
|
|
16
|
+
"soy_free",
|
|
17
|
+
"vegan",
|
|
18
|
+
"vegetarian",
|
|
19
|
+
] as const;
|
|
20
|
+
export const DietaryTagSchema = z.enum(DIETARY_TAG_VALUES);
|
|
21
|
+
export type DietaryTag = (typeof DIETARY_TAG_VALUES)[number];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const DIFFICULTY_VALUES = [
|
|
4
|
-
"beginner",
|
|
5
|
-
"intermediate",
|
|
6
|
-
"advanced",
|
|
7
|
-
"expert",
|
|
8
|
-
] as const;
|
|
9
|
-
export const DifficultySchema = z.enum(DIFFICULTY_VALUES);
|
|
10
|
-
export type Difficulty = (typeof DIFFICULTY_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const DIFFICULTY_VALUES = [
|
|
4
|
+
"beginner",
|
|
5
|
+
"intermediate",
|
|
6
|
+
"advanced",
|
|
7
|
+
"expert",
|
|
8
|
+
] as const;
|
|
9
|
+
export const DifficultySchema = z.enum(DIFFICULTY_VALUES);
|
|
10
|
+
export type Difficulty = (typeof DIFFICULTY_VALUES)[number];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const MEAL_TYPE_VALUES = [
|
|
4
|
-
"appetizer",
|
|
5
|
-
"breakfast",
|
|
6
|
-
"brunch",
|
|
7
|
-
"dessert",
|
|
8
|
-
"dinner",
|
|
9
|
-
"drink",
|
|
10
|
-
"lunch",
|
|
11
|
-
"snack",
|
|
12
|
-
] as const;
|
|
13
|
-
export const MealTypeSchema = z.enum(MEAL_TYPE_VALUES);
|
|
14
|
-
export type MealType = (typeof MEAL_TYPE_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const MEAL_TYPE_VALUES = [
|
|
4
|
+
"appetizer",
|
|
5
|
+
"breakfast",
|
|
6
|
+
"brunch",
|
|
7
|
+
"dessert",
|
|
8
|
+
"dinner",
|
|
9
|
+
"drink",
|
|
10
|
+
"lunch",
|
|
11
|
+
"snack",
|
|
12
|
+
] as const;
|
|
13
|
+
export const MealTypeSchema = z.enum(MEAL_TYPE_VALUES);
|
|
14
|
+
export type MealType = (typeof MEAL_TYPE_VALUES)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const RECIPE_SOURCE_VALUES = ["image", "text", "url"] as const;
|
|
4
|
-
export const RecipeSourceSchema = z.enum(RECIPE_SOURCE_VALUES);
|
|
5
|
-
export type RecipeSource = (typeof RECIPE_SOURCE_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const RECIPE_SOURCE_VALUES = ["image", "text", "url"] as const;
|
|
4
|
+
export const RecipeSourceSchema = z.enum(RECIPE_SOURCE_VALUES);
|
|
5
|
+
export type RecipeSource = (typeof RECIPE_SOURCE_VALUES)[number];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const RECIPE_STATUS_VALUES = [
|
|
4
|
-
"active",
|
|
5
|
-
"archived",
|
|
6
|
-
"deleted",
|
|
7
|
-
"flagged",
|
|
8
|
-
"pending",
|
|
9
|
-
"rejected",
|
|
10
|
-
] as const;
|
|
11
|
-
export const RecipeStatusSchema = z.enum(RECIPE_STATUS_VALUES);
|
|
12
|
-
export type RecipeStatus = (typeof RECIPE_STATUS_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const RECIPE_STATUS_VALUES = [
|
|
4
|
+
"active",
|
|
5
|
+
"archived",
|
|
6
|
+
"deleted",
|
|
7
|
+
"flagged",
|
|
8
|
+
"pending",
|
|
9
|
+
"rejected",
|
|
10
|
+
] as const;
|
|
11
|
+
export const RecipeStatusSchema = z.enum(RECIPE_STATUS_VALUES);
|
|
12
|
+
export type RecipeStatus = (typeof RECIPE_STATUS_VALUES)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const SPICINESS_VALUES = ["none", "mild", "medium", "hot"] as const;
|
|
4
|
-
export const SpicinessSchema = z.enum(SPICINESS_VALUES);
|
|
5
|
-
export type Spiciness = (typeof SPICINESS_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const SPICINESS_VALUES = ["none", "mild", "medium", "hot"] as const;
|
|
4
|
+
export const SpicinessSchema = z.enum(SPICINESS_VALUES);
|
|
5
|
+
export type Spiciness = (typeof SPICINESS_VALUES)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const TEMPERATURE_UNIT_VALUES = ["celsius", "fahrenheit"] as const;
|
|
4
|
-
export const TemperatureUnitSchema = z.enum(TEMPERATURE_UNIT_VALUES);
|
|
5
|
-
export type TemperatureUnit = (typeof TEMPERATURE_UNIT_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const TEMPERATURE_UNIT_VALUES = ["celsius", "fahrenheit"] as const;
|
|
4
|
+
export const TemperatureUnitSchema = z.enum(TEMPERATURE_UNIT_VALUES);
|
|
5
|
+
export type TemperatureUnit = (typeof TEMPERATURE_UNIT_VALUES)[number];
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
|
|
3
|
-
export const UNIT_VALUES = [
|
|
4
|
-
// Volume (metric)
|
|
5
|
-
"ml",
|
|
6
|
-
"l",
|
|
7
|
-
// Volume (imperial)
|
|
8
|
-
"tsp",
|
|
9
|
-
"tbsp",
|
|
10
|
-
"fl_oz",
|
|
11
|
-
"cup",
|
|
12
|
-
"pint",
|
|
13
|
-
"quart",
|
|
14
|
-
"gallon",
|
|
15
|
-
// Weight (metric)
|
|
16
|
-
"mg",
|
|
17
|
-
"g",
|
|
18
|
-
"kg",
|
|
19
|
-
// Weight (imperial)
|
|
20
|
-
"oz",
|
|
21
|
-
"lb",
|
|
22
|
-
// Count/portion
|
|
23
|
-
"piece",
|
|
24
|
-
"whole",
|
|
25
|
-
"half",
|
|
26
|
-
"quarter",
|
|
27
|
-
"slice",
|
|
28
|
-
"serving",
|
|
29
|
-
// Produce-specific
|
|
30
|
-
"clove",
|
|
31
|
-
"stalk",
|
|
32
|
-
"sprig",
|
|
33
|
-
"leaf",
|
|
34
|
-
"bunch",
|
|
35
|
-
"head",
|
|
36
|
-
"fillet",
|
|
37
|
-
"stick",
|
|
38
|
-
"sheet",
|
|
39
|
-
// Container
|
|
40
|
-
"can",
|
|
41
|
-
"package",
|
|
42
|
-
"bottle",
|
|
43
|
-
"jar",
|
|
44
|
-
// Imprecise
|
|
45
|
-
"handful",
|
|
46
|
-
"pinch",
|
|
47
|
-
"dash",
|
|
48
|
-
"drop",
|
|
49
|
-
] as const;
|
|
50
|
-
export const UnitSchema = z.enum(UNIT_VALUES);
|
|
51
|
-
export type Unit = (typeof UNIT_VALUES)[number];
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
|
|
3
|
+
export const UNIT_VALUES = [
|
|
4
|
+
// Volume (metric)
|
|
5
|
+
"ml",
|
|
6
|
+
"l",
|
|
7
|
+
// Volume (imperial)
|
|
8
|
+
"tsp",
|
|
9
|
+
"tbsp",
|
|
10
|
+
"fl_oz",
|
|
11
|
+
"cup",
|
|
12
|
+
"pint",
|
|
13
|
+
"quart",
|
|
14
|
+
"gallon",
|
|
15
|
+
// Weight (metric)
|
|
16
|
+
"mg",
|
|
17
|
+
"g",
|
|
18
|
+
"kg",
|
|
19
|
+
// Weight (imperial)
|
|
20
|
+
"oz",
|
|
21
|
+
"lb",
|
|
22
|
+
// Count/portion
|
|
23
|
+
"piece",
|
|
24
|
+
"whole",
|
|
25
|
+
"half",
|
|
26
|
+
"quarter",
|
|
27
|
+
"slice",
|
|
28
|
+
"serving",
|
|
29
|
+
// Produce-specific
|
|
30
|
+
"clove",
|
|
31
|
+
"stalk",
|
|
32
|
+
"sprig",
|
|
33
|
+
"leaf",
|
|
34
|
+
"bunch",
|
|
35
|
+
"head",
|
|
36
|
+
"fillet",
|
|
37
|
+
"stick",
|
|
38
|
+
"sheet",
|
|
39
|
+
// Container
|
|
40
|
+
"can",
|
|
41
|
+
"package",
|
|
42
|
+
"bottle",
|
|
43
|
+
"jar",
|
|
44
|
+
// Imprecise
|
|
45
|
+
"handful",
|
|
46
|
+
"pinch",
|
|
47
|
+
"dash",
|
|
48
|
+
"drop",
|
|
49
|
+
] as const;
|
|
50
|
+
export const UnitSchema = z.enum(UNIT_VALUES);
|
|
51
|
+
export type Unit = (typeof UNIT_VALUES)[number];
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
import { SLUG_REGEX } from "../../config";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
required
|
|
6
|
-
slug:
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
import { SLUG_REGEX } from "../../config";
|
|
3
|
+
|
|
4
|
+
export interface EquipmentMeta {
|
|
5
|
+
required?: boolean;
|
|
6
|
+
slug: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const EquipmentMetaSchema = z.object({
|
|
10
|
+
required: z.boolean().optional(),
|
|
11
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
12
|
+
}) satisfies z.ZodType<EquipmentMeta>;
|
|
13
|
+
|
|
14
|
+
export interface EquipmentContent {
|
|
15
|
+
name: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const EquipmentContentSchema = z.object({
|
|
21
|
+
name: z.string().min(1).max(100),
|
|
22
|
+
notes: z.string().max(200).optional(),
|
|
23
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
24
|
+
}) satisfies z.ZodType<EquipmentContent>;
|
|
25
|
+
|
|
26
|
+
export interface Equipment extends EquipmentMeta, EquipmentContent {}
|
|
27
|
+
|
|
28
|
+
export const EquipmentSchema = z.object({
|
|
29
|
+
...EquipmentMetaSchema.shape,
|
|
30
|
+
...EquipmentContentSchema.shape,
|
|
31
|
+
}) satisfies z.ZodType<Equipment>;
|
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
import {
|
|
3
|
-
CuisineSchema,
|
|
4
|
-
DietaryTagSchema,
|
|
5
|
-
DifficultySchema,
|
|
6
|
-
MealTypeSchema,
|
|
7
|
-
SpicinessSchema,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
import {
|
|
3
|
+
CuisineSchema,
|
|
4
|
+
DietaryTagSchema,
|
|
5
|
+
DifficultySchema,
|
|
6
|
+
MealTypeSchema,
|
|
7
|
+
SpicinessSchema,
|
|
8
|
+
type Cuisine,
|
|
9
|
+
type DietaryTag,
|
|
10
|
+
type Difficulty,
|
|
11
|
+
type MealType,
|
|
12
|
+
type Spiciness,
|
|
13
|
+
} from "./enums";
|
|
14
|
+
|
|
15
|
+
export interface RecipeFilters {
|
|
16
|
+
cuisines?: Cuisine[];
|
|
17
|
+
dietaryTags?: DietaryTag[];
|
|
18
|
+
difficulty?: Difficulty;
|
|
19
|
+
excludeIngredients?: string[];
|
|
20
|
+
includeIngredients?: string[];
|
|
21
|
+
mealTypes?: MealType[];
|
|
22
|
+
spiciness?: Spiciness;
|
|
23
|
+
timeLimit?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const RecipeFiltersSchema = z.object({
|
|
27
|
+
cuisines: z.array(CuisineSchema).optional(),
|
|
28
|
+
dietaryTags: z.array(DietaryTagSchema).optional(),
|
|
29
|
+
difficulty: DifficultySchema.optional(),
|
|
30
|
+
excludeIngredients: z.array(z.string()).optional(),
|
|
31
|
+
includeIngredients: z.array(z.string()).optional(),
|
|
32
|
+
mealTypes: z.array(MealTypeSchema).optional(),
|
|
33
|
+
spiciness: SpicinessSchema.optional(),
|
|
34
|
+
timeLimit: z.number().int().min(5).max(300).optional(),
|
|
35
|
+
}) satisfies z.ZodType<RecipeFilters>;
|
|
@@ -1,46 +1,70 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
import { SLUG_REGEX } from "../../config";
|
|
3
|
-
import { UnitSchema } from "./enums";
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
quantity
|
|
7
|
-
required
|
|
8
|
-
slug:
|
|
9
|
-
unit
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
slug: z.string().regex(SLUG_REGEX),
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
import { SLUG_REGEX } from "../../config";
|
|
3
|
+
import { UnitSchema, type Unit } from "./enums";
|
|
4
|
+
|
|
5
|
+
export interface IngredientMeta {
|
|
6
|
+
quantity?: number;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
slug: string;
|
|
9
|
+
unit?: Unit;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const IngredientMetaSchema = z.object({
|
|
13
|
+
quantity: z.number().positive().optional(),
|
|
14
|
+
required: z.boolean().optional(),
|
|
15
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
16
|
+
unit: UnitSchema.optional(),
|
|
17
|
+
}) satisfies z.ZodType<IngredientMeta>;
|
|
18
|
+
|
|
19
|
+
export interface IngredientContent {
|
|
20
|
+
name: string;
|
|
21
|
+
notes?: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const IngredientContentSchema = z.object({
|
|
26
|
+
name: z.string().min(1).max(100),
|
|
27
|
+
notes: z.string().max(200).optional(),
|
|
28
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
29
|
+
}) satisfies z.ZodType<IngredientContent>;
|
|
30
|
+
|
|
31
|
+
export interface Ingredient extends IngredientMeta, IngredientContent {}
|
|
32
|
+
|
|
33
|
+
export const IngredientSchema = z.object({
|
|
34
|
+
...IngredientMetaSchema.shape,
|
|
35
|
+
...IngredientContentSchema.shape,
|
|
36
|
+
}) satisfies z.ZodType<Ingredient>;
|
|
37
|
+
|
|
38
|
+
export interface IngredientSectionMeta {
|
|
39
|
+
ingredients: IngredientMeta[];
|
|
40
|
+
slug: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const IngredientSectionMetaSchema = z.object({
|
|
44
|
+
ingredients: z.array(IngredientMetaSchema).min(1),
|
|
45
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
46
|
+
}) satisfies z.ZodType<IngredientSectionMeta>;
|
|
47
|
+
|
|
48
|
+
export interface IngredientSectionContent {
|
|
49
|
+
ingredients: IngredientContent[];
|
|
50
|
+
slug: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const IngredientSectionContentSchema = z.object({
|
|
55
|
+
ingredients: z.array(IngredientContentSchema).min(1),
|
|
56
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
57
|
+
title: z.string().max(100).optional(),
|
|
58
|
+
}) satisfies z.ZodType<IngredientSectionContent>;
|
|
59
|
+
|
|
60
|
+
export interface IngredientSection {
|
|
61
|
+
ingredients: Ingredient[];
|
|
62
|
+
slug: string;
|
|
63
|
+
title?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const IngredientSectionSchema = z.object({
|
|
67
|
+
ingredients: z.array(IngredientSchema).min(1),
|
|
68
|
+
slug: z.string().regex(SLUG_REGEX),
|
|
69
|
+
title: z.string().max(100).optional(),
|
|
70
|
+
}) satisfies z.ZodType<IngredientSection>;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import { z } from "
|
|
2
|
-
import { TemperatureSchema } from "./temperature";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
duration
|
|
6
|
-
step:
|
|
7
|
-
temperature
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
step: z.number().int().positive(),
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
1
|
+
import { z } from "genkit";
|
|
2
|
+
import { TemperatureSchema, type Temperature } from "./temperature";
|
|
3
|
+
|
|
4
|
+
export interface InstructionMeta {
|
|
5
|
+
duration?: number;
|
|
6
|
+
step: number;
|
|
7
|
+
temperature?: Temperature;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const InstructionMetaSchema = z.object({
|
|
11
|
+
duration: z.number().int().positive().optional(),
|
|
12
|
+
step: z.number().int().positive(),
|
|
13
|
+
temperature: TemperatureSchema.optional(),
|
|
14
|
+
}) satisfies z.ZodType<InstructionMeta>;
|
|
15
|
+
|
|
16
|
+
export interface InstructionContent {
|
|
17
|
+
step: number;
|
|
18
|
+
text: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const InstructionContentSchema = z.object({
|
|
22
|
+
step: z.number().int().positive(),
|
|
23
|
+
text: z.string().min(1).max(1000),
|
|
24
|
+
}) satisfies z.ZodType<InstructionContent>;
|
|
25
|
+
|
|
26
|
+
export interface Instruction extends InstructionMeta, InstructionContent {}
|
|
27
|
+
|
|
28
|
+
export const InstructionSchema = z.object({
|
|
29
|
+
...InstructionMetaSchema.shape,
|
|
30
|
+
...InstructionContentSchema.shape,
|
|
31
|
+
}) satisfies z.ZodType<Instruction>;
|