@cravery/core 0.0.60 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +80 -80
  2. package/dist/types/core/errors.d.ts +2 -2
  3. package/dist/types/core/errors.js +16 -16
  4. package/dist/types/ingredients/ingredient.d.ts +1 -1
  5. package/dist/types/ingredients/ingredient.d.ts.map +1 -1
  6. package/dist/types/recipes/difficulty.d.ts.map +1 -1
  7. package/dist/types/recipes/difficulty.js +1 -6
  8. package/dist/types/recipes/difficulty.js.map +1 -1
  9. package/dist/types/recipes/spiciness.d.ts.map +1 -1
  10. package/dist/types/recipes/spiciness.js +7 -1
  11. package/dist/types/recipes/spiciness.js.map +1 -1
  12. package/dist/types/reports/target.d.ts.map +1 -1
  13. package/dist/types/reports/update.d.ts.map +1 -1
  14. package/dist/types/reports/update_type.d.ts.map +1 -1
  15. package/dist/types/reports/update_type.js +1 -5
  16. package/dist/types/reports/update_type.js.map +1 -1
  17. package/dist/types/subscriptions/store.d.ts.map +1 -1
  18. package/dist/types/subscriptions/store.js +6 -1
  19. package/dist/types/subscriptions/store.js.map +1 -1
  20. package/dist/types/users/index.d.ts +2 -0
  21. package/dist/types/users/index.d.ts.map +1 -1
  22. package/dist/types/users/index.js +2 -0
  23. package/dist/types/users/index.js.map +1 -1
  24. package/dist/types/users/request.d.ts +12 -0
  25. package/dist/types/users/request.d.ts.map +1 -0
  26. package/dist/types/users/request.js +3 -0
  27. package/dist/types/users/request.js.map +1 -0
  28. package/dist/types/users/request_status.d.ts +3 -0
  29. package/dist/types/users/request_status.d.ts.map +1 -0
  30. package/dist/types/users/request_status.js +10 -0
  31. package/dist/types/users/request_status.js.map +1 -0
  32. package/package.json +34 -34
  33. package/src/index.ts +1 -1
  34. package/src/types/core/entity.ts +13 -13
  35. package/src/types/core/entity_status.ts +9 -9
  36. package/src/types/core/errors.ts +119 -119
  37. package/src/types/core/index.ts +8 -8
  38. package/src/types/core/locale.ts +2 -2
  39. package/src/types/core/measurement_system.ts +2 -2
  40. package/src/types/core/price.ts +4 -4
  41. package/src/types/core/theme.ts +2 -2
  42. package/src/types/core/timestamp.ts +4 -4
  43. package/src/types/equipment/category.ts +15 -15
  44. package/src/types/equipment/equipment.ts +12 -12
  45. package/src/types/equipment/equipment_entity.ts +17 -17
  46. package/src/types/equipment/index.ts +4 -4
  47. package/src/types/equipment/user_equipment.ts +9 -9
  48. package/src/types/ingredients/category.ts +28 -28
  49. package/src/types/ingredients/group.ts +8 -8
  50. package/src/types/ingredients/index.ts +6 -6
  51. package/src/types/ingredients/ingredient.ts +16 -16
  52. package/src/types/ingredients/ingredient_entity.ts +21 -21
  53. package/src/types/ingredients/ingredient_section.ts +18 -18
  54. package/src/types/ingredients/user_ingredient.ts +14 -14
  55. package/src/types/recipes/allergen.ts +16 -16
  56. package/src/types/recipes/comment.ts +8 -8
  57. package/src/types/recipes/cuisine.ts +90 -90
  58. package/src/types/recipes/dietary_tag.ts +18 -18
  59. package/src/types/recipes/difficulty.ts +2 -7
  60. package/src/types/recipes/index.ts +14 -14
  61. package/src/types/recipes/instruction.ts +19 -19
  62. package/src/types/recipes/meal_type.ts +13 -13
  63. package/src/types/recipes/nutrition.ts +11 -11
  64. package/src/types/recipes/recipe.ts +81 -81
  65. package/src/types/recipes/recipe_source.ts +2 -2
  66. package/src/types/recipes/recipe_stats.ts +8 -8
  67. package/src/types/recipes/spiciness.ts +8 -2
  68. package/src/types/recipes/temperature.ts +6 -6
  69. package/src/types/recipes/temperature_unit.ts +2 -2
  70. package/src/types/recipes/unit.ts +48 -48
  71. package/src/types/reports/category.ts +1 -1
  72. package/src/types/reports/index.ts +8 -8
  73. package/src/types/reports/priority.ts +7 -7
  74. package/src/types/reports/report.ts +18 -18
  75. package/src/types/reports/status.ts +9 -9
  76. package/src/types/reports/target.ts +23 -19
  77. package/src/types/reports/update.ts +4 -4
  78. package/src/types/reports/update_type.ts +1 -5
  79. package/src/types/settings/notification.ts +6 -6
  80. package/src/types/settings/settings.ts +26 -26
  81. package/src/types/subscriptions/cost.ts +5 -5
  82. package/src/types/subscriptions/index.ts +8 -8
  83. package/src/types/subscriptions/member.ts +11 -11
  84. package/src/types/subscriptions/store.ts +6 -1
  85. package/src/types/subscriptions/subscription.ts +21 -21
  86. package/src/types/subscriptions/subscription_role.ts +2 -2
  87. package/src/types/subscriptions/subscription_status.ts +11 -11
  88. package/src/types/subscriptions/subscription_tier.ts +2 -2
  89. package/src/types/users/index.ts +6 -4
  90. package/src/types/users/profile.ts +8 -8
  91. package/src/types/users/request.ts +12 -0
  92. package/src/types/users/request_status.ts +7 -0
  93. package/src/types/users/user.ts +11 -11
  94. package/src/types/users/user_role.ts +8 -8
