@cravery/core 0.0.14 → 0.0.16
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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/types/recipe/nutrition.d.ts.map +1 -1
- package/dist/types/recipe/nutrition.js +11 -11
- package/dist/types/recipe/nutrition.js.map +1 -1
- package/dist/types/recipe/recipe.d.ts +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +3 -2
- package/src/lib/ai/flow.ts +1 -1
- package/src/lib/api.ts +1 -1
- package/src/lib/utils/sanitize.ts +1 -1
- package/src/nul +0 -0
- package/src/types/ai/recipe.ts +1 -1
- package/src/types/ai/translation.ts +1 -1
- package/src/types/core/asset.ts +1 -1
- package/src/types/core/enums/image_type.ts +1 -1
- package/src/types/core/enums/locale.ts +1 -1
- package/src/types/core/enums/measurement_system.ts +1 -1
- package/src/types/core/enums/theme.ts +1 -1
- package/src/types/core/enums/url_type.ts +1 -1
- package/src/types/core/settings.ts +1 -1
- package/src/types/iam/enums/profile_status.ts +1 -1
- package/src/types/iam/enums/subscription_role.ts +1 -1
- package/src/types/iam/enums/subscription_status.ts +1 -1
- package/src/types/iam/enums/subscription_tier.ts +1 -1
- package/src/types/iam/enums/user_role.ts +1 -1
- package/src/types/iam/enums/user_status.ts +1 -1
- package/src/types/iam/profile.ts +1 -1
- package/src/types/iam/subscription.ts +1 -1
- package/src/types/iam/user.ts +1 -1
- package/src/types/moderation/enums/moderation_status.ts +1 -1
- package/src/types/moderation/enums/priority.ts +1 -1
- package/src/types/moderation/enums/severity.ts +1 -1
- package/src/types/moderation/enums/suggestion_category.ts +1 -1
- package/src/types/moderation/moderation.ts +1 -1
- package/src/types/recipe/enums/allergen.ts +1 -1
- package/src/types/recipe/enums/cuisine.ts +1 -1
- package/src/types/recipe/enums/dietary_tag.ts +1 -1
- package/src/types/recipe/enums/difficulty.ts +1 -1
- package/src/types/recipe/enums/meal_type.ts +1 -1
- package/src/types/recipe/enums/recipe_source.ts +1 -1
- package/src/types/recipe/enums/recipe_status.ts +1 -1
- package/src/types/recipe/enums/spiciness.ts +1 -1
- package/src/types/recipe/enums/temperature_unit.ts +1 -1
- package/src/types/recipe/enums/unit.ts +1 -1
- package/src/types/recipe/equipment.ts +1 -1
- package/src/types/recipe/filters.ts +1 -1
- package/src/types/recipe/ingredient.ts +1 -1
- package/src/types/recipe/instruction.ts +1 -1
- package/src/types/recipe/nutrition.ts +1 -1
- package/src/types/recipe/recipe.ts +1 -1
- package/src/types/recipe/temperature.ts +1 -1
- package/src/types/report/enums/report_priority.ts +1 -1
- package/src/types/report/enums/report_status.ts +1 -1
- package/src/types/report/enums/report_target_type.ts +1 -1
- package/src/types/report/enums/report_type.ts +1 -1
- package/src/types/report/report.ts +1 -1
- package/dist/lib/errors/index.d.ts +0 -40
- package/dist/lib/errors/index.d.ts.map +0 -1
- package/dist/lib/errors/index.js +0 -97
- package/dist/lib/errors/index.js.map +0 -1
- package/dist/lib/repository/equipment.repository.d.ts +0 -15
- package/dist/lib/repository/equipment.repository.d.ts.map +0 -1
- package/dist/lib/repository/equipment.repository.js +0 -65
- package/dist/lib/repository/equipment.repository.js.map +0 -1
- package/dist/lib/repository/errors.d.ts +0 -20
- package/dist/lib/repository/errors.d.ts.map +0 -1
- package/dist/lib/repository/errors.js +0 -33
- package/dist/lib/repository/errors.js.map +0 -1
- package/dist/lib/repository/factory.d.ts +0 -19
- package/dist/lib/repository/factory.d.ts.map +0 -1
- package/dist/lib/repository/factory.js +0 -31
- package/dist/lib/repository/factory.js.map +0 -1
- package/dist/lib/repository/firestore.repository.d.ts +0 -50
- package/dist/lib/repository/firestore.repository.d.ts.map +0 -1
- package/dist/lib/repository/firestore.repository.js +0 -410
- package/dist/lib/repository/firestore.repository.js.map +0 -1
- package/dist/lib/repository/index.d.ts +0 -13
- package/dist/lib/repository/index.d.ts.map +0 -1
- package/dist/lib/repository/index.js +0 -29
- package/dist/lib/repository/index.js.map +0 -1
- package/dist/lib/repository/ingredient.repository.d.ts +0 -15
- package/dist/lib/repository/ingredient.repository.d.ts.map +0 -1
- package/dist/lib/repository/ingredient.repository.js +0 -65
- package/dist/lib/repository/ingredient.repository.js.map +0 -1
- package/dist/lib/repository/profile.repository.d.ts +0 -12
- package/dist/lib/repository/profile.repository.d.ts.map +0 -1
- package/dist/lib/repository/profile.repository.js +0 -39
- package/dist/lib/repository/profile.repository.js.map +0 -1
- package/dist/lib/repository/recipe-queue.repository.d.ts +0 -10
- package/dist/lib/repository/recipe-queue.repository.d.ts.map +0 -1
- package/dist/lib/repository/recipe-queue.repository.js +0 -37
- package/dist/lib/repository/recipe-queue.repository.js.map +0 -1
- package/dist/lib/repository/recipe.repository.d.ts +0 -10
- package/dist/lib/repository/recipe.repository.d.ts.map +0 -1
- package/dist/lib/repository/recipe.repository.js +0 -40
- package/dist/lib/repository/recipe.repository.js.map +0 -1
- package/dist/lib/repository/report.repository.d.ts +0 -15
- package/dist/lib/repository/report.repository.d.ts.map +0 -1
- package/dist/lib/repository/report.repository.js +0 -47
- package/dist/lib/repository/report.repository.js.map +0 -1
- package/dist/lib/repository/rtdb.repository.d.ts +0 -21
- package/dist/lib/repository/rtdb.repository.d.ts.map +0 -1
- package/dist/lib/repository/rtdb.repository.js +0 -55
- package/dist/lib/repository/rtdb.repository.js.map +0 -1
- package/dist/lib/repository/settings.repository.d.ts +0 -11
- package/dist/lib/repository/settings.repository.d.ts.map +0 -1
- package/dist/lib/repository/settings.repository.js +0 -48
- package/dist/lib/repository/settings.repository.js.map +0 -1
- package/dist/lib/repository/user.repository.d.ts +0 -11
- package/dist/lib/repository/user.repository.d.ts.map +0 -1
- package/dist/lib/repository/user.repository.js +0 -36
- package/dist/lib/repository/user.repository.js.map +0 -1
- package/dist/types/ai/filters.d.ts +0 -31
- package/dist/types/ai/filters.d.ts.map +0 -1
- package/dist/types/ai/filters.js +0 -16
- package/dist/types/ai/filters.js.map +0 -1
- package/dist/types/ai/flow.d.ts +0 -323
- package/dist/types/ai/flow.d.ts.map +0 -1
- package/dist/types/ai/flow.js +0 -65
- package/dist/types/ai/flow.js.map +0 -1
- package/dist/types/api.d.ts +0 -14
- package/dist/types/api.d.ts.map +0 -1
- package/dist/types/api.js +0 -3
- package/dist/types/api.js.map +0 -1
- package/dist/types/asset.d.ts +0 -33
- package/dist/types/asset.d.ts.map +0 -1
- package/dist/types/asset.js +0 -18
- package/dist/types/asset.js.map +0 -1
- package/dist/types/enums/allergen.d.ts +0 -5
- package/dist/types/enums/allergen.d.ts.map +0 -1
- package/dist/types/enums/allergen.js +0 -21
- package/dist/types/enums/allergen.js.map +0 -1
- package/dist/types/enums/cuisine.d.ts +0 -5
- package/dist/types/enums/cuisine.d.ts.map +0 -1
- package/dist/types/enums/cuisine.js +0 -41
- package/dist/types/enums/cuisine.js.map +0 -1
- package/dist/types/enums/dietary_tag.d.ts +0 -5
- package/dist/types/enums/dietary_tag.d.ts.map +0 -1
- package/dist/types/enums/dietary_tag.js +0 -23
- package/dist/types/enums/dietary_tag.js.map +0 -1
- package/dist/types/enums/difficulty.d.ts +0 -5
- package/dist/types/enums/difficulty.d.ts.map +0 -1
- package/dist/types/enums/difficulty.js +0 -12
- package/dist/types/enums/difficulty.js.map +0 -1
- package/dist/types/enums/image_type.d.ts +0 -5
- package/dist/types/enums/image_type.d.ts.map +0 -1
- package/dist/types/enums/image_type.js +0 -7
- package/dist/types/enums/image_type.js.map +0 -1
- package/dist/types/enums/index.d.ts +0 -24
- package/dist/types/enums/index.d.ts.map +0 -1
- package/dist/types/enums/index.js +0 -40
- package/dist/types/enums/index.js.map +0 -1
- package/dist/types/enums/locale.d.ts +0 -5
- package/dist/types/enums/locale.d.ts.map +0 -1
- package/dist/types/enums/locale.js +0 -7
- package/dist/types/enums/locale.js.map +0 -1
- package/dist/types/enums/meal_type.d.ts +0 -5
- package/dist/types/enums/meal_type.d.ts.map +0 -1
- package/dist/types/enums/meal_type.js +0 -16
- package/dist/types/enums/meal_type.js.map +0 -1
- package/dist/types/enums/moderation_status.d.ts +0 -5
- package/dist/types/enums/moderation_status.d.ts.map +0 -1
- package/dist/types/enums/moderation_status.js +0 -11
- package/dist/types/enums/moderation_status.js.map +0 -1
- package/dist/types/enums/priority.d.ts +0 -5
- package/dist/types/enums/priority.d.ts.map +0 -1
- package/dist/types/enums/priority.js +0 -7
- package/dist/types/enums/priority.js.map +0 -1
- package/dist/types/enums/profile_status.d.ts +0 -5
- package/dist/types/enums/profile_status.d.ts.map +0 -1
- package/dist/types/enums/profile_status.js +0 -12
- package/dist/types/enums/profile_status.js.map +0 -1
- package/dist/types/enums/recipe_source.d.ts +0 -5
- package/dist/types/enums/recipe_source.d.ts.map +0 -1
- package/dist/types/enums/recipe_source.js +0 -7
- package/dist/types/enums/recipe_source.js.map +0 -1
- package/dist/types/enums/recipe_status.d.ts +0 -5
- package/dist/types/enums/recipe_status.d.ts.map +0 -1
- package/dist/types/enums/recipe_status.js +0 -14
- package/dist/types/enums/recipe_status.js.map +0 -1
- package/dist/types/enums/role.d.ts +0 -5
- package/dist/types/enums/role.d.ts.map +0 -1
- package/dist/types/enums/role.js +0 -13
- package/dist/types/enums/role.js.map +0 -1
- package/dist/types/enums/severity.d.ts +0 -5
- package/dist/types/enums/severity.d.ts.map +0 -1
- package/dist/types/enums/severity.js +0 -7
- package/dist/types/enums/severity.js.map +0 -1
- package/dist/types/enums/spiciness.d.ts +0 -5
- package/dist/types/enums/spiciness.d.ts.map +0 -1
- package/dist/types/enums/spiciness.js +0 -7
- package/dist/types/enums/spiciness.js.map +0 -1
- package/dist/types/enums/subscription_role.d.ts +0 -5
- package/dist/types/enums/subscription_role.d.ts.map +0 -1
- package/dist/types/enums/subscription_role.js +0 -13
- package/dist/types/enums/subscription_role.js.map +0 -1
- package/dist/types/enums/subscription_status.d.ts +0 -5
- package/dist/types/enums/subscription_status.d.ts.map +0 -1
- package/dist/types/enums/subscription_status.js +0 -14
- package/dist/types/enums/subscription_status.js.map +0 -1
- package/dist/types/enums/subscription_tier.d.ts +0 -4
- package/dist/types/enums/subscription_tier.d.ts.map +0 -1
- package/dist/types/enums/subscription_tier.js +0 -6
- package/dist/types/enums/subscription_tier.js.map +0 -1
- package/dist/types/enums/suggestion_category.d.ts +0 -5
- package/dist/types/enums/suggestion_category.d.ts.map +0 -1
- package/dist/types/enums/suggestion_category.js +0 -13
- package/dist/types/enums/suggestion_category.js.map +0 -1
- package/dist/types/enums/temperature_unit.d.ts +0 -5
- package/dist/types/enums/temperature_unit.d.ts.map +0 -1
- package/dist/types/enums/temperature_unit.js +0 -7
- package/dist/types/enums/temperature_unit.js.map +0 -1
- package/dist/types/enums/unit.d.ts +0 -5
- package/dist/types/enums/unit.d.ts.map +0 -1
- package/dist/types/enums/unit.js +0 -53
- package/dist/types/enums/unit.js.map +0 -1
- package/dist/types/enums/url_type.d.ts +0 -5
- package/dist/types/enums/url_type.d.ts.map +0 -1
- package/dist/types/enums/url_type.js +0 -15
- package/dist/types/enums/url_type.js.map +0 -1
- package/dist/types/enums/user_status.d.ts +0 -5
- package/dist/types/enums/user_status.d.ts.map +0 -1
- package/dist/types/enums/user_status.js +0 -12
- package/dist/types/enums/user_status.js.map +0 -1
- package/dist/types/iam/settings.d.ts +0 -96
- package/dist/types/iam/settings.d.ts.map +0 -1
- package/dist/types/iam/settings.js +0 -31
- package/dist/types/iam/settings.js.map +0 -1
- package/dist/types/moderation.d.ts +0 -168
- package/dist/types/moderation.d.ts.map +0 -1
- package/dist/types/moderation.js +0 -39
- package/dist/types/moderation.js.map +0 -1
- package/dist/types/report.d.ts +0 -135
- package/dist/types/report.d.ts.map +0 -1
- package/dist/types/report.js +0 -61
- package/dist/types/report.js.map +0 -1
- package/dist/types/repository.d.ts +0 -80
- package/dist/types/repository.d.ts.map +0 -1
- package/dist/types/repository.js +0 -6
- package/dist/types/repository.js.map +0 -1
- package/dist/types/response.d.ts +0 -16
- package/dist/types/response.d.ts.map +0 -1
- package/dist/types/response.js +0 -14
- package/dist/types/response.js.map +0 -1
- package/dist/types/settings.d.ts +0 -95
- package/dist/types/settings.d.ts.map +0 -1
- package/dist/types/settings.js +0 -36
- package/dist/types/settings.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Firestore } from "firebase-admin/firestore";
|
|
2
|
-
import { FirestoreRepository } from "./firestore.repository";
|
|
3
|
-
import type { RecipeMeta } from "../../types/recipe";
|
|
4
|
-
export declare class RecipeQueueRepository extends FirestoreRepository<RecipeMeta> {
|
|
5
|
-
constructor(firestore: Firestore);
|
|
6
|
-
protected validate(data: Partial<RecipeMeta>): void;
|
|
7
|
-
findBySourceUrl(sourceUrl: string): Promise<RecipeMeta | null>;
|
|
8
|
-
findBySourceUrlAndUser(sourceUrl: string, userId: string): Promise<RecipeMeta | null>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=recipe-queue.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-queue.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/recipe-queue.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,qBAAa,qBAAsB,SAAQ,mBAAmB,CAAC,UAAU,CAAC;gBAC5D,SAAS,EAAE,SAAS;IAQhC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI;IAW7C,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAQ9D,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;CAU9B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecipeQueueRepository = void 0;
|
|
4
|
-
const firestore_repository_1 = require("./firestore.repository");
|
|
5
|
-
const recipe_1 = require("../../types/recipe");
|
|
6
|
-
const collections_1 = require("../../config/collections");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
|
-
class RecipeQueueRepository extends firestore_repository_1.FirestoreRepository {
|
|
9
|
-
constructor(firestore) {
|
|
10
|
-
super(firestore, collections_1.COLLECTIONS.RecipeQueue, {
|
|
11
|
-
enableTimestamps: true,
|
|
12
|
-
enableSoftDelete: false,
|
|
13
|
-
validateOnWrite: true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
validate(data) {
|
|
17
|
-
const result = recipe_1.RecipeMetaSchema.partial().safeParse(data);
|
|
18
|
-
if (!result.success) {
|
|
19
|
-
throw new errors_1.RepositoryError(errors_1.RepositoryErrorCode.VALIDATION_ERROR, "Recipe queue validation failed", { errors: result.error.issues });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async findBySourceUrl(sourceUrl) {
|
|
23
|
-
var _a;
|
|
24
|
-
const results = await this.findWhere([{ field: "sourceUrl", op: "==", value: sourceUrl }], { limit: 1 });
|
|
25
|
-
return (_a = results[0]) !== null && _a !== void 0 ? _a : null;
|
|
26
|
-
}
|
|
27
|
-
async findBySourceUrlAndUser(sourceUrl, userId) {
|
|
28
|
-
var _a;
|
|
29
|
-
const results = await this.findWhere([
|
|
30
|
-
{ field: "sourceUrl", op: "==", value: sourceUrl },
|
|
31
|
-
{ field: "createdBy", op: "==", value: userId },
|
|
32
|
-
], { limit: 1 });
|
|
33
|
-
return (_a = results[0]) !== null && _a !== void 0 ? _a : null;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.RecipeQueueRepository = RecipeQueueRepository;
|
|
37
|
-
//# sourceMappingURL=recipe-queue.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-queue.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/recipe-queue.repository.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D,+CAAsD;AACtD,0DAAuD;AACvD,qCAAgE;AAEhE,MAAa,qBAAsB,SAAQ,0CAA+B;IACx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
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Firestore } from "firebase-admin/firestore";
|
|
2
|
-
import { FirestoreRepository } from "./firestore.repository";
|
|
3
|
-
import type { RecipeMeta } from "../../types/recipe";
|
|
4
|
-
export declare class RecipeRepository extends FirestoreRepository<RecipeMeta> {
|
|
5
|
-
constructor(firestore: Firestore);
|
|
6
|
-
protected validate(data: Partial<RecipeMeta>): void;
|
|
7
|
-
findBySourceUrl(sourceUrl: string): Promise<RecipeMeta | null>;
|
|
8
|
-
hardDelete(id: string): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=recipe.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/recipe.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,UAAU,CAAC;gBACvD,SAAS,EAAE,SAAS;IAQhC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI;IAW7C,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAQ9D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAe5C"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecipeRepository = void 0;
|
|
4
|
-
const firestore_repository_1 = require("./firestore.repository");
|
|
5
|
-
const recipe_1 = require("../../types/recipe");
|
|
6
|
-
const collections_1 = require("../../config/collections");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
|
-
class RecipeRepository extends firestore_repository_1.FirestoreRepository {
|
|
9
|
-
constructor(firestore) {
|
|
10
|
-
super(firestore, collections_1.COLLECTIONS.Recipes, {
|
|
11
|
-
enableTimestamps: true,
|
|
12
|
-
enableSoftDelete: true,
|
|
13
|
-
validateOnWrite: true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
validate(data) {
|
|
17
|
-
const result = recipe_1.RecipeMetaSchema.partial().safeParse(data);
|
|
18
|
-
if (!result.success) {
|
|
19
|
-
throw new errors_1.RepositoryError(errors_1.RepositoryErrorCode.VALIDATION_ERROR, "Recipe validation failed", { errors: result.error.issues });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async findBySourceUrl(sourceUrl) {
|
|
23
|
-
var _a;
|
|
24
|
-
const results = await this.findWhere([{ field: "sourceUrl", op: "==", value: sourceUrl }], { limit: 1 });
|
|
25
|
-
return (_a = results[0]) !== null && _a !== void 0 ? _a : null;
|
|
26
|
-
}
|
|
27
|
-
async hardDelete(id) {
|
|
28
|
-
const docRef = this.collection.doc(id);
|
|
29
|
-
const contentRef = docRef.collection("content");
|
|
30
|
-
const batch = this.firestore.batch();
|
|
31
|
-
const contentDocs = await contentRef.listDocuments();
|
|
32
|
-
for (const doc of contentDocs) {
|
|
33
|
-
batch.delete(doc);
|
|
34
|
-
}
|
|
35
|
-
batch.delete(docRef);
|
|
36
|
-
await batch.commit();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.RecipeRepository = RecipeRepository;
|
|
40
|
-
//# sourceMappingURL=recipe.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/recipe.repository.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D,+CAAsD;AACtD,0DAAuD;AACvD,qCAAgE;AAEhE,MAAa,gBAAiB,SAAQ,0CAA+B;IACnE,YAAY,S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AAM,CAAC,MAAM,CAAC,CAAC;QAErB,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;CACF;AA3CD,4CA2CC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Firestore } from "firebase-admin/firestore";
|
|
2
|
-
import { FirestoreRepository } from "./firestore.repository";
|
|
3
|
-
import type { Report, ReportStatus, ReportType } from "../../types/report";
|
|
4
|
-
import type { QueryOptions } from "../../types/repository";
|
|
5
|
-
export declare class ReportRepository extends FirestoreRepository<Report> {
|
|
6
|
-
constructor(firestore: Firestore);
|
|
7
|
-
protected validate(data: Partial<Report>): void;
|
|
8
|
-
findByStatus(status: ReportStatus, options?: QueryOptions): Promise<Report[]>;
|
|
9
|
-
findByType(type: ReportType, options?: QueryOptions): Promise<Report[]>;
|
|
10
|
-
findByUserId(userId: string, options?: QueryOptions): Promise<Report[]>;
|
|
11
|
-
findByTargetId(targetId: string, options?: QueryOptions): Promise<Report[]>;
|
|
12
|
-
findPending(options?: QueryOptions): Promise<Report[]>;
|
|
13
|
-
countByUserInPeriod(userId: string, startDate: Date, endDate: Date): Promise<number>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=report.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/report.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI3E,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAExE,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,MAAM,CAAC;gBACnD,SAAS,EAAE,SAAS;IAQhC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI;IAWzC,YAAY,CAChB,MAAM,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,EAAE,CAAC;IAOd,UAAU,CACd,IAAI,EAAE,UAAU,EAChB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,EAAE,CAAC;IAOd,YAAY,CAChB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,EAAE,CAAC;IAOd,cAAc,CAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,EAAE,CAAC;IAOd,WAAW,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAItD,mBAAmB,CACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,IAAI,GACZ,OAAO,CAAC,MAAM,CAAC;CAQnB"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportRepository = void 0;
|
|
4
|
-
const firestore_repository_1 = require("./firestore.repository");
|
|
5
|
-
const report_1 = require("../../types/report");
|
|
6
|
-
const collections_1 = require("../../config/collections");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
|
-
class ReportRepository extends firestore_repository_1.FirestoreRepository {
|
|
9
|
-
constructor(firestore) {
|
|
10
|
-
super(firestore, collections_1.COLLECTIONS.Reports, {
|
|
11
|
-
enableTimestamps: true,
|
|
12
|
-
enableSoftDelete: false,
|
|
13
|
-
validateOnWrite: true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
validate(data) {
|
|
17
|
-
const result = report_1.ReportSchema.partial().safeParse(data);
|
|
18
|
-
if (!result.success) {
|
|
19
|
-
throw new errors_1.RepositoryError(errors_1.RepositoryErrorCode.VALIDATION_ERROR, "Report validation failed", { errors: result.error.issues });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async findByStatus(status, options) {
|
|
23
|
-
return this.findWhere([{ field: "status", op: "==", value: status }], Object.assign({ orderBy: { field: "createdAt", direction: "desc" } }, options));
|
|
24
|
-
}
|
|
25
|
-
async findByType(type, options) {
|
|
26
|
-
return this.findWhere([{ field: "type", op: "==", value: type }], Object.assign({ orderBy: { field: "createdAt", direction: "desc" } }, options));
|
|
27
|
-
}
|
|
28
|
-
async findByUserId(userId, options) {
|
|
29
|
-
return this.findWhere([{ field: "userId", op: "==", value: userId }], Object.assign({ orderBy: { field: "createdAt", direction: "desc" } }, options));
|
|
30
|
-
}
|
|
31
|
-
async findByTargetId(targetId, options) {
|
|
32
|
-
return this.findWhere([{ field: "targetId", op: "==", value: targetId }], Object.assign({ orderBy: { field: "createdAt", direction: "desc" } }, options));
|
|
33
|
-
}
|
|
34
|
-
async findPending(options) {
|
|
35
|
-
return this.findByStatus("pending", options);
|
|
36
|
-
}
|
|
37
|
-
async countByUserInPeriod(userId, startDate, endDate) {
|
|
38
|
-
const clauses = [
|
|
39
|
-
{ field: "userId", op: "==", value: userId },
|
|
40
|
-
{ field: "createdAt", op: ">=", value: startDate },
|
|
41
|
-
{ field: "createdAt", op: "<=", value: endDate },
|
|
42
|
-
];
|
|
43
|
-
return this.count(clauses);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.ReportRepository = ReportRepository;
|
|
47
|
-
//# sourceMappingURL=report.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/report.repository.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D,+CAAkD;AAClD,0DAAuD;AACvD,qCAAgE;AAGhE,MAAa,gBAAiB,SAAQ,0CAA2B;IAC/D,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,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,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,IAC/C,OAAO,EACV,CAAC;IACL,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,OAAsB;QAEtB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,kBACtE,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,IAC/C,OAAO,EACV,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAsB;QACtC,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,MAAc,EACd,SAAe,EACf,OAAa;QAEb,MAAM,OAAO,GAAkB;YAC7B,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;YAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;YAClD,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;SACjD,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;CACF;AA5ED,4CA4EC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Database, Reference } from "firebase-admin/database";
|
|
2
|
-
import type { IRTDBRepository } from "../../types/repository";
|
|
3
|
-
export declare abstract class RTDBRepository<T extends {
|
|
4
|
-
id: string;
|
|
5
|
-
}> implements IRTDBRepository<T> {
|
|
6
|
-
protected readonly database: Database;
|
|
7
|
-
protected readonly path: string;
|
|
8
|
-
protected readonly ref: Reference;
|
|
9
|
-
constructor(database: Database, path: string);
|
|
10
|
-
protected toDocument(entity: Partial<T>): Record<string, unknown>;
|
|
11
|
-
protected fromDocument(id: string, data: Record<string, unknown>): T;
|
|
12
|
-
get(id: string): Promise<T | null>;
|
|
13
|
-
getAll(): Promise<T[]>;
|
|
14
|
-
set(id: string, data: T): Promise<void>;
|
|
15
|
-
update(id: string, data: Partial<T>): Promise<void>;
|
|
16
|
-
remove(id: string): Promise<void>;
|
|
17
|
-
increment(id: string, field: string, delta?: number): Promise<void>;
|
|
18
|
-
decrement(id: string, field: string, delta?: number): Promise<void>;
|
|
19
|
-
multiUpdate(updates: Record<string, unknown>): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=rtdb.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rtdb.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/rtdb.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,8BAAsB,cAAc,CAClC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CACxB,YAAW,eAAe,CAAC,CAAC,CAAC;IAI3B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAJjC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gBAGb,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM;IAKjC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIjE,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC;IAI9D,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAMlC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;IAWtB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKvC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAItE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnE"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RTDBRepository = void 0;
|
|
4
|
-
class RTDBRepository {
|
|
5
|
-
constructor(database, path) {
|
|
6
|
-
this.database = database;
|
|
7
|
-
this.path = path;
|
|
8
|
-
this.ref = database.ref(path);
|
|
9
|
-
}
|
|
10
|
-
toDocument(entity) {
|
|
11
|
-
return Object.assign({}, entity);
|
|
12
|
-
}
|
|
13
|
-
fromDocument(id, data) {
|
|
14
|
-
return Object.assign({ id }, data);
|
|
15
|
-
}
|
|
16
|
-
async get(id) {
|
|
17
|
-
const snapshot = await this.ref.child(id).get();
|
|
18
|
-
if (!snapshot.exists())
|
|
19
|
-
return null;
|
|
20
|
-
return this.fromDocument(id, snapshot.val());
|
|
21
|
-
}
|
|
22
|
-
async getAll() {
|
|
23
|
-
const snapshot = await this.ref.get();
|
|
24
|
-
if (!snapshot.exists())
|
|
25
|
-
return [];
|
|
26
|
-
const results = [];
|
|
27
|
-
snapshot.forEach((child) => {
|
|
28
|
-
results.push(this.fromDocument(child.key, child.val()));
|
|
29
|
-
});
|
|
30
|
-
return results;
|
|
31
|
-
}
|
|
32
|
-
async set(id, data) {
|
|
33
|
-
const docData = this.toDocument(data);
|
|
34
|
-
await this.ref.child(id).set(docData);
|
|
35
|
-
}
|
|
36
|
-
async update(id, data) {
|
|
37
|
-
const docData = this.toDocument(data);
|
|
38
|
-
await this.ref.child(id).update(docData);
|
|
39
|
-
}
|
|
40
|
-
async remove(id) {
|
|
41
|
-
await this.ref.child(id).remove();
|
|
42
|
-
}
|
|
43
|
-
async increment(id, field, delta = 1) {
|
|
44
|
-
const fieldRef = this.ref.child(id).child(field);
|
|
45
|
-
await fieldRef.transaction((current) => (current || 0) + delta);
|
|
46
|
-
}
|
|
47
|
-
async decrement(id, field, delta = 1) {
|
|
48
|
-
await this.increment(id, field, -delta);
|
|
49
|
-
}
|
|
50
|
-
async multiUpdate(updates) {
|
|
51
|
-
await this.ref.update(updates);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.RTDBRepository = RTDBRepository;
|
|
55
|
-
//# sourceMappingURL=rtdb.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rtdb.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/rtdb.repository.ts"],"names":[],"mappings":";;;AAGA,MAAsB,cAAc;IAKlC,YACqB,QAAkB,EAClB,IAAY;QADZ,aAAQ,GAAR,QAAQ,CAAU;QAClB,SAAI,GAAJ,IAAI,CAAQ;QAE/B,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAES,UAAU,CAAC,MAAkB;QACrC,yBAAY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CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,EAAU,EAAE,KAAa,EAAE,QAAgB,CAAC;QAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,EAAU,EAAE,KAAa,EAAE,QAAgB,CAAC;QAC1D,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAgC;QAChD,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;CACF;AA/DD,wCA+DC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Firestore } from "firebase-admin/firestore";
|
|
2
|
-
import { FirestoreRepository } from "./firestore.repository";
|
|
3
|
-
import type { Settings, SettingsInput } from "../../types/settings";
|
|
4
|
-
export declare class SettingsRepository extends FirestoreRepository<Settings> {
|
|
5
|
-
constructor(firestore: Firestore);
|
|
6
|
-
protected validate(data: Partial<Settings>): void;
|
|
7
|
-
findByUserId(userId: string): Promise<Settings | null>;
|
|
8
|
-
createForUser(userId: string, data: Omit<Settings, "id">): Promise<Settings>;
|
|
9
|
-
static createDefaultSettings(): SettingsInput;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=settings.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/settings.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKpE,qBAAa,kBAAmB,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;gBACvD,SAAS,EAAE,SAAS;IAQhC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI;IAW3C,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAItD,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GACzB,OAAO,CAAC,QAAQ,CAAC;IAIpB,MAAM,CAAC,qBAAqB,IAAI,aAAa;CAkB9C"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SettingsRepository = void 0;
|
|
4
|
-
const firestore_repository_1 = require("./firestore.repository");
|
|
5
|
-
const settings_1 = require("../../types/settings");
|
|
6
|
-
const collections_1 = require("../../config/collections");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
|
-
class SettingsRepository extends firestore_repository_1.FirestoreRepository {
|
|
9
|
-
constructor(firestore) {
|
|
10
|
-
super(firestore, collections_1.COLLECTIONS.Settings, {
|
|
11
|
-
enableTimestamps: true,
|
|
12
|
-
enableSoftDelete: false,
|
|
13
|
-
validateOnWrite: true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
validate(data) {
|
|
17
|
-
const result = settings_1.SettingsSchema.partial().safeParse(data);
|
|
18
|
-
if (!result.success) {
|
|
19
|
-
throw new errors_1.RepositoryError(errors_1.RepositoryErrorCode.VALIDATION_ERROR, "Settings validation failed", { errors: result.error.issues });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async findByUserId(userId) {
|
|
23
|
-
return this.findById(userId);
|
|
24
|
-
}
|
|
25
|
-
async createForUser(userId, data) {
|
|
26
|
-
return this.create(data, userId);
|
|
27
|
-
}
|
|
28
|
-
static createDefaultSettings() {
|
|
29
|
-
return {
|
|
30
|
-
allergens: [],
|
|
31
|
-
dietaryTags: [],
|
|
32
|
-
cuisines: [],
|
|
33
|
-
excludedIngredients: [],
|
|
34
|
-
locale: "en",
|
|
35
|
-
temperatureUnit: "celsius",
|
|
36
|
-
measurementSystem: "metric",
|
|
37
|
-
theme: "system",
|
|
38
|
-
notifications: {
|
|
39
|
-
email: true,
|
|
40
|
-
push: true,
|
|
41
|
-
marketing: false,
|
|
42
|
-
weeklyDigest: true,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.SettingsRepository = SettingsRepository;
|
|
48
|
-
//# sourceMappingURL=settings.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/settings.repository.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D,mDAAsD;AACtD,0DAAuD;AACvD,qCAAgE;AAEhE,MAAa,kBAAmB,SAAQ,0CAA6B;IACnE,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,EAAE,yBAAW,CAAC,QAAQ,EAAE;YACrC,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,KAAK;YACvB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAES,QAAQ,CAAC,IAAuB;QACxC,MAAM,MAAM,GAAG,yBAAc,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,wBAAe,CACvB,4BAAmB,CAAC,gBAAgB,EACpC,4BAA4B,EAC5B,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAChC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAc;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,MAAc,EACd,IAA0B;QAE1B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,qBAAqB;QAC1B,OAAO;YACL,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,mBAAmB,EAAE,EAAE;YACvB,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,SAAS;YAC1B,iBAAiB,EAAE,QAAQ;YAC3B,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE;gBACb,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,KAAK;gBAChB,YAAY,EAAE,IAAI;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AAjDD,gDAiDC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Firestore } from "firebase-admin/firestore";
|
|
2
|
-
import { FirestoreRepository } from "./firestore.repository";
|
|
3
|
-
import type { User } from "../../types/iam/user";
|
|
4
|
-
export declare class UserRepository extends FirestoreRepository<User> {
|
|
5
|
-
constructor(firestore: Firestore);
|
|
6
|
-
protected validate(data: Partial<User>): void;
|
|
7
|
-
findByEmail(email: string): Promise<User | null>;
|
|
8
|
-
createWithId(uid: string, data: Omit<User, "id">): Promise<User>;
|
|
9
|
-
emailExists(email: string): Promise<boolean>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=user.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.repository.d.ts","sourceRoot":"","sources":["../../../src/lib/repository/user.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAKjD,qBAAa,cAAe,SAAQ,mBAAmB,CAAC,IAAI,CAAC;gBAC/C,SAAS,EAAE,SAAS;IAQhC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWvC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAQhD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhE,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAInD"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserRepository = void 0;
|
|
4
|
-
const firestore_repository_1 = require("./firestore.repository");
|
|
5
|
-
const user_1 = require("../../types/iam/user");
|
|
6
|
-
const collections_1 = require("../../config/collections");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
|
-
class UserRepository extends firestore_repository_1.FirestoreRepository {
|
|
9
|
-
constructor(firestore) {
|
|
10
|
-
super(firestore, collections_1.COLLECTIONS.Users, {
|
|
11
|
-
enableTimestamps: true,
|
|
12
|
-
enableSoftDelete: true,
|
|
13
|
-
validateOnWrite: true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
validate(data) {
|
|
17
|
-
const result = user_1.UserSchema.partial().safeParse(data);
|
|
18
|
-
if (!result.success) {
|
|
19
|
-
throw new errors_1.RepositoryError(errors_1.RepositoryErrorCode.VALIDATION_ERROR, "User validation failed", { errors: result.error.issues });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async findByEmail(email) {
|
|
23
|
-
var _a;
|
|
24
|
-
const results = await this.findWhere([{ field: "email", op: "==", value: email }], { limit: 1 });
|
|
25
|
-
return (_a = results[0]) !== null && _a !== void 0 ? _a : null;
|
|
26
|
-
}
|
|
27
|
-
async createWithId(uid, data) {
|
|
28
|
-
return this.create(data, uid);
|
|
29
|
-
}
|
|
30
|
-
async emailExists(email) {
|
|
31
|
-
const user = await this.findByEmail(email);
|
|
32
|
-
return user !== null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.UserRepository = UserRepository;
|
|
36
|
-
//# sourceMappingURL=user.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.repository.js","sourceRoot":"","sources":["../../../src/lib/repository/user.repository.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D,+CAAkD;AAClD,0DAAuD;AACvD,qCAAgE;AAEhE,MAAa,cAAe,SAAQ,0CAAyB;IAC3D,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,EAAE,yBAAW,CAAC,KAAK,EAAE;YAClC,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,IAAI;YACtB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAES,QAAQ,CAAC,IAAmB;QACpC,MAAM,MAAM,GAAG,iBAAU,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,wBAAe,CACvB,4BAAmB,CAAC,gBAAgB,EACpC,wBAAwB,EACxB,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAChC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAa;;QAC7B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAClC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAC5C,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACF,OAAO,MAAA,OAAO,CAAC,CAAC,CAAC,mCAAI,IAAI,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,GAAW,EAAE,IAAsB;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAa;QAC7B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,IAAI,KAAK,IAAI,CAAC;IACvB,CAAC;CACF;AApCD,wCAoCC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from "genkit";
|
|
2
|
-
export declare const RecipeFiltersSchema: z.ZodObject<{
|
|
3
|
-
cuisines: z.ZodOptional<z.ZodArray<z.ZodEnum<["african", "american", "brazilian", "british", "caribbean", "chinese", "egyptian", "emirati", "ethiopian", "filipino", "french", "fusion", "german", "greek", "indian", "indonesian", "italian", "japanese", "korean", "lebanese", "malaysian", "mexican", "moroccan", "pakistani", "persian", "russian", "saudi", "spanish", "sudanese", "thai", "turkish", "vietnamese", "other"]>, "many">>;
|
|
4
|
-
dietaryTags: z.ZodOptional<z.ZodArray<z.ZodEnum<["dairy_free", "egg_free", "gluten_free", "halal", "high_protein", "keto", "low_carb", "low_fat", "low_sodium", "low_sugar", "nut_free", "pescatarian", "soy_free", "vegan", "vegetarian"]>, "many">>;
|
|
5
|
-
difficulty: z.ZodOptional<z.ZodEnum<["beginner", "intermediate", "advanced", "expert"]>>;
|
|
6
|
-
excludeIngredients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
-
includeIngredients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
|
-
mealTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["appetizer", "breakfast", "brunch", "dessert", "dinner", "drink", "lunch", "snack"]>, "many">>;
|
|
9
|
-
spiciness: z.ZodOptional<z.ZodEnum<["none", "mild", "medium", "hot"]>>;
|
|
10
|
-
timeLimit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
cuisines?: ("african" | "american" | "brazilian" | "british" | "caribbean" | "chinese" | "egyptian" | "emirati" | "ethiopian" | "filipino" | "french" | "fusion" | "german" | "greek" | "indian" | "indonesian" | "italian" | "japanese" | "korean" | "lebanese" | "malaysian" | "mexican" | "moroccan" | "pakistani" | "persian" | "russian" | "saudi" | "spanish" | "sudanese" | "thai" | "turkish" | "vietnamese" | "other")[] | undefined;
|
|
13
|
-
dietaryTags?: ("dairy_free" | "egg_free" | "gluten_free" | "halal" | "high_protein" | "keto" | "low_carb" | "low_fat" | "low_sodium" | "low_sugar" | "nut_free" | "pescatarian" | "soy_free" | "vegan" | "vegetarian")[] | undefined;
|
|
14
|
-
difficulty?: "beginner" | "intermediate" | "advanced" | "expert" | undefined;
|
|
15
|
-
excludeIngredients?: string[] | undefined;
|
|
16
|
-
includeIngredients?: string[] | undefined;
|
|
17
|
-
mealTypes?: ("appetizer" | "breakfast" | "brunch" | "dessert" | "dinner" | "drink" | "lunch" | "snack")[] | undefined;
|
|
18
|
-
spiciness?: "medium" | "none" | "mild" | "hot" | undefined;
|
|
19
|
-
timeLimit?: number | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
cuisines?: ("african" | "american" | "brazilian" | "british" | "caribbean" | "chinese" | "egyptian" | "emirati" | "ethiopian" | "filipino" | "french" | "fusion" | "german" | "greek" | "indian" | "indonesian" | "italian" | "japanese" | "korean" | "lebanese" | "malaysian" | "mexican" | "moroccan" | "pakistani" | "persian" | "russian" | "saudi" | "spanish" | "sudanese" | "thai" | "turkish" | "vietnamese" | "other")[] | undefined;
|
|
22
|
-
dietaryTags?: ("dairy_free" | "egg_free" | "gluten_free" | "halal" | "high_protein" | "keto" | "low_carb" | "low_fat" | "low_sodium" | "low_sugar" | "nut_free" | "pescatarian" | "soy_free" | "vegan" | "vegetarian")[] | undefined;
|
|
23
|
-
difficulty?: "beginner" | "intermediate" | "advanced" | "expert" | undefined;
|
|
24
|
-
excludeIngredients?: string[] | undefined;
|
|
25
|
-
includeIngredients?: string[] | undefined;
|
|
26
|
-
mealTypes?: ("appetizer" | "breakfast" | "brunch" | "dessert" | "dinner" | "drink" | "lunch" | "snack")[] | undefined;
|
|
27
|
-
spiciness?: "medium" | "none" | "mild" | "hot" | undefined;
|
|
28
|
-
timeLimit?: number | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
export type RecipeFilters = z.infer<typeof RecipeFiltersSchema>;
|
|
31
|
-
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/types/ai/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAS3B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/types/ai/filters.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecipeFiltersSchema = void 0;
|
|
4
|
-
const genkit_1 = require("genkit");
|
|
5
|
-
const enums_1 = require("../enums");
|
|
6
|
-
exports.RecipeFiltersSchema = genkit_1.z.object({
|
|
7
|
-
cuisines: genkit_1.z.array(enums_1.CuisineSchema).optional(),
|
|
8
|
-
dietaryTags: genkit_1.z.array(enums_1.DietaryTagSchema).optional(),
|
|
9
|
-
difficulty: enums_1.DifficultySchema.optional(),
|
|
10
|
-
excludeIngredients: genkit_1.z.array(genkit_1.z.string()).optional(),
|
|
11
|
-
includeIngredients: genkit_1.z.array(genkit_1.z.string()).optional(),
|
|
12
|
-
mealTypes: genkit_1.z.array(enums_1.MealTypeSchema).optional(),
|
|
13
|
-
spiciness: enums_1.SpicinessSchema.optional(),
|
|
14
|
-
timeLimit: genkit_1.z.number().int().min(5).max(180).optional(),
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=filters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/types/ai/filters.ts"],"names":[],"mappings":";;;AAAA,mCAA2B;AAC3B,oCAMkB;AAEL,QAAA,mBAAmB,GAAG,UAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,UAAC,CAAC,KAAK,CAAC,qBAAa,CAAC,CAAC,QAAQ,EAAE;IAC3C,WAAW,EAAE,UAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC,CAAC,QAAQ,EAAE;IACjD,UAAU,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACvC,kBAAkB,EAAE,UAAC,CAAC,KAAK,CAAC,UAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,kBAAkB,EAAE,UAAC,CAAC,KAAK,CAAC,UAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,SAAS,EAAE,UAAC,CAAC,KAAK,CAAC,sBAAc,CAAC,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,uBAAe,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,UAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC"}
|