@cravery/core 0.0.24 → 0.0.26
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/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/ai/embedding.d.ts +2 -1
- package/dist/lib/ai/embedding.d.ts.map +1 -1
- package/dist/lib/ai/embedding.js +4 -17
- package/dist/lib/ai/embedding.js.map +1 -1
- package/dist/lib/ai/genkit.d.ts +1 -0
- package/dist/lib/ai/genkit.d.ts.map +1 -1
- package/dist/lib/ai/genkit.js +14 -1
- package/dist/lib/ai/genkit.js.map +1 -1
- package/dist/types/ai/recipe.d.ts +1 -244
- package/dist/types/ai/recipe.d.ts.map +1 -1
- package/dist/types/ai/recipe.js +0 -28
- package/dist/types/ai/recipe.js.map +1 -1
- package/dist/types/ai/translation.d.ts +1 -107
- package/dist/types/ai/translation.d.ts.map +1 -1
- package/dist/types/ai/translation.js +0 -11
- package/dist/types/ai/translation.js.map +1 -1
- package/dist/types/core/api.d.ts +4 -4
- package/dist/types/core/api.d.ts.map +1 -1
- package/dist/types/core/asset.d.ts +2 -22
- package/dist/types/core/asset.d.ts.map +1 -1
- package/dist/types/core/asset.js +0 -9
- package/dist/types/core/asset.js.map +1 -1
- package/dist/types/core/entity.d.ts +7 -0
- package/dist/types/core/entity.d.ts.map +1 -0
- package/dist/types/core/entity.js +3 -0
- package/dist/types/core/entity.js.map +1 -0
- package/dist/types/core/index.d.ts +5 -1
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/index.js +5 -1
- package/dist/types/core/index.js.map +1 -1
- package/dist/types/core/locale.d.ts +3 -0
- package/dist/types/core/locale.d.ts.map +1 -0
- package/dist/types/core/locale.js +5 -0
- package/dist/types/core/locale.js.map +1 -0
- package/dist/types/core/measurement_system.d.ts +3 -0
- package/dist/types/core/measurement_system.d.ts.map +1 -0
- package/dist/types/core/measurement_system.js +5 -0
- package/dist/types/core/measurement_system.js.map +1 -0
- package/dist/types/core/settings.d.ts +5 -88
- package/dist/types/core/settings.d.ts.map +1 -1
- package/dist/types/core/settings.js +0 -25
- package/dist/types/core/settings.js.map +1 -1
- package/dist/types/core/theme.d.ts +3 -0
- package/dist/types/core/theme.d.ts.map +1 -0
- package/dist/types/core/theme.js +5 -0
- package/dist/types/core/theme.js.map +1 -0
- package/dist/types/core/timestamp.d.ts +5 -0
- package/dist/types/core/timestamp.d.ts.map +1 -0
- package/dist/types/core/timestamp.js +3 -0
- package/dist/types/core/timestamp.js.map +1 -0
- package/dist/types/iam/index.d.ts +6 -1
- package/dist/types/iam/index.d.ts.map +1 -1
- package/dist/types/iam/index.js +6 -1
- package/dist/types/iam/index.js.map +1 -1
- package/dist/types/iam/profile.d.ts +2 -56
- package/dist/types/iam/profile.d.ts.map +1 -1
- package/dist/types/iam/profile.js +0 -22
- package/dist/types/iam/profile.js.map +1 -1
- package/dist/types/iam/profile_status.d.ts +3 -0
- package/dist/types/iam/profile_status.d.ts.map +1 -0
- package/dist/types/iam/profile_status.js +10 -0
- package/dist/types/iam/profile_status.js.map +1 -0
- package/dist/types/iam/subscription.d.ts +4 -80
- package/dist/types/iam/subscription.d.ts.map +1 -1
- package/dist/types/iam/subscription.js +0 -19
- package/dist/types/iam/subscription.js.map +1 -1
- package/dist/types/iam/subscription_role.d.ts +3 -0
- package/dist/types/iam/subscription_role.d.ts.map +1 -0
- package/dist/types/iam/subscription_role.js +5 -0
- package/dist/types/iam/subscription_role.js.map +1 -0
- package/dist/types/iam/subscription_status.d.ts +3 -0
- package/dist/types/iam/subscription_status.d.ts.map +1 -0
- package/dist/types/iam/subscription_status.js +10 -0
- package/dist/types/iam/subscription_status.js.map +1 -0
- package/dist/types/iam/subscription_tier.d.ts +3 -0
- package/dist/types/iam/subscription_tier.d.ts.map +1 -0
- package/dist/types/iam/subscription_tier.js +5 -0
- package/dist/types/iam/subscription_tier.js.map +1 -0
- package/dist/types/iam/user.d.ts +3 -42
- package/dist/types/iam/user.d.ts.map +1 -1
- package/dist/types/iam/user.js +0 -16
- package/dist/types/iam/user.js.map +1 -1
- package/dist/types/iam/user_role.d.ts +5 -0
- package/dist/types/iam/user_role.d.ts.map +1 -0
- package/dist/types/iam/user_role.js +16 -0
- package/dist/types/iam/user_role.js.map +1 -0
- package/dist/types/iam/user_status.d.ts +3 -0
- package/dist/types/iam/user_status.d.ts.map +1 -0
- package/dist/types/iam/user_status.js +10 -0
- package/dist/types/iam/user_status.js.map +1 -0
- package/dist/types/moderation/index.d.ts +4 -1
- package/dist/types/moderation/index.d.ts.map +1 -1
- package/dist/types/moderation/index.js +4 -1
- package/dist/types/moderation/index.js.map +1 -1
- package/dist/types/moderation/moderation.d.ts +5 -137
- package/dist/types/moderation/moderation.d.ts.map +1 -1
- package/dist/types/moderation/moderation.js +0 -37
- package/dist/types/moderation/moderation.js.map +1 -1
- package/dist/types/moderation/moderation_status.d.ts +3 -0
- package/dist/types/moderation/moderation_status.d.ts.map +1 -0
- package/dist/types/moderation/moderation_status.js +9 -0
- package/dist/types/moderation/moderation_status.js.map +1 -0
- package/dist/types/moderation/priority.d.ts +3 -0
- package/dist/types/moderation/priority.d.ts.map +1 -0
- package/dist/types/moderation/priority.js +5 -0
- package/dist/types/moderation/priority.js.map +1 -0
- package/dist/types/moderation/severity.d.ts +3 -0
- package/dist/types/moderation/severity.d.ts.map +1 -0
- package/dist/types/moderation/severity.js +5 -0
- package/dist/types/moderation/severity.js.map +1 -0
- package/dist/types/moderation/suggestion_category.d.ts +3 -0
- package/dist/types/moderation/suggestion_category.d.ts.map +1 -0
- package/dist/types/moderation/suggestion_category.js +11 -0
- package/dist/types/moderation/suggestion_category.js.map +1 -0
- package/dist/types/recipe/allergen.d.ts +3 -0
- package/dist/types/recipe/allergen.d.ts.map +1 -0
- package/dist/types/recipe/allergen.js +19 -0
- package/dist/types/recipe/allergen.js.map +1 -0
- package/dist/types/recipe/cuisine.d.ts +3 -0
- package/dist/types/recipe/cuisine.d.ts.map +1 -0
- package/dist/types/recipe/cuisine.js +39 -0
- package/dist/types/recipe/cuisine.js.map +1 -0
- package/dist/types/recipe/dietary_tag.d.ts +3 -0
- package/dist/types/recipe/dietary_tag.d.ts.map +1 -0
- package/dist/types/recipe/dietary_tag.js +21 -0
- package/dist/types/recipe/dietary_tag.js.map +1 -0
- package/dist/types/recipe/difficulty.d.ts +3 -0
- package/dist/types/recipe/difficulty.d.ts.map +1 -0
- package/dist/types/recipe/difficulty.js +10 -0
- package/dist/types/recipe/difficulty.js.map +1 -0
- package/dist/types/recipe/equipment.d.ts +0 -40
- package/dist/types/recipe/equipment.d.ts.map +1 -1
- package/dist/types/recipe/equipment.js +0 -12
- package/dist/types/recipe/equipment.js.map +1 -1
- package/dist/types/recipe/filters.d.ts +5 -30
- package/dist/types/recipe/filters.d.ts.map +1 -1
- package/dist/types/recipe/filters.js +0 -13
- package/dist/types/recipe/filters.js.map +1 -1
- package/dist/types/recipe/index.d.ts +10 -1
- package/dist/types/recipe/index.d.ts.map +1 -1
- package/dist/types/recipe/index.js +10 -1
- package/dist/types/recipe/index.js.map +1 -1
- package/dist/types/recipe/ingredient.d.ts +1 -169
- package/dist/types/recipe/ingredient.d.ts.map +1 -1
- package/dist/types/recipe/ingredient.js +0 -29
- package/dist/types/recipe/ingredient.js.map +1 -1
- package/dist/types/recipe/instruction.d.ts +2 -72
- package/dist/types/recipe/instruction.d.ts.map +1 -1
- package/dist/types/recipe/instruction.js +0 -13
- package/dist/types/recipe/instruction.js.map +1 -1
- package/dist/types/recipe/meal_type.d.ts +3 -0
- package/dist/types/recipe/meal_type.d.ts.map +1 -0
- package/dist/types/recipe/meal_type.js +14 -0
- package/dist/types/recipe/meal_type.js.map +1 -0
- package/dist/types/recipe/nutrition.d.ts +0 -36
- package/dist/types/recipe/nutrition.d.ts.map +1 -1
- package/dist/types/recipe/nutrition.js +0 -13
- package/dist/types/recipe/nutrition.js.map +1 -1
- package/dist/types/recipe/recipe.d.ts +14 -525
- package/dist/types/recipe/recipe.d.ts.map +1 -1
- package/dist/types/recipe/recipe.js +0 -80
- package/dist/types/recipe/recipe.js.map +1 -1
- package/dist/types/recipe/recipe_source.d.ts +3 -0
- package/dist/types/recipe/recipe_source.d.ts.map +1 -0
- package/dist/types/recipe/recipe_source.js +5 -0
- package/dist/types/recipe/recipe_source.js.map +1 -0
- package/dist/types/recipe/recipe_status.d.ts +3 -0
- package/dist/types/recipe/recipe_status.d.ts.map +1 -0
- package/dist/types/recipe/recipe_status.js +12 -0
- package/dist/types/recipe/recipe_status.js.map +1 -0
- package/dist/types/recipe/spiciness.d.ts +3 -0
- package/dist/types/recipe/spiciness.d.ts.map +1 -0
- package/dist/types/recipe/spiciness.js +5 -0
- package/dist/types/recipe/spiciness.js.map +1 -0
- package/dist/types/recipe/temperature.d.ts +1 -12
- package/dist/types/recipe/temperature.d.ts.map +1 -1
- package/dist/types/recipe/temperature.js +0 -7
- package/dist/types/recipe/temperature.js.map +1 -1
- package/dist/types/recipe/temperature_unit.d.ts +3 -0
- package/dist/types/recipe/temperature_unit.d.ts.map +1 -0
- package/dist/types/recipe/temperature_unit.js +5 -0
- package/dist/types/recipe/temperature_unit.js.map +1 -0
- package/dist/types/recipe/unit.d.ts +3 -0
- package/dist/types/recipe/unit.d.ts.map +1 -0
- package/dist/types/recipe/unit.js +51 -0
- package/dist/types/recipe/unit.js.map +1 -0
- package/dist/types/report/index.d.ts +4 -1
- package/dist/types/report/index.d.ts.map +1 -1
- package/dist/types/report/index.js +4 -1
- package/dist/types/report/index.js.map +1 -1
- package/dist/types/report/report.d.ts +5 -94
- package/dist/types/report/report.d.ts.map +1 -1
- package/dist/types/report/report.js +0 -29
- package/dist/types/report/report.js.map +1 -1
- package/dist/types/report/report_priority.d.ts +3 -0
- package/dist/types/report/report_priority.d.ts.map +1 -0
- package/dist/types/report/report_priority.js +10 -0
- package/dist/types/report/report_priority.js.map +1 -0
- package/dist/types/report/report_status.d.ts +3 -0
- package/dist/types/report/report_status.d.ts.map +1 -0
- package/dist/types/report/report_status.js +10 -0
- package/dist/types/report/report_status.js.map +1 -0
- package/dist/types/report/report_target_type.d.ts +3 -0
- package/dist/types/report/report_target_type.d.ts.map +1 -0
- package/dist/types/report/report_target_type.js +10 -0
- package/dist/types/report/report_target_type.js.map +1 -0
- package/dist/types/report/report_type.d.ts +3 -0
- package/dist/types/report/report_type.d.ts.map +1 -0
- package/dist/types/report/report_type.js +12 -0
- package/dist/types/report/report_type.js.map +1 -0
- package/package.json +3 -14
- package/src/index.ts +0 -1
- package/src/types/ai/recipe.ts +10 -47
- package/src/types/ai/translation.ts +1 -18
- package/src/types/core/api.ts +4 -4
- package/src/types/core/asset.ts +2 -14
- package/src/types/core/entity.ts +7 -0
- package/src/types/core/index.ts +5 -1
- package/src/types/core/{enums/locale.ts → locale.ts} +0 -3
- package/src/types/core/{enums/measurement_system.ts → measurement_system.ts} +0 -3
- package/src/types/core/settings.ts +9 -43
- package/src/types/core/{enums/theme.ts → theme.ts} +0 -3
- package/src/types/core/timestamp.ts +4 -0
- package/src/types/iam/index.ts +6 -1
- package/src/types/iam/profile.ts +2 -24
- package/src/types/iam/{enums/profile_status.ts → profile_status.ts} +0 -3
- package/src/types/iam/subscription.ts +4 -28
- package/src/types/iam/{enums/subscription_role.ts → subscription_role.ts} +0 -3
- package/src/types/iam/{enums/subscription_status.ts → subscription_status.ts} +0 -3
- package/src/types/iam/subscription_tier.ts +2 -0
- package/src/types/iam/user.ts +3 -22
- package/src/types/iam/user_role.ts +15 -0
- package/src/types/iam/{enums/user_status.ts → user_status.ts} +0 -3
- package/src/types/moderation/index.ts +4 -1
- package/src/types/moderation/moderation.ts +5 -50
- package/src/types/moderation/{enums/moderation_status.ts → moderation_status.ts} +0 -3
- package/src/types/moderation/{enums/priority.ts → priority.ts} +0 -3
- package/src/types/moderation/{enums/severity.ts → severity.ts} +0 -3
- package/src/types/moderation/suggestion_category.ts +8 -0
- package/src/types/recipe/{enums/allergen.ts → allergen.ts} +0 -3
- package/src/types/recipe/{enums/cuisine.ts → cuisine.ts} +0 -3
- package/src/types/recipe/{enums/dietary_tag.ts → dietary_tag.ts} +0 -3
- package/src/types/recipe/{enums/difficulty.ts → difficulty.ts} +0 -3
- package/src/types/recipe/equipment.ts +0 -18
- package/src/types/recipe/filters.ts +5 -24
- package/src/types/recipe/index.ts +10 -1
- package/src/types/recipe/ingredient.ts +1 -37
- package/src/types/recipe/instruction.ts +2 -19
- package/src/types/recipe/{enums/meal_type.ts → meal_type.ts} +0 -3
- package/src/types/recipe/nutrition.ts +0 -18
- package/src/types/recipe/recipe.ts +18 -118
- package/src/types/recipe/{enums/recipe_source.ts → recipe_source.ts} +0 -3
- package/src/types/recipe/{enums/recipe_status.ts → recipe_status.ts} +0 -3
- package/src/types/recipe/{enums/spiciness.ts → spiciness.ts} +0 -3
- package/src/types/recipe/temperature.ts +1 -7
- package/src/types/recipe/{enums/temperature_unit.ts → temperature_unit.ts} +0 -3
- package/src/types/recipe/{enums/unit.ts → unit.ts} +0 -3
- package/src/types/report/index.ts +4 -1
- package/src/types/report/report.ts +5 -40
- package/src/types/report/{enums/report_priority.ts → report_priority.ts} +0 -3
- package/src/types/report/{enums/report_status.ts → report_status.ts} +0 -3
- package/src/types/report/{enums/report_target_type.ts → report_target_type.ts} +0 -3
- package/src/types/report/{enums/report_type.ts → report_type.ts} +0 -3
- package/src/lib/ai/cost.ts +0 -82
- package/src/lib/ai/embedding.ts +0 -64
- package/src/lib/ai/errors.ts +0 -43
- package/src/lib/ai/flow.ts +0 -134
- package/src/lib/ai/genkit.ts +0 -24
- package/src/lib/ai/image.ts +0 -27
- package/src/lib/ai/index.ts +0 -6
- package/src/lib/api.ts +0 -103
- package/src/lib/firebase.ts +0 -5
- package/src/lib/iam.ts +0 -37
- package/src/lib/index.ts +0 -7
- package/src/lib/storage.ts +0 -60
- package/src/lib/usage/index.ts +0 -1
- package/src/lib/usage/usage.service.ts +0 -192
- package/src/lib/utils/index.ts +0 -2
- package/src/lib/utils/sanitize.ts +0 -38
- package/src/lib/utils/slug.ts +0 -33
- package/src/types/core/enums/image_type.ts +0 -5
- package/src/types/core/enums/index.ts +0 -5
- package/src/types/core/enums/url_type.ts +0 -13
- package/src/types/iam/enums/index.ts +0 -6
- package/src/types/iam/enums/subscription_tier.ts +0 -4
- package/src/types/iam/enums/user_role.ts +0 -11
- package/src/types/moderation/enums/index.ts +0 -4
- package/src/types/moderation/enums/suggestion_category.ts +0 -11
- package/src/types/recipe/enums/index.ts +0 -10
- package/src/types/report/enums/index.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe_source.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/recipe_source.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mCAAoC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe_source.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe_source.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe_status.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/recipe_status.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,8EAOvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RECIPE_STATUS_VALUES = void 0;
|
|
4
|
+
exports.RECIPE_STATUS_VALUES = [
|
|
5
|
+
"active",
|
|
6
|
+
"archived",
|
|
7
|
+
"deleted",
|
|
8
|
+
"flagged",
|
|
9
|
+
"pending",
|
|
10
|
+
"rejected",
|
|
11
|
+
];
|
|
12
|
+
//# sourceMappingURL=recipe_status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe_status.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe_status.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,UAAU;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spiciness.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/spiciness.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,4CAA6C,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spiciness.js","sourceRoot":"","sources":["../../../src/types/recipe/spiciness.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC"}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type TemperatureUnit } from "./enums";
|
|
1
|
+
import { TemperatureUnit } from "./temperature_unit";
|
|
3
2
|
export interface Temperature {
|
|
4
3
|
unit: TemperatureUnit;
|
|
5
4
|
value: number;
|
|
6
5
|
}
|
|
7
|
-
export declare const TemperatureSchema: z.ZodObject<{
|
|
8
|
-
unit: z.ZodEnum<["celsius", "fahrenheit"]>;
|
|
9
|
-
value: z.ZodNumber;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
value: number;
|
|
12
|
-
unit: "celsius" | "fahrenheit";
|
|
13
|
-
}, {
|
|
14
|
-
value: number;
|
|
15
|
-
unit: "celsius" | "fahrenheit";
|
|
16
|
-
}>;
|
|
17
6
|
//# sourceMappingURL=temperature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temperature.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/temperature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"temperature.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/temperature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemperatureSchema = void 0;
|
|
4
|
-
const genkit_1 = require("genkit");
|
|
5
|
-
const enums_1 = require("./enums");
|
|
6
|
-
exports.TemperatureSchema = genkit_1.z.object({
|
|
7
|
-
unit: enums_1.TemperatureUnitSchema,
|
|
8
|
-
value: genkit_1.z.number().min(-50).max(1000),
|
|
9
|
-
});
|
|
10
3
|
//# sourceMappingURL=temperature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temperature.js","sourceRoot":"","sources":["../../../src/types/recipe/temperature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"temperature.js","sourceRoot":"","sources":["../../../src/types/recipe/temperature.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temperature_unit.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/temperature_unit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,oCAAqC,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temperature_unit.js","sourceRoot":"","sources":["../../../src/types/recipe/temperature_unit.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const UNIT_VALUES: readonly ["ml", "l", "tsp", "tbsp", "fl_oz", "cup", "pint", "quart", "gallon", "mg", "g", "kg", "oz", "lb", "piece", "whole", "half", "quarter", "slice", "serving", "clove", "stalk", "sprig", "leaf", "bunch", "head", "fillet", "stick", "sheet", "can", "package", "bottle", "jar", "handful", "pinch", "dash", "drop"];
|
|
2
|
+
export type Unit = (typeof UNIT_VALUES)[number];
|
|
3
|
+
//# sourceMappingURL=unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../../src/types/recipe/unit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6TA8Cd,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UNIT_VALUES = void 0;
|
|
4
|
+
exports.UNIT_VALUES = [
|
|
5
|
+
// Volume (metric)
|
|
6
|
+
"ml",
|
|
7
|
+
"l",
|
|
8
|
+
// Volume (imperial)
|
|
9
|
+
"tsp",
|
|
10
|
+
"tbsp",
|
|
11
|
+
"fl_oz",
|
|
12
|
+
"cup",
|
|
13
|
+
"pint",
|
|
14
|
+
"quart",
|
|
15
|
+
"gallon",
|
|
16
|
+
// Weight (metric)
|
|
17
|
+
"mg",
|
|
18
|
+
"g",
|
|
19
|
+
"kg",
|
|
20
|
+
// Weight (imperial)
|
|
21
|
+
"oz",
|
|
22
|
+
"lb",
|
|
23
|
+
// Count/portion
|
|
24
|
+
"piece",
|
|
25
|
+
"whole",
|
|
26
|
+
"half",
|
|
27
|
+
"quarter",
|
|
28
|
+
"slice",
|
|
29
|
+
"serving",
|
|
30
|
+
// Produce-specific
|
|
31
|
+
"clove",
|
|
32
|
+
"stalk",
|
|
33
|
+
"sprig",
|
|
34
|
+
"leaf",
|
|
35
|
+
"bunch",
|
|
36
|
+
"head",
|
|
37
|
+
"fillet",
|
|
38
|
+
"stick",
|
|
39
|
+
"sheet",
|
|
40
|
+
// Container
|
|
41
|
+
"can",
|
|
42
|
+
"package",
|
|
43
|
+
"bottle",
|
|
44
|
+
"jar",
|
|
45
|
+
// Imprecise
|
|
46
|
+
"handful",
|
|
47
|
+
"pinch",
|
|
48
|
+
"dash",
|
|
49
|
+
"drop",
|
|
50
|
+
];
|
|
51
|
+
//# sourceMappingURL=unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.js","sourceRoot":"","sources":["../../../src/types/recipe/unit.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,oBAAoB;IACpB,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,oBAAoB;IACpB,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,mBAAmB;IACnB,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,KAAK;IACL,SAAS;IACT,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/report/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/report/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
|
|
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./report_priority"), exports);
|
|
18
|
+
__exportStar(require("./report_status"), exports);
|
|
19
|
+
__exportStar(require("./report_target_type"), exports);
|
|
20
|
+
__exportStar(require("./report_type"), exports);
|
|
18
21
|
__exportStar(require("./report"), exports);
|
|
19
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/report/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/report/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,kDAAgC;AAChC,uDAAqC;AACrC,gDAA8B;AAC9B,2CAAyB"}
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { Timestamp } from "../core";
|
|
2
|
+
import { ReportPriority } from "./report_priority";
|
|
3
|
+
import { ReportStatus } from "./report_status";
|
|
4
|
+
import { ReportTargetType } from "./report_target_type";
|
|
5
|
+
import { ReportType } from "./report_type";
|
|
4
6
|
export interface ReportEvidence {
|
|
5
7
|
aiScore?: number;
|
|
6
8
|
aiSuggestions?: Record<string, unknown>[];
|
|
7
9
|
contentSnapshot?: string;
|
|
8
10
|
imageHashes?: string[];
|
|
9
11
|
}
|
|
10
|
-
export declare const ReportEvidenceSchema: z.ZodObject<{
|
|
11
|
-
aiScore: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
aiSuggestions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
13
|
-
contentSnapshot: z.ZodOptional<z.ZodString>;
|
|
14
|
-
imageHashes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
aiScore?: number | undefined;
|
|
17
|
-
aiSuggestions?: Record<string, unknown>[] | undefined;
|
|
18
|
-
contentSnapshot?: string | undefined;
|
|
19
|
-
imageHashes?: string[] | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
aiScore?: number | undefined;
|
|
22
|
-
aiSuggestions?: Record<string, unknown>[] | undefined;
|
|
23
|
-
contentSnapshot?: string | undefined;
|
|
24
|
-
imageHashes?: string[] | undefined;
|
|
25
|
-
}>;
|
|
26
12
|
export interface Report {
|
|
27
13
|
categories: string[];
|
|
28
14
|
createdAt: Timestamp;
|
|
@@ -43,79 +29,4 @@ export interface Report {
|
|
|
43
29
|
updatedAt: Timestamp;
|
|
44
30
|
userId: string;
|
|
45
31
|
}
|
|
46
|
-
export declare const ReportSchema: z.ZodObject<{
|
|
47
|
-
categories: z.ZodArray<z.ZodString, "many">;
|
|
48
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
49
|
-
description: z.ZodString;
|
|
50
|
-
evidence: z.ZodOptional<z.ZodObject<{
|
|
51
|
-
aiScore: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
aiSuggestions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
53
|
-
contentSnapshot: z.ZodOptional<z.ZodString>;
|
|
54
|
-
imageHashes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
|
-
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
aiScore?: number | undefined;
|
|
57
|
-
aiSuggestions?: Record<string, unknown>[] | undefined;
|
|
58
|
-
contentSnapshot?: string | undefined;
|
|
59
|
-
imageHashes?: string[] | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
aiScore?: number | undefined;
|
|
62
|
-
aiSuggestions?: Record<string, unknown>[] | undefined;
|
|
63
|
-
contentSnapshot?: string | undefined;
|
|
64
|
-
imageHashes?: string[] | undefined;
|
|
65
|
-
}>>;
|
|
66
|
-
id: z.ZodString;
|
|
67
|
-
notes: z.ZodOptional<z.ZodString>;
|
|
68
|
-
priority: z.ZodEnum<["critical", "high", "low", "medium"]>;
|
|
69
|
-
reason: z.ZodString;
|
|
70
|
-
reportedBy: z.ZodOptional<z.ZodString>;
|
|
71
|
-
resolution: z.ZodOptional<z.ZodString>;
|
|
72
|
-
reviewedAt: z.ZodOptional<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
73
|
-
reviewedBy: z.ZodOptional<z.ZodString>;
|
|
74
|
-
status: z.ZodEnum<["escalated", "pending", "resolved", "reviewed"]>;
|
|
75
|
-
targetId: z.ZodString;
|
|
76
|
-
targetType: z.ZodEnum<["image", "profile", "recipe", "user"]>;
|
|
77
|
-
type: z.ZodEnum<["auto_rejected", "manual_rejected", "repeated_violations", "unsafe_generated", "unsafe_upload", "user_report"]>;
|
|
78
|
-
updatedAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
79
|
-
userId: z.ZodString;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
[x: string]: any;
|
|
82
|
-
categories?: unknown;
|
|
83
|
-
createdAt?: unknown;
|
|
84
|
-
description?: unknown;
|
|
85
|
-
evidence?: unknown;
|
|
86
|
-
id?: unknown;
|
|
87
|
-
notes?: unknown;
|
|
88
|
-
priority?: unknown;
|
|
89
|
-
reason?: unknown;
|
|
90
|
-
reportedBy?: unknown;
|
|
91
|
-
resolution?: unknown;
|
|
92
|
-
reviewedAt?: unknown;
|
|
93
|
-
reviewedBy?: unknown;
|
|
94
|
-
status?: unknown;
|
|
95
|
-
targetId?: unknown;
|
|
96
|
-
targetType?: unknown;
|
|
97
|
-
type?: unknown;
|
|
98
|
-
updatedAt?: unknown;
|
|
99
|
-
userId?: unknown;
|
|
100
|
-
}, {
|
|
101
|
-
[x: string]: any;
|
|
102
|
-
categories?: unknown;
|
|
103
|
-
createdAt?: unknown;
|
|
104
|
-
description?: unknown;
|
|
105
|
-
evidence?: unknown;
|
|
106
|
-
id?: unknown;
|
|
107
|
-
notes?: unknown;
|
|
108
|
-
priority?: unknown;
|
|
109
|
-
reason?: unknown;
|
|
110
|
-
reportedBy?: unknown;
|
|
111
|
-
resolution?: unknown;
|
|
112
|
-
reviewedAt?: unknown;
|
|
113
|
-
reviewedBy?: unknown;
|
|
114
|
-
status?: unknown;
|
|
115
|
-
targetId?: unknown;
|
|
116
|
-
targetType?: unknown;
|
|
117
|
-
type?: unknown;
|
|
118
|
-
updatedAt?: unknown;
|
|
119
|
-
userId?: unknown;
|
|
120
|
-
}>;
|
|
121
32
|
//# sourceMappingURL=report.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/types/report/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/types/report/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1,32 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportSchema = exports.ReportEvidenceSchema = void 0;
|
|
4
|
-
const genkit_1 = require("genkit");
|
|
5
|
-
const enums_1 = require("./enums");
|
|
6
|
-
exports.ReportEvidenceSchema = genkit_1.z.object({
|
|
7
|
-
aiScore: genkit_1.z.number().min(0).max(1).optional(),
|
|
8
|
-
aiSuggestions: genkit_1.z.array(genkit_1.z.record(genkit_1.z.string(), genkit_1.z.unknown())).optional(),
|
|
9
|
-
contentSnapshot: genkit_1.z.string().optional(),
|
|
10
|
-
imageHashes: genkit_1.z.array(genkit_1.z.string()).optional(),
|
|
11
|
-
});
|
|
12
|
-
exports.ReportSchema = genkit_1.z.object({
|
|
13
|
-
categories: genkit_1.z.array(genkit_1.z.string()),
|
|
14
|
-
createdAt: genkit_1.z.custom(),
|
|
15
|
-
description: genkit_1.z.string(),
|
|
16
|
-
evidence: exports.ReportEvidenceSchema.optional(),
|
|
17
|
-
id: genkit_1.z.string(),
|
|
18
|
-
notes: genkit_1.z.string().optional(),
|
|
19
|
-
priority: enums_1.ReportPrioritySchema,
|
|
20
|
-
reason: genkit_1.z.string(),
|
|
21
|
-
reportedBy: genkit_1.z.string().optional(),
|
|
22
|
-
resolution: genkit_1.z.string().optional(),
|
|
23
|
-
reviewedAt: genkit_1.z.custom().optional(),
|
|
24
|
-
reviewedBy: genkit_1.z.string().optional(),
|
|
25
|
-
status: enums_1.ReportStatusSchema,
|
|
26
|
-
targetId: genkit_1.z.string(),
|
|
27
|
-
targetType: enums_1.ReportTargetTypeSchema,
|
|
28
|
-
type: enums_1.ReportTypeSchema,
|
|
29
|
-
updatedAt: genkit_1.z.custom(),
|
|
30
|
-
userId: genkit_1.z.string(),
|
|
31
|
-
});
|
|
32
3
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/types/report/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/types/report/report.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_priority.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_priority.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,gDAKzB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_priority.js","sourceRoot":"","sources":["../../../src/types/report/report_priority.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;IACpC,UAAU;IACV,MAAM;IACN,KAAK;IACL,QAAQ;CACA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_status.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_status.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,2DAKvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_status.js","sourceRoot":"","sources":["../../../src/types/report/report_status.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,WAAW;IACX,SAAS;IACT,UAAU;IACV,UAAU;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_target_type.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,iDAK5B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REPORT_TARGET_TYPE_VALUES = void 0;
|
|
4
|
+
exports.REPORT_TARGET_TYPE_VALUES = [
|
|
5
|
+
"image",
|
|
6
|
+
"profile",
|
|
7
|
+
"recipe",
|
|
8
|
+
"user",
|
|
9
|
+
];
|
|
10
|
+
//# sourceMappingURL=report_target_type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_target_type.js","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACvC,OAAO;IACP,SAAS;IACT,QAAQ;IACR,MAAM;CACE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_type.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,0HAOrB,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REPORT_TYPE_VALUES = void 0;
|
|
4
|
+
exports.REPORT_TYPE_VALUES = [
|
|
5
|
+
"auto_rejected",
|
|
6
|
+
"manual_rejected",
|
|
7
|
+
"repeated_violations",
|
|
8
|
+
"unsafe_generated",
|
|
9
|
+
"unsafe_upload",
|
|
10
|
+
"user_report",
|
|
11
|
+
];
|
|
12
|
+
//# sourceMappingURL=report_type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_type.js","sourceRoot":"","sources":["../../../src/types/report/report_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;IACf,aAAa;CACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cravery/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Clean architecture foundation for Cravery",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,24 +31,13 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsc",
|
|
33
33
|
"build:watch": "tsc --watch",
|
|
34
|
-
"
|
|
35
|
-
"lint": "eslint .",
|
|
36
|
-
"test": "jest",
|
|
37
|
-
"test:watch": "jest --watch",
|
|
38
|
-
"test:coverage": "jest --coverage"
|
|
34
|
+
"clean": "rimraf dist && npm run build"
|
|
39
35
|
},
|
|
40
36
|
"keywords": [],
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@genkit-ai/google-genai": "^1.27.0",
|
|
43
|
-
"genkit": "^1.27.0"
|
|
44
|
-
},
|
|
45
37
|
"devDependencies": {
|
|
38
|
+
"rimraf": "^6.1.2",
|
|
46
39
|
"typescript": "^5.9.3"
|
|
47
40
|
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"firebase-admin": "^13.6.0",
|
|
50
|
-
"firebase-functions": "^7.0.2"
|
|
51
|
-
},
|
|
52
41
|
"files": [
|
|
53
42
|
"dist/**/*",
|
|
54
43
|
"src/**/*"
|
package/src/index.ts
CHANGED
package/src/types/ai/recipe.ts
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import { z } from "genkit";
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type Allergen,
|
|
14
|
-
type Cuisine,
|
|
15
|
-
type DietaryTag,
|
|
16
|
-
type Difficulty,
|
|
17
|
-
type Equipment,
|
|
18
|
-
type IngredientSection,
|
|
19
|
-
type Instruction,
|
|
20
|
-
type MealType,
|
|
21
|
-
type Nutrition,
|
|
22
|
-
type Spiciness,
|
|
2
|
+
Allergen,
|
|
3
|
+
Cuisine,
|
|
4
|
+
DietaryTag,
|
|
5
|
+
Difficulty,
|
|
6
|
+
Equipment,
|
|
7
|
+
IngredientSection,
|
|
8
|
+
Instruction,
|
|
9
|
+
MealType,
|
|
10
|
+
Nutrition,
|
|
11
|
+
Spiciness,
|
|
23
12
|
} from "../recipe";
|
|
24
13
|
|
|
25
14
|
export interface AIRecipe {
|
|
@@ -40,29 +29,3 @@ export interface AIRecipe {
|
|
|
40
29
|
tips?: string[];
|
|
41
30
|
title: string;
|
|
42
31
|
}
|
|
43
|
-
|
|
44
|
-
// Simplified schema for Gemini structured output
|
|
45
|
-
// Removed complex constraints that cause "too many states" errors:
|
|
46
|
-
// - Regex patterns on slugs (removed from nested schemas)
|
|
47
|
-
// - High array max limits (instructions max 50, equipment max 20, etc)
|
|
48
|
-
// - Numeric min/max bounds (confidence 0-1, servings 1-100, time 1-1440, etc)
|
|
49
|
-
// - String length constraints (description 10-2000, title 3-200, etc)
|
|
50
|
-
// These validations should be done in application logic if needed
|
|
51
|
-
export const AIRecipeSchema = z.object({
|
|
52
|
-
allergens: z.array(AllergenSchema),
|
|
53
|
-
confidence: z.number(),
|
|
54
|
-
cuisine: CuisineSchema,
|
|
55
|
-
description: z.string(),
|
|
56
|
-
dietaryTags: z.array(DietaryTagSchema),
|
|
57
|
-
difficulty: DifficultySchema,
|
|
58
|
-
equipment: z.array(EquipmentSchema).optional(),
|
|
59
|
-
ingredientSections: z.array(IngredientSectionSchema),
|
|
60
|
-
instructions: z.array(InstructionSchema),
|
|
61
|
-
mealTypes: z.array(MealTypeSchema),
|
|
62
|
-
nutrition: NutritionSchema.optional(),
|
|
63
|
-
servings: z.number(),
|
|
64
|
-
spiciness: SpicinessSchema,
|
|
65
|
-
time: z.number(),
|
|
66
|
-
tips: z.array(z.string()).optional(),
|
|
67
|
-
title: z.string(),
|
|
68
|
-
}) satisfies z.ZodType<AIRecipe>;
|