@@ -1,16 +1,16 @@
1
- export const ALLERGEN_VALUES = [
2
- "celery",
3
- "dairy",
4
- "eggs",
5
- "fish",
6
- "gluten",
7
- "lupin",
8
- "mustard",
9
- "nuts",
10
- "peanuts",
11
- "sesame",
12
- "shellfish",
13
- "soy",
14
- "sulfites",
15
- ] as const;
16
- export type Allergen = (typeof ALLERGEN_VALUES)[number];
1
+ export const ALLERGEN_VALUES = [
2
+ "celery",
3
+ "dairy",
4
+ "eggs",
5
+ "fish",
6
+ "gluten",
7
+ "lupin",
8
+ "mustard",
9
+ "nuts",
10
+ "peanuts",
11
+ "sesame",
12
+ "shellfish",
13
+ "soy",
14
+ "sulfites",
15
+ ] as const;
16
+ export type Allergen = (typeof ALLERGEN_VALUES)[number];
@@ -1,8 +1,8 @@
1
- import { Entity } from "../core";
2
-
3
- export interface RecipeComment extends Entity {
4
- recipeId: string;
5
- userId: string;
6
- content: string;
7
- parentId?: string;
8
- }
1
+ import { Entity } from "../core";
2
+
3
+ export interface RecipeComment extends Entity {
4
+ recipeId: string;
5
+ userId: string;
6
+ content: string;
7
+ parentId?: string;
8
+ }
@@ -1,90 +1,90 @@
1
- export const CUISINE_VALUES = [
2
- // East Asia
3
- "chinese",
4
- "japanese",
5
- "korean",
6
-
7
- // Southeast Asia
8
- "filipino",
9
- "indonesian",
10
- "malaysian",
11
- "singaporean",
12
- "thai",
13
- "vietnamese",
14
-
15
- // South Asia
16
- "bangladeshi",
17
- "indian",
18
- "pakistani",
19
- "sri_lankan",
20
-
21
- // Middle East
22
- "emirati",
23
- "iraqi",
24
- "jordanian",
25
- "lebanese",
26
- "palestinian",
27
- "saudi",
28
- "syrian",
29
- "yemeni",
30
-
31
- // Central Asia & Caucasus
32
- "persian",
33
- "turkish",
34
-
35
- // North Africa
36
- "algerian",
37
- "egyptian",
38
- "moroccan",
39
- "sudanese",
40
- "tunisian",
41
-
42
- // Sub-Saharan Africa
43
- "ethiopian",
44
- "ghanaian",
45
- "kenyan",
46
- "nigerian",
47
- "south_african",
48
-
49
- // Western Europe
50
- "british",
51
- "french",
52
- "german",
53
- "irish",
54
- "italian",
55
- "portuguese",
56
- "spanish",
57
-
58
- // Northern Europe
59
- "danish",
60
- "swedish",
61
-
62
- // Eastern Europe
63
- "greek",
64
- "hungarian",
65
- "polish",
66
- "russian",
67
- "ukrainian",
68
-
69
- // North America
70
- "american",
71
- "cajun",
72
- "mexican",
73
-
74
- // Caribbean
75
- "cuban",
76
- "jamaican",
77
- "puerto_rican",
78
-
79
- // South America
80
- "argentinian",
81
- "brazilian",
82
- "colombian",
83
- "peruvian",
84
- "venezuelan",
85
-
86
- // Oceania
87
- "australian",
88
- ] as const;
89
-
90
- export type Cuisine = (typeof CUISINE_VALUES)[number];
1
+ export const CUISINE_VALUES = [
2
+ // East Asia
3
+ "chinese",
4
+ "japanese",
5
+ "korean",
6
+
7
+ // Southeast Asia
8
+ "filipino",
9
+ "indonesian",
10
+ "malaysian",
11
+ "singaporean",
12
+ "thai",
13
+ "vietnamese",
14
+
15
+ // South Asia
16
+ "bangladeshi",
17
+ "indian",
18
+ "pakistani",
19
+ "sri_lankan",
20
+
21
+ // Middle East
22
+ "emirati",
23
+ "iraqi",
24
+ "jordanian",
25
+ "lebanese",
26
+ "palestinian",
27
+ "saudi",
28
+ "syrian",
29
+ "yemeni",
30
+
31
+ // Central Asia & Caucasus
32
+ "persian",
33
+ "turkish",
34
+
35
+ // North Africa
36
+ "algerian",
37
+ "egyptian",
38
+ "moroccan",
39
+ "sudanese",
40
+ "tunisian",
41
+
42
+ // Sub-Saharan Africa
43
+ "ethiopian",
44
+ "ghanaian",
45
+ "kenyan",
46
+ "nigerian",
47
+ "south_african",
48
+
49
+ // Western Europe
50
+ "british",
51
+ "french",
52
+ "german",
53
+ "irish",
54
+ "italian",
55
+ "portuguese",
56
+ "spanish",
57
+
58
+ // Northern Europe
59
+ "danish",
60
+ "swedish",
61
+
62
+ // Eastern Europe
63
+ "greek",
64
+ "hungarian",
65
+ "polish",
66
+ "russian",
67
+ "ukrainian",
68
+
69
+ // North America
70
+ "american",
71
+ "cajun",
72
+ "mexican",
73
+
74
+ // Caribbean
75
+ "cuban",
76
+ "jamaican",
77
+ "puerto_rican",
78
+
79
+ // South America
80
+ "argentinian",
81
+ "brazilian",
82
+ "colombian",
83
+ "peruvian",
84
+ "venezuelan",
85
+
86
+ // Oceania
87
+ "australian",
88
+ ] as const;
89
+
90
+ export type Cuisine = (typeof CUISINE_VALUES)[number];
@@ -1,18 +1,18 @@
1
- export const DIETARY_TAG_VALUES = [
2
- "dairy_free",
3
- "egg_free",
4
- "gluten_free",
5
- "halal",
6
- "high_protein",
7
- "keto",
8
- "low_carb",
9
- "low_fat",
10
- "low_sodium",
11
- "low_sugar",
12
- "nut_free",
13
- "pescatarian",
14
- "soy_free",
15
- "vegan",
16
- "vegetarian",
17
- ] as const;
18
- export type DietaryTag = (typeof DIETARY_TAG_VALUES)[number];
1
+ export const DIETARY_TAG_VALUES = [
2
+ "dairy_free",
3
+ "egg_free",
4
+ "gluten_free",
5
+ "halal",
6
+ "high_protein",
7
+ "keto",
8
+ "low_carb",
9
+ "low_fat",
10
+ "low_sodium",
11
+ "low_sugar",
12
+ "nut_free",
13
+ "pescatarian",
14
+ "soy_free",
15
+ "vegan",
16
+ "vegetarian",
17
+ ] as const;
18
+ export type DietaryTag = (typeof DIETARY_TAG_VALUES)[number];
@@ -1,7 +1,2 @@
1
- export const DIFFICULTY_VALUES = [
2
- "easy",
3
- "medium",
4
- "hard",
5
- "expert",
6
- ] as const;
7
- export type Difficulty = (typeof DIFFICULTY_VALUES)[number];
1
+ export const DIFFICULTY_VALUES = ["easy", "medium", "hard", "expert"] as const;
2
+ export type Difficulty = (typeof DIFFICULTY_VALUES)[number];
@@ -1,14 +1,14 @@
1
- export * from "./allergen";
2
- export * from "./comment";
3
- export * from "./cuisine";
4
- export * from "./dietary_tag";
5
- export * from "./difficulty";
6
- export * from "./instruction";
7
- export * from "./meal_type";
8
- export * from "./nutrition";
9
- export * from "./recipe_source";
10
- export * from "./recipe";
11
- export * from "./spiciness";
12
- export * from "./temperature_unit";
13
- export * from "./temperature";
14
- export * from "./unit";
1
+ export * from "./allergen";
2
+ export * from "./comment";
3
+ export * from "./cuisine";
4
+ export * from "./dietary_tag";
5
+ export * from "./difficulty";
6
+ export * from "./instruction";
7
+ export * from "./meal_type";
8
+ export * from "./nutrition";
9
+ export * from "./recipe_source";
10
+ export * from "./recipe";
11
+ export * from "./spiciness";
12
+ export * from "./temperature_unit";
13
+ export * from "./temperature";
14
+ export * from "./unit";
@@ -1,19 +1,19 @@
1
- import { Temperature } from "./temperature";
2
-
3
- export interface InstructionMeta {
4
- step: number;
5
- duration?: number;
6
- equipment?: string[];
7
- ingredients?: string[];
8
- optional?: boolean;
9
- temperature?: Temperature;
10
- }
11
-
12
- export interface InstructionContent {
13
- step: number;
14
- text: string;
15
- tip?: string;
16
- warning?: string;
17
- }
18
-
19
- export interface Instruction extends InstructionMeta, InstructionContent {}
1
+ import { Temperature } from "./temperature";
2
+
3
+ export interface InstructionMeta {
4
+ step: number;
5
+ duration?: number;
6
+ equipment?: string[];
7
+ ingredients?: string[];
8
+ optional?: boolean;
9
+ temperature?: Temperature;
10
+ }
11
+
12
+ export interface InstructionContent {
13
+ step: number;
14
+ text: string;
15
+ tip?: string;
16
+ warning?: string;
17
+ }
18
+
19
+ export interface Instruction extends InstructionMeta, InstructionContent {}
@@ -1,13 +1,13 @@
1
- export const MEAL_TYPE_VALUES = [
2
- "appetizer",
3
- "breakfast",
4
- "brunch",
5
- "dessert",
6
- "dinner",
7
- "drink",
8
- "lunch",
9
- "sauce",
10
- "side",
11
- "snack",
12
- ] as const;
13
- export type MealType = (typeof MEAL_TYPE_VALUES)[number];
1
+ export const MEAL_TYPE_VALUES = [
2
+ "appetizer",
3
+ "breakfast",
4
+ "brunch",
5
+ "dessert",
6
+ "dinner",
7
+ "drink",
8
+ "lunch",
9
+ "sauce",
10
+ "side",
11
+ "snack",
12
+ ] as const;
13
+ export type MealType = (typeof MEAL_TYPE_VALUES)[number];
@@ -1,11 +1,11 @@
1
- export interface Nutrition {
2
- calories: number;
3
- carbs?: number;
4
- cholesterol?: number;
5
- fat?: number;
6
- fiber?: number;
7
- protein?: number;
8
- saturatedFat?: number;
9
- sodium?: number;
10
- sugar?: number;
11
- }
1
+ export interface Nutrition {
2
+ calories: number;
3
+ carbs?: number;
4
+ cholesterol?: number;
5
+ fat?: number;
6
+ fiber?: number;
7
+ protein?: number;
8
+ saturatedFat?: number;
9
+ sodium?: number;
10
+ sugar?: number;
11
+ }
@@ -1,81 +1,81 @@
1
- import { Entity } from "../core";
2
- import { Locale } from "../core/locale";
3
- import { Allergen } from "./allergen";
4
- import { Cuisine } from "./cuisine";
5
- import { DietaryTag } from "./dietary_tag";
6
- import { Difficulty } from "./difficulty";
7
- import { Equipment, EquipmentContent, EquipmentMeta } from "../equipment";
8
- import {
9
- IngredientSection,
10
- IngredientSectionContent,
11
- IngredientSectionMeta,
12
- } from "../ingredients";
13
- import {
14
- Instruction,
15
- InstructionContent,
16
- InstructionMeta,
17
- } from "./instruction";
18
- import { MealType } from "./meal_type";
19
- import { Nutrition } from "./nutrition";
20
- import { RecipeSource } from "./recipe_source";
21
- import { Spiciness } from "./spiciness";
22
-
23
- export interface RecipeMeta extends Entity {
24
- allergens: Allergen[];
25
- confidence: number;
26
- createdBy: string;
27
- cuisines: Cuisine[];
28
- dietaryTags: DietaryTag[];
29
- difficulty: Difficulty;
30
- equipment?: EquipmentMeta[];
31
- images?: string[];
32
- ingredientSections: IngredientSectionMeta[];
33
- instructions: InstructionMeta[];
34
- mealTypes: MealType[];
35
- nutrition?: Nutrition;
36
- originalLocale: Locale;
37
- searchTerms?: string[];
38
- servings: number;
39
- source: RecipeSource;
40
- sourceUrl?: string;
41
- spiciness: Spiciness;
42
- time: number;
43
- videoUrl?: string;
44
- }
45
-
46
- export interface RecipeContent {
47
- description: string;
48
- equipment?: EquipmentContent[];
49
- ingredientSections: IngredientSectionContent[];
50
- instructions: InstructionContent[];
51
- locale: Locale;
52
- tips?: string[];
53
- title: string;
54
- }
55
-
56
- export interface Recipe extends Entity {
57
- allergens: Allergen[];
58
- confidence: number;
59
- createdBy: string;
60
- cuisines: Cuisine[];
61
- description: string;
62
- dietaryTags: DietaryTag[];
63
- difficulty: Difficulty;
64
- equipment?: Equipment[];
65
- images?: string[];
66
- ingredientSections: IngredientSection[];
67
- instructions: Instruction[];
68
- locale: Locale;
69
- mealTypes: MealType[];
70
- nutrition?: Nutrition;
71
- originalLocale: Locale;
72
- searchTerms?: string[];
73
- servings: number;
74
- source: RecipeSource;
75
- sourceUrl?: string;
76
- spiciness: Spiciness;
77
- time: number;
78
- tips?: string[];
79
- title: string;
80
- videoUrl?: string;
81
- }
1
+ import { Entity } from "../core";
2
+ import { Locale } from "../core/locale";
3
+ import { Allergen } from "./allergen";
4
+ import { Cuisine } from "./cuisine";
5
+ import { DietaryTag } from "./dietary_tag";
6
+ import { Difficulty } from "./difficulty";
7
+ import { Equipment, EquipmentContent, EquipmentMeta } from "../equipment";
8
+ import {
9
+ IngredientSection,
10
+ IngredientSectionContent,
11
+ IngredientSectionMeta,
12
+ } from "../ingredients";
13
+ import {
14
+ Instruction,
15
+ InstructionContent,
16
+ InstructionMeta,
17
+ } from "./instruction";
18
+ import { MealType } from "./meal_type";
19
+ import { Nutrition } from "./nutrition";
20
+ import { RecipeSource } from "./recipe_source";
21
+ import { Spiciness } from "./spiciness";
22
+
23
+ export interface RecipeMeta extends Entity {
24
+ allergens: Allergen[];
25
+ confidence: number;
26
+ createdBy: string;
27
+ cuisines: Cuisine[];
28
+ dietaryTags: DietaryTag[];
29
+ difficulty: Difficulty;
30
+ equipment?: EquipmentMeta[];
31
+ images?: string[];
32
+ ingredientSections: IngredientSectionMeta[];
33
+ instructions: InstructionMeta[];
34
+ mealTypes: MealType[];
35
+ nutrition?: Nutrition;
36
+ originalLocale: Locale;
37
+ searchTerms?: string[];
38
+ servings: number;
39
+ source: RecipeSource;
40
+ sourceUrl?: string;
41
+ spiciness: Spiciness;
42
+ time: number;
43
+ videoUrl?: string;
44
+ }
45
+
46
+ export interface RecipeContent {
47
+ description: string;
48
+ equipment?: EquipmentContent[];
49
+ ingredientSections: IngredientSectionContent[];
50
+ instructions: InstructionContent[];
51
+ locale: Locale;
52
+ tips?: string[];
53
+ title: string;
54
+ }
55
+
56
+ export interface Recipe extends Entity {
57
+ allergens: Allergen[];
58
+ confidence: number;
59
+ createdBy: string;
60
+ cuisines: Cuisine[];
61
+ description: string;
62
+ dietaryTags: DietaryTag[];
63
+ difficulty: Difficulty;
64
+ equipment?: Equipment[];
65
+ images?: string[];
66
+ ingredientSections: IngredientSection[];
67
+ instructions: Instruction[];
68
+ locale: Locale;
69
+ mealTypes: MealType[];
70
+ nutrition?: Nutrition;
71
+ originalLocale: Locale;
72
+ searchTerms?: string[];
73
+ servings: number;
74
+ source: RecipeSource;
75
+ sourceUrl?: string;
76
+ spiciness: Spiciness;
77
+ time: number;
78
+ tips?: string[];
79
+ title: string;
80
+ videoUrl?: string;
81
+ }
@@ -1,2 +1,2 @@
1
- export const RECIPE_SOURCE_VALUES = ["image", "text", "url"] as const;
2
- export type RecipeSource = (typeof RECIPE_SOURCE_VALUES)[number];
1
+ export const RECIPE_SOURCE_VALUES = ["image", "text", "url"] as const;
2
+ export type RecipeSource = (typeof RECIPE_SOURCE_VALUES)[number];
@@ -1,8 +1,8 @@
1
- export interface RecipeStats {
2
- comments: number;
3
- cooks: number;
4
- ratingCount: number;
5
- ratingSum: number;
6
- saves: number;
7
- shares: number;
8
- }
1
+ export interface RecipeStats {
2
+ comments: number;
3
+ cooks: number;
4
+ ratingCount: number;
5
+ ratingSum: number;
6
+ saves: number;
7
+ shares: number;
8
+ }
@@ -1,2 +1,8 @@
1
- export const SPICINESS_VALUES = ["none", "mild", "medium", "hot", "extreme"] as const;
2
- export type Spiciness = (typeof SPICINESS_VALUES)[number];
1
+ export const SPICINESS_VALUES = [
2
+ "none",
3
+ "mild",
4
+ "medium",
5
+ "hot",
6
+ "extreme",
7
+ ] as const;
8
+ export type Spiciness = (typeof SPICINESS_VALUES)[number];
@@ -1,6 +1,6 @@
1
- import { TemperatureUnit } from "./temperature_unit";
2
-
3
- export interface Temperature {
4
- unit: TemperatureUnit;
5
- value: number;
6
- }
1
+ import { TemperatureUnit } from "./temperature_unit";
2
+
3
+ export interface Temperature {
4
+ unit: TemperatureUnit;
5
+ value: number;
6
+ }
@@ -1,2 +1,2 @@
1
- export const TEMPERATURE_UNIT_VALUES = ["celsius", "fahrenheit"] as const;
2
- export type TemperatureUnit = (typeof TEMPERATURE_UNIT_VALUES)[number];
1
+ export const TEMPERATURE_UNIT_VALUES = ["celsius", "fahrenheit"] as const;
2
+ export type TemperatureUnit = (typeof TEMPERATURE_UNIT_VALUES)[number];