@cravery/core 0.0.21 → 0.0.22

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.
Files changed (63) hide show
  1. package/dist/lib/ai/embedding.d.ts +1 -1
  2. package/dist/lib/ai/embedding.d.ts.map +1 -1
  3. package/dist/lib/ai/embedding.js +12 -9
  4. package/dist/lib/ai/embedding.js.map +1 -1
  5. package/dist/lib/ai/genkit.d.ts +3 -3
  6. package/dist/lib/ai/genkit.d.ts.map +1 -1
  7. package/dist/lib/ai/genkit.js +12 -8
  8. package/dist/lib/ai/genkit.js.map +1 -1
  9. package/dist/types/core/settings.d.ts.map +1 -1
  10. package/dist/types/core/settings.js.map +1 -1
  11. package/dist/types/iam/user.d.ts.map +1 -1
  12. package/dist/types/iam/user.js.map +1 -1
  13. package/package.json +56 -56
  14. package/src/lib/ai/embedding.ts +15 -9
  15. package/src/lib/ai/flow.ts +89 -89
  16. package/src/lib/ai/genkit.ts +18 -12
  17. package/src/lib/api.ts +103 -103
  18. package/src/lib/utils/sanitize.ts +38 -38
  19. package/src/types/ai/recipe.ts +61 -61
  20. package/src/types/ai/translation.ts +27 -27
  21. package/src/types/core/asset.ts +17 -17
  22. package/src/types/core/enums/image_type.ts +5 -5
  23. package/src/types/core/enums/locale.ts +5 -5
  24. package/src/types/core/enums/measurement_system.ts +5 -5
  25. package/src/types/core/enums/theme.ts +5 -5
  26. package/src/types/core/enums/url_type.ts +13 -13
  27. package/src/types/core/settings.ts +68 -61
  28. package/src/types/iam/enums/profile_status.ts +10 -10
  29. package/src/types/iam/enums/subscription_role.ts +5 -5
  30. package/src/types/iam/enums/subscription_status.ts +10 -10
  31. package/src/types/iam/enums/subscription_tier.ts +4 -4
  32. package/src/types/iam/enums/user_role.ts +11 -11
  33. package/src/types/iam/enums/user_status.ts +10 -10
  34. package/src/types/iam/profile.ts +45 -45
  35. package/src/types/iam/subscription.ts +45 -45
  36. package/src/types/iam/user.ts +36 -31
  37. package/src/types/moderation/enums/moderation_status.ts +9 -9
  38. package/src/types/moderation/enums/priority.ts +5 -5
  39. package/src/types/moderation/enums/severity.ts +5 -5
  40. package/src/types/moderation/enums/suggestion_category.ts +11 -11
  41. package/src/types/moderation/moderation.ts +87 -87
  42. package/src/types/recipe/enums/allergen.ts +19 -19
  43. package/src/types/recipe/enums/cuisine.ts +39 -39
  44. package/src/types/recipe/enums/dietary_tag.ts +21 -21
  45. package/src/types/recipe/enums/difficulty.ts +10 -10
  46. package/src/types/recipe/enums/meal_type.ts +14 -14
  47. package/src/types/recipe/enums/recipe_source.ts +5 -5
  48. package/src/types/recipe/enums/recipe_status.ts +12 -12
  49. package/src/types/recipe/enums/spiciness.ts +5 -5
  50. package/src/types/recipe/enums/temperature_unit.ts +5 -5
  51. package/src/types/recipe/enums/unit.ts +51 -51
  52. package/src/types/recipe/equipment.ts +31 -31
  53. package/src/types/recipe/filters.ts +35 -35
  54. package/src/types/recipe/ingredient.ts +70 -70
  55. package/src/types/recipe/instruction.ts +31 -31
  56. package/src/types/recipe/nutrition.ts +29 -29
  57. package/src/types/recipe/recipe.ts +198 -198
  58. package/src/types/recipe/temperature.ts +12 -12
  59. package/src/types/report/enums/report_priority.ts +10 -10
  60. package/src/types/report/enums/report_status.ts +10 -10
  61. package/src/types/report/enums/report_target_type.ts +10 -10
  62. package/src/types/report/enums/report_type.ts +12 -12
  63. package/src/types/report/report.ts +68 -68
@@ -1,61 +1,68 @@
1
- import { z } from "genkit";
2
- import type { Timestamp } from "firebase-admin/firestore";
3
- import { LocaleSchema, MeasurementSystemSchema, ThemeSchema, type Locale, type MeasurementSystem, type Theme } from "./enums";
4
- import {
5
- AllergenSchema,
6
- CuisineSchema,
7
- DietaryTagSchema,
8
- SpicinessSchema,
9
- TemperatureUnitSchema,
10
- type Allergen,
11
- type Cuisine,
12
- type DietaryTag,
13
- type Spiciness,
14
- type TemperatureUnit,
15
- } from "../recipe";
16
-
17
- export interface NotificationSettings {
18
- email: boolean;
19
- push: boolean;
20
- marketing: boolean;
21
- weeklyDigest: boolean;
22
- }
23
-
24
- export const NotificationSettingsSchema = z.object({
25
- email: z.boolean(),
26
- push: z.boolean(),
27
- marketing: z.boolean(),
28
- weeklyDigest: z.boolean(),
29
- }) satisfies z.ZodType<NotificationSettings>;
30
-
31
- export interface Settings {
32
- id: string;
33
- allergens: Allergen[];
34
- dietaryTags: DietaryTag[];
35
- cuisines: Cuisine[];
36
- spiciness?: Spiciness;
37
- excludedIngredients: string[];
38
- locale: Locale;
39
- temperatureUnit: TemperatureUnit;
40
- measurementSystem: MeasurementSystem;
41
- theme: Theme;
42
- notifications: NotificationSettings;
43
- createdAt: Timestamp;
44
- updatedAt: Timestamp;
45
- }
46
-
47
- export const SettingsSchema = z.object({
48
- id: z.string(),
49
- allergens: z.array(AllergenSchema),
50
- dietaryTags: z.array(DietaryTagSchema),
51
- cuisines: z.array(CuisineSchema),
52
- spiciness: SpicinessSchema.optional(),
53
- excludedIngredients: z.array(z.string()),
54
- locale: LocaleSchema,
55
- temperatureUnit: TemperatureUnitSchema,
56
- measurementSystem: MeasurementSystemSchema,
57
- theme: ThemeSchema,
58
- notifications: NotificationSettingsSchema,
59
- createdAt: z.custom<Timestamp>(),
60
- updatedAt: z.custom<Timestamp>(),
61
- });
1
+ import { z } from "genkit";
2
+ import type { Timestamp } from "firebase-admin/firestore";
3
+ import {
4
+ LocaleSchema,
5
+ MeasurementSystemSchema,
6
+ ThemeSchema,
7
+ type Locale,
8
+ type MeasurementSystem,
9
+ type Theme,
10
+ } from "./enums";
11
+ import {
12
+ AllergenSchema,
13
+ CuisineSchema,
14
+ DietaryTagSchema,
15
+ SpicinessSchema,
16
+ TemperatureUnitSchema,
17
+ type Allergen,
18
+ type Cuisine,
19
+ type DietaryTag,
20
+ type Spiciness,
21
+ type TemperatureUnit,
22
+ } from "../recipe";
23
+
24
+ export interface NotificationSettings {
25
+ email: boolean;
26
+ push: boolean;
27
+ marketing: boolean;
28
+ weeklyDigest: boolean;
29
+ }
30
+
31
+ export const NotificationSettingsSchema = z.object({
32
+ email: z.boolean(),
33
+ push: z.boolean(),
34
+ marketing: z.boolean(),
35
+ weeklyDigest: z.boolean(),
36
+ }) satisfies z.ZodType<NotificationSettings>;
37
+
38
+ export interface Settings {
39
+ id: string;
40
+ allergens: Allergen[];
41
+ dietaryTags: DietaryTag[];
42
+ cuisines: Cuisine[];
43
+ spiciness?: Spiciness;
44
+ excludedIngredients: string[];
45
+ locale: Locale;
46
+ temperatureUnit: TemperatureUnit;
47
+ measurementSystem: MeasurementSystem;
48
+ theme: Theme;
49
+ notifications: NotificationSettings;
50
+ createdAt: Timestamp;
51
+ updatedAt: Timestamp;
52
+ }
53
+
54
+ export const SettingsSchema = z.object({
55
+ id: z.string(),
56
+ allergens: z.array(AllergenSchema),
57
+ dietaryTags: z.array(DietaryTagSchema),
58
+ cuisines: z.array(CuisineSchema),
59
+ spiciness: SpicinessSchema.optional(),
60
+ excludedIngredients: z.array(z.string()),
61
+ locale: LocaleSchema,
62
+ temperatureUnit: TemperatureUnitSchema,
63
+ measurementSystem: MeasurementSystemSchema,
64
+ theme: ThemeSchema,
65
+ notifications: NotificationSettingsSchema,
66
+ createdAt: z.custom<Timestamp>(),
67
+ updatedAt: z.custom<Timestamp>(),
68
+ });
@@ -1,10 +1,10 @@
1
- import { z } from "genkit";
2
-
3
- export const PROFILE_STATUS_VALUES = [
4
- "active",
5
- "deleted",
6
- "pending",
7
- "suspended",
8
- ] as const;
9
- export const ProfileStatusSchema = z.enum(PROFILE_STATUS_VALUES);
10
- export type ProfileStatus = (typeof PROFILE_STATUS_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const PROFILE_STATUS_VALUES = [
4
+ "active",
5
+ "deleted",
6
+ "pending",
7
+ "suspended",
8
+ ] as const;
9
+ export const ProfileStatusSchema = z.enum(PROFILE_STATUS_VALUES);
10
+ export type ProfileStatus = (typeof PROFILE_STATUS_VALUES)[number];
@@ -1,5 +1,5 @@
1
- import { z } from "genkit";
2
-
3
- export const SUBSCRIPTION_ROLE_VALUES = ["member", "owner"] as const;
4
- export const SubscriptionRoleSchema = z.enum(SUBSCRIPTION_ROLE_VALUES);
5
- export type SubscriptionRole = (typeof SUBSCRIPTION_ROLE_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const SUBSCRIPTION_ROLE_VALUES = ["member", "owner"] as const;
4
+ export const SubscriptionRoleSchema = z.enum(SUBSCRIPTION_ROLE_VALUES);
5
+ export type SubscriptionRole = (typeof SUBSCRIPTION_ROLE_VALUES)[number];
@@ -1,10 +1,10 @@
1
- import { z } from "genkit";
2
-
3
- export const SUBSCRIPTION_STATUS_VALUES = [
4
- "active",
5
- "deleted",
6
- "pending",
7
- "rejected",
8
- ] as const;
9
- export const SubscriptionStatusSchema = z.enum(SUBSCRIPTION_STATUS_VALUES);
10
- export type SubscriptionStatus = (typeof SUBSCRIPTION_STATUS_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const SUBSCRIPTION_STATUS_VALUES = [
4
+ "active",
5
+ "deleted",
6
+ "pending",
7
+ "rejected",
8
+ ] as const;
9
+ export const SubscriptionStatusSchema = z.enum(SUBSCRIPTION_STATUS_VALUES);
10
+ export type SubscriptionStatus = (typeof SUBSCRIPTION_STATUS_VALUES)[number];
@@ -1,4 +1,4 @@
1
- import { z } from "genkit";
2
-
3
- export const SubscriptionTierSchema = z.enum(["family", "free", "pro"]);
4
- export type SubscriptionTier = z.infer<typeof SubscriptionTierSchema>;
1
+ import { z } from "genkit";
2
+
3
+ export const SubscriptionTierSchema = z.enum(["family", "free", "pro"]);
4
+ export type SubscriptionTier = z.infer<typeof SubscriptionTierSchema>;
@@ -1,11 +1,11 @@
1
- import { z } from "genkit";
2
-
3
- export const USER_ROLE_VALUES = [
4
- "admin",
5
- "moderator",
6
- "translator",
7
- "user",
8
- "guest",
9
- ] as const;
10
- export const UserRoleSchema = z.enum(USER_ROLE_VALUES);
11
- export type UserRole = (typeof USER_ROLE_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const USER_ROLE_VALUES = [
4
+ "admin",
5
+ "moderator",
6
+ "translator",
7
+ "user",
8
+ "guest",
9
+ ] as const;
10
+ export const UserRoleSchema = z.enum(USER_ROLE_VALUES);
11
+ export type UserRole = (typeof USER_ROLE_VALUES)[number];
@@ -1,10 +1,10 @@
1
- import { z } from "genkit";
2
-
3
- export const USER_STATUS_VALUES = [
4
- "active",
5
- "deleted",
6
- "pending",
7
- "suspended",
8
- ] as const;
9
- export const UserStatusSchema = z.enum(USER_STATUS_VALUES);
10
- export type UserStatus = (typeof USER_STATUS_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const USER_STATUS_VALUES = [
4
+ "active",
5
+ "deleted",
6
+ "pending",
7
+ "suspended",
8
+ ] as const;
9
+ export const UserStatusSchema = z.enum(USER_STATUS_VALUES);
10
+ export type UserStatus = (typeof USER_STATUS_VALUES)[number];
@@ -1,45 +1,45 @@
1
- import { z } from "genkit";
2
- import type { Timestamp } from "firebase-admin/firestore";
3
- import { ProfileStatusSchema, type ProfileStatus } from "./enums";
4
-
5
- export interface Profile {
6
- bio?: string;
7
- createdAt: Timestamp;
8
- id: string;
9
- imageUrl?: string;
10
- name: string;
11
- public: boolean;
12
- status: ProfileStatus;
13
- updatedAt: Timestamp;
14
- verified: boolean;
15
- }
16
-
17
- export const ProfileSchema = z.object({
18
- bio: z.string().max(280).optional(),
19
- createdAt: z.custom<Timestamp>(),
20
- id: z.string(),
21
- imageUrl: z.string().url().optional(),
22
- name: z.string().min(1).max(50),
23
- public: z.boolean(),
24
- status: ProfileStatusSchema,
25
- updatedAt: z.custom<Timestamp>(),
26
- verified: z.boolean(),
27
- });
28
-
29
- export interface ProfileStats {
30
- followers: number;
31
- following: number;
32
- likes: number;
33
- recipes: number;
34
- saves: number;
35
- updatedAt: number;
36
- }
37
-
38
- export const ProfileStatsSchema = z.object({
39
- followers: z.number().int().nonnegative(),
40
- following: z.number().int().nonnegative(),
41
- likes: z.number().int().nonnegative(),
42
- recipes: z.number().int().nonnegative(),
43
- saves: z.number().int().nonnegative(),
44
- updatedAt: z.number().int(),
45
- }) satisfies z.ZodType<ProfileStats>;
1
+ import { z } from "genkit";
2
+ import type { Timestamp } from "firebase-admin/firestore";
3
+ import { ProfileStatusSchema, type ProfileStatus } from "./enums";
4
+
5
+ export interface Profile {
6
+ bio?: string;
7
+ createdAt: Timestamp;
8
+ id: string;
9
+ imageUrl?: string;
10
+ name: string;
11
+ public: boolean;
12
+ status: ProfileStatus;
13
+ updatedAt: Timestamp;
14
+ verified: boolean;
15
+ }
16
+
17
+ export const ProfileSchema = z.object({
18
+ bio: z.string().max(280).optional(),
19
+ createdAt: z.custom<Timestamp>(),
20
+ id: z.string(),
21
+ imageUrl: z.string().url().optional(),
22
+ name: z.string().min(1).max(50),
23
+ public: z.boolean(),
24
+ status: ProfileStatusSchema,
25
+ updatedAt: z.custom<Timestamp>(),
26
+ verified: z.boolean(),
27
+ });
28
+
29
+ export interface ProfileStats {
30
+ followers: number;
31
+ following: number;
32
+ likes: number;
33
+ recipes: number;
34
+ saves: number;
35
+ updatedAt: number;
36
+ }
37
+
38
+ export const ProfileStatsSchema = z.object({
39
+ followers: z.number().int().nonnegative(),
40
+ following: z.number().int().nonnegative(),
41
+ likes: z.number().int().nonnegative(),
42
+ recipes: z.number().int().nonnegative(),
43
+ saves: z.number().int().nonnegative(),
44
+ updatedAt: z.number().int(),
45
+ }) satisfies z.ZodType<ProfileStats>;
@@ -1,45 +1,45 @@
1
- import { z } from "genkit";
2
- import type { Timestamp } from "firebase-admin/firestore";
3
- import {
4
- SubscriptionRoleSchema,
5
- SubscriptionStatusSchema,
6
- SubscriptionTierSchema,
7
- type SubscriptionRole,
8
- type SubscriptionStatus,
9
- type SubscriptionTier,
10
- } from "./enums";
11
- import { MAX_MEMBERS_FAMILY_PLAN } from "../../config";
12
-
13
- export interface Member {
14
- userId: string;
15
- role: SubscriptionRole;
16
- status: SubscriptionStatus;
17
- invitedAt: Timestamp;
18
- joinedAt?: Timestamp;
19
- }
20
-
21
- export const MemberSchema = z.object({
22
- userId: z.string(),
23
- role: SubscriptionRoleSchema,
24
- status: SubscriptionStatusSchema,
25
- invitedAt: z.custom<Timestamp>(),
26
- joinedAt: z.custom<Timestamp>().optional(),
27
- });
28
-
29
- export interface Subscription {
30
- expiresAt: Timestamp;
31
- id: string;
32
- members?: Member[];
33
- providerId: string;
34
- tier: SubscriptionTier;
35
- updatedAt: Timestamp;
36
- }
37
-
38
- export const SubscriptionSchema = z.object({
39
- expiresAt: z.custom<Timestamp>(),
40
- id: z.string(),
41
- members: z.array(MemberSchema).max(MAX_MEMBERS_FAMILY_PLAN).optional(),
42
- providerId: z.string(),
43
- tier: SubscriptionTierSchema,
44
- updatedAt: z.custom<Timestamp>(),
45
- });
1
+ import { z } from "genkit";
2
+ import type { Timestamp } from "firebase-admin/firestore";
3
+ import {
4
+ SubscriptionRoleSchema,
5
+ SubscriptionStatusSchema,
6
+ SubscriptionTierSchema,
7
+ type SubscriptionRole,
8
+ type SubscriptionStatus,
9
+ type SubscriptionTier,
10
+ } from "./enums";
11
+ import { MAX_MEMBERS_FAMILY_PLAN } from "../../config";
12
+
13
+ export interface Member {
14
+ userId: string;
15
+ role: SubscriptionRole;
16
+ status: SubscriptionStatus;
17
+ invitedAt: Timestamp;
18
+ joinedAt?: Timestamp;
19
+ }
20
+
21
+ export const MemberSchema = z.object({
22
+ userId: z.string(),
23
+ role: SubscriptionRoleSchema,
24
+ status: SubscriptionStatusSchema,
25
+ invitedAt: z.custom<Timestamp>(),
26
+ joinedAt: z.custom<Timestamp>().optional(),
27
+ });
28
+
29
+ export interface Subscription {
30
+ expiresAt: Timestamp;
31
+ id: string;
32
+ members?: Member[];
33
+ providerId: string;
34
+ tier: SubscriptionTier;
35
+ updatedAt: Timestamp;
36
+ }
37
+
38
+ export const SubscriptionSchema = z.object({
39
+ expiresAt: z.custom<Timestamp>(),
40
+ id: z.string(),
41
+ members: z.array(MemberSchema).max(MAX_MEMBERS_FAMILY_PLAN).optional(),
42
+ providerId: z.string(),
43
+ tier: SubscriptionTierSchema,
44
+ updatedAt: z.custom<Timestamp>(),
45
+ });
@@ -1,31 +1,36 @@
1
- import { z } from "genkit";
2
- import type { Timestamp } from "firebase-admin/firestore";
3
- import { UserRoleSchema, UserStatusSchema, type UserRole, type UserStatus } from "./enums";
4
-
5
- export interface User {
6
- createdAt: Timestamp;
7
- deletedAt?: Timestamp;
8
- email: string;
9
- id: string;
10
- imageUrl?: string;
11
- name: string;
12
- role: UserRole;
13
- status: UserStatus;
14
- subscriptionId?: string;
15
- updatedAt: Timestamp;
16
- verified: boolean;
17
- }
18
-
19
- export const UserSchema = z.object({
20
- createdAt: z.custom<Timestamp>(),
21
- deletedAt: z.custom<Timestamp>().optional(),
22
- email: z.string().email(),
23
- id: z.string(),
24
- imageUrl: z.string().url().optional(),
25
- name: z.string().min(1).max(50),
26
- role: UserRoleSchema,
27
- status: UserStatusSchema,
28
- subscriptionId: z.string().optional(),
29
- updatedAt: z.custom<Timestamp>(),
30
- verified: z.boolean(),
31
- });
1
+ import { z } from "genkit";
2
+ import type { Timestamp } from "firebase-admin/firestore";
3
+ import {
4
+ UserRoleSchema,
5
+ UserStatusSchema,
6
+ type UserRole,
7
+ type UserStatus,
8
+ } from "./enums";
9
+
10
+ export interface User {
11
+ createdAt: Timestamp;
12
+ deletedAt?: Timestamp;
13
+ email: string;
14
+ id: string;
15
+ imageUrl?: string;
16
+ name: string;
17
+ role: UserRole;
18
+ status: UserStatus;
19
+ subscriptionId?: string;
20
+ updatedAt: Timestamp;
21
+ verified: boolean;
22
+ }
23
+
24
+ export const UserSchema = z.object({
25
+ createdAt: z.custom<Timestamp>(),
26
+ deletedAt: z.custom<Timestamp>().optional(),
27
+ email: z.string().email(),
28
+ id: z.string(),
29
+ imageUrl: z.string().url().optional(),
30
+ name: z.string().min(1).max(50),
31
+ role: UserRoleSchema,
32
+ status: UserStatusSchema,
33
+ subscriptionId: z.string().optional(),
34
+ updatedAt: z.custom<Timestamp>(),
35
+ verified: z.boolean(),
36
+ });
@@ -1,9 +1,9 @@
1
- import { z } from "genkit";
2
-
3
- export const MODERATION_STATUS_VALUES = [
4
- "approved",
5
- "pending",
6
- "rejected",
7
- ] as const;
8
- export const ModerationStatusSchema = z.enum(MODERATION_STATUS_VALUES);
9
- export type ModerationStatus = (typeof MODERATION_STATUS_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const MODERATION_STATUS_VALUES = [
4
+ "approved",
5
+ "pending",
6
+ "rejected",
7
+ ] as const;
8
+ export const ModerationStatusSchema = z.enum(MODERATION_STATUS_VALUES);
9
+ export type ModerationStatus = (typeof MODERATION_STATUS_VALUES)[number];
@@ -1,5 +1,5 @@
1
- import { z } from "genkit";
2
-
3
- export const PRIORITY_VALUES = ["low", "medium", "high"] as const;
4
- export const PrioritySchema = z.enum(PRIORITY_VALUES);
5
- export type Priority = (typeof PRIORITY_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const PRIORITY_VALUES = ["low", "medium", "high"] as const;
4
+ export const PrioritySchema = z.enum(PRIORITY_VALUES);
5
+ export type Priority = (typeof PRIORITY_VALUES)[number];
@@ -1,5 +1,5 @@
1
- import { z } from "genkit";
2
-
3
- export const SEVERITY_VALUES = ["low", "medium", "high"] as const;
4
- export const SeveritySchema = z.enum(SEVERITY_VALUES);
5
- export type Severity = (typeof SEVERITY_VALUES)[number];
1
+ import { z } from "genkit";
2
+
3
+ export const SEVERITY_VALUES = ["low", "medium", "high"] as const;
4
+ export const SeveritySchema = z.enum(SEVERITY_VALUES);
5
+ export type Severity = (typeof SEVERITY_VALUES)[number];
@@ -1,11 +1,11 @@
1
- import { z } from "genkit";
2
-
3
- export const SUGGESTION_CATEGORY_VALUES = [
4
- "missing_info",
5
- "unclear_instruction",
6
- "image_quality",
7
- "nutrition",
8
- "safety",
9
- ] as const;
10
- export const SuggestionCategorySchema = z.enum(SUGGESTION_CATEGORY_VALUES);
11
- export type SuggestionCategory = z.infer<typeof SuggestionCategorySchema>;
1
+ import { z } from "genkit";
2
+
3
+ export const SUGGESTION_CATEGORY_VALUES = [
4
+ "missing_info",
5
+ "unclear_instruction",
6
+ "image_quality",
7
+ "nutrition",
8
+ "safety",
9
+ ] as const;
10
+ export const SuggestionCategorySchema = z.enum(SUGGESTION_CATEGORY_VALUES);
11
+ export type SuggestionCategory = z.infer<typeof SuggestionCategorySchema>